UNPKG

yuanian-ai-component

Version:
1 lines 931 kB
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var i in n)("object"==typeof exports?exports:t)[i]=n[i]}}(window,(function(){return n={},t.m=e=[function(t,e,n){"use strict";t.exports=n(6)},function(t,e,n){function i(t){if(a[t])return a[t].exports;var e=a[t]={i:t,l:!1,exports:{}};return r[t].call(e.exports,e,e.exports,i),e.l=!0,e.exports}var r,a;window,t.exports=(a={},i.m=r=[function(t,e){var n,i={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},r={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},a=Object.prototype.toString,o=Array.prototype,s=o.forEach,l=o.filter,u=o.slice,c=o.map,h=o.reduce,d={};function f(t){if(null==t||"object"!=typeof t)return t;var e=t,n=a.call(t);if("[object Array]"===n){if(!M(t)){e=[];for(var o=0,s=t.length;o<s;o++)e[o]=f(t[o])}}else if(r[n]){if(!M(t)){var l=t.constructor;if(t.constructor.from)e=l.from(t);else for(e=new l(t.length),o=0,s=t.length;o<s;o++)e[o]=f(t[o])}}else if(!i[n]&&!M(t)&&!w(t))for(var u in e={},t)t.hasOwnProperty(u)&&(e[u]=f(t[u]));return e}function p(t,e,n){if(!_(e)||!_(t))return n?f(e):t;for(var i in e)if(e.hasOwnProperty(i)){var r=t[i],a=e[i];!_(a)||!_(r)||x(a)||x(r)||w(a)||w(r)||b(a)||b(r)||M(a)||M(r)?!n&&i in t||(t[i]=f(e[i])):p(r,a,n)}return t}function g(t,e,n){for(var i in e)e.hasOwnProperty(i)&&(n?null!=e[i]:null==t[i])&&(t[i]=e[i]);return t}function m(){return d.createCanvas()}function v(t,e,n){if(t&&e)if(t.forEach&&t.forEach===s)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,r=t.length;i<r;i++)e.call(n,t[i],i,t);else for(var a in t)t.hasOwnProperty(a)&&e.call(n,t[a],a,t)}function y(t,e){var n=u.call(arguments,2);return function(){return t.apply(e,n.concat(u.call(arguments)))}}function x(t){return"[object Array]"===a.call(t)}function _(t){var e=typeof t;return"function"==e||!!t&&"object"==e}function b(t){return!!i[a.call(t)]}function w(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}d.createCanvas=function(){return document.createElement("canvas")};var S="__ec_primitive__";function M(t){return t[S]}function I(t){var e=x(t);this.data={};var n=this;function i(t,i){e?n.set(t,i):n.set(i,t)}t instanceof I?t.each(i):t&&v(t,i)}I.prototype={constructor:I,get:function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},set:function(t,e){return this.data[t]=e},each:function(t,e){for(var n in void 0!==e&&(t=y(t,e)),this.data)this.data.hasOwnProperty(n)&&t(this.data[n],n)},removeKey:function(t){delete this.data[t]}},e.$override=function(t,e){"createCanvas"===t&&(n=null),d[t]=e},e.clone=f,e.merge=p,e.mergeAll=function(t,e){for(var n=t[0],i=1,r=t.length;i<r;i++)n=p(n,t[i],e);return n},e.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},e.defaults=g,e.createCanvas=m,e.getContext=function(){return n=n||m().getContext("2d")},e.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var n=0,i=t.length;n<i;n++)if(t[n]===e)return n}return-1},e.inherits=function(t,e){var n=t.prototype;function i(){}for(var r in i.prototype=e.prototype,t.prototype=new i,n)n.hasOwnProperty(r)&&(t.prototype[r]=n[r]);(t.prototype.constructor=t).superClass=e},e.mixin=function(t,e,n){g(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,n)},e.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},e.each=v,e.map=function(t,e,n){if(t&&e){if(t.map&&t.map===c)return t.map(e,n);for(var i=[],r=0,a=t.length;r<a;r++)i.push(e.call(n,t[r],r,t));return i}},e.reduce=function(t,e,n,i){if(t&&e){if(t.reduce&&t.reduce===h)return t.reduce(e,n,i);for(var r=0,a=t.length;r<a;r++)n=e.call(i,n,t[r],r,t);return n}},e.filter=function(t,e,n){if(t&&e){if(t.filter&&t.filter===l)return t.filter(e,n);for(var i=[],r=0,a=t.length;r<a;r++)e.call(n,t[r],r,t)&&i.push(t[r]);return i}},e.find=function(t,e,n){if(t&&e)for(var i=0,r=t.length;i<r;i++)if(e.call(n,t[i],i,t))return t[i]},e.bind=y,e.curry=function(t){var e=u.call(arguments,1);return function(){return t.apply(this,e.concat(u.call(arguments)))}},e.isArray=x,e.isFunction=function(t){return"function"==typeof t},e.isString=function(t){return"[object String]"===a.call(t)},e.isObject=_,e.isBuiltInObject=b,e.isTypedArray=function(t){return!!r[a.call(t)]},e.isDom=w,e.eqNaN=function(t){return t!=t},e.retrieve=function(t){for(var e=0,n=arguments.length;e<n;e++)if(null!=arguments[e])return arguments[e]},e.retrieve2=function(t,e){return null!=t?t:e},e.retrieve3=function(t,e,n){return null!=t?t:null!=e?e:n},e.slice=function(){return Function.call.apply(u,arguments)},e.normalizeCssArray=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},e.assert=function(t,e){if(!t)throw new Error(e)},e.trim=function(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},e.setAsPrimitive=function(t){t[S]=!0},e.isPrimitive=M,e.createHashMap=function(t){return new I(t)},e.concatArray=function(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];var r=t.length;for(i=0;i<e.length;i++)n[i+r]=e[i];return n},e.noop=function(){}},function(t,e,n){n(5).__DEV__;var i=n(68),r=n(0),a=n(23),o=n(11),s=n(87),l=n(35),u=n(140),c=n(153),h=n(20),d=n(264),f=n(265),p=n(267),g=n(13),m=n(14),v=n(74),y=n(24),x=n(2),_=n(4),b=n(30).throttle,w=n(268),S=n(269),M=n(270),I=n(271),A=n(272),T=n(273);n(154);var C=n(96),D=r.assert,L=r.each,P=r.isFunction,k=r.isObject,O=g.parseClassType,R="__flagInMainProcess",E="__optionUpdated",N=/^[a-zA-Z0-9_]+$/;function z(t,e){return function(n,i,r){e||!this._disposed?(n=n&&n.toLowerCase(),l.prototype[t].call(this,n,i,r)):this.id}}function B(){l.call(this)}function V(t,e,n){n=n||{},"string"==typeof e&&(e=ut[e]),this.id,this.group,this._dom=t;var a=this._zr=i.init(t,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height});this._throttledZrFlush=b(r.bind(a.flush,a),17),(e=r.clone(e))&&f(e,!0),this._theme=e,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new h;var o,u,d,p,g=this._api=(u=(o=this)._coordSysMgr,r.extend(new c(o),{getCoordinateSystems:r.bind(u.getCoordinateSystems,u),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return o._model.getComponent(e.mainType,e.index);t=t.parent}}}));function m(t,e){return t.__prio-e.__prio}s(lt,m),s(at,m),this._scheduler=new I(this,g,at,lt),l.call(this,this._ecEventProcessor=new nt),this._messageCenter=new B,this._initEvents(),this.resize=r.bind(this.resize,this),this._pendingActions=[],a.animation.on("frame",this._onframe,this),p=this,(d=a).on("rendered",(function(){p.trigger("rendered"),!d.animation.isFinished()||p[E]||p._scheduler.unfinished||p._pendingActions.length||p.trigger("finished")})),r.setAsPrimitive(this)}B.prototype.on=z("on",!0),B.prototype.off=z("off",!0),B.prototype.one=z("one",!0),r.mixin(B,l);var G=V.prototype;function F(t,e,n){if(this._disposed)this.id;else{var i,r=this._model,a=this._coordSysMgr.getCoordinateSystems();e=_.parseFinder(r,e);for(var o=0;o<a.length;o++){var s=a[o];if(s[t]&&null!=(i=s[t](r,e,n)))return i}}}G._onframe=function(){if(!this._disposed){var t=this._scheduler;if(this[E]){var e=this[E].silent;this[R]=!0,H(this),W.update.call(this),this[R]=!1,this[E]=!1,Y.call(this,e),X.call(this,e)}else if(t.unfinished){var n=1,i=this._model;this._api,t.unfinished=!1;do{var r=+new Date;t.performSeriesTasks(i),t.performDataProcessorTasks(i),Z(this,i),t.performVisualTasks(i),Q(this,this._model,0,"remain"),n-=new Date-r}while(0<n&&t.unfinished);t.unfinished||this._zr.flush()}}},G.getDom=function(){return this._dom},G.getZr=function(){return this._zr},G.setOption=function(t,e,n){if(this._disposed)this.id;else{var i;if(k(e)&&(n=e.lazyUpdate,i=e.silent,e=e.notMerge),this[R]=!0,!this._model||e){var r=new d(this._api),a=this._theme,o=this._model=new u;o.scheduler=this._scheduler,o.init(null,null,a,r)}this._model.setOption(t,ot),n?(this[E]={silent:i},this[R]=!1):(H(this),W.update.call(this),this._zr.flush(),this[E]=!1,this[R]=!1,Y.call(this,i),X.call(this,i))}},G.setTheme=function(){},G.getModel=function(){return this._model},G.getOption=function(){return this._model&&this._model.getOption()},G.getWidth=function(){return this._zr.getWidth()},G.getHeight=function(){return this._zr.getHeight()},G.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},G.getRenderedCanvas=function(t){if(o.canvasSupported)return(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},G.getSvgDataUrl=function(){if(o.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return r.each(e,(function(t){t.stopAnimation(!0)})),t.painter.pathToDataUrl()}},G.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;L(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var a="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return L(i,(function(t){t.group.ignore=!1})),a}this.id},G.getConnectedDataURL=function(t){if(this._disposed)this.id;else if(o.canvasSupported){var e=this.group,n=Math.min,a=Math.max;if(dt[e]){var s=1/0,l=1/0,u=-1/0,c=-1/0,h=[],d=t&&t.pixelRatio||1;r.each(ht,(function(i,o){if(i.group===e){var d=i.getRenderedCanvas(r.clone(t)),f=i.getDom().getBoundingClientRect();s=n(f.left,s),l=n(f.top,l),u=a(f.right,u),c=a(f.bottom,c),h.push({dom:d,left:f.left,top:f.top})}}));var f=(u*=d)-(s*=d),p=(c*=d)-(l*=d),g=r.createCanvas();g.width=f,g.height=p;var m=i.init(g);return t.connectedBackgroundColor&&m.add(new x.Rect({shape:{x:0,y:0,width:f,height:p},style:{fill:t.connectedBackgroundColor}})),L(h,(function(t){var e=new x.Image({style:{x:t.left*d-s,y:t.top*d-l,image:t.dom}});m.add(e)})),m.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},G.convertToPixel=r.curry(F,"convertToPixel"),G.convertFromPixel=r.curry(F,"convertFromPixel"),G.containPixel=function(t,e){if(!this._disposed){var n,i=this._model;return t=_.parseFinder(i,t),r.each(t,(function(t,i){0<=i.indexOf("Models")&&r.each(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n|=!!r.containPoint(e);else if("seriesModels"===i){var a=this._chartsMap[t.__viewId];a&&a.containPoint&&(n|=a.containPoint(e,t))}}),this)}),this),!!n}this.id},G.getVisual=function(t,e){var n=this._model,i=(t=_.parseFinder(n,t,{defaultMainType:"series"})).seriesModel.getData(),r=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?i.indexOfRawIndex(t.dataIndex):null;return null!=r?i.getItemVisual(r,e):i.getVisual(e)},G.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},G.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var W={prepareAndUpdate:function(t){H(this),W.update.call(this,t)},update:function(t){var e=this._model,n=this._api,i=this._zr,r=this._coordSysMgr,s=this._scheduler;if(e){s.restoreData(e,t),s.performSeriesTasks(e),r.create(e,n),s.performDataProcessorTasks(e,t),Z(this,e),r.update(e,n),J(e),s.performVisualTasks(e,t),K(this,e,n,t);var l=e.get("backgroundColor")||"transparent";if(o.canvasSupported)i.setBackgroundColor(l);else{var u=a.parse(l);l=a.stringify(u,"rgb"),0===u[3]&&(l="transparent")}$(e,n)}},updateTransform:function(t){var e=this._model,n=this,i=this._api;if(e){var a=[];e.eachComponent((function(r,o){var s=n.getViewOfComponentModel(o);if(s&&s.__alive)if(s.updateTransform){var l=s.updateTransform(o,e,i,t);l&&l.update&&a.push(s)}else a.push(s)}));var o=r.createHashMap();e.eachSeries((function(r){var a=n._chartsMap[r.__viewId];if(a.updateTransform){var s=a.updateTransform(r,e,i,t);s&&s.update&&o.set(r.uid,1)}else o.set(r.uid,1)})),J(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0,dirtyMap:o}),Q(n,e,0,t,o),$(e,this._api)}},updateView:function(t){var e=this._model;e&&(y.markUpdateMethod(t,"updateView"),J(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),K(this,this._model,this._api,t),$(e,this._api))},updateVisual:function(t){W.update.call(this,t)},updateLayout:function(t){W.update.call(this,t)}};function H(t){var e=t._model,n=t._scheduler;n.restorePipelines(e),n.prepareStageTasks(),q(t,"component",e,n),q(t,"chart",e,n),n.plan()}function j(t,e,n,i,a){var o=t._model;if(i){var s={};s[i+"Id"]=n[i+"Id"],s[i+"Index"]=n[i+"Index"],s[i+"Name"]=n[i+"Name"];var l={mainType:i,query:s};a&&(l.subType=a);var u=n.excludeSeriesId;null!=u&&(u=r.createHashMap(_.normalizeToArray(u))),o&&o.eachComponent(l,(function(e){u&&null!=u.get(e.id)||c(t["series"===i?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else L(t._componentsViews.concat(t._chartsViews),c);function c(i){i&&i.__alive&&i[e]&&i[e](i.__model,o,t._api,n)}}function Z(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries((function(t){i.updateStreamModes(t,n[t.__viewId])}))}function U(t,e){var n=t.type,i=t.escapeConnect,a=it[n],o=a.actionInfo,s=(o.update||"update").split(":"),l=s.pop();s=null!=s[0]&&O(s[0]),this[R]=!0;var u=[t],c=!1;t.batch&&(c=!0,u=r.map(t.batch,(function(e){return(e=r.defaults(r.extend({},e),t)).batch=null,e})));var h,d=[],f="highlight"===n||"downplay"===n;L(u,(function(t){(h=(h=a.action(t,this._model,this._api))||r.extend({},t)).type=o.event||h.type,d.push(h),f?j(this,l,t,"series"):s&&j(this,l,t,s.main,s.sub)}),this),"none"===l||f||s||(this[E]?(H(this),W.update.call(this,t),this[E]=!1):W[l].call(this,t)),h=c?{type:o.event||n,escapeConnect:i,batch:d}:d[0],this[R]=!1,e||this._messageCenter.trigger(h.type,h)}function Y(t){for(var e=this._pendingActions;e.length;){var n=e.shift();U.call(this,n,t)}}function X(t){t||this.trigger("updated")}function q(t,e,n,i){for(var r="component"===e,a=r?t._componentsViews:t._chartsViews,o=r?t._componentsMap:t._chartsMap,s=t._zr,l=t._api,u=0;u<a.length;u++)a[u].__alive=!1;function c(t){var e="_ec_"+t.id+"_"+t.type,u=o[e];if(!u){var c=O(t.type);(u=new(r?v.getClass(c.main,c.sub):y.getClass(c.sub))).init(n,l),o[e]=u,a.push(u),s.add(u.group)}t.__viewId=u.__id=e,u.__alive=!0,u.__model=t,u.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||i.prepareView(u,t,n,l)}for(r?n.eachComponent((function(t,e){"series"!==t&&c(e)})):n.eachSeries(c),u=0;u<a.length;){var h=a[u];h.__alive?u++:(r||h.renderTask.dispose(),s.remove(h.group),h.dispose(n,l),a.splice(u,1),delete o[h.__id],h.__id=h.group.__ecComponentInfo=null)}}function J(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function K(t,e,n,i){var r,a,o;r=e,a=n,o=i,L(t._componentsViews,(function(t){var e=t.__model;t.render(e,r,a,o),et(e,t)})),L(t._chartsViews,(function(t){t.__alive=!1})),Q(t,e,0,i),L(t._chartsViews,(function(t){t.__alive||t.remove(e,n)}))}function Q(t,e,n,i,r){var a,s,l,u,c,h=t._scheduler;e.eachSeries((function(e){var n=t._chartsMap[e.__viewId];n.__alive=!0;var o,s,l=n.renderTask;h.updatePayload(l,i),r&&r.get(e.uid)&&l.dirty(),a|=l.perform(h.getPerformArgs(l)),n.group.silent=!!e.get("silent"),et(e,n),o=n,s=e.get("blendMode")||null,o.group.traverse((function(t){t.isGroup||t.style.blend!==s&&t.setStyle("blend",s),t.eachPendingDisplayable&&t.eachPendingDisplayable((function(t){t.setStyle("blend",s)}))}))})),h.unfinished|=a,l=e,u=(s=t)._zr.storage,c=0,u.traverse((function(t){c++})),c>l.get("hoverLayerThreshold")&&!o.node&&l.eachSeries((function(t){if(!t.preventUsingHoverLayer){var e=s._chartsMap[t.__viewId];e.__alive&&e.group.traverse((function(t){t.useHoverLayer=!0}))}})),S(t._zr.dom,e)}function $(t,e){L(st,(function(n){n(t,e)}))}G.resize=function(t){if(this._disposed)this.id;else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[R]=!0,n&&H(this),W.update.call(this),this[R]=!1,Y.call(this,i),X.call(this,i)}}},G.showLoading=function(t,e){if(this._disposed)this.id;else if(k(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),ct[t]){var n=ct[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},G.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},G.makeActionFromEvent=function(t){var e=r.extend({},t);return e.type=rt[t.type],e},G.dispatchAction=function(t,e){this._disposed?this.id:(k(e)||(e={silent:!!e}),it[t.type]&&this._model&&(this[R]?this._pendingActions.push(t):(U.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&o.browser.weChat&&this._throttledZrFlush(),Y.call(this,e.silent),X.call(this,e.silent))))},G.appendData=function(t){if(this._disposed)this.id;else{var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0}},G.on=z("on",!1),G.off=z("off",!1),G.one=z("one",!1);var tt=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function et(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))}))}function nt(){this.eventInfo}G._initEvents=function(){L(tt,(function(t){function e(e){var n,i=this.getModel(),a=e.target;if("globalout"===t)n={};else if(a&&null!=a.dataIndex){var o=a.dataModel||i.getSeriesByIndex(a.seriesIndex);n=o&&o.getDataParams(a.dataIndex,a.dataType,a)||{}}else a&&a.eventData&&(n=r.extend({},a.eventData));if(n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&i.getComponent(s,l),c=u&&this["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];n.event=e,n.type=t,this._ecEventProcessor.eventInfo={targetEl:a,packedEvent:n,model:u,view:c},this.trigger(t,n)}}e.zrEventfulCallAtLast=!0,this._zr.on(t,e,this)}),this),L(rt,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},G.isDisposed=function(){return this._disposed},G.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},G.dispose=function(){if(this._disposed)this.id;else{this._disposed=!0,_.setAttribute(this.getDom(),gt,"");var t=this._api,e=this._model;L(this._componentsViews,(function(n){n.dispose(e,t)})),L(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete ht[this.id]}},r.mixin(V,l),nt.prototype={constructor:nt,normalizeQuery:function(t){var e={},n={},i={};if(r.isString(t)){var a=O(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};r.each(t,(function(t,r){for(var a=!1,l=0;l<o.length;l++){var u=o[l],c=r.lastIndexOf(u);if(0<c&&c===r.length-u.length){var h=r.slice(0,c);"data"!==h&&(e.mainType=h,e[u.toLowerCase()]=t,a=!0)}}s.hasOwnProperty(r)&&(n[r]=t,a=!0),a||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},filter:function(t,e,n){var i=this.eventInfo;if(!i)return!0;var r=i.targetEl,a=i.packedEvent,o=i.model,s=i.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,r,a));function c(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},afterTrigger:function(){this.eventInfo=null}};var it={},rt={},at=[],ot=[],st=[],lt=[],ut={},ct={},ht={},dt={},ft=+new Date,pt=+new Date,gt="_echarts_instance_";function mt(t){dt[t]=!1}var vt=mt;function yt(t){return ht[_.getAttribute(t,gt)]}function xt(t,e){ut[t]=e}function _t(t){ot.push(t)}function bt(t,e){Mt(at,t,e,1e3)}function wt(t,e,n){"function"==typeof e&&(n=e,e="");var i=k(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,D(N.test(i)&&N.test(e)),it[i]||(it[i]={action:n,actionInfo:t}),rt[e]=i}function St(t,e){Mt(lt,t,e,3e3,"visual")}function Mt(t,e,n,i,r){(P(e)||k(e))&&(n=e,e=i);var a=I.wrapStageHandler(n,r);return a.__prio=e,a.__raw=n,t.push(a),a}function It(t,e){ct[t]=e}St(2e3,w),_t(f),bt(900,p),It("default",M),wt({type:"highlight",event:"highlight",update:"highlight"},r.noop),wt({type:"downplay",event:"downplay",update:"downplay"},r.noop),xt("light",A),xt("dark",T),e.version="4.7.0",e.dependencies={zrender:"4.3.0"},e.PRIORITY={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:3500,COMPONENT:4e3,BRUSH:5e3}},e.init=function(t,e,n){var i=yt(t);if(i)return i;var r,a,o=new V(t,e,n);function s(t,e){for(var n=0;n<t.length;n++)t[n][a]=e}return o.id="ec_"+ft++,ht[o.id]=o,_.setAttribute(t,gt,o.id),r=o,a="__connectUpdateStatus",L(rt,(function(t,e){r._messageCenter.on(e,(function(t){if(dt[r.group]&&0!==r[a]){if(t&&t.escapeConnect)return;var e=r.makeActionFromEvent(t),n=[];L(ht,(function(t){t!==r&&t.group===r.group&&n.push(t)})),s(n,0),L(n,(function(t){1!==t[a]&&t.dispatchAction(e)})),s(n,2)}}))})),o},e.connect=function(t){if(r.isArray(t)){var e=t;t=null,L(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+pt++,L(e,(function(e){e.group=t}))}return dt[t]=!0,t},e.disConnect=mt,e.disconnect=vt,e.dispose=function(t){"string"==typeof t?t=ht[t]:t instanceof V||(t=yt(t)),t instanceof V&&!t.isDisposed()&&t.dispose()},e.getInstanceByDom=yt,e.getInstanceById=function(t){return ht[t]},e.registerTheme=xt,e.registerPreprocessor=_t,e.registerProcessor=bt,e.registerPostUpdate=function(t){st.push(t)},e.registerAction=wt,e.registerCoordinateSystem=function(t,e){h.register(t,e)},e.getCoordinateSystemDimensions=function(t){var e=h.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},e.registerLayout=function(t,e){Mt(lt,t,e,1e3,"layout")},e.registerVisual=St,e.registerLoading=It,e.extendComponentModel=function(t){return g.extend(t)},e.extendComponentView=function(t){return v.extend(t)},e.extendSeriesModel=function(t){return m.extend(t)},e.extendChartView=function(t){return y.extend(t)},e.setCanvasCreator=function(t){r.$override("createCanvas",t)},e.registerMap=function(t,e,n){C.registerMap(t,e,n)},e.getMap=function(t){var e=C.retrieveMap(t);return e&&e[0]&&{geoJson:e[0].geoJSON,specialAreas:e[0].specialAreas}},e.dataTool={};var At=n(156);!function(){for(var t in At)At.hasOwnProperty(t)&&(e[t]=At[t])}()},function(t,e,n){var i=n(0),r=n(141),a=n(23),o=n(15),s=n(7),l=n(10),u=n(86),c=n(44);e.Image=c;var h=n(36);e.Group=h;var d=n(37);e.Text=d;var f=n(146);e.Circle=f;var p=n(253);e.Sector=p;var g=n(254);e.Ring=g;var m=n(148);e.Polygon=m;var v=n(150);e.Polyline=v;var y=n(90);e.Rect=y;var x=n(151);e.Line=x;var _=n(257);e.BezierCurve=_;var b=n(258);e.Arc=b;var w=n(259);e.CompoundPath=w;var S=n(92);e.LinearGradient=S;var M=n(260);e.RadialGradient=M;var I=n(8);e.BoundingRect=I;var A=n(93);e.IncrementalDisplayable=A;var T=n(91),C=Math.max,D=Math.min,L={},P="emphasis",k="normal",O=1,R={},E={};function N(t,e){E[t]=e}function z(t,e,n,i){var a=r.createFromString(t,e);return n&&("center"===i&&(n=B(n,a.getBoundingRect())),G(a,n)),a}function B(t,e){var n,i=e.width/e.height,r=t.height*i;return n=r<=t.width?t.height:(r=t.width)/i,{x:t.x+t.width/2-r/2,y:t.y+t.height/2-n/2,width:r,height:n}}var V=r.mergePath;function G(t,e){if(t.applyTransform){var n=t.getBoundingRect().calculateTransform(e);t.applyTransform(n)}}var F=T.subPixelOptimize;function W(t){return null!=t&&"none"!==t}var H=i.createHashMap(),j=0;function Z(t){var e=t.__hoverStl;if(e&&!t.__highlighted){var n=t.__zr,i=t.useHoverLayer&&n&&"canvas"===n.painter.type;if(t.__highlighted=i?"layer":"plain",!(t.isGroup||!n&&t.useHoverLayer)){var r=t,a=t.style;i&&(a=(r=n.addHover(t)).style),st(a),i||function(t){if(t.__hoverStlDirty){t.__hoverStlDirty=!1;var e=t.__hoverStl;if(e){var n=t.__cachedNormalStl={};t.__cachedNormalZ2=t.z2;var i=t.style;for(var r in e)null!=e[r]&&(n[r]=i[r]);n.fill=i.fill,n.stroke=i.stroke}else t.__cachedNormalStl=t.__cachedNormalZ2=null}}(r),a.extendFrom(e),U(a,e,"fill"),U(a,e,"stroke"),ot(a),i||(t.dirty(!1),t.z2+=1)}}}function U(t,e,n){!W(e[n])&&W(t[n])&&(t[n]=function(t){if("string"!=typeof t)return t;var e=H.get(t);return e||(e=a.lift(t,-.1),j<1e4&&(H.set(t,e),j++)),e}(t[n]))}function Y(t){var e=t.__highlighted;if(e&&(t.__highlighted=!1,!t.isGroup))if("layer"===e)t.__zr&&t.__zr.removeHover(t);else{var n=t.style,i=t.__cachedNormalStl;i&&(st(n),t.setStyle(i),ot(n));var r=t.__cachedNormalZ2;null!=r&&t.z2-r==1&&(t.z2=r)}}function X(t,e,n){var i,r=k,a=k;t.__highlighted&&(r=P,i=!0),e(t,n),t.__highlighted&&(a=P,i=!0),t.isGroup&&t.traverse((function(t){t.isGroup||e(t,n)})),i&&t.__highDownOnUpdate&&t.__highDownOnUpdate(r,a)}function q(t,e){e=t.__hoverStl=!1!==e&&(t.hoverStyle||e||{}),t.__hoverStlDirty=!0,t.__highlighted&&(t.__cachedNormalStl=null,Y(t),Z(t))}function J(t){tt(this,t)||this.__highByOuter||X(this,Z)}function K(t){tt(this,t)||this.__highByOuter||X(this,Y)}function Q(t){this.__highByOuter|=1<<(t||0),X(this,Z)}function $(t){(this.__highByOuter&=~(1<<(t||0)))||X(this,Y)}function tt(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function et(t,e){var n=!1===e;if(t.__highDownSilentOnTouch=t.highDownSilentOnTouch,t.__highDownOnUpdate=t.highDownOnUpdate,!n||t.__highDownDispatcher){var i=n?"off":"on";t[i]("mouseover",J)[i]("mouseout",K),t[i]("emphasis",Q)[i]("normal",$),t.__highByOuter=t.__highByOuter||0,t.__highDownDispatcher=!n}}function nt(t,e,n,r,a){return it(t,e,r,a),n&&i.extend(t,n),t}function it(t,e,n,r){if((n=n||L).isRectText){var a;n.getTextPosition?a=n.getTextPosition(e,r):"outside"===(a=e.getShallow("position")||(r?null:"inside"))&&(a="top"),t.textPosition=a,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=i.retrieve2(e.getShallow("distance"),r?null:5)}var s,l=e.ecModel,u=l&&l.option.textStyle,c=function(t){for(var e;t&&t!==t.ecModel;){var n=(t.option||L).rich;if(n)for(var i in e=e||{},n)n.hasOwnProperty(i)&&(e[i]=1);t=t.parentModel}return e}(e);if(c)for(var h in s={},c)if(c.hasOwnProperty(h)){var d=e.getModel(["rich",h]);rt(s[h]={},d,u,n,r)}return t.rich=s,rt(t,e,u,n,r,!0),n.forceRich&&!n.textStyle&&(n.textStyle={}),t}function rt(t,e,n,r,a,o){n=!a&&n||L,t.textFill=at(e.getShallow("color"),r)||n.color,t.textStroke=at(e.getShallow("textBorderColor"),r)||n.textBorderColor,t.textStrokeWidth=i.retrieve2(e.getShallow("textBorderWidth"),n.textBorderWidth),a||(o&&(t.insideRollbackOpt=r,ot(t)),null==t.textFill&&(t.textFill=r.autoColor)),t.fontStyle=e.getShallow("fontStyle")||n.fontStyle,t.fontWeight=e.getShallow("fontWeight")||n.fontWeight,t.fontSize=e.getShallow("fontSize")||n.fontSize,t.fontFamily=e.getShallow("fontFamily")||n.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&r.disableBox||(t.textBackgroundColor=at(e.getShallow("backgroundColor"),r),t.textPadding=e.getShallow("padding"),t.textBorderColor=at(e.getShallow("borderColor"),r),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||n.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||n.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||n.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||n.textShadowOffsetY}function at(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function ot(t){var e,n=t.textPosition,i=t.insideRollbackOpt;if(i&&null==t.textFill){var r=i.autoColor,a=i.isRectText,o=i.useInsideStyle,s=!1!==o&&(!0===o||a&&n&&"string"==typeof n&&0<=n.indexOf("inside")),l=!s&&null!=r;(s||l)&&(e={textFill:t.textFill,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth}),s&&(t.textFill="#fff",null==t.textStroke&&(t.textStroke=r,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),l&&(t.textFill=r)}t.insideRollback=e}function st(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth,t.insideRollback=null)}function lt(t,e,n,i,r,a){if("function"==typeof r&&(a=r,r=null),i&&i.isAnimationEnabled()){var o=t?"Update":"",s=i.getShallow("animationDuration"+o),l=i.getShallow("animationEasing"+o),u=i.getShallow("animationDelay"+o);"function"==typeof u&&(u=u(r,i.getAnimationDelayParams?i.getAnimationDelayParams(e,r):null)),"function"==typeof s&&(s=s(r)),0<s?e.animateTo(n,s,u||0,l,a,!!a):(e.stopAnimation(),e.attr(n),a&&a())}else e.stopAnimation(),e.attr(n),a&&a()}function ut(t,e,n,i,r){lt(!0,t,e,n,i,r)}function ct(t,e,n){return e&&!i.isArrayLike(e)&&(e=u.getLocalTransform(e)),n&&(e=o.invert([],e)),s.applyTransform([],t,e)}function ht(t,e,n,i,r,a,o,s){var l,u=n-t,c=i-e,h=o-r,d=s-a,f=dt(h,d,u,c);if((l=f)<=1e-6&&-1e-6<=l)return!1;var p=t-r,g=e-a,m=dt(p,g,u,c)/f;if(m<0||1<m)return!1;var v=dt(p,g,h,d)/f;return!(v<0||1<v)}function dt(t,e,n,i){return t*i-n*e}N("circle",f),N("sector",p),N("ring",g),N("polygon",m),N("polyline",v),N("rect",y),N("line",x),N("bezierCurve",_),N("arc",b),e.Z2_EMPHASIS_LIFT=1,e.CACHED_LABEL_STYLE_PROPERTIES={color:"textFill",textBorderColor:"textStroke",textBorderWidth:"textStrokeWidth"},e.extendShape=function(t){return l.extend(t)},e.extendPath=function(t,e){return r.extendFromString(t,e)},e.registerShape=N,e.getShapeClass=function(t){if(E.hasOwnProperty(t))return E[t]},e.makePath=z,e.makeImage=function(t,e,n){var i=new c({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===n){var r={width:t.width,height:t.height};i.setStyle(B(e,r))}}});return i},e.mergePath=V,e.resizePath=G,e.subPixelOptimizeLine=function(t){return T.subPixelOptimizeLine(t.shape,t.shape,t.style),t},e.subPixelOptimizeRect=function(t){return T.subPixelOptimizeRect(t.shape,t.shape,t.style),t},e.subPixelOptimize=F,e.setElementHoverStyle=q,e.setHoverStyle=function(t,e){et(t,!0),X(t,q,e)},e.setAsHighDownDispatcher=et,e.isHighDownDispatcher=function(t){return!(!t||!t.__highDownDispatcher)},e.getHighlightDigit=function(t){var e=R[t];return null==e&&O<=32&&(e=R[t]=O++),e},e.setLabelStyle=function(t,e,n,r,a,o,s){var l,u=(a=a||L).labelFetcher,c=a.labelDataIndex,h=a.labelDimIndex,d=n.getShallow("show"),f=r.getShallow("show");(d||f)&&(u&&(l=u.getFormattedLabel(c,"normal",null,h)),null==l&&(l=i.isFunction(a.defaultText)?a.defaultText(c,a):a.defaultText));var p=d?l:null,g=f?i.retrieve2(u?u.getFormattedLabel(c,"emphasis",null,h):null,l):null;null==p&&null==g||(nt(t,n,o,a),nt(e,r,s,a,!0)),t.text=p,e.text=g},e.modifyLabelStyle=function(t,e,n){var r=t.style;e&&(st(r),t.setStyle(e),ot(r)),r=t.__hoverStl,n&&r&&(st(r),i.extend(r,n),ot(r))},e.setTextStyle=nt,e.setText=function(t,e,n){var i,r={isRectText:!0};!1===n?i=!0:r.autoColor=n,it(t,e,r,i)},e.getFont=function(t,e){var n=e&&e.getModel("textStyle");return i.trim([t.fontStyle||n&&n.getShallow("fontStyle")||"",t.fontWeight||n&&n.getShallow("fontWeight")||"",(t.fontSize||n&&n.getShallow("fontSize")||12)+"px",t.fontFamily||n&&n.getShallow("fontFamily")||"sans-serif"].join(" "))},e.updateProps=ut,e.initProps=function(t,e,n,i,r){lt(!1,t,e,n,i,r)},e.getTransform=function(t,e){for(var n=o.identity([]);t&&t!==e;)o.mul(n,t.getLocalTransform(),n),t=t.parent;return n},e.applyTransform=ct,e.transformDirection=function(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),r=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),a=["left"===t?-i:"right"===t?i:0,"top"===t?-r:"bottom"===t?r:0];return a=ct(a,e,n),Math.abs(a[0])>Math.abs(a[1])?0<a[0]?"right":"left":0<a[1]?"bottom":"top"},e.groupTransition=function(t,e,n,r){if(t&&e){var a,o=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var i=l(t);t.attr(l(e)),ut(t,i,n,t.dataIndex)}}}))}function l(t){var e={position:s.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=i.extend({},t.shape)),e}},e.clipPointsByRect=function(t,e){return i.map(t,(function(t){var n=t[0];n=C(n,e.x),n=D(n,e.x+e.width);var i=t[1];return i=C(i,e.y),[n,i=D(i,e.y+e.height)]}))},e.clipRectByRect=function(t,e){var n=C(t.x,e.x),i=D(t.x+t.width,e.x+e.width),r=C(t.y,e.y),a=D(t.y+t.height,e.y+e.height);if(n<=i&&r<=a)return{x:n,y:r,width:i-n,height:a-r}},e.createIcon=function(t,e,n){var r=(e=i.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),i.defaults(r,n),new c(e)):z(t.replace("path://",""),e,n,"center")},e.linePolygonIntersect=function(t,e,n,i,r){for(var a=0,o=r[r.length-1];a<r.length;a++){var s=r[a];if(ht(t,e,n,i,s[0],s[1],o[0],o[1]))return!0;o=s}},e.lineLineIntersect=ht},function(t,e,n){var i=n(0),r=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function a(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}e.linearMap=function(t,e,n,i){var r=e[1]-e[0],a=n[1]-n[0];if(0==r)return 0==a?n[0]:(n[0]+n[1])/2;if(i)if(0<r){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*a+n[0]},e.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?t.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t},e.round=function(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t},e.asc=function(t){return t.sort((function(t,e){return t-e})),t},e.getPrecision=function(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n},e.getPrecisionSafe=function(t){var e=t.toString(),n=e.indexOf("e");if(0<n){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r},e.getPixelPrecision=function(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),a=Math.round(n(Math.abs(e[1]-e[0]))/i),o=Math.min(Math.max(-r+a,0),20);return isFinite(o)?o:20},e.getPercentWithPrecision=function(t,e,n){if(!t[e])return 0;var r=i.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===r)return 0;for(var a=Math.pow(10,n),o=i.map(t,(function(t){return(isNaN(t)?0:t)/r*a*100})),s=100*a,l=i.map(o,(function(t){return Math.floor(t)})),u=i.reduce(l,(function(t,e){return t+e}),0),c=i.map(o,(function(t,e){return t-l[e]}));u<s;){for(var h=Number.NEGATIVE_INFINITY,d=null,f=0,p=c.length;f<p;++f)c[f]>h&&(h=c[f],d=f);++l[d],c[d]=0,++u}return l[e]/a},e.MAX_SAFE_INTEGER=9007199254740991,e.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},e.isRadianAroundZero=function(t){return-1e-4<t&&t<1e-4},e.parseDate=function(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=r.exec(t);if(!e)return new Date(NaN);if(e[8]){var n=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(n-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],(e[2]||1)-1,+e[3]||1,n,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)},e.quantity=function(t){return Math.pow(10,a(t))},e.quantityExponent=a,e.nice=function(t,e){var n=a(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,-20<=n?+t.toFixed(n<0?-n:0):t},e.quantile=function(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],a=n-i;return a?r+a*(t[i]-r):r},e.reformIntervals=function(t){t.sort((function(t,e){return function t(e,n,i){return e.interval[i]<n.interval[i]||e.interval[i]===n.interval[i]&&(e.close[i]-n.close[i]==(i?-1:1)||!i&&t(e,n,1))}(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i<t.length;){for(var r=t[i].interval,a=t[i].close,o=0;o<2;o++)r[o]<=e&&(r[o]=e,a[o]=o?1:1-n),e=r[o],n=a[o];r[0]===r[1]&&a[0]*a[1]!=1?t.splice(i,1):i++}return t},e.isNumeric=function(t){return 0<=t-parseFloat(t)}},function(t,e,n){var i=n(0),r=n(11),a=i.each,o=i.isObject,s=i.isArray,l="series\0";function u(t){return t instanceof Array?t:null==t?[]:[t]}function c(t){return o(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var h=0;function d(t,e){return t&&t.hasOwnProperty(e)}e.normalizeToArray=u,e.defaultEmphasis=function(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,r=n.length;i<r;i++){var a=n[i];!t.emphasis[e].hasOwnProperty(a)&&t[e].hasOwnProperty(a)&&(t.emphasis[e][a]=t[e][a])}}},e.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],e.getDataItemValue=function(t){return!o(t)||s(t)||t instanceof Date?t:t.value},e.isDataItemOption=function(t){return o(t)&&!(t instanceof Array)},e.mappingToExists=function(t,e){e=(e||[]).slice();var n=i.map(t||[],(function(t,e){return{exist:t}}));return a(e,(function(t,i){if(o(t)){for(var r=0;r<n.length;r++)if(!n[r].option&&null!=t.id&&n[r].exist.id===t.id+"")return n[r].option=t,void(e[i]=null);for(r=0;r<n.length;r++){var a=n[r].exist;if(!(n[r].option||null!=a.id&&null!=t.id||null==t.name||c(t)||c(a)||a.name!==t.name+""))return n[r].option=t,void(e[i]=null)}}})),a(e,(function(t,e){if(o(t)){for(var i=0;i<n.length;i++){var r=n[i].exist;if(!n[i].option&&!c(r)&&null==t.id){n[i].option=t;break}}i>=n.length&&n.push({option:t})}})),n},e.makeIdAndName=function(t){var e=i.createHashMap();a(t,(function(t,n){var i=t.exist;i&&e.set(i.id,t)})),a(t,(function(t,n){var r=t.option;i.assert(!r||null==r.id||!e.get(r.id)||e.get(r.id)===t,"id duplicates: "+(r&&r.id)),r&&null!=r.id&&e.set(r.id,t),t.keyInfo||(t.keyInfo={})})),a(t,(function(t,n){var i=t.exist,r=t.option,a=t.keyInfo;if(o(r)){if(a.name=null!=r.name?r.name+"":i?i.name:l+n,i)a.id=i.id;else if(null!=r.id)a.id=r.id+"";else for(var s=0;a.id="\0"+a.name+"\0"+s++,e.get(a.id););e.set(a.id,t)}}))},e.isNameSpecified=function(t){var e=t.name;return!(!e||!e.indexOf(l))},e.isIdInner=c,e.compressBatches=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[a(n),a(i)];function r(t,e,n){for(var i=0,r=t.length;i<r;i++)for(var a=t[i].seriesId,o=u(t[i].dataIndex),s=n&&n[a],l=0,c=o.length;l<c;l++){var h=o[l];s&&s[h]?s[h]=null:(e[a]||(e[a]={}))[h]=1}}function a(t,e){var n=[];for(var i in t)if(t.hasOwnProperty(i)&&null!=t[i])if(e)n.push(+i);else{var r=a(t[i],!0);r.length&&n.push({seriesId:i,dataIndex:r})}return n}},e.queryDataIndex=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?i.isArray(e.dataIndex)?i.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?i.isArray(e.name)?i.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},e.makeInner=function(){var t="__\0ec_inner_"+h+++"_"+Math.random().toFixed(5);return function(e){return e[t]||(e[t]={})}},e.parseFinder=function(t,e,n){if(i.isString(e)){var r={};r[e+"Index"]=0,e=r}var o=n&&n.defaultMainType;!o||d(e,o+"Index")||d(e,o+"Id")||d(e,o+"Name")||(e[o+"Index"]=0);var s={};return a(e,(function(r,a){if(r=e[a],"dataIndex"!==a&&"dataIndexInside"!==a){var o=a.match(/^(\w+)(Index|Id|Name)$/)||[],l=o[1],u=(o[2]||"").toLowerCase();if(!(!l||!u||null==r||"index"===u&&"none"===r||n&&n.includeMainTypes&&i.indexOf(n.includeMainTypes,l)<0)){var c={mainType:l};"index"===u&&"all"===r||(c[u]=r);var h=t.queryComponents(c);s[l+"Models"]=h,s[l+"Model"]=h[0]}}else s[a]=r})),s},e.setAttribute=function(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n},e.getAttribute=function(t,e){return t.getAttribute?t.getAttribute(e):t[e]},e.getTooltipRenderMode=function(t){return"auto"===t?r.domSupported?"html":"richText":t||"html"},e.groupData=function(t,e){var n=i.createHashMap(),r=[];return i.each(t,(function(t){var i=e(t);(n.get(i)||(r.push(i),n.set(i,[]))).push(t)})),{keys:r,buckets:n}}},function(t,e,n){(function(t){var n;"undefined"!=typeof window?n=window.__DEV__:void 0!==t&&(n=t.__DEV__),void 0===n&&(n=!0);var i=n;e.__DEV__=i}).call(this,n(233))},function(t,e,n){var i=n(0),r=n(8),a=n(3).parsePercent,o=n(9),s=i.each,l=["left","right","top","bottom","width","height"],u=[["width","left","right"],["height","top","bottom"]];function c(t,e,n,i,r){var a=0,o=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var c,h,d=l.position,f=l.getBoundingRect(),p=e.childAt(u+1),g=p&&p.getBoundingRect();if("horizontal"===t){var m=f.width+(g?-g.x+f.x:0);s=i<(c=a+m)||l.newline?(a=0,c=m,o+=s+n,f.height):Math.max(s,f.height)}else{var v=f.height+(g?-g.y+f.y:0);s=r<(h=o+v)||l.newline?(a+=s+n,o=0,h=v,f.width):Math.max(s,f.width)}l.newline||(d[0]=a,d[1]=o,"horizontal"===t?a=c+n:o=h+n)}))}var h=c,d=i.curry(c,"vertical"),f=i.curry(c,"horizontal");function p(t,e,n){n=o.normalizeCssArray(n||0);var i=e.width,s=e.height,l=a(t.left,i),u=a(t.top,s),c=a(t.right,i),h=a(t.bottom,s),d=a(t.width,i),f=a(t.height,s),p=n[2]+n[0],g=n[1]+n[3],m=t.aspect;switch(isNaN(d)&&(d=i-c-g-l),isNaN(f)&&(f=s-h-p-u),null!=m&&(isNaN(d)&&isNaN(f)&&(i/s<m?d=.8*i:f=.8*s),isNaN(d)&&(d=m*f),isNaN(f)&&(f=d/m)),isNaN(l)&&(l=i-c-d-g),isNaN(u)&&(u=s-h-f-p),t.left||t.right){case"center":l=i/2-d/2-n[3];break;case"right":l=i-d-g}switch(t.top||t.bottom){case"middle":case"center":u=s/2-f/2-n[0];break;case"bottom":u=s-f-p}l=l||0,u=u||0,isNaN(d)&&(d=i-g-l-(c||0)),isNaN(f)&&(f=s-p-u-(h||0));var v=new r(l+n[3],u+n[0],d,f);return v.margin=n,v}function g(t,e){return e&&t&&s(l,(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t}e.LOCATION_PARAMS=l,e.HV_NAMES=u,e.box=h,e.vbox=d,e.hbox=f,e.getAvailableSize=function(t,e,n){var i=e.width,r=e.height,s=a(t.x,i),l=a(t.y,r),u=a(t.x2,i),c=a(t.y2,r);return(isNaN(s)||isNaN(parseFloat(t.x)))&&(s=0),(isNaN(u)||isNaN(parseFloat(t.x2)))&&(u=i),(isNaN(l)||isNaN(parseFloat(t.y)))&&(l=0),(isNaN(c)||isNaN(parseFloat(t.y2)))&&(c=r),n=o.normalizeCssArray(n||0),{width:Math.max(u-s-n[1]-n[3],0),height:Math.max(c-l-n[0]-n[2],0)}},e.getLayoutRect=p,e.positionElement=function(t,e,n,a,o){var s=!o||!o.hv||o.hv[0],l=!o||!o.hv||o.hv[1],u=o&&o.boundingMode||"all";if(s||l){var c;if("raw"===u)c="group"===t.type?new r(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(c=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(c=c.clone()).applyTransform(h)}e=p(i.defaults({width:c.width,height:c.height},e),n,a);var d=t.position,f=s?e.x-c.x:0,g=l?e.y-c.y:0;t.attr("position","raw"===u?[f,g]:[d[0]+f,d[1]+g])}},e.sizeCalculable=function(t,e){return null!=t[u[e][0]]||null!=t[u[e][1]]&&null!=t[u[e][2]]},e.mergeLayoutParam=function(t,e,n){i.isObject(n)||(n={});var r=n.ignoreSize;i.isArray(r)||(r=[r,r]);var a=l(u[0],0),o=l(u[1],1);function l(n,i){var a={},o=0,l={},u=0;if(s(n,(function(e){l[e]=t[e]})),s(n,(function(t){c(e,t)&&(a[t]=l[t]=e[t]),h(a,t)&&o++,h(l,t)&&u++})),r[i])return h(e,n[1])?l[n[2]]=null:h(e,n[2])&&(l[n[1]]=null),l;if(2!==u&&o){if(2<=o)return a;for(var d=0;d<n.length;d++){var f=n[d];if(!c(a,f)&&c(t,f)){a[f]=t[f];break}}return a}return l}function c(t,e){return t.hasOwnProperty(e)}function h(t,e){return null!=t[e]&&"auto"!==t[e]}function d(t,e,n){s(t,(function(t){e[t]=n[t]}))}d(u[0],t,a),d(u[1],t,o)},e.getLayoutParams=function(t){return g({},t)},e.copyLayoutParams=g},function(t,e){var n="undefined"==typeof Float32Array?Array:Float32Array;function i(t){return Math.sqrt(a(t))}var r=i;function a(t){return t[0]*t[0]+t[1]*t[1]}var o=a;function s(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var l=s;function u(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var c=u;e.create=function(t,e){var i=new n(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},e.clone=function(t){var e=new n(2);return e[0]=t[0],e[1]=t[1],e},e.set=function(t,e,n){return t[0]=e,t[1]=n,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t},e.scaleAndAdd=function(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t},e.sub=function(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t},e.len=i,e.length=r,e.lenSquare=a,e.lengthSquare=o,e.mul=function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},e.div=function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t},e.normalize=function(t,e){var n=i(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t},e.distance=s,e.dist=l,e.distanceSquare=u,e.distSquare=c,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},e.lerp=function(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t},e.applyTransform=function(t,e,n){var i=e[0],r=e[1];return t[0]=n[0]*i+n[2]*r+n[4],t[1]=n[1]*i+n[3]*r+n[5],t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}},function(t,e,n){var i,r,a,o,s=n(7),l=n(15),u=s.applyTransform,c=Math.min,h=Math.max;function d(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}d.prototype={constructor:d,union:function(t){var e=c(t.x,this.x),n=c(t.y,this.y);this.width=h(t.x+t.width,this.x+this.width)-e,this.height=h(t.y+t.height,this.y+this.height)-n,this.x=e,this.y=n},applyTransform:(i=[],r=[],a=[],o=[],function(t){if(t){i[0]=a[0]=this.x,i[1]=o[1]=this.y,r[0]=o[0]=this.x+this.width,r[1]=a[1]=this.y+this.height,u(i,i,t),u(r,r,t),u(a,a,t),u(o,o,t),this.x=c(i[0],r[0],a[0],o[0]),this.y=c(i[1],r[1],a[1],o[1]);var e=h(i[0],r[0],a[0],o[0]),n=h(i[1],r[1],a[1],o[1]);this.width=e-this.x,this.height=n-this.y}}),calculateTransform:function(t){var e=t.width/this.width,n=t.height/this.height,i=l.create();return l.translate(i,i,[-this.x,-this.y]),l.scale(i,i,[e,n]),l.translate(i,i,[t.x,t.y]),i},intersect:function(t){if(!t)return!1;t instanceof d||(t=d.create(t));var e=this,n=e.x,i=e.x+e.width,r=e.y,a=e.y+e.height,o=t.x,s=t.x+t.width,l=t.y,u=t.y+t.height;return!(i<o||s<n||a<l||u<r)},contain:function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new d(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},d.create=function(t){return new d(t.x,t.y,t.width,t.height)};var f=d;t.exports=f},function(t,e,n){var i=n(0),r=n(17),a=n(3),o=i.normalizeCssArray,s=/([&<>"'])/g,l={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function u(t){return null==t?"":(t+"").replace(s,(function(t,e){return l[e]}))}function c(t,e){return"{"+t+(null==e?"":e)+"}"}var h=["a","b","c","d","e","f","g"];function d(t,e){return"0000".substr(0,e-(t+="").length)+t}var f=r.truncateText;e.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")},e.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},e.normalizeCssArray=o,e.encodeHTML=u,e.formatTpl=function(t,e,n){i.isArray(e)||(e=[e]);var r=e.length;if(!r)return"";for(var a=e[0].$vars||[],o=0;o<a.length;o++){var s=h[o];t=t.replace(c(s),c(s,0))}for(var l=0;l<r;l++)for(var d=0;d<a.length;d++){var f=e[l][a[d]];t=t.replace(c(h[d],l),n?u(f):f)}return t},e.formatTplSimple=function(t,e,n){return i.each(e,(function(e,i){t=t.replace("{"+i+"}",n?u(e):e)})),t},e.getTooltipMarker=function(t,e){var n=(t=i.isString(t)?{color:t,extraCssText:e}:t||{}).color,r=t.type,a=(e=t.extraCssText,t.renderMode||"html"),o=t.markerId||"X";return n?"html"===a?"subItem"===r?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+u(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+u(n)+";"+(e||"")+'"></span>':{renderMode:a,content:"{marker"+o+"|} ",style:{color:n}}:""},e.formatTime=function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=a.parseDate(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),s=i["get"+r+"Month"]()+1,l=i["get"+r+"Date"](),u=i["get"+r+"Hours"](),c=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),f=i["get"+r+"Milliseconds"]();return t.replace("MM",d(s,2)).replace("M",s).replace("yyyy",o).replace("yy",o%100).replace("dd",d(l,2)).replace("d",l).replace("hh",d(u,2)).replace("h",u).replace("mm",d(c,2)).replace("m",c).replace("ss",d(h,2)).replace("s",h).replace("SSS",d(f,3))},e.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},e.truncateText=f,e.getTextBoundingRect=function(t){return r.getBoundingRect(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},e.getTextRect=function(t,e,n,i,a,o,s,l){return r.getBoundingRect(t,e,n,i,a,l,o,s)}},function(t,e,n){var i=n(55),r=n(0),a=n(46),o=n(249),s=n(136).prototype.getCanvasPattern,l=Math.abs,u=new a(!0);function c(t){i.call(this,t),this.path=null}c.prototype={constructor:c,type:"path",__dirtyPath:!0,strokeContainThreshold:5,segmentIgnoreThreshold:0,subPixelOpt