1 line
987 KiB
JavaScript
1 line
987 KiB
JavaScript
function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(t,e){"object"===("undefined"==typeof exports?"undefined":_typeof(exports))&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,function(t){"use strict";var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function u(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var h=function(){return(h=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var e=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},w=new function(){this.browser=new e,this.node=!1,this.wxa=!1,this.worker=!1,this.canvasSupported=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1};"object"===("undefined"==typeof wx?"undefined":_typeof(wx))&&"function"==typeof wx.getSystemInfoSync?(w.wxa=!0,w.canvasSupported=!0,w.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?(w.worker=!0,w.canvasSupported=!0):"undefined"==typeof navigator?(w.node=!0,w.canvasSupported=!0,w.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),o=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),r=t.match(/Edge?\/([\d.]+)/),t=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);o&&(n.ie=!0,n.version=o[1]);r&&(n.edge=!0,n.version=r[1],n.newEdge=18<+r[1].split(".")[0]);t&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&11<=+n.version),e.domSupported="undefined"!=typeof document;t=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in t||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in t)&&!("OTransition"in t),e.transformSupported=e.transform3dSupported||n.ie&&9<=+n.version}(navigator.userAgent,w);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},c=Object.prototype.toString,n=Array.prototype,a=n.forEach,p=n.filter,o=n.slice,d=n.map,r=function(){}.constructor,f=r?r.prototype:null,g="__proto__",y={};function m(t,e){y[t]=e}var v=2311;function _(){return v++}function x(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.error.apply(console,t)}function S(t){if(null==t||"object"!==_typeof(t))return t;var e=t,n=c.call(t);if("[object Array]"===n){if(!lt(t))for(var e=[],i=0,o=t.length;i<o;i++)e[i]=S(t[i])}else if(l[n]){if(!lt(t)){var r=t.constructor;if(r.from)e=r.from(t);else{e=new r(t.length);for(i=0,o=t.length;i<o;i++)e[i]=S(t[i])}}}else if(!s[n]&&!lt(t)&&!j(t))for(var a in e={},t)t.hasOwnProperty(a)&&a!==g&&(e[a]=S(t[a]));return e}function b(t,e,n){if(!Y(e)||!Y(t))return n?S(e):t;for(var i in e){var o,r;e.hasOwnProperty(i)&&i!==g&&(o=t[i],!Y(r=e[i])||!Y(o)||G(r)||G(o)||j(r)||j(o)||X(r)||X(o)||lt(r)||lt(o)?!n&&i in t||(t[i]=S(e[i])):b(o,r,n))}return t}function M(t,e){for(var n=t[0],i=1,o=t.length;i<o;i++)n=b(n,t[i],e);return n}function P(t,e){if(Object.assign)Object.assign(t,e);else for(var n in e)e.hasOwnProperty(n)&&n!==g&&(t[n]=e[n]);return t}function A(t,e,n){for(var i=z(e),o=0;o<i.length;o++){var r=i[o];(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}return t}var D=function(){return y.createCanvas()};function C(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}function I(t,e){var n,i=t.prototype;function o(){}for(n in o.prototype=e.prototype,t.prototype=new o,i)i.hasOwnProperty(n)&&(t.prototype[n]=i[n]);(t.prototype.constructor=t).superClass=e}function T(t,e,n){if(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var i=Object.getOwnPropertyNames(e),o=0;o<i.length;o++){var r=i[o];"constructor"!==r&&(n?null!=e[r]:null==t[r])&&(t[r]=e[r])}else A(t,e,n)}function k(t){return!!t&&("string"!=typeof t&&"number"==typeof t.length)}function E(t,e,n){if(t&&e)if(t.forEach&&t.forEach===a)t.forEach(e,n);else if(t.length===+t.length)for(var i=0,o=t.length;i<o;i++)e.call(n,t[i],i,t);else for(var r in t)t.hasOwnProperty(r)&&e.call(n,t[r],r,t)}function L(t,e,n){if(!t)return[];if(!e)return nt(t);if(t.map&&t.map===d)return t.map(e,n);for(var i=[],o=0,r=t.length;o<r;o++)i.push(e.call(n,t[o],o,t));return i}function O(t,e,n,i){if(t&&e){for(var o=0,r=t.length;o<r;o++)n=e.call(i,n,t[o],o,t);return n}}function R(t,e,n){if(!t)return[];if(!e)return nt(t);if(t.filter&&t.filter===p)return t.filter(e,n);for(var i=[],o=0,r=t.length;o<r;o++)e.call(n,t[o],o,t)&&i.push(t[o]);return i}function N(t,e,n){if(t&&e)for(var i=0,o=t.length;i<o;i++)if(e.call(n,t[i],i,t))return t[i]}function z(t){if(!t)return[];if(Object.keys)return Object.keys(t);var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e);return n}y.createCanvas=function(){return document.createElement("canvas")};var B=f&&F(f.bind)?f.call.bind(f.bind):function(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return function(){return t.apply(e,n.concat(o.call(arguments)))}};function V(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return function(){return t.apply(this,e.concat(o.call(arguments)))}}function G(t){return Array.isArray?Array.isArray(t):"[object Array]"===c.call(t)}function F(t){return"function"==typeof t}function H(t){return"string"==typeof t}function W(t){return"[object String]"===c.call(t)}function U(t){return"number"==typeof t}function Y(t){var e=_typeof(t);return"function"===e||!!t&&"object"===e}function X(t){return!!s[c.call(t)]}function Z(t){return!!l[c.call(t)]}function j(t){return"object"===_typeof(t)&&"number"==typeof t.nodeType&&"object"===_typeof(t.ownerDocument)}function q(t){return null!=t.colorStops}function K(t){return null!=t.image}function $(t){return"[object RegExp]"===c.call(t)}function J(t){return t!=t}function Q(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0,i=t.length;n<i;n++)if(null!=t[n])return t[n]}function tt(t,e){return null!=t?t:e}function et(t,e,n){return null!=t?t:null!=e?e:n}function nt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return o.apply(t,e)}function it(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}function ot(t,e){if(!t)throw new Error(e)}function rt(t){return null==t?null:"function"==typeof t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var at="__ec_primitive__";function st(t){t[at]=!0}function lt(t){return t[at]}var ut=(ht.prototype.get=function(t){return this.data.hasOwnProperty(t)?this.data[t]:null},ht.prototype.set=function(t,e){return this.data[t]=e},ht.prototype.each=function(t,e){for(var n in this.data)this.data.hasOwnProperty(n)&&t.call(e,this.data[n],n)},ht.prototype.keys=function(){return z(this.data)},ht.prototype.removeKey=function(t){delete this.data[t]},ht);function ht(t){this.data={};var n=G(t);this.data={};var i=this;function e(t,e){n?i.set(t,e):i.set(e,t)}t instanceof ht?t.each(e):t&&E(t,e)}function ct(t){return new ut(t)}function pt(t,e){for(var n=new t.constructor(t.length+e.length),i=0;i<t.length;i++)n[i]=t[i];for(var o=t.length,i=0;i<e.length;i++)n[i+o]=e[i];return n}function dt(t,e){var n=Object.create?Object.create(t):((n=function(){}).prototype=t,new n);return e&&P(n,e),n}function ft(t,e){return t.hasOwnProperty(e)}function gt(){}var yt=Object.freeze({__proto__:null,$override:m,guid:_,logError:x,clone:S,merge:b,mergeAll:M,extend:P,defaults:A,createCanvas:D,indexOf:C,inherits:I,mixin:T,isArrayLike:k,each:E,map:L,reduce:O,filter:R,find:N,keys:z,bind:B,curry:V,isArray:G,isFunction:F,isString:H,isStringSafe:W,isNumber:U,isObject:Y,isBuiltInObject:X,isTypedArray:Z,isDom:j,isGradientObject:q,isImagePatternObject:K,isRegExp:$,eqNaN:J,retrieve:Q,retrieve2:tt,retrieve3:et,slice:nt,normalizeCssArray:it,assert:ot,trim:rt,setAsPrimitive:st,isPrimitive:lt,HashMap:ut,createHashMap:ct,concatArray:pt,createObject:dt,hasOwn:ft,noop:gt});function mt(t,e){return[t=null==t?0:t,e=null==e?0:e]}function vt(t,e){return t[0]=e[0],t[1]=e[1],t}function _t(t){return[t[0],t[1]]}function xt(t,e,n){return t[0]=e,t[1]=n,t}function bt(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function wt(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t}function St(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function Mt(t){return Math.sqrt(It(t))}function It(t){return t[0]*t[0]+t[1]*t[1]}function Tt(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function Ct(t,e){var n=Mt(e);return 0===n?(t[0]=0,t[1]=0):(t[0]=e[0]/n,t[1]=e[1]/n),t}function Dt(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var At=Dt;function kt(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var Lt=kt;function Pt(t,e,n,i){return t[0]=e[0]+i*(n[0]-e[0]),t[1]=e[1]+i*(n[1]-e[1]),t}function Ot(t,e,n){var i=e[0],e=e[1];return t[0]=n[0]*i+n[2]*e+n[4],t[1]=n[1]*i+n[3]*e+n[5],t}function Rt(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t}function Nt(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}var Et=Object.freeze({__proto__:null,create:mt,copy:vt,clone:_t,set:xt,add:bt,scaleAndAdd:wt,sub:St,len:Mt,length:Mt,lenSquare:It,lengthSquare:It,mul:function(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t},div:function(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t},dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},scale:Tt,normalize:Ct,distance:Dt,dist:At,distanceSquare:kt,distSquare:Lt,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},lerp:Pt,applyTransform:Ot,min:Rt,max:Nt}),zt=function(t,e){this.target=t,this.topTarget=e&&e.topTarget},Bt=(Vt.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent;e&&((this._draggingTarget=e).dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new zt(e,t),"dragstart",t.event))},Vt.prototype._drag=function(t){var e,n,i,o,r=this._draggingTarget;r&&(i=t.offsetX,o=t.offsetY,e=i-this._x,n=o-this._y,this._x=i,this._y=o,r.drift(e,n,t),this.handler.dispatchToElement(new zt(r,t),"drag",t.event),i=this.handler.findHover(i,o,r).target,o=this._dropTarget,r!==(this._dropTarget=i)&&(o&&i!==o&&this.handler.dispatchToElement(new zt(o,t),"dragleave",t.event),i&&i!==o&&this.handler.dispatchToElement(new zt(i,t),"dragenter",t.event)))},Vt.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new zt(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new zt(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},Vt);function Vt(t){(this.handler=t).on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}var Gt=(Ft.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var o=this._$handlers;if("function"==typeof e&&(i=n,n=e,e=null),!n||!t)return this;var r=this._$eventProcessor;null!=e&&r&&r.normalizeQuery&&(e=r.normalizeQuery(e)),o[t]||(o[t]=[]);for(var a=0;a<o[t].length;a++)if(o[t][a].h===n)return this;r={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},e=o[t].length-1,i=o[t][e];return i&&i.callAtLast?o[t].splice(e,0,r):o[t].push(r),this},Ft.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},Ft.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],o=0,r=n[t].length;o<r;o++)n[t][o].h!==e&&i.push(n[t][o]);n[t]=i}n[t]&&0===n[t].length&&delete n[t]}else delete n[t];return this},Ft.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=i.length,s=0;s<a;s++){var l=i[s];if(!o||!o.filter||null==l.query||o.filter(t,l.query))switch(r){case 0:l.h.call(l.ctx);break;case 1:l.h.call(l.ctx,e[0]);break;case 2:l.h.call(l.ctx,e[0],e[1]);break;default:l.h.apply(l.ctx,e)}}return o&&o.afterTrigger&&o.afterTrigger(t),this},Ft.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],o=this._$eventProcessor;if(i)for(var r=e.length,a=e[r-1],s=i.length,l=0;l<s;l++){var u=i[l];if(!o||!o.filter||null==u.query||o.filter(t,u.query))switch(r){case 0:u.h.call(a);break;case 1:u.h.call(a,e[0]);break;case 2:u.h.call(a,e[0],e[1]);break;default:u.h.apply(a,e.slice(1,r-1))}}return o&&o.afterTrigger&&o.afterTrigger(t),this},Ft);function Ft(t){t&&(this._$eventProcessor=t)}var Ht=Math.log(2);function Wt(t,e,n,i,o,r){var a=i+"-"+o,s=t.length;if(r.hasOwnProperty(a))return r[a];if(1===e){var l=Math.round(Math.log((1<<s)-1&~o)/Ht);return t[n][l]}for(var u=i|1<<n,h=n+1;i&1<<h;)h++;for(var c=0,p=0,d=0;p<s;p++){var f=1<<p;f&o||(c+=(d%2?-1:1)*t[n][p]*Wt(t,e-1,h,u,o|f,r),d++)}return r[a]=c}function Ut(t,e){var n=[[t[0],t[1],1,0,0,0,-e[0]*t[0],-e[0]*t[1]],[0,0,0,t[0],t[1],1,-e[1]*t[0],-e[1]*t[1]],[t[2],t[3],1,0,0,0,-e[2]*t[2],-e[2]*t[3]],[0,0,0,t[2],t[3],1,-e[3]*t[2],-e[3]*t[3]],[t[4],t[5],1,0,0,0,-e[4]*t[4],-e[4]*t[5]],[0,0,0,t[4],t[5],1,-e[5]*t[4],-e[5]*t[5]],[t[6],t[7],1,0,0,0,-e[6]*t[6],-e[6]*t[7]],[0,0,0,t[6],t[7],1,-e[7]*t[6],-e[7]*t[7]]],i={},o=Wt(n,8,0,0,0,i);if(0!==o){for(var r=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==r[s]&&(r[s]=0),r[s]+=((a+s)%2?-1:1)*Wt(n,7,0===a?1:0,1<<a,1<<s,i)/o*e[a];return function(t,e,n){var i=e*r[6]+n*r[7]+1;t[0]=(e*r[0]+n*r[1]+r[2])/i,t[1]=(e*r[3]+n*r[4]+r[5])/i}}}var Yt="___zrEVENTSAVED",Xt=[];function Zt(t,e,n,i,o){if(e.getBoundingClientRect&&w.domSupported&&!jt(e)){var r=e[Yt]||(e[Yt]={}),o=function(t,e,n){for(var i=n?"invTrans":"trans",o=e[i],r=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,h=h.top;a.push(p,h),l=l&&r&&p===r[c]&&h===r[1+c],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&o?o:(e.srcCoords=a,e[i]=n?Ut(s,a):Ut(a,s))}(function(t,e){var n=e.markers;if(n)return n;n=e.markers=[];for(var i=["left","right"],o=["top","bottom"],r=0;r<4;r++){var a=document.createElement("div"),s=a.style,l=r%2,u=(r>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[l]+":0",o[u]+":0",i[1-l]+":auto",o[1-u]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,r),r,o);if(o)return o(t,n,i),!0}return!1}function jt(t){return"CANVAS"===t.nodeName.toUpperCase()}var qt="undefined"!=typeof window&&!!window.addEventListener,Kt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$t=[];function Jt(t,e,n,i){return n=n||{},i||!w.canvasSupported?Qt(t,e,n):w.browser.firefox&&w.browser.version<"39"&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):Qt(t,e,n),n}function Qt(t,e,n){if(w.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(jt(t)){e=t.getBoundingClientRect();return n.zrX=i-e.left,void(n.zrY=o-e.top)}if(Zt($t,t,i,o))return n.zrX=$t[0],void(n.zrY=$t[1])}n.zrX=n.zrY=0}function te(t){return t||window.event}function ee(t,e,n){if(null!=(e=te(e)).zrX)return e;var i=e.type;i&&0<=i.indexOf("touch")?(i=("touchend"!==i?e.targetTouches:e.changedTouches)[0])&&Jt(t,i,e,n):(Jt(t,e,e,n),o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,t=t.deltaY;return null!=n&&null!=t?3*(0!==t?Math.abs(t):Math.abs(n))*(0<t||!(t<0)&&0<n?-1:1):e}(e),e.zrDelta=o?o/120:-(e.detail||0)/3);var o=e.button;return null==e.which&&void 0!==o&&Kt.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function ne(t,e,n,i){qt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ie=qt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function oe(t){return 2===t.which||3===t.which}var re=(ae.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},ae.prototype.clear=function(){return this._track.length=0,this},ae.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var o={points:[],touches:[],target:e,event:t},r=0,a=i.length;r<a;r++){var s=i[r],l=Jt(n,s,{});o.points.push([l.zrX,l.zrY]),o.touches.push(s)}this._track.push(o)}},ae.prototype._recognize=function(t){for(var e in le)if(le.hasOwnProperty(e)){e=le[e](this._track,t);if(e)return e}},ae);function ae(){this._track=[]}function se(t){var e=t[1][0]-t[0][0],t=t[1][1]-t[0][1];return Math.sqrt(e*e+t*t)}var le={pinch:function(t,e){var n=t.length;if(n){var i=(t[n-1]||{}).points,n=(t[n-2]||{}).points||i;if(n&&1<n.length&&i&&1<i.length){n=se(i)/se(n);isFinite(n)||(n=1),e.pinchScale=n;i=[((i=i)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=i[0],e.pinchY=i[1],{type:"pinch",target:t[0].target,event:e}}}}},ue="silent";function he(){ie(this.event)}var ce,pe=(u(de,ce=Gt),de.prototype.dispose=function(){},de.prototype.setCursor=function(){},de);function de(){var t=null!==ce&&ce.apply(this,arguments)||this;return t.handler=null,t}var fe,ge=function(t,e){this.x=t,this.y=e},ye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],me=(u(ve,fe=Gt),ve.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(E(ye,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},ve.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=_e(this,e,n),o=this._hovered,r=o.target;r&&!r.__zr&&(r=(o=this.findHover(o.x,o.y)).target);i=this._hovered=i?new ge(e,n):this.findHover(e,n),e=i.target,n=this.proxy;n.setCursor&&n.setCursor(e?e.cursor:"default"),r&&e!==r&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(i,"mousemove",t),e&&e!==r&&this.dispatchToElement(i,"mouseover",t)},ve.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},ve.prototype.resize=function(){this._hovered=new ge(0,0)},ve.prototype.dispatch=function(t,e){t=this[t];t&&t.call(this,e)},ve.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},ve.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},ve.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var o="on"+e,r={type:e,event:n=n,target:(t=t).target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:he};i&&(i[o]&&(r.cancelBubble=!!i[o].call(i,r)),i.trigger(e,r),i=i.__hostTarget||i.parent,!r.cancelBubble););r.cancelBubble||(this.trigger(e,r),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(t){"function"==typeof t[o]&&t[o].call(t,r),t.trigger&&t.trigger(e,r)}))}},ve.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),o=new ge(t,e),r=i.length-1;0<=r;r--){var a=void 0;if(i[r]!==n&&!i[r].ignore&&(a=function(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,o=void 0,r=!1;i;){if(!(r=i.ignoreClip?!0:r)){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(o=!0)}a=i.__hostTarget;i=a||i.parent}return!o||ue}return!1}(i[r],t,e))&&(o.topTarget||(o.topTarget=i[r]),a!==ue)){o.target=i[r];break}}return o},ve.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new re);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);"end"===e&&n.clear(),i&&(n=i.type,t.gestureEvent=n,(t=new ge).target=i.target,this.dispatchToElement(t,n,i.event))},ve);function ve(t,e,n,i){var o=fe.call(this)||this;return o._hovered=new ge(0,0),o.storage=t,o.painter=e,o.painterRoot=i,n=n||new pe,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new Bt(o),o}function _e(t,e,n){t=t.painter;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(a){me.prototype[a]=function(t){var e,n,i=t.zrX,o=t.zrY,r=_e(this,i,o);if("mouseup"===a&&r||(n=(e=this.findHover(i,o)).target),"mousedown"===a)this._downEl=n,this._downPoint=[t.zrX,t.zrY],this._upEl=n;else if("mouseup"===a)this._upEl=n;else if("click"===a){if(this._downEl!==this._upEl||!this._downPoint||4<At(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(e,a,t)}});var xe=32,be=7;function we(t,e,n,i){var o=e+1;if(o===n)return 1;if(i(t[o++],t[e])<0){for(;o<n&&i(t[o],t[o-1])<0;)o++;!function(t,e,n){n--;for(;e<n;){var i=t[e];t[e++]=t[n],t[n--]=i}}(t,e,o)}else for(;o<n&&0<=i(t[o],t[o-1]);)o++;return o-e}function Se(t,e,n,i,o){for(i===e&&i++;i<n;i++){for(var r,a=t[i],s=e,l=i;s<l;)o(a,t[r=s+l>>>1])<0?l=r:s=1+r;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;0<u;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Me(t,e,n,i,o,r){var a=0,s=0,l=1;if(0<r(t,e[n+o])){for(s=i-o;l<s&&0<r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}else{for(s=o+1;l<s&&r(t,e[n+o-l])<=0;)(l=1+((a=l)<<1))<=0&&(l=s);i=a,a=o-(l=s<l?s:l),l=o-i}for(a++;a<l;){var u=a+(l-a>>>1);0<r(t,e[n+u])?a=u+1:l=u}return l}function Ie(t,e,n,i,o,r){var a=0,s=0,l=1;if(r(t,e[n+o])<0){for(s=o+1;l<s&&r(t,e[n+o-l])<0;)(l=1+((a=l)<<1))<=0&&(l=s);var u=a,a=o-(l=s<l?s:l),l=o-u}else{for(s=i-o;l<s&&0<=r(t,e[n+o+l]);)(l=1+((a=l)<<1))<=0&&(l=s);s<l&&(l=s),a+=o,l+=o}for(a++;a<l;){var h=a+(l-a>>>1);r(t,e[n+h])<0?l=h:a=h+1}return l}function Te(f,g){var r,a,y=be,s=0,m=(f.length,[]);function e(t){var e=r[t],n=a[t],i=r[t+1],o=a[t+1];a[t]=n+o,t===s-3&&(r[t+1]=r[t+2],a[t+1]=a[t+2]),s--;t=Ie(f[i],f,e,n,0,g);e+=t,0!=(n-=t)&&0!==(o=Me(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;o<e;o++)m[o]=f[t+o];var r=0,a=n,s=t;if(f[s++]=f[a++],0==--i){for(o=0;o<e;o++)f[s+o]=m[r+o];return}if(1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];return f[s+i]=m[r]}var l,u,h,c=y;for(;;){u=l=0,h=!1;do{if(g(f[a],m[r])<0){if(f[s++]=f[a++],u++,(l=0)==--i){h=!0;break}}else if(f[s++]=m[r++],l++,u=0,1==--e){h=!0;break}}while((l|u)<c);if(h)break;do{if(0!==(l=Ie(f[a],m,r,e,0,g))){for(o=0;o<l;o++)f[s+o]=m[r+o];if(s+=l,r+=l,(e-=l)<=1){h=!0;break}}if(f[s++]=f[a++],0==--i){h=!0;break}if(0!==(u=Me(m[r],f,a,i,0,g))){for(o=0;o<u;o++)f[s+o]=f[a+o];if(s+=u,a+=u,0===(i-=u)){h=!0;break}}if(f[s++]=m[r++],1==--e){h=!0;break}}while(c--,be<=l||be<=u);if(h)break;c<0&&(c=0),c+=2}if((y=c)<1&&(y=1),1===e){for(o=0;o<i;o++)f[s+o]=f[a+o];f[s+i]=m[r]}else{if(0===e)throw new Error;for(o=0;o<e;o++)f[s+o]=m[r+o]}}:function(t,e,n,i){var o=0;for(o=0;o<i;o++)m[o]=f[n+o];var r=t+e-1,a=i-1,s=n+i-1,l=0,u=0;if(f[s--]=f[r--],0==--e){for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o];return}if(1===i){for(u=(s-=e)+1,l=(r-=e)+1,o=e-1;0<=o;o--)f[u+o]=f[l+o];return f[s]=m[a]}var h=y;for(;;){var c=0,p=0,d=!1;do{if(g(m[a],f[r])<0){if(f[s--]=f[r--],c++,(p=0)==--e){d=!0;break}}else if(f[s--]=m[a--],p++,c=0,1==--i){d=!0;break}}while((c|p)<h);if(d)break;do{if(0!==(c=e-Ie(m[a],f,t,e,e-1,g))){for(e-=c,u=(s-=c)+1,l=(r-=c)+1,o=c-1;0<=o;o--)f[u+o]=f[l+o];if(0===e){d=!0;break}}if(f[s--]=m[a--],1==--i){d=!0;break}if(0!==(p=i-Me(f[r],m,0,i,i-1,g))){for(i-=p,u=(s-=p)+1,l=(a-=p)+1,o=0;o<p;o++)f[u+o]=m[l+o];if(i<=1){d=!0;break}}if(f[s--]=f[r--],0==--e){d=!0;break}}while(h--,be<=c||be<=p);if(d)break;h<0&&(h=0),h+=2}(y=h)<1&&(y=1);if(1===i){for(u=(s-=e)+1,l=(r-=e)+1,o=e-1;0<=o;o--)f[u+o]=f[l+o];f[s]=m[a]}else{if(0===i)throw new Error;for(l=s-(i-1),o=0;o<i;o++)f[l+o]=m[o]}})(e,n,i,o)}return r=[],a=[],{mergeRuns:function(){for(;1<s;){var t=s-2;if(1<=t&&a[t-1]<=a[t]+a[t+1]||2<=t&&a[t-2]<=a[t]+a[t-1])a[t-1]<a[t+1]&&t--;else if(a[t]>a[t+1])break;e(t)}},forceMergeRuns:function(){for(;1<s;){var t=s-2;0<t&&a[t-1]<a[t+1]&&t--,e(t)}},pushRun:function(t,e){r[s]=t,a[s]=e,s+=1}}}function Ce(t,e,n,i){n=n||0;var o=(i=i||t.length)-n;if(!(o<2)){var r=0;if(o<xe)Se(t,n,i,n+(r=we(t,n,i,e)),e);else{var a,s=Te(t,e),l=function(t){for(var e=0;xe<=t;)e|=1&t,t>>=1;return t+e}(o);do{}while((r=we(t,n,i,e))<l&&(Se(t,n,n+(a=l<(a=o)?l:a),n+r,e),r=a),s.pushRun(n,r),s.mergeRuns(),n+=r,0!==(o-=r));s.forceMergeRuns()}}}var De=1,Ae=4,ke=!1;function Le(){ke||(ke=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Pe(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var Oe=(Re.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},Re.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return!t&&n.length||this.updateDisplayList(e),n},Re.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,o=e.length;i<o;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,w.canvasSupported&&Ce(n,Pe)},Re.prototype._updateAndAddDisplayable=function(t,e,n){if(!t.ignore||n){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e=e?e.slice():[];for(var o=i,r=t;o;)o.parent=r,o.updateTransform(),e.push(o),o=(r=o).getClipPath()}if(t.childrenRef){for(var a=t.childrenRef(),s=0;s<a.length;s++){var l=a[s];t.__dirty&&(l.__dirty|=De),this._updateAndAddDisplayable(l,e,n)}t.__dirty=0}else{var u=t;e&&e.length?u.__clipPaths=e:u.__clipPaths&&0<u.__clipPaths.length&&(u.__clipPaths=[]),isNaN(u.z)&&(Le(),u.z=0),isNaN(u.z2)&&(Le(),u.z2=0),isNaN(u.zlevel)&&(Le(),u.zlevel=0),this._displayList[this._displayListLen++]=u}u=t.getDecalElement&&t.getDecalElement();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextGuideLine();u&&this._updateAndAddDisplayable(u,e,n);u=t.getTextContent();u&&this._updateAndAddDisplayable(u,e,n)}},Re.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},Re.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);else{var i=C(this._roots,t);0<=i&&this._roots.splice(i,1)}},Re.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},Re.prototype.getRoots=function(){return this._roots},Re.prototype.dispose=function(){this._displayList=null,this._roots=null},Re);function Re(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Pe}var Ne="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},Ee={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(e=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--t)*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)},backIn:function(t){return t*t*(2.70158*t-1.70158)},backOut:function(t){return--t*t*(2.70158*t+1.70158)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((1+e)*t-e)*.5:.5*((t-=2)*t*((1+e)*t+e)+2)},bounceIn:function(t){return 1-Ee.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Ee.bounceIn(2*t):.5*Ee.bounceOut(2*t-1)+.5}},ze=(Be.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){(n=(t-this._startTime-this._pausedTime)/this._life)<0&&(n=0);var n=Math.min(n,1),i=this.easing,i="string"==typeof i?Ee[i]:i,i="function"==typeof i?i(n):n;if(this.onframe&&this.onframe(i),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},Be.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},Be.prototype.pause=function(){this._paused=!0},Be.prototype.resume=function(){this._paused=!1},Be);function Be(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}var Ve=function(t){this.value=t},Ge=(Fe.prototype.insert=function(t){t=new Ve(t);return this.insertEntry(t),t},Fe.prototype.insertEntry=function(t){this.head?((this.tail.next=t).prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Fe.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Fe.prototype.len=function(){return this._len},Fe.prototype.clear=function(){this.head=this.tail=null,this._len=0},Fe);function Fe(){this._len=0}var He=(We.prototype.put=function(t,e){var n,i,o=this._list,r=this._map,a=null;return null==r[t]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete r[i.key],a=i.value,this._lastRemovedEntry=i),n?n.value=e:n=new Ve(e),n.key=t,o.insertEntry(n),r[t]=n),a},We.prototype.get=function(t){var e=this._map[t],t=this._list;if(null!=e)return e!==t.tail&&(t.remove(e),t.insertEntry(e)),e.value},We.prototype.clear=function(){this._list.clear(),this._map={}},We.prototype.len=function(){return this._list.len()},We);function We(t){this._list=new Ge,this._maxSize=10,this._map={},this._maxSize=t}var Ue={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Ye(t){return(t=Math.round(t))<0?0:255<t?255:t}function Xe(t){return t<0?0:1<t?1:t}function Ze(t){return t.length&&"%"===t.charAt(t.length-1)?Ye(parseFloat(t)/100*255):Ye(parseInt(t,10))}function je(t){return t.length&&"%"===t.charAt(t.length-1)?Xe(parseFloat(t)/100):Xe(parseFloat(t))}function qe(t,e,n){return n<0?n+=1:1<n&&--n,6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Ke(t,e,n){return t+(e-t)*n}function $e(t,e,n,i,o){return t[0]=e,t[1]=n,t[2]=i,t[3]=o,t}function Je(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Qe=new He(20),tn=null;function en(t,e){tn&&Je(tn,e),tn=Qe.put(t,tn||e.slice())}function nn(t,e){if(t){e=e||[];var n=Qe.get(t);if(n)return Je(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in Ue)return Je(e,Ue[i]),en(t,e),e;var o=i.length;if("#"===i.charAt(0))return 4===o||5===o?0<=(r=parseInt(i.slice(1,4),16))&&r<=4095?($e(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),en(t,e),e):void $e(e,0,0,0,1):7===o||9===o?0<=(r=parseInt(i.slice(1,7),16))&&r<=16777215?($e(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),en(t,e),e):void $e(e,0,0,0,1):void 0;var n=i.indexOf("("),r=i.indexOf(")");if(-1!==n&&r+1===o){var o=i.substr(0,n),a=i.substr(n+1,r-(n+1)).split(","),s=1;switch(o){case"rgba":if(4!==a.length)return 3===a.length?$e(e,+a[0],+a[1],+a[2],1):$e(e,0,0,0,1);s=je(a.pop());case"rgb":return 3!==a.length?void $e(e,0,0,0,1):($e(e,Ze(a[0]),Ze(a[1]),Ze(a[2]),s),en(t,e),e);case"hsla":return 4!==a.length?void $e(e,0,0,0,1):(a[3]=je(a[3]),on(a,e),en(t,e),e);case"hsl":return 3!==a.length?void $e(e,0,0,0,1):(on(a,e),en(t,e),e);default:return}}$e(e,0,0,0,1)}}function on(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=je(t[1]),o=je(t[2]),i=o<=.5?o*(i+1):o+i-o*i,o=2*o-i;return $e(e=e||[],Ye(255*qe(o,i,n+1/3)),Ye(255*qe(o,i,n)),Ye(255*qe(o,i,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function rn(t,e){var n=nn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,255<n[i]?n[i]=255:n[i]<0&&(n[i]=0);return cn(n,4===n.length?"rgba":"rgb")}}function an(t){t=nn(t);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function sn(t,e,n){if(e&&e.length&&0<=t&&t<=1){n=n||[];var i=t*(e.length-1),o=Math.floor(i),r=Math.ceil(i),t=e[o],r=e[r],o=i-o;return n[0]=Ye(Ke(t[0],r[0],o)),n[1]=Ye(Ke(t[1],r[1],o)),n[2]=Ye(Ke(t[2],r[2],o)),n[3]=Xe(Ke(t[3],r[3],o)),n}}function ln(t,e,n){if(e&&e.length&&0<=t&&t<=1){var i=t*(e.length-1),o=Math.floor(i),r=Math.ceil(i),a=nn(e[o]),t=nn(e[r]),e=i-o,e=cn([Ye(Ke(a[0],t[0],e)),Ye(Ke(a[1],t[1],e)),Ye(Ke(a[2],t[2],e)),Xe(Ke(a[3],t[3],e))],"rgba");return n?{color:e,leftIndex:o,rightIndex:r,value:i}:e}}function un(t,e,n,i){var o=nn(t);if(t)return o=function(t){if(t){var e,n,i,o=t[0]/255,r=t[1]/255,a=t[2]/255,s=Math.min(o,r,a),l=Math.max(o,r,a),u=l-s,h=(l+s)/2;0==u?n=e=0:(n=h<.5?u/(l+s):u/(2-l-s),i=((l-o)/6+u/2)/u,s=((l-r)/6+u/2)/u,u=((l-a)/6+u/2)/u,o===l?e=u-s:r===l?e=1/3+i-u:a===l&&(e=2/3+s-i),e<0&&(e+=1),1<e&&--e);h=[360*e,n,h];return null!=t[3]&&h.push(t[3]),h}}(o),null!=e&&(o[0]=(e=e,(e=Math.round(e))<0?0:360<e?360:e)),null!=n&&(o[1]=je(n)),null!=i&&(o[2]=je(i)),cn(on(o),"rgba")}function hn(t,e){t=nn(t);if(t&&null!=e)return t[3]=Xe(e),cn(t,"rgba")}function cn(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function pn(t,e){t=nn(t);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var dn=Object.freeze({__proto__:null,parse:nn,lift:rn,toHex:an,fastLerp:sn,fastMapToColor:sn,lerp:ln,mapToColor:ln,modifyHSL:un,modifyAlpha:hn,stringify:cn,lum:pn,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),fn=Array.prototype.slice;function gn(t,e,n){return(e-t)*n+t}function yn(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=gn(e[r],n[r],i)}function mn(t,e,n,i){for(var o=e.length,r=0;r<o;r++)t[r]=e[r]+n[r]*i;return t}function vn(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=e[a][s]+n[a][s]*i}return t}function _n(t,e){var n=t.length;if(n===e.length){for(var i=0;i<n;i++)if(t[i]!==e[i])return;return 1}}function xn(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function bn(t,e,n,i,o,r,a,s){for(var l=e.length,u=0;u<l;u++)t[u]=xn(e[u],n[u],i[u],o[u],r,a,s)}function wn(t){if(k(t)){var e=t.length;if(k(t[0])){for(var n=[],i=0;i<e;i++)n.push(fn.call(t[i]));return n}return fn.call(t)}return t}function Sn(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}var Mn=[0,0,0,0],In=(Tn.prototype.isFinished=function(){return this._finished},Tn.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},Tn.prototype.needsAnimate=function(){return!this._isAllValueEqual&&2<=this.keyframes.length&&this.interpolable&&0<this.maxTime},Tn.prototype.getAdditiveTrack=function(){return this._additiveTrack},Tn.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var o,r=k((r=e)&&r[0])?2:1;if(0<i&&this.arrDim!==r)return void(this.interpolable=!1);if(1==r&&"number"!=typeof e[0]||2==r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);0<i&&(o=n[i-1],this._isAllValueEqual&&(1==r&&_n(e,o.value)||(this._isAllValueEqual=!1))),this.arrDim=r}else{if(0<this.arrDim)return void(this.interpolable=!1);if("string"==typeof e){r=nn(e);r?(e=r,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e||isNaN(e))return void(this.interpolable=!1);this._isAllValueEqual&&0<i&&(o=n[i-1],(this.isValueColor&&!_n(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1))}e={time:t,value:e,percent:0};return this.keyframes.push(e),e},Tn.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort(function(t,e){return t.time-e.time});for(var n=this.arrDim,i=e.length,o=e[i-1],r=0;r<i;r++)e[r].percent=e[r].time/this.maxTime,0<n&&r!==i-1&&function(t,e,n){var i=t,o=e;if(i.push&&o.push){var e=i.length,r=o.length;if(e!==r)if(r<e)i.length=r;else for(var a=e;a<r;a++)i.push(1===n?o[a]:fn.call(o[a]));for(var s=i[0]&&i[0].length,a=0;a<i.length;a++)if(1===n)isNaN(i[a])&&(i[a]=o[a]);else for(var l=0;l<s;l++)isNaN(i[a][l])&&(i[a][l]=o[a][l])}}(e[r].value,o.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;for(var a=e[0].value,r=0;r<i;r++)0===n?this.isValueColor?e[r].additiveValue=mn([],e[r].value,a,-1):e[r].additiveValue=e[r].value-a:1===n?e[r].additiveValue=mn([],e[r].value,a,-1):2===n&&(e[r].additiveValue=vn([],e[r].value,a,-1))}},Tn.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=null!=this._additiveTrack,i=n?"additiveValue":"value",o=this.keyframes,r=this.keyframes.length,a=this.propName,s=this.arrDim,l=this.isValueColor;if(e<0)u=0;else if(e<this._lastFramePercent){for(var u=Math.min(this._lastFrame+1,r-1);0<=u&&!(o[u].percent<=e);u--);u=Math.min(u,r-2)}else{for(u=this._lastFrame;u<r&&!(o[u].percent>e);u++);u=Math.min(u-1,r-2)}var h,c,p,d,f,g,y,m=o[u+1],v=o[u];v&&m&&(this._lastFrame=u,this._lastFramePercent=e,0!=(g=m.percent-v.percent)&&(h=(e-v.percent)/g,c=n?this._additiveValue:l?Mn:t[a],(0<s||l)&&!c&&(c=this._additiveValue=[]),this.useSpline?(p=o[u][i],d=o[0===u?u:u-1][i],f=o[r-2<u?r-1:u+1][i],g=o[r-3<u?r-1:u+2][i],0<s?(1===s?bn:function(t,e,n,i,o,r,a,s){for(var l=e.length,u=e[0].length,h=0;h<l;h++){t[h]||(t[1]=[]);for(var c=0;c<u;c++)t[h][c]=xn(e[h][c],n[h][c],i[h][c],o[h][c],r,a,s)}})(c,d,p,f,g,h,h*h,h*h*h):l?(bn(c,d,p,f,g,h,h*h,h*h*h),n||(t[a]=Sn(c))):(y=void 0,y=this.interpolable?xn(d,p,f,g,h,h*h,h*h*h):f,n?this._additiveValue=y:t[a]=y)):0<s?(1===s?yn:function(t,e,n,i){for(var o=e.length,r=o&&e[0].length,a=0;a<o;a++){t[a]||(t[a]=[]);for(var s=0;s<r;s++)t[a][s]=gn(e[a][s],n[a][s],i)}})(c,v[i],m[i],h):l?(yn(c,v[i],m[i],h),n||(t[a]=Sn(c))):(y=void 0,y=this.interpolable?gn(v[i],m[i],h):(v=v[i],i=m[i],.5<h?i:v),n?this._additiveValue=y:t[a]=y),n&&this._addToTarget(t)))}},Tn.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(nn(t[n],Mn),mn(Mn,Mn,i,1),t[n]=Sn(Mn)):t[n]=t[n]+i:1===e?mn(t[n],t[n],i,1):2===e&&vn(t[n],t[n],i,1)},Tn);function Tn(t){this.keyframes=[],this.maxTime=0,this.arrDim=0,this.interpolable=!0,this._needsSort=!1,this._isAllValueEqual=!0,this._lastFrame=0,this._lastFramePercent=0,this.propName=t}var Cn=(Dn.prototype.getTarget=function(){return this._target},Dn.prototype.changeTarget=function(t){this._target=t},Dn.prototype.when=function(t,e){return this.whenWithKeys(t,e,z(e))},Dn.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,o=0;o<n.length;o++){var r=n[o];if(!(s=i[r])){var a,s=i[r]=new In(r),l=void 0,u=this._getAdditiveTrack(r);if(u?(l=(a=u.keyframes[u.keyframes.length-1])&&a.value,u.isValueColor&&l&&(l=Sn(l))):l=this._target[r],null==l)continue;0!==t&&s.addKeyframe(0,wn(l)),this._trackKeys.push(r)}s.addKeyframe(t,wn(e[r]))}return this._maxTime=Math.max(this._maxTime,t),this},Dn.prototype.pause=function(){this._clip.pause(),this._paused=!0},Dn.prototype.resume=function(){this._clip.resume(),this._paused=!1},Dn.prototype.isPaused=function(){return!!this._paused},Dn.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},Dn.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},Dn.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},Dn.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var o=n[i].getTrack(t);o&&(e=o)}return e},Dn.prototype.start=function(t,e){if(!(0<this._started)){this._started=1;for(var r=this,a=[],n=0;n<this._trackKeys.length;n++){var i=this._trackKeys[n],o=this._tracks[i],s=this._getAdditiveTrack(i),i=o.keyframes;o.prepare(s),o.needsAnimate()?a.push(o):o.interpolable||(i=i[i.length-1])&&(r._target[o.propName]=i.value)}return a.length||e?(e=new ze({life:this._maxTime,loop:this._loop,delay:this._delay,onframe:function(t){r._started=2;var e=r._additiveAnimators;if(e){for(var n=!1,i=0;i<e.length;i++)if(e[i]._clip){n=!0;break}n||(r._additiveAnimators=null)}for(i=0;i<a.length;i++)a[i].step(r._target,t);var o=r._onframeCbs;if(o)for(i=0;i<o.length;i++)o[i](r._target,t)},ondestroy:function(){r._doneCallback()}}),this._clip=e,this.animation&&this.animation.addClip(e),t&&"spline"!==t&&(e.easing=t)):this._doneCallback(),this}},Dn.prototype.stop=function(t){var e;this._clip&&(e=this._clip,t&&e.onframe(1),this._abortedCallback())},Dn.prototype.delay=function(t){return this._delay=t,this},Dn.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},Dn.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},Dn.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},Dn.prototype.getClip=function(){return this._clip},Dn.prototype.getTrack=function(t){return this._tracks[t]},Dn.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,o=0;o<t.length;o++){var r=n[t[o]];r&&(e?r.step(this._target,1):1===this._started&&r.step(this._target,0),r.setFinished())}for(var a=!0,o=0;o<i.length;o++)if(!n[i[o]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},Dn.prototype.saveFinalToTarget=function(t,e){if(t){e=e||this._trackKeys;for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&!r.isFinished()&&((i=(i=r.keyframes)[i.length-1])&&(i=wn(i.value),r.isValueColor&&(i=Sn(i)),t[o]=i))}}},Dn.prototype.__changeFinalValue=function(t,e){e=e||z(t);for(var n=0;n<e.length;n++){var i,o=e[n],r=this._tracks[o];r&&(1<(i=r.keyframes).length&&(i=i.pop(),r.addKeyframe(i.time,t[o]),r.prepare(r.getAdditiveTrack())))}},Dn);function Dn(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,(this._loop=e)&&n?x("Can' use additive animation on looped animation."):this._additiveAnimators=n}var An,kn=(u(Ln,An=Gt),Ln.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?((this._clipsTail.next=t).prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},Ln.prototype.addAnimator=function(t){t.animation=this;t=t.getClip();t&&this.addClip(t)},Ln.prototype.removeClip=function(t){var e,n;t.animation&&(e=t.prev,n=t.next,e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null)},Ln.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},Ln.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;)var o=i.next,i=(i.step(e,n)&&(i.ondestroy&&i.ondestroy(),this.removeClip(i)),o);this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},Ln.prototype._startLoop=function(){var e=this;this._running=!0,Ne(function t(){e._running&&(Ne(t),e._paused||e.update())})},Ln.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},Ln.prototype.stop=function(){this._running=!1},Ln.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},Ln.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},Ln.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},Ln.prototype.isFinished=function(){return null==this._clipsHead},Ln.prototype.animate=function(t,e){e=e||{},this.start();e=new Cn(t,e.loop);return this.addAnimator(e),e},Ln);function Ln(t){var e=An.call(this)||this;return e._running=!1,e._time=0,e._pausedTime=0,e._pauseStart=0,e._paused=!1,t=t||{},e.stage=t.stage||{},e.onframe=t.onframe||function(){},e}var Pn,On=w.domSupported,Rn=(Pn={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:vp=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:L(vp,function(t){var e=t.replace("mouse","pointer");return Pn.hasOwnProperty(e)?e:t})}),Nn=["mousemove","mouseup"],En=["pointermove","pointerup"],zn=!1;function Bn(t){t=t.pointerType;return"pen"===t||"touch"===t}function Vn(t){t&&(t.zrByTouch=!0)}function Gn(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Fn=function(t,e){this.stopPropagation=gt,this.stopImmediatePropagation=gt,this.preventDefault=gt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Hn={mousedown:function(t){t=ee(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ee(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ee(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Gn(this,(t=ee(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){zn=!0,t=ee(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){zn||(t=ee(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Vn(t=ee(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Hn.mousemove.call(this,t),Hn.mousedown.call(this,t)},touchmove:function(t){Vn(t=ee(this.dom,t)),this.handler.processGesture(t,"change"),Hn.mousemove.call(this,t)},touchend:function(t){Vn(t=ee(this.dom,t)),this.handler.processGesture(t,"end"),Hn.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Hn.click.call(this,t)},pointerdown:function(t){Hn.mousedown.call(this,t)},pointermove:function(t){Bn(t)||Hn.mousemove.call(this,t)},pointerup:function(t){Hn.mouseup.call(this,t)},pointerout:function(t){Bn(t)||Hn.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],function(e){Hn[e]=function(t){t=ee(this.dom,t),this.trigger(e,t)}});var Wn={pointermove:function(t){Bn(t)||Wn.mousemove.call(this,t)},pointerup:function(t){Wn.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function Un(i,o){var r=o.domHandlers;w.pointerEventsSupported?E(Rn.pointer,function(e){Xn(o,e,function(t){r[e].call(i,t)})}):(w.touchEventsSupported&&E(Rn.touch,function(n){Xn(o,n,function(t){var e;r[n].call(i,t),(e=o).touching=!0,null!=e.touchTimer&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)})}),E(Rn.mouse,function(e){Xn(o,e,function(t){t=te(t),o.touching||r[e].call(i,t)})}))}function Yn(o,r){function t(i){Xn(r,i,function(t){var e,n;t=te(t),Gn(o,t.target)||(n=t,t=ee((e=o).dom,new Fn(e,n),!0),r.domHandlers[i].call(o,t))},{capture:!0})}w.pointerEventsSupported?E(En,t):w.touchEventsSupported||E(Nn,t)}function Xn(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,ne(t.domTarget,e,n,i)}function Zn(t){var e,n,i,o,r,a=t.mounted;for(e in a)a.hasOwnProperty(e)&&(n=t.domTarget,o=a[i=e],r=t.listenerOpts[e],qt?n.removeEventListener(i,o,r):n.detachEvent("on"+i,o));t.mounted={}}var jn,qn=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Kn=(u($n,jn=Gt),$n.prototype.dispose=function(){Zn(this._localHandlerScope),On&&Zn(this._globalHandlerScope)},$n.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},$n.prototype.__togglePointerCapture=function(t){var e;this.__mayPointerCapture=null,On&&+this.__pointerCapturing^+t&&(this.__pointerCapturing=t,e=this._globalHandlerScope,t?Yn(this,e):Zn(e))},$n);function $n(t,e){var n=jn.call(this)||this;return n.__pointerCapturing=!1,n.dom=t,n.painterRoot=e,n._localHandlerScope=new qn(t,Hn),On&&(n._globalHandlerScope=new qn(document,Wn)),Un(n,n._localHandlerScope),n}var Jn=1,Qn=Jn="undefined"!=typeof window?Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1):Jn,ti="#333",ei="#ccc";function ni(){return[1,0,0,1,0,0]}function ii(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function oi(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ri(t,e,n){var i=e[0]*n[0]+e[2]*n[1],o=e[1]*n[0]+e[3]*n[1],r=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],e=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=o,t[2]=r,t[3]=a,t[4]=s,t[5]=e,t}function ai(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function si(t,e,n){var i=e[0],o=e[2],r=e[4],a=e[1],s=e[3],l=e[5],e=Math.sin(n),n=Math.cos(n);return t[0]=i*n+a*e,t[1]=-i*e+a*n,t[2]=o*n+s*e,t[3]=-o*e+n*s,t[4]=n*r+e*l,t[5]=n*l-e*r,t}function li(t,e,n){var i=n[0],n=n[1];return t[0]=e[0]*i,t[1]=e[1]*n,t[2]=e[2]*i,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*n,t}function ui(t,e){var n=e[0],i=e[2],o=e[4],r=e[1],a=e[3],s=e[5],e=n*a-r*i;return e?(e=1/e,t[0]=a*e,t[1]=-r*e,t[2]=-i*e,t[3]=n*e,t[4]=(i*s-a*o)*e,t[5]=(r*o-n*s)*e,t):null}function hi(t){var e=ni();return oi(e,t),e}var ci=Object.freeze({__proto__:null,create:ni,identity:ii,copy:oi,mul:ri,translate:ai,rotate:si,scale:li,invert:ui,clone:hi}),pi=ii;function di(t){return 5e-5<t||t<-5e-5}var fi=[],gi=[],yi=ni(),mi=Math.abs,vi=(_i.prototype.getLocalTransform=function(t){return _i.getLocalTransform(this,t)},_i.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},_i.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},_i.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},_i.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},_i.prototype.needLocalTransform=function(){return di(this.rotation)||di(this.x)||di(this.y)||di(this.scaleX-1)||di(this.scaleY-1)},_i.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||ni(),e?this.getLocalTransform(n):pi(n),t&&(e?ri(n,t,n):oi(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&pi(n)},_i.prototype._resolveGlobalScaleRatio=function(t){var e,n,i=this.globalScaleRatio;null!=i&&1!==i&&(this.getGlobalScale(fi),e=((fi[0]-(n=fi[0]<0?-1:1))*i+n)/fi[0]||0,n=((fi[1]-(n=fi[1]<0?-1:1))*i+n)/fi[1]||0,t[0]*=e,t[1]*=e,t[2]*=n,t[3]*=n),this.invTransform=this.invTransform||ni(),ui(this.invTransform,t)},_i.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},_i.prototype.setLocalTransform=function(t){var e,n,i,o;t&&(o=t[0]*t[0]+t[1]*t[1],i=t[2]*t[2]+t[3]*t[3],e=Math.atan2(t[1],t[0]),n=Math.PI/2+e-Math.atan2(t[3],t[2]),i=Math.sqrt(i)*Math.cos(n),o=Math.sqrt(o),this.skewX=n,this.skewY=0,this.rotation=-e,this.x=+t[4],this.y=+t[5],this.scaleX=o,this.scaleY=i,this.originX=0,this.originY=0)},_i.prototype.decomposeTransform=function(){var t,e,n;this.transform&&(n=this.parent,t=this.transform,n&&n.transform&&(ri(gi,n.invTransform,t),t=gi),e=this.originX,n=this.originY,(e||n)&&(yi[4]=e,yi[5]=n,ri(gi,t,yi),gi[4]-=e,gi[5]-=n,t=gi),this.setLocalTransform(t))},_i.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1])):(t[0]=1,t[1]=1),t},_i.prototype.transformCoordToLocal=function(t,e){t=[t,e],e=this.invTransform;return e&&Ot(t,t,e),t},_i.prototype.transformCoordToGlobal=function(t,e){t=[t,e],e=this.transform;return e&&Ot(t,t,e),t},_i.prototype.getLineScale=function(){var t=this.transform;return t&&1e-10<mi(t[0]-1)&&1e-10<mi(t[3]-1)?Math.sqrt(mi(t[0]*t[3]-t[2]*t[1])):1},_i.prototype.copyTransform=function(t){for(var e=0;e<xi.length;e++){var n=xi[e];this[n]=t[n]}},_i.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,o=t.scaleX,r=t.scaleY,a=t.rotation||0,s=t.x,l=t.y,u=t.skewX?Math.tan(t.skewX):0,t=t.skewY?Math.tan(-t.skewY):0;return n||i?(e[4]=-n*o-u*i*r,e[5]=-i*r-t*n*o):e[4]=e[5]=0,e[0]=o,e[3]=r,e[1]=t*o,e[2]=u*r,a&&si(e,e,a),e[4]+=n+s,e[5]+=i+l,e},_i.initDefaultProps=((Rg=_i.prototype).x=0,Rg.y=0,Rg.scaleX=1,Rg.scaleY=1,Rg.originX=0,Rg.originY=0,Rg.skewX=0,Rg.skewY=0,Rg.rotation=0,void(Rg.globalScaleRatio=1)),_i);function _i(){}var xi=["x","y","originX","originY","rotation","scaleX","scaleY","skewX","skewY"],bi=(wi.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},wi.prototype.clone=function(){return new wi(this.x,this.y)},wi.prototype.set=function(t,e){return this.x=t,this.y=e,this},wi.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},wi.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},wi.prototype.scale=function(t){this.x*=t,this.y*=t},wi.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},wi.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},wi.prototype.dot=function(t){return this.x*t.x+this.y*t.y},wi.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},wi.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},wi.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},wi.prototype.distance=function(t){var e=this.x-t.x,t=this.y-t.y;return Math.sqrt(e*e+t*t)},wi.prototype.distanceSquare=function(t){var e=this.x-t.x,t=this.y-t.y;return e*e+t*t},wi.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},wi.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},wi.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},wi.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},wi.set=function(t,e,n){t.x=e,t.y=n},wi.copy=function(t,e){t.x=e.x,t.y=e.y},wi.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},wi.lenSquare=function(t){return t.x*t.x+t.y*t.y},wi.dot=function(t,e){return t.x*e.x+t.y*e.y},wi.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},wi.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},wi.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},wi.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},wi.lerp=function(t,e,n,i){var o=1-i;t.x=o*e.x+i*n.x,t.y=o*e.y+i*n.y},wi);function wi(t,e){this.x=t||0,this.y=e||0}var Si=Math.min,Mi=Math.max,Ii=new bi,Ti=new bi,Ci=new bi,Di=new bi,Ai=new bi,ki=new bi,Li=(Pi.prototype.union=function(t){var e=Si(t.x,this.x),n=Si(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Mi(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Mi(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},Pi.prototype.applyTransform=function(t){Pi.applyTransform(this,this,t)},Pi.prototype.calculateTransform=function(t){var e=t.width/this.width,n=t.height/this.height,i=ni();return ai(i,i,[-this.x,-this.y]),li(i,i,[e,n]),ai(i,i,[t.x,t.y]),i},Pi.prototype.intersect=function(t,e){if(!t)return!1;t instanceof Pi||(t=Pi.create(t));var n,i,o,r,a,s,l,u=this.x,h=this.x+this.width,c=this.y,p=this.y+this.height,d=t.x,f=t.x+t.width,g=t.y,y=t.y+t.height,m=!(h<d||f<u||p<g||y<c);return e&&(n=1/0,i=0,o=Math.abs(h-d),r=Math.abs(f-u),a=Math.abs(p-g),s=Math.abs(y-c),l=Math.min(o,r),t=Math.min(a,s),h<d||f<u?i<l&&(i=l,o<r?bi.set(ki,-o,0):bi.set(ki,r,0)):l<n&&(n=l,o<r?bi.set(Ai,o,0):bi.set(Ai,-r,0)),p<g||y<c?i<t&&(i=t,a<s?bi.set(ki,0,-a):bi.set(ki,0,s)):l<n&&(n=l,a<s?bi.set(Ai,0,a):bi.set(Ai,0,-s))),e&&bi.copy(e,m?Ai:ki),m},Pi.prototype.contain=function(t,e){return t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height},Pi.prototype.clone=function(){return new Pi(this.x,this.y,this.width,this.height)},Pi.prototype.copy=function(t){Pi.copy(this,t)},Pi.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Pi.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Pi.prototype.isZero=function(){return 0===this.width||0===this.height},Pi.create=function(t){return new Pi(t.x,t.y,t.width,t.height)},Pi.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},Pi.applyTransform=function(t,e,n){if(n){if(n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]){var i=n[0],o=n[3],r=n[4],a=n[5];return t.x=e.x*i+r,t.y=e.y*o+a,t.width=e.width*i,t.height=e.height*o,t.width<0&&(t.x+=t.width,t.width=-t.width),void(t.height<0&&(t.y+=t.height,t.height=-t.height))}Ii.x=Ci.x=e.x,Ii.y=Di.y=e.y,Ti.x=Di.x=e.x+e.width,Ti.y=Ci.y=e.y+e.height,Ii.transform(n),Di.transform(n),Ti.transform(n),Ci.transform(n),t.x=Si(Ii.x,Ti.x,Ci.x,Di.x),t.y=Si(Ii.y,Ti.y,Ci.y,Di.y);o=Mi(Ii.x,Ti.x,Ci.x,Di.x),n=Mi(Ii.y,Ti.y,Ci.y,Di.y);t.width=o-t.x,t.height=n-t.y}else t!==e&&Pi.copy(t,e)},Pi);function Pi(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}var Oi,Ri,Ni={},Ei="12px sans-serif";var zi={measureText:function(t,e){return Oi=Oi||D().getContext("2d"),Ri!==e&&(Ri=Oi.font=e||Ei),Oi.measureText(t)}};function Bi(t,e){var n=Ni[e=e||Ei],i=(n=n||(Ni[e]=new He(500))).get(t);return null==i&&(i=zi.measureText(t,e).width,n.put(t,i)),i}function Vi(t,e,n,i){t=Bi(t,e),e=Wi(e),n=Fi(0,t,n),i=Hi(0,e,i);return new Li(n,i,t,e)}function Gi(t,e,n,i){var o=((t||"")+"").split("\n");if(1===o.length)return Vi(o[0],e,n,i);for(var r=new Li(0,0,0,0),a=0;a<o.length;a++){var s=Vi(o[a],e,n,i);0===a?r.copy(s):r.union(s)}return r}function Fi(t,e,n){return"right"===n?t-=e:"center"===n&&(t-=e/2),t}function Hi(t,e,n){return"middle"===n?t-=e/2:"bottom"===n&&(t-=e),t}function Wi(t){return Bi("国",t)}function Ui(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t}function Yi(t,e,n){var i=e.position||"inside",o=null!=e.distance?e.distance:5,r=n.height,a=n.width,s=r/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Ui(i[0],n.width),u+=Ui(i[1],n.height),c=h=null;else switch(i){case"left":l-=o,u+=s,h="right",c="middle";break;case"right":l+=o+a,u+=s,c="middle";break;case"top":l+=a/2,u-=o,h="center",c="bottom";break;case"bottom":l+=a/2,u+=r+o,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=o,u+=s,c="middle";break;case"insideRight":l+=a-o,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=o,h="center";break;case"insideBottom":l+=a/2,u+=r-o,h="center",c="bottom";break;case"insideTopLeft":l+=o,u+=o;break;case"insideTopRight":l+=a-o,u+=o,h="right";break;case"insideBottomLeft":l+=o,u+=r-o,c="bottom";break;case"insideBottomRight":l+=a-o,u+=r-o,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Xi="__zr_normal__",Zi=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],ji={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},qi={},Ki=new Li(0,0,0,0),$i=(Ji.prototype._init=function(t){this.attr(t)},Ji.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;(i=i||(this.transform=[1,0,0,1,0,0]))[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},Ji.prototype.beforeUpdate=function(){},Ji.prototype.afterUpdate=function(){},Ji.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},Ji.prototype.updateInnerText=function(t){var e,n,i,o,r,a,s,l,u,h,c=this._textContent;!c||c.ignore&&!t||(this.textConfig||(this.textConfig={}),a=(e=this.textConfig).local,o=i=void 0,n=!1,(u=c.innerTransformable).parent=a?this:null,l=!1,u.copyTransform(c),null!=e.position&&(s=Ki,e.layoutRect?s.copy(e.layoutRect):s.copy(this.getBoundingRect()),a||s.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(qi,e,s):Yi(qi,e,s),u.x=qi.x,u.y=qi.y,i=qi.align,o=qi.verticalAlign,(r=e.origin)&&null!=e.rotation&&(h=t=void 0,h="center"===r?(t=.5*s.width,.5*s.height):(t=Ui(r[0],s.width),Ui(r[1],s.height)),l=!0,u.originX=-u.x+t+(a?0:s.x),u.originY=-u.y+h+(a?0:s.y))),null!=e.rotation&&(u.rotation=e.rotation),(h=e.offset)&&(u.x+=h[0],u.y+=h[1],l||(u.originX=-h[0],u.originY=-h[1])),a=null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),h=u=l=void 0,a&&this.canBeInsideText()?(l=e.insideFill,u=e.insideStroke,null!=l&&"auto"!==l||(l=this.getInsideTextFill()),null!=u&&"auto"!==u||(u=this.getInsideTextStroke(l),h=!0)):(l=e.outsideFill,u=e.outsideStroke,null!=l&&"auto"!==l||(l=this.getOutsideFill()),null!=u&&"auto"!==u||(u=this.getOutsideStroke(l),h=!0)),(l=l||"#000")===s.fill&&u===s.stroke&&h===s.autoStroke&&i===s.align&&o===s.verticalAlign||(n=!0,s.fill=l,s.stroke=u,s.autoStroke=h,s.align=i,s.verticalAlign=o,c.setDefaultTextStyle(s)),c.__dirty|=De,n&&c.dirtyStyle(!0))},Ji.prototype.canBeInsideText=function(){return!0},Ji.prototype.getInsideTextFill=function(){return"#fff"},Ji.prototype.getInsideTextStroke=function(t){return"#000"},Ji.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ei:ti},Ji.prototype.getOutsideStroke=function(t){for(var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&nn(e),i=(n=n||[255,255,255,1])[3],o=this.__zr.isDarkMode(),r=0;r<3;r++)n[r]=n[r]*i+(o?0:255)*(1-i);return n[3]=1,cn(n,"rgba")},Ji.prototype.traverse=function(t,e){},Ji.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},P(this.extra,e)):this[t]=e},Ji.prototype.hide=function(){this.ignore=!0,this.markRedraw()},Ji.prototype.show=function(){this.ignore=!1,this.markRedraw()},Ji.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Y(t))for(var n=z(t),i=0;i<n.length;i++){var o=n[i];this.attrKV(o,t[o])}return this.markRedraw(),this},Ji.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],o=i.__fromStateTransition;o&&o!==Xi||(o=(o=i.targetName)?e[o]:e,i.saveFinalToTarget(o))}},Ji.prototype._innerSaveToNormal=function(t){var e=(e=this._normalState)||(this._normalState={});t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,Zi)},Ji.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null==t[o]||o in e||(e[o]=this[o])}},Ji.prototype.hasState=function(){return 0<this.currentStates.length},Ji.prototype.getState=function(t){return this.states[t]},Ji.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},Ji.prototype.clearStates=function(t){this.useState(Xi,!1,t)},Ji.prototype.useState=function(t,e,n,i){var o=t===Xi;if(this.hasState()||!o){var r,a=this.currentStates,s=this.stateTransition;if(!(0<=C(a,t))||!e&&1!==a.length){if((r=(r=this.stateProxy&&!o?this.stateProxy(t):r)||this.states&&this.states[t])||o){o||this.saveCurrentToNormalState(r);a=!!(r&&r.hoverLayer||i);a&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,r,this._normalState,e,!n&&!this.__inHover&&s&&0<s.duration,s);i=this._textContent,s=this._textGuide;return i&&i.useState(t,e,n,a),s&&s.useState(t,e,n,a),o?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!a&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~De),r}x("State "+t+" not exists.")}}},Ji.prototype.useStates=function(t,e,n){if(t.length){var i=[],o=this.currentStates,r=t.length,a=r===o.length;if(a)for(var s=0;s<r;s++)if(t[s]!==o[s]){a=!1;break}if(!a){for(s=0;s<r;s++){var l=t[s],u=void 0;(u=(u=this.stateProxy?this.stateProxy(l,t):u)||this.states[l])&&i.push(u)}var h=i[r-1],c=!!(h&&h.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);h=this._mergeStates(i),n=this.stateTransition;this.saveCurrentToNormalState(h),this._applyStateObj(t.join(","),h,this._normalState,!1,!e&&!this.__inHover&&n&&0<n.duration,n);h=this._textContent,n=this._textGuide;h&&h.useStates(t,e,c),n&&n.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~De)}}else this.clearStates()},Ji.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},Ji.prototype.removeState=function(t){var e=C(this.currentStates,t);0<=e&&((t=this.currentStates.slice()).splice(e,1),this.useStates(t))},Ji.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),o=C(i,t),t=0<=C(i,e);0<=o?t?i.splice(o,1):i[o]=e:n&&!t&&i.push(e),this.useStates(i)},Ji.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},Ji.prototype._mergeStates=function(t){for(var e,n={},i=0;i<t.length;i++){var o=t[i];P(n,o),o.textConfig&&P(e=e||{},o.textConfig)}return e&&(n.textConfig=e),n},Ji.prototype._applyStateObj=function(t,e,n,i,o,r){var a=!(e&&i);e&&e.textConfig?(this.textConfig=P({},(i?this:n).textConfig),P(this.textConfig,e.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig);for(var s={},l=!1,u=0;u<Zi.length;u++){var h=Zi[u],c=o&&ji[h];e&&null!=e[h]?c?(l=!0,s[h]=e[h]):this[h]=e[h]:a&&null!=n[h]&&(c?(l=!0,s[h]=n[h]):this[h]=n[h])}if(!o)for(u=0;u<this.animators.length;u++){var p=this.animators[u],d=p.targetName;p.__changeFinalValue(d?(e||n)[d]:e||n)}l&&this._transitionState(t,s,r)},Ji.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");if(t===this)throw new Error("Recursive component attachment.");var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},Ji.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},Ji.prototype.getClipPath=function(){return this._clipPath},Ji.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},Ji.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},Ji.prototype.getTextContent=function(){return this._textContent},Ji.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.innerTransformable=new vi,this._attachComponent(t),this._textContent=t,this.markRedraw()}},Ji.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),P(this.textConfig,t),this.markRedraw()},Ji.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},Ji.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},Ji.prototype.getTextGuideLine=function(){return this._textGuide},Ji.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},Ji.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},Ji.prototype.markRedraw=function(){this.__dirty|=De;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},Ji.prototype.dirty=function(){this.markRedraw()},Ji.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},Ji.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},Ji.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},Ji.prototype.animate=function(t,e){var n=t?this[t]:this;if(n){e=new Cn(n,e);return this.addAnimator(e,t),e}x('Property "'+t+'" is not existed in element '+this.id)},Ji.prototype.addAnimator=function(n,t){var e=this.__zr,i=this;n.during(function(){i.updateDuringAnimation(t)}).done(function(){var t=i.animators,e=C(t,n);0<=e&&t.splice(e,1)}),this.animators.push(n),e&&e.animation.addAnimator(n),e&&e.wakeUp()},Ji.prototype.updateDuringAnimation=function(t){this.markRedraw()},Ji.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,o=[],r=0;r<i;r++){var a=n[r];t&&t!==a.scope?o.push(a):a.stop(e)}return this.animators=o,this},Ji.prototype.animateTo=function(t,e,n){Qi(this,t,e,n)},Ji.prototype.animateFrom=function(t,e,n){Qi(this,t,e,n,!0)},Ji.prototype._transitionState=function(t,e,n,i){for(var o=Qi(this,e,n,i),r=0;r<o.length;r++)o[r].__fromStateTransition=t},Ji.prototype.getBoundingRect=function(){return null},Ji.prototype.getPaintRect=function(){return null},Ji.initDefaultProps=function(){var t=Ji.prototype;t.type="element",t.name="",t.ignore=!1,t.silent=!1,t.isGroup=!1,t.draggable=!1,t.dragging=!1,t.ignoreClip=!1,t.__inHover=!1,t.__dirty=De;var i={};function a(t,e,n){i[t+e+n]||(console.warn("DEPRECATED: '"+t+"' has been deprecated. use '"+e+"', '"+n+"' instead"),i[t+e+n]=!0)}function e(e,n,i,o){function r(e,t){Object.defineProperty(t,0,{get:function(){return e[i]},set:function(t){e[i]=t}}),Object.defineProperty(t,1,{get:function(){return e[o]},set:function(t){e[o]=t}})}Object.defineProperty(t,e,{get:function(){var t;return a(e,i,o),this[n]||(t=this[n]=[],r(this,t)),this[n]},set:function(t){a(e,i,o),this[i]=t[0],this[o]=t[1],this[n]=t,r(this,t)}})}Object.defineProperty&&(!w.browser.ie||8<w.browser.version)&&(e("position","_legacyPos","x","y"),e("scale","_legacyScale","scaleX","scaleY"),e("origin","_legacyOrigin","originX","originY"))}(),Ji);function Ji(t){this.id=v++,this.animators=[],this.currentStates=[],this.states={},this._init(t)}function Qi(t,e,n,i,o){var r=[];!function t(e,n,i,o,r,a,s,l){var u=[];var h=[];var c=z(o);var p=r.duration;var d=r.delay;var f=r.additive;var g=r.setToFinal;var y=!Y(a);for(var m=0;m<c.length;m++){var v=c[m];null!=i[v]&&null!=o[v]&&(y||a[v])?Y(o[v])&&!k(o[v])?n?l||(i[v]=o[v],e.updateDuringAnimation(n)):t(e,v,i[v],o[v],r,a&&a[v],s,l):(u.push(v),h.push(v)):l||(i[v]=o[v],e.updateDuringAnimation(n),h.push(v))}var _=u.length;if(0<_||r.force&&!s.length){for(var x=e.animators,b=[],w=0;w<x.length;w++)x[w].targetName===n&&b.push(x[w]);if(!f&&b.length)for(var w=0;w<b.length;w++){var S=b[w].stopTracks(h);S&&(S=C(x,b[w]),x.splice(S,1))}var M=void 0,I=void 0,T=void 0;if(l){I={},g&&(M={});for(var w=0;w<_;w++){var v=u[w];I[v]=i[v],g?M[v]=o[v]:i[v]=o[v]}}else if(g){T={};for(var w=0;w<_;w++){var v=u[w];T[v]=wn(i[v]),eo(i,o,v)}}var f=new Cn(i,!1,f?b:null);f.targetName=n,r.scope&&(f.scope=r.scope),g&&M&&f.whenWithKeys(0,M,u),T&&f.whenWithKeys(0,T,u),f.whenWithKeys(null==p?500:p,l?I:o,u).delay(d||0),e.addAnimator(f,n),s.push(f)}}(t,"",t,e,n=n||{},i,r,o);function a(){u=!0,--l<=0&&(u?h&&h():c&&c())}function s(){--l<=0&&(u?h&&h():c&&c())}var l=r.length,u=!1,h=n.done,c=n.aborted;l||h&&h(),0<r.length&&n.during&&r[0].during(function(t,e){n.during(e)});for(var p=0;p<r.length;p++){var d=r[p];d.done(a),d.aborted(s),d.start(n.easing,n.force)}return r}function to(t,e,n){for(var i=0;i<n;i++)t[i]=e[i]}function eo(t,e,n){if(k(e[n]))if(k(t[n])||(t[n]=[]),Z(e[n])){var i=e[n].length;t[n].length!==i&&(t[n]=new e[n].constructor(i),to(t[n],e[n],i))}else{var o=e[n],r=t[n],a=o.length;if(k(o[0]))for(var s=o[0].length,l=0;l<a;l++)r[l]?to(r[l],o[l],s):r[l]=Array.prototype.slice.call(o[l]);else to(r,o,a);r.length=o.length}else t[n]=e[n]}T($i,Gt),T($i,vi);var no,io=(u(oo,no=$i),oo.prototype.childrenRef=function(){return this._children},oo.prototype.children=function(){return this._children.slice()},oo.prototype.childAt=function(t){return this._children[t]},oo.prototype.childOfName=function(t){for(var e=this._children,n=0;n<e.length;n++)if(e[n].name===t)return e[n]},oo.prototype.childCount=function(){return this._children.length},oo.prototype.add=function(t){if(t&&(t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),t.__hostTarget))throw"This elemenet has been used as an attachment";return this},oo.prototype.addBefore=function(t,e){var n;return t&&t!==this&&t.parent!==this&&e&&e.parent===this&&(0<=(e=(n=this._children).indexOf(e))&&(n.splice(e,0,t),this._doAdd(t))),this},oo.prototype.replace=function(t,e){t=C(this._children,t);return 0<=t&&this.replaceAt(e,t),this},oo.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];return t&&t!==this&&t.parent!==this&&t!==i&&(n[e]=t,i.parent=null,(e=this.__zr)&&i.removeSelfFromZr(e),this._doAdd(t)),this},oo.prototype._doAdd=function(t){t.parent&&t.parent.remove(t);var e=(t.parent=this).__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},oo.prototype.remove=function(t){var e=this.__zr,n=this._children,i=C(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},oo.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n<t.length;n++){var i=t[n];e&&i.removeSelfFromZr(e),i.parent=null}return t.length=0,this},oo.prototype.eachChild=function(t,e){for(var n=this._children,i=0;i<n.length;i++){var o=n[i];t.call(e,o,i)}return this},oo.prototype.traverse=function(t,e){for(var n=0;n<this._children.length;n++){var i=this._children[n],o=t.call(e,i);i.isGroup&&!o&&i.traverse(t,e)}return this},oo.prototype.addSelfToZr=function(t){no.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].addSelfToZr(t)},oo.prototype.removeSelfFromZr=function(t){no.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].removeSelfFromZr(t)},oo.prototype.getBoundingRect=function(t){for(var e=new Li(0,0,0,0),n=t||this._children,i=[],o=null,r=0;r<n.length;r++){var a,s=n[r];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(i))?(Li.applyTransform(e,a,s),(o=o||e.clone()).union(e)):(o=o||a.clone()).union(a))}return o||e},oo);function oo(t){var e=no.call(this)||this;return e.isGroup=!0,e._children=[],e.attr(t),e}io.prototype.type="group";var ro=!w.canvasSupported,ao={},so={};var lo=(uo.prototype.add=function(t){t&&(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},uo.prototype.remove=function(t){t&&(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},uo.prototype.configLayer=function(t,e){this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh()},uo.prototype.setBackgroundColor=function(t){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=function(t){if(!t)return!1;if("string"==typeof t)return pn(t,1)<.4;if(t.colorStops){for(var e=t.colorStops,n=0,i=e.length,o=0;o<i;o++)n+=pn(e[o].color,1);return(n/=i)<.4}return!1}(t)},uo.prototype.getBackgroundColor=function(){return this._backgroundColor},uo.prototype.setDarkMode=function(t){this._darkMode=t},uo.prototype.isDarkMode=function(){return this._darkMode},uo.prototype.refreshImmediately=function(t){t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},uo.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},uo.prototype.flush=function(){this._flush(!1)},uo.prototype._flush=function(t){var e,n=(new Date).getTime();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());t=(new Date).getTime();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:t-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},uo.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},uo.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},uo.prototype.addHover=function(t){},uo.prototype.removeHover=function(t){},uo.prototype.clearHover=function(){},uo.prototype.refreshHover=function(){this._needsRefreshHover=!0},uo.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},uo.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},uo.prototype.clearAnimation=function(){this.animation.clear()},uo.prototype.getWidth=function(){return this.painter.getWidth()},uo.prototype.getHeight=function(){return this.painter.getHeight()},uo.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},uo.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},uo.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},uo.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},uo.prototype.off=function(t,e){this.handler.off(t,e)},uo.prototype.trigger=function(t,e){this.handler.trigger(t,e)},uo.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof io&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},uo.prototype.dispose=function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete so[t]},uo);function uo(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var o=new Oe,r=n.renderer||"canvas";if(ro)throw new Error("IE8 support has been dropped since 5.0");if(ao[r]||(r=z(ao)[0]),!ao[r])throw new Error("Renderer '"+r+"' is not imported. Please import it first.");n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect;n=new ao[r](e,o,n,t);this.storage=o,this.painter=n;t=w.node||w.worker?null:new Kn(n.getViewportRoot(),n.root);this.handler=new me(o,n,t,n.root),this.animation=new kn({stage:{update:function(){return i._flush(!0)}}}),this.animation.start()}function ho(t,e){e=new lo(v++,t,e);return so[e.id]=e}function co(t,e){ao[t]=e}var po=Object.freeze({__proto__:null,init:ho,dispose:function(t){t.dispose()},disposeAll:function(){for(var t in so)so.hasOwnProperty(t)&&so[t].dispose();so={}},getInstance:function(t){return so[t]},registerPainter:co,version:"5.2.1"}),fo=1e-4,go=20;function yo(t,e,n,i){var o=e[0],r=e[1],a=n[0],s=n[1],e=r-o,n=s-a;if(0==e)return 0==n?a:(a+s)/2;if(i)if(0<e){if(t<=o)return a;if(r<=t)return s}else{if(o<=t)return a;if(t<=r)return s}else{if(t===o)return a;if(t===r)return s}return(t-o)/e*n+a}function mo(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}function vo(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),go),t=(+t).toFixed(e),n?t:+t}function _o(t){return t.sort(function(t,e){return t-e}),t}function xo(t){if(t=+t,isNaN(t))return 0;if(1e-14<t)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return bo(t)}function bo(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),t=0<n?+e.slice(n+1):0,n=0<n?n:e.length,e=e.indexOf("."),e=e<0?0:n-1-e;return Math.max(0,e-t)}function wo(t,e){var n=Math.log,i=Math.LN10,t=Math.floor(n(t[1]-t[0])/i),i=Math.round(n(Math.abs(e[1]-e[0]))/i),i=Math.min(Math.max(-t+i,0),20);return isFinite(i)?i:20}function So(t,e,n){if(!t[e])return 0;var i=O(t,function(t,e){return t+(isNaN(e)?0:e)},0);if(0===i)return 0;for(var o=Math.pow(10,n),t=L(t,function(t){return(isNaN(t)?0:t)/i*o*100}),r=100*o,a=L(t,function(t){return Math.floor(t)}),s=O(a,function(t,e){return t+e},0),l=L(t,function(t,e){return t-a[e]});s<r;){for(var u=Number.NEGATIVE_INFINITY,h=null,c=0,p=l.length;c<p;++c)l[c]>u&&(u=l[c],h=c);++a[h],l[h]=0,++s}return a[e]/o}var Mo=9007199254740991;function Io(t){var e=2*Math.PI;return(t%e+e)%e}function To(t){return-fo<t&&t<fo}var Co=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function Do(t){if(t instanceof Date)return t;if("string"!=typeof t)return null==t?new Date(NaN):new Date(Math.round(t));var e=Co.exec(t);if(!e)return new Date(NaN);if(e[8]){t=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}function Ao(t){return Math.pow(10,ko(t))}function ko(t){if(0===t)return 0;var e=Math.floor(Math.log(t)/Math.LN10);return 10<=t/Math.pow(10,e)&&e++,e}function Lo(t,e){var n=ko(t),i=Math.pow(10,n),o=t/i,o=e?o<1.5?1:o<2.5?2:o<4?3:o<7?5:10:o<1?1:o<2?2:o<3?3:o<5?5:10;return t=o*i,-20<=n?+t.toFixed(n<0?-n:0):t}function Po(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),e=+t[i-1],n=n-i;return n?e+n*(t[i]-e):e}function Oo(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 o=t[i].interval,r=t[i].close,a=0;a<2;a++)o[a]<=e&&(o[a]=e,r[a]=a?1:1-n),e=o[a],n=r[a];o[0]===o[1]&&r[0]*r[1]!=1?t.splice(i,1):i++}return t}function Ro(t){var e=parseFloat(t);return e==t&&(0!==e||"string"!=typeof t||t.indexOf("x")<=0)?e:NaN}function No(t){return!isNaN(Ro(t))}function Eo(){return Math.round(9*Math.random())}function zo(t,e){return null==t?e:null==e?t:t*e/function t(e,n){return 0===n?e:t(n,e%n)}(t,e)}var Bo="[ECharts] ",Vo={},Go="undefined"!=typeof console&&console.warn&&console.log;function Fo(t){Go&&console.warn(Bo+t)}function Ho(t){Go&&console.error(Bo+t)}function Wo(t){Vo[t]||Go&&(Vo[t]=!0,console.warn(Bo+"DEPRECATED: "+t))}function Uo(t,e,n){Wo((n?"["+n+"]":"")+t+" is deprecated, use "+e+" instead.")}function Yo(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];function i(t){return void 0===t?"undefined":t===1/0?"Infinity":t===-1/0?"-Infinity":J(t)?"NaN":t instanceof Date?"Date("+t.toISOString()+")":F(t)?"function () { ... }":$(t)?t+"":null}return L(t,function(t){if(H(t))return t;var e=i(t);if(null!=e)return e;if("undefined"==typeof JSON||!JSON.stringify)return"?";try{return JSON.stringify(t,function(t,e){var n=i(e);return null==n?e:n})}catch(t){return"?"}}).join(" ")}function Xo(t){throw new Error(t)}var Zo="series\0",jo="\0_ec_\0";function qo(t){return t instanceof Array?t:null==t?[]:[t]}function Ko(t,e,n){if(t){t[e]=t[e]||{},t.emphasis=t.emphasis||{},t.emphasis[e]=t.emphasis[e]||{};for(var i=0,o=n.length;i<o;i++){var r=n[i];!t.emphasis[e].hasOwnProperty(r)&&t[e].hasOwnProperty(r)&&(t.emphasis[e][r]=t[e][r])}}}var $o=["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"];function Jo(t){return!Y(t)||G(t)||t instanceof Date?t:t.value}function Qo(t,n,e){var i="normalMerge"===e,o="replaceMerge"===e,r="replaceAll"===e;t=t||[],n=(n||[]).slice();var a=ct();E(n,function(t,e){Y(t)?(null==t.id||or(t.id)||ir(t.id),null==t.name||or(t.name)||ir(t.name)):n[e]=null});var s,l,u,h,c,p,d,f,g,y,e=function(t,e,n){var i=[];if("replaceAll"===n)return i;for(var o=0;o<t.length;o++){var r=t[o];r&&null!=r.id&&e.set(r.id,o),i.push({existing:"replaceMerge"===n||ar(r)?null:r,newOption:null,keyInfo:null,brandNew:null})}return i}(t,a,e);return(i||o)&&(s=e,l=t,u=a,E(h=n,function(t,e){var n,i,o;t&&null!=t.id&&(n=er(t.id),null!=(i=u.get(n))&&(ot(!(o=s[i]).newOption,'Duplicated option on id "'+n+'".'),o.newOption=t,o.existing=l[i],h[e]=null))})),i&&(c=e,E(p=n,function(t,e){if(t&&null!=t.name)for(var n=0;n<c.length;n++){var i=c[n].existing;if(!c[n].newOption&&i&&(null==i.id||null==t.id)&&!ar(t)&&!ar(i)&&tr("name",i,t))return c[n].newOption=t,void(p[e]=null)}})),i||o?(f=e,g=o,E(n,function(t){if(t){for(var e,n=0;(e=f[n])&&(e.newOption||ar(e.existing)||e.existing&&null!=t.id&&!tr("id",t,e.existing));)n++;e?(e.newOption=t,e.brandNew=g):f.push({newOption:t,brandNew:g,existing:null,keyInfo:null}),n++}})):r&&(d=e,E(n,function(t){d.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})),r=e,y=ct(),E(r,function(t){var e=t.existing;e&&y.set(e.id,t)}),E(r,function(t){var e=t.newOption;ot(!e||null==e.id||!y.get(e.id)||y.get(e.id)===t,"id duplicates: "+(e&&e.id)),e&&null!=e.id&&y.set(e.id,t),t.keyInfo||(t.keyInfo={})}),E(r,function(t,e){var n=t.existing,i=t.newOption,o=t.keyInfo;if(Y(i)){if(o.name=null!=i.name?er(i.name):n?n.name:Zo+e,n)o.id=er(n.id);else if(null!=i.id)o.id=er(i.id);else for(var r=0;o.id="\0"+o.name+"\0"+r++,y.get(o.id););y.set(o.id,t)}}),e}function tr(t,e,n){e=nr(e[t],null),t=nr(n[t],null);return null!=e&&null!=t&&e===t}function er(t){if(1,null==t)throw new Error;return nr(t,"")}function nr(t,e){if(null==t)return e;var n=_typeof(t);return"string"===n?t:"number"===n||W(t)?t+"":e}function ir(t){Fo("`"+t+"` is invalid id or name. Must be a string or number.")}function or(t){return W(t)||No(t)}function rr(t){t=t.name;return!(!t||!t.indexOf(Zo))}function ar(t){return t&&null!=t.id&&0===er(t.id).indexOf(jo)}function sr(t,o,r){E(t,function(t){var e,n,i=t.newOption;Y(i)&&(t.keyInfo.mainType=o,t.keyInfo.subType=(e=o,n=i,i=t.existing,t=r,n.type||(i?i.subType:t.determineSubType(e,n))))})}function lr(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?G(t.dataIndex)?L(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?G(t.name)?L(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function ur(){var e="__ec_inner_"+hr++;return function(t){return t[e]||(t[e]={})}}var hr=Eo();function cr(n,t,i){var e=pr(t,i),o=e.mainTypeSpecified,t=e.queryOptionMap,r=e.others,a=i?i.defaultMainType:null;return!o&&a&&t.set(a,{}),t.each(function(t,e){t=gr(n,e,t,{useDefault:a===e,enableAll:!i||null==i.enableAll||i.enableAll,enableNone:!i||null==i.enableNone||i.enableNone});r[e+"Models"]=t.models,r[e+"Model"]=t.models[0]}),r}function pr(t,o){var e,t=H(t)?((e={})[t+"Index"]=0,e):t,r=ct(),a={},s=!1;return E(t,function(t,e){var n,i;"dataIndex"!==e&&"dataIndexInside"!==e?(n=(i=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],i=(i[2]||"").toLowerCase(),!n||!i||o&&o.includeMainTypes&&C(o.includeMainTypes,n)<0||(s=s||!!n,(r.get(n)||r.set(n,{}))[i]=t)):a[e]=t}),{mainTypeSpecified:s,queryOptionMap:r,others:a}}var dr={useDefault:!0,enableAll:!1,enableNone:!1},fr={useDefault:!1,enableAll:!0,enableNone:!0};function gr(t,e,n,i){i=i||dr;var o=n.index,r=n.id,a=n.name,n={models:null,specified:null!=o||null!=r||null!=a};if(n.specified)return"none"===o||!1===o?(ot(i.enableNone,'`"none"` or `false` is not a valid value on index option.'),n.models=[]):("all"===o&&(ot(i.enableAll,'`"all"` is not a valid value on index option.'),o=r=a=null),n.models=t.queryComponents({mainType:e,index:o,id:r,name:a})),n;a=void 0;return n.models=i.useDefault&&(a=t.getComponent(e))?[a]:[],n}function yr(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function mr(t,n){var i=ct(),o=[];return E(t,function(t){var e=n(t);(i.get(e)||(o.push(e),i.set(e,[]))).push(t)}),{keys:o,buckets:i}}function vr(t,e,n,i,o){var r=null==e||"auto"===e;if(null==i)return i;if("number"==typeof i)return vo(p=gn(n||0,i,o),r?Math.max(xo(n||0),xo(i)):e);if("string"==typeof i)return o<1?n:i;for(var a=[],s=n,l=i,u=Math.max(s?s.length:0,l.length),h=0;h<u;++h){var c,p,d=t.getDimensionInfo(h);d&&"ordinal"===d.type?a[h]=(o<1&&s?s:l)[h]:(p=gn(c=s&&s[h]?s[h]:0,d=l[h],o),a[h]=vo(p,r?Math.max(xo(c),xo(d)):e))}return a}var _r=".",xr="___EC__COMPONENT__CONTAINER___",br="___EC__EXTENDED_CLASS___";function wr(t){var e={main:"",sub:""};return t&&(t=t.split(_r),e.main=t[0]||"",e.sub=t[1]||""),e}function Sr(t,e){(t.$constructor=t).extend=function(i){E(e,function(t){i[t]||console.warn("Method `"+t+"` should be implemented"+(i.type?" in "+i.type:"")+".")});var o=this;function r(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(i.$constructor)i.$constructor.apply(this,arguments);else{if(t=o,"function"==typeof t&&/^class\s/.test(Function.prototype.toString.call(t)))return dt(r.prototype,new(o.bind.apply(o,function(t,e,n){if(n||2===arguments.length)for(var i,o=0,r=e.length;o<r;o++)!i&&o in e||((i=i||Array.prototype.slice.call(e,0,o))[o]=e[o]);return t.concat(i||e)}([void 0],e))));o.apply(this,arguments)}}return r[br]=!0,P(r.prototype,i),r.extend=this.extend,r.superCall=Tr,r.superApply=Cr,I(r,this),r.superClass=o,r}}function Mr(t,e){t.extend=e.extend}var Ir=Math.round(10*Math.random());function Tr(t,e){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];return this.superClass.prototype[e].apply(t,n)}function Cr(t,e,n){return this.superClass.prototype[e].apply(t,n)}function Dr(t){var o={};t.registerClass=function(t){var e,n=t.type||t.prototype.type;return n&&(ot(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e=n),'componentType "'+e+'" illegal'),(n=wr(t.prototype.type=n)).sub?n.sub!==xr&&(function(t){var e=o[t.main];e&&e[xr]||((e=o[t.main]={})[xr]=!0);return e}(n)[n.sub]=t):(o[n.main]&&console.warn(n.main+" exists."),o[n.main]=t)),t},t.getClass=function(t,e,n){var i=o[t];if(i&&i[xr]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" is used but not imported.":t+".type should be specified.");return i},t.getClassesByMainType=function(t){var t=wr(t),n=[],t=o[t.main];return t&&t[xr]?E(t,function(t,e){e!==xr&&n.push(t)}):n.push(t),n},t.hasClass=function(t){t=wr(t);return!!o[t.main]},t.getAllClassMainTypes=function(){var n=[];return E(o,function(t,e){n.push(e)}),n},t.hasSubTypes=function(t){t=wr(t),t=o[t.main];return t&&t[xr]}}function Ar(a,s){for(var t=0;t<a.length;t++)a[t][1]||(a[t][1]=a[t][0]);return s=s||!1,function(t,e,n){for(var i={},o=0;o<a.length;o++){var r=a[o][1];e&&0<=C(e,r)||n&&C(n,r)<0||null!=(r=t.getShallow(r,s))&&(i[a[o][0]]=r)}return i}}var kr=Ar([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Lr=(Pr.prototype.getAreaStyle=function(t,e){return kr(this,t,e)},Pr);function Pr(){}var Or=new He(50);function Rr(t,e,n,i,o){if(t){if("string"!=typeof t)return t;if(e&&e.__zrImageSrc===t||!n)return e;var r=Or.get(t),o={hostEl:n,cb:i,cbPayload:o};return r?Er(e=r.image)||r.pending.push(o):((e=new Image).onload=e.onerror=Nr,Or.put(t,e.__cachedImgObj={image:e,pending:[o]}),e.src=e.__zrImageSrc=t),e}return e}function Nr(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var n=t.pending[e],i=n.cb;i&&i(this,n.cbPayload),n.hostEl.dirty()}t.pending.length=0}function Er(t){return t&&t.width&&t.height}var zr=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function Br(t,e,n,i,o){if(!e)return"";var r=(t+"").split("\n");o=Vr(e,n,i,o);for(var a=0,s=r.length;a<s;a++)r[a]=Gr(r[a],o);return r.join("\n")}function Vr(t,e,n,i){var o=P({},i=i||{});o.font=e,n=tt(n,"..."),o.maxIterations=tt(i.maxIterations,2);var r=o.minChar=tt(i.minChar,0);o.cnCharWidth=Bi("国",e);var a=o.ascCharWidth=Bi("a",e);o.placeholder=tt(i.placeholder,"");for(var s=t=Math.max(0,t-1),l=0;l<r&&a<=s;l++)s-=a;e=Bi(n,e);return s<e&&(n="",e=0),s=t-e,o.ellipsis=n,o.ellipsisWidth=e,o.contentWidth=s,o.containerWidth=t,o}function Gr(t,e){var n=e.containerWidth,i=e.font,o=e.contentWidth;if(!n)return"";if((s=Bi(t,i))<=n)return t;for(var r=0;;r++){if(s<=o||r>=e.maxIterations){t+=e.ellipsis;break}var a=0===r?function(t,e,n,i){for(var o=0,r=0,a=t.length;r<a&&o<e;r++){var s=t.charCodeAt(r);o+=0<=s&&s<=127?n:i}return r}(t,o,e.ascCharWidth,e.cnCharWidth):0<s?Math.floor(t.length*o/s):0,s=Bi(t=t.substr(0,a),i)}return t=""===t?e.placeholder:t}var Fr=function(){},Hr=function(t){this.tokens=[],t&&(this.tokens=t)},Wr=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function Ur(t,e){var n=new Wr;if(null!=t&&(t+=""),!t)return n;for(var i,o=e.width,r=e.height,a=e.overflow,s="break"!==a&&"breakAll"!==a||null==o?null:{width:o,accumWidth:0,breakAll:"breakAll"===a},l=zr.lastIndex=0;null!=(i=zr.exec(t));){var u=i.index;l<u&&Yr(n,t.substring(l,u),e,s),Yr(n,i[2],e,s,i[1]),l=zr.lastIndex}l<t.length&&Yr(n,t.substring(l,t.length),e,s);var h=[],c=0,p=0,d=e.padding,f="truncate"===a,g="truncate"===e.lineOverflow;function y(t,e,n){t.width=e,t.lineHeight=n,c+=n,p=Math.max(p,e)}t:for(var m=0;m<n.lines.length;m++){for(var v=n.lines[m],_=0,x=0,b=0;b<v.tokens.length;b++){var w=(A=v.tokens[b]).styleName&&e.rich[A.styleName]||{},S=A.textPadding=w.padding,M=S?S[1]+S[3]:0,I=A.font=w.font||e.font;A.contentHeight=Wi(I);var T=tt(w.height,A.contentHeight);if(A.innerHeight=T,S&&(T+=S[0]+S[2]),A.height=T,A.lineHeight=et(w.lineHeight,e.lineHeight,T),A.align=w&&w.align||e.align,A.verticalAlign=w&&w.verticalAlign||"middle",g&&null!=r&&c+A.lineHeight>r){0<b?(v.tokens=v.tokens.slice(0,b),y(v,x,_),n.lines=n.lines.slice(0,m+1)):n.lines=n.lines.slice(0,m);break t}var C,D=w.width,S=null==D||"auto"===D;"string"==typeof D&&"%"===D.charAt(D.length-1)?(A.percentWidth=D,h.push(A),A.contentWidth=Bi(A.text,I)):(!S||(C=(D=w.backgroundColor)&&D.image)&&Er(C="string"!=typeof(D=C)?D:(D=Or.get(D))&&D.image)&&(A.width=Math.max(A.width,C.width*T/C.height)),null!=(C=f&&null!=o?o-x:null)&&C<A.width?!S||C<M?(A.text="",A.width=A.contentWidth=0):(A.text=Br(A.text,C-M,I,e.ellipsis,{minChar:e.truncateMinChar}),A.width=A.contentWidth=Bi(A.text,I)):A.contentWidth=Bi(A.text,I)),A.width+=M,x+=A.width,w&&(_=Math.max(_,A.lineHeight))}y(v,x,_)}n.outerWidth=n.width=tt(o,p),n.outerHeight=n.height=tt(r,c),n.contentHeight=c,n.contentWidth=p,d&&(n.outerWidth+=d[1]+d[3],n.outerHeight+=d[0]+d[2]);for(m=0;m<h.length;m++){var A,k=(A=h[m]).percentWidth;A.width=parseInt(k,10)/100*n.width}return n}function Yr(t,e,n,i,o){var r,a,s,l=""===e,u=o&&n.rich[o]||{},h=t.lines,c=u.font||n.font,p=!1;i?(n=(n=u.padding)?n[1]+n[3]:0,null!=u.width&&"auto"!==u.width?(s=Ui(u.width,i.width)+n,0<h.length&&s+i.accumWidth>i.width&&(r=e.split("\n"),p=!0),i.accumWidth=s):(s=Zr(e,c,i.width,i.breakAll,i.accumWidth),i.accumWidth=s.accumWidth+n,a=s.linesWidths,r=s.lines)):r=e.split("\n");for(var d=0;d<r.length;d++){var f,g,y=r[d],m=new Fr;m.styleName=o,m.text=y,m.isLineHolder=!y&&!l,m.width="number"==typeof u.width?u.width:a?a[d]:Bi(y,c),d||p?h.push(new Hr([m])):1===(g=(f=(h[h.length-1]||(h[0]=new Hr)).tokens).length)&&f[0].isLineHolder?f[0]=m:!y&&g&&!l||f.push(m)}}var Xr=O(",&?/;] ".split(""),function(t,e){return t[e]=!0,t},{});function Zr(t,e,n,i,o){for(var r,a=[],s=[],l="",u="",h=0,c=0,p=0;p<t.length;p++){var d,f,g=t.charAt(p);"\n"!==g?(d=Bi(g,e),f=!i&&(r=void 0,!(!(33<=(r=(r=f=g).charCodeAt(0))&&r<=255)||!!Xr[f])),(a.length?n<c+d:n<o+c+d)?c?(l||u)&&(c=f?(l||(l=u,u="",c=h=0),a.push(l),s.push(c-h),u+=g,l="",h+=d):(u&&(l+=u,c+=h,u="",h=0),a.push(l),s.push(c),l=g,d)):f?(a.push(u),s.push(h),u=g,h=d):(a.push(g),s.push(d)):(c+=d,f?(u+=g,h+=d):(u&&(l+=u,u="",h=0),l+=g))):(u&&(l+=u,c+=h),a.push(l),s.push(c),u=l="",c=h=0)}return a.length||l||(l=t,u="",h=0),u&&(l+=u),l&&(a.push(l),s.push(c)),1===a.length&&(c+=o),{accumWidth:c,lines:a,linesWidths:s}}var jr="__zr_style_"+Math.round(10*Math.random()),qr={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Kr={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};qr[jr]=!0;var $r,Jr=["z","z2","invisible"],Qr=["invisible"],ta=(u(ea,$r=$i),ea.prototype._init=function(t){for(var e=z(t),n=0;n<e.length;n++){var i=e[n];"style"===i?this.useStyle(t[i]):$r.prototype.attrKV.call(this,i,t[i])}this.style||this.useStyle({})},ea.prototype.beforeBrush=function(){},ea.prototype.afterBrush=function(){},ea.prototype.innerBeforeBrush=function(){},ea.prototype.innerAfterBrush=function(){},ea.prototype.shouldBePainted=function(t,e,n,i){var o=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(t,e,n){na.copy(t.getBoundingRect()),t.transform&&na.applyTransform(t.transform);return ia.width=e,ia.height=n,!na.intersect(ia)}(this,t,e)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths)for(var r=0;r<this.__clipPaths.length;++r)if(this.__clipPaths[r].isZeroArea())return!1;if(i&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},ea.prototype.contain=function(t,e){return this.rectContain(t,e)},ea.prototype.traverse=function(t,e){t.call(e,this)},ea.prototype.rectContain=function(t,e){e=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(e[0],e[1])},ea.prototype.getPaintRect=function(){var t,e,n,i,o,r=this._paintRect;return this._paintRect&&!this.__dirty||(t=this.transform,e=this.getBoundingRect(),o=(i=this.style).shadowBlur||0,n=i.shadowOffsetX||0,i=i.shadowOffsetY||0,r=this._paintRect||(this._paintRect=new Li(0,0,0,0)),t?Li.applyTransform(r,e,t):r.copy(e),(o||n||i)&&(r.width+=2*o+Math.abs(n),r.height+=2*o+Math.abs(i),r.x=Math.min(r.x,r.x+n-o),r.y=Math.min(r.y,r.y+i-o)),o=this.dirtyRectTolerance,r.isZero()||(r.x=Math.floor(r.x-o),r.y=Math.floor(r.y-o),r.width=Math.ceil(r.width+1+2*o),r.height=Math.ceil(r.height+1+2*o))),r},ea.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new Li(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},ea.prototype.getPrevPaintRect=function(){return this._prevPaintRect},ea.prototype.animateStyle=function(t){return this.animate("style",t)},ea.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():this.markRedraw()},ea.prototype.attrKV=function(t,e){"style"!==t?$r.prototype.attrKV.call(this,t,e):this.style?this.setStyle(e):this.useStyle(e)},ea.prototype.setStyle=function(t,e){return"string"==typeof t?this.style[t]=e:P(this.style,t),this.dirtyStyle(),this},ea.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},ea.prototype.dirty=function(){this.dirtyStyle()},ea.prototype.styleChanged=function(){return!!(2&this.__dirty)},ea.prototype.styleUpdated=function(){this.__dirty&=-3},ea.prototype.createStyle=function(t){return dt(qr,t)},ea.prototype.useStyle=function(t){t[jr]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},ea.prototype.isStyleObject=function(t){return t[jr]},ea.prototype._innerSaveToNormal=function(t){$r.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.style&&!e.style&&(e.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,e,Jr)},ea.prototype._applyStateObj=function(t,e,n,i,o,r){$r.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.style?o?i?a=e.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,e.style)):(a=this._mergeStyle(this.createStyle(),(i?this:n).style),this._mergeStyle(a,e.style)):s&&(a=n.style),a)if(o){var l=this.style;if(this.style=this.createStyle(s?{}:l),s)for(var u=z(l),h=0;h<u.length;h++)(p=u[h])in a&&(a[p]=a[p],this.style[p]=l[p]);for(var c=z(a),h=0;h<c.length;h++){var p=c[h];this.style[p]=this.style[p]}this._transitionState(t,{style:a},r,this.getAnimationStyleProps())}else this.useStyle(a);for(var d=this.__inHover?Qr:Jr,h=0;h<d.length;h++){p=d[h];e&&null!=e[p]?this[p]=e[p]:s&&null!=n[p]&&(this[p]=n[p])}},ea.prototype._mergeStates=function(t){for(var e,n=$r.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.style&&(e=e||{},this._mergeStyle(e,o.style))}return e&&(n.style=e),n},ea.prototype._mergeStyle=function(t,e){return P(t,e),t},ea.prototype.getAnimationStyleProps=function(){return Kr},ea.initDefaultProps=((_d=ea.prototype).type="displayable",_d.invisible=!1,_d.z=0,_d.z2=0,_d.zlevel=0,_d.culling=!1,_d.cursor="pointer",_d.rectHover=!1,_d.incremental=!1,_d._rect=null,_d.dirtyRectTolerance=0,void(_d.__dirty=2|De)),ea);function ea(t){return $r.call(this,t)||this}var na=new Li(0,0,0,0),ia=new Li(0,0,0,0);var oa=Math.pow,ra=Math.sqrt,aa=1e-8,sa=1e-4,la=ra(3),ua=1/3,ha=mt(),ca=mt(),pa=mt();function da(t){return-aa<t&&t<aa}function fa(t){return aa<t||t<-aa}function ga(t,e,n,i,o){var r=1-o;return r*r*(r*t+3*o*e)+o*o*(o*i+3*r*n)}function ya(t,e,n,i,o){var r=1-o;return 3*(((e-t)*r+2*(n-e)*o)*r+(i-n)*o*o)}function ma(t,e,n,i,o,r){var a,s,l,u=i+3*(e-n)-t,h=3*(n-2*e+t),i=3*(e-t),n=t-o,e=h*h-3*u*i,t=h*i-9*u*n,o=i*i-3*h*n,n=0;return da(e)&&da(t)?da(h)?r[0]=0:0<=(s=-i/h)&&s<=1&&(r[n++]=s):da(i=t*t-4*e*o)?(l=-(o=t/e)/2,0<=(s=-h/u+o)&&s<=1&&(r[n++]=s),0<=l&&l<=1&&(r[n++]=l)):0<i?(a=e*h+1.5*u*(-t-(i=ra(i))),0<=(s=(-h-((i=(i=e*h+1.5*u*(-t+i))<0?-oa(-i,ua):oa(i,ua))+(a=a<0?-oa(-a,ua):oa(a,ua))))/(3*u))&&s<=1&&(r[n++]=s)):(a=(2*e*h-3*u*t)/(2*ra(e*e*e)),t=Math.acos(a)/3,s=(-h-2*(a=ra(e))*(e=Math.cos(t)))/(3*u),l=(-h+a*(e+la*Math.sin(t)))/(3*u),u=(-h+a*(e-la*Math.sin(t)))/(3*u),0<=s&&s<=1&&(r[n++]=s),0<=l&&l<=1&&(r[n++]=l),0<=u&&u<=1&&(r[n++]=u)),n}function va(t,e,n,i,o){var r,a=6*n-12*e+6*t,i=9*e+3*i-3*t-9*n,n=3*e-3*t,e=0;return da(i)?fa(a)&&0<=(r=-n/a)&&r<=1&&(o[e++]=r):da(t=a*a-4*i*n)?o[0]=-a/(2*i):0<t&&(t=(-a-(n=ra(t)))/(2*i),0<=(r=(-a+n)/(2*i))&&r<=1&&(o[e++]=r),0<=t&&t<=1&&(o[e++]=t)),e}function _a(t,e,n,i,o,r){var a=(e-t)*o+t,s=(n-e)*o+e,e=(i-n)*o+n,n=(s-a)*o+a,s=(e-s)*o+s,o=(s-n)*o+n;r[0]=t,r[1]=a,r[2]=n,r[3]=o,r[4]=o,r[5]=s,r[6]=e,r[7]=i}function xa(t,e,n,i,o,r,a,s,l,u,h){var c,p,d,f,g=.005,y=1/0;ha[0]=l,ha[1]=u;for(var m=0;m<1;m+=.05)ca[0]=ga(t,n,o,a,m),ca[1]=ga(e,i,r,s,m),(d=Lt(ha,ca))<y&&(c=m,y=d);for(var y=1/0,v=0;v<32&&!(g<sa);v++)f=c-g,p=c+g,ca[0]=ga(t,n,o,a,f),ca[1]=ga(e,i,r,s,f),d=Lt(ca,ha),0<=f&&d<y?(c=f,y=d):(pa[0]=ga(t,n,o,a,p),pa[1]=ga(e,i,r,s,p),f=Lt(pa,ha),p<=1&&f<y?(c=p,y=f):g*=.5);return h&&(h[0]=ga(t,n,o,a,c),h[1]=ga(e,i,r,s,c)),ra(y)}function ba(t,e,n,i){var o=1-i;return o*(o*t+2*i*e)+i*i*n}function wa(t,e,n,i){return 2*((1-i)*(e-t)+i*(n-e))}function Sa(t,e,n){n=t+n-2*e;return 0==n?.5:(t-e)/n}function Ma(t,e,n,i,o){var r=(e-t)*i+t,e=(n-e)*i+e,i=(e-r)*i+r;o[0]=t,o[1]=r,o[2]=i,o[3]=i,o[4]=e,o[5]=n}function Ia(t,e,n,i,o,r,a,s,l){var u,h=.005,c=1/0;ha[0]=a,ha[1]=s;for(var p=0;p<1;p+=.05)ca[0]=ba(t,n,o,p),ca[1]=ba(e,i,r,p),(y=Lt(ha,ca))<c&&(u=p,c=y);for(var c=1/0,d=0;d<32&&!(h<sa);d++){var f=u-h,g=u+h;ca[0]=ba(t,n,o,f),ca[1]=ba(e,i,r,f);var y=Lt(ca,ha);0<=f&&y<c?(u=f,c=y):(pa[0]=ba(t,n,o,g),pa[1]=ba(e,i,r,g),f=Lt(pa,ha),g<=1&&f<c?(u=g,c=f):h*=.5)}return l&&(l[0]=ba(t,n,o,u),l[1]=ba(e,i,r,u)),ra(c)}var Ta=Math.min,Ca=Math.max,Da=Math.sin,Aa=Math.cos,ka=2*Math.PI,La=mt(),Pa=mt(),Oa=mt();function Ra(t,e,n){if(0!==t.length){for(var i=t[0],o=i[0],r=i[0],a=i[1],s=i[1],l=1;l<t.length;l++)i=t[l],o=Ta(o,i[0]),r=Ca(r,i[0]),a=Ta(a,i[1]),s=Ca(s,i[1]);e[0]=o,e[1]=a,n[0]=r,n[1]=s}}function Na(t,e,n,i,o,r){o[0]=Ta(t,n),o[1]=Ta(e,i),r[0]=Ca(t,n),r[1]=Ca(e,i)}var Ea=[],za=[];var Ba={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Va=[],Ga=[],Fa=[],Ha=[],Wa=[],Ua=[],Ya=Math.min,Xa=Math.max,Za=Math.cos,ja=Math.sin,qa=Math.sqrt,Ka=Math.abs,$a=Math.PI,Ja=2*$a,Qa="undefined"!=typeof Float32Array,ts=[];function es(t){return Math.round(t/$a*1e8)/1e8%2*$a}function ns(t,e){var n=es(t[0]);n<0&&(n+=Ja);var i=n-t[0],o=t[1];o+=i,!e&&Ja<=o-n?o=n+Ja:e&&Ja<=n-o?o=n-Ja:!e&&o<n?o=n+(Ja-es(n-o)):e&&n<o&&(o=n-(Ja-es(o-n))),t[0]=n,t[1]=o}var is=(os.prototype.increaseVersion=function(){this._version++},os.prototype.getVersion=function(){return this._version},os.prototype.setScale=function(t,e,n){0<(n=n||0)&&(this._ux=Ka(n/Qn/t)||0,this._uy=Ka(n/Qn/e)||0)},os.prototype.setDPR=function(t){this.dpr=t},os.prototype.setContext=function(t){this._ctx=t},os.prototype.getContext=function(){return this._ctx},os.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},os.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},os.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ba.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},os.prototype.lineTo=function(t,e){var n=Ka(t-this._xi),i=Ka(e-this._yi),o=n>this._ux||i>this._uy;return this.addData(Ba.L,t,e),this._ctx&&o&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),o?(this._xi=t,this._yi=e,this._pendingPtDist=0):(i=n*n+i*i)>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=i),this},os.prototype.bezierCurveTo=function(t,e,n,i,o,r){return this._drawPendingPt(),this.addData(Ba.C,t,e,n,i,o,r),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,o,r):this._ctx.bezierCurveTo(t,e,n,i,o,r)),this._xi=o,this._yi=r,this},os.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ba.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},os.prototype.arc=function(t,e,n,i,o,r){this._drawPendingPt(),ts[0]=i,ts[1]=o,ns(ts,r),i=ts[0];var a=(o=ts[1])-i;return this.addData(Ba.A,t,e,n,n,i,a,0,r?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,r),this._xi=Za(o)*n+t,this._yi=ja(o)*n+e,this},os.prototype.arcTo=function(t,e,n,i,o){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},os.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ba.R,t,e,n,i),this},os.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ba.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},os.prototype.fill=function(t){t&&t.fill(),this.toStatic()},os.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},os.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;n<t.length;n++)e+=t[n];this._dashSum=e,this._needsDash=!0}else this._lineDash=null,this._needsDash=!1;return this},os.prototype.setLineDashOffset=function(t){return this._dashOffset=t,this},os.prototype.len=function(){return this._len},os.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!Qa||(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},os.prototype.appendPath=function(t){for(var e=(t=!(t instanceof Array)?[t]:t).length,n=0,i=this._len,o=0;o<e;o++)n+=t[o].len();Qa&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(o=0;o<e;o++)for(var r=t[o].data,a=0;a<r.length;a++)this.data[i++]=r[a];this._len=i},os.prototype.addData=function(t,e,n,i,o,r,a,s,l){if(this._saveData){var u=this.data;this._len+arguments.length>u.length&&(this._expandData(),u=this.data);for(var h=0;h<arguments.length;h++)u[this._len++]=arguments[h]}},os.prototype._drawPendingPt=function(){0<this._pendingPtDist&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},os.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},os.prototype._dashedLineTo=function(t,e){var n,i,o=this._dashSum,r=this._lineDash,a=this._ctx,s=this._dashOffset,l=this._xi,u=this._yi,h=t-l,c=e-u,p=qa(h*h+c*c),d=l,f=u,g=r.length;for(s<0&&(s=o+s),d-=(s%=o)*(h/=p),f-=s*(c/=p);0<h&&d<=t||h<0&&t<=d||0===h&&(0<c&&f<=e||c<0&&e<=f);)d+=h*(n=r[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,0<h&&d<l||h<0&&l<d||0<c&&f<u||c<0&&u<f||a[i%2?"moveTo":"lineTo"]((0<=h?Ya:Xa)(d,t),(0<=c?Ya:Xa)(f,e));h=d-t,c=f-e,this._dashOffset=-qa(h*h+c*c)},os.prototype._dashedBezierTo=function(t,e,n,i,o,r){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,m=0,v=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=ga(g,t,n,o,a+.1)-ga(g,t,n,o,a),l=ga(y,e,i,r,a+.1)-ga(y,e,i,r,a),m+=qa(s*s+l*l);for(;v<_&&!(d<(x+=f[v]));v++);for(a=(x-d)/m;a<=1;)u=ga(g,t,n,o,a),h=ga(y,e,i,r,a),v%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[v]/m,v=(v+1)%_;v%2!=0&&c.lineTo(o,r),s=o-u,l=r-h,this._dashOffset=-qa(s*s+l*l)},os.prototype._dashedQuadraticTo=function(t,e,n,i){var o=n,r=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,o,r)},os.prototype.toStatic=function(){var t;this._saveData&&(this._drawPendingPt(),(t=this.data)instanceof Array&&(t.length=this._len,Qa&&11<this._len&&(this.data=new Float32Array(t))))},os.prototype.getBoundingRect=function(){Fa[0]=Fa[1]=Wa[0]=Wa[1]=Number.MAX_VALUE,Ha[0]=Ha[1]=Ua[0]=Ua[1]=-Number.MAX_VALUE;for(var t,e,n,i,o=this.data,r=0,a=0,s=0,l=0,u=0;u<this._len;){var h=o[u++],c=1===u;switch(c&&(s=r=o[u],l=a=o[u+1]),h){case Ba.M:r=s=o[u++],a=l=o[u++],Wa[0]=s,Wa[1]=l,Ua[0]=s,Ua[1]=l;break;case Ba.L:Na(r,a,o[u],o[u+1],Wa,Ua),r=o[u++],a=o[u++];break;case Ba.C:!function(t,e,n,i,o,r,a,s,l,u){var h=va,c=ga,p=h(t,n,o,a,Ea);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<p;d++){var f=c(t,n,o,a,Ea[d]);l[0]=Ta(f,l[0]),u[0]=Ca(f,u[0])}for(p=h(e,i,r,s,za),d=0;d<p;d++){var g=c(e,i,r,s,za[d]);l[1]=Ta(g,l[1]),u[1]=Ca(g,u[1])}l[0]=Ta(t,l[0]),u[0]=Ca(t,u[0]),l[0]=Ta(a,l[0]),u[0]=Ca(a,u[0]),l[1]=Ta(e,l[1]),u[1]=Ca(e,u[1]),l[1]=Ta(s,l[1]),u[1]=Ca(s,u[1])}(r,a,o[u++],o[u++],o[u++],o[u++],o[u],o[u+1],Wa,Ua),r=o[u++],a=o[u++];break;case Ba.Q:p=r,y=a,t=o[u++],e=o[u++],d=o[u],m=o[u+1],n=Wa,g=Ua,v=f=v=f=i=void 0,i=ba,f=Ca(Ta((v=Sa)(p,t,d),1),0),v=Ca(Ta(v(y,e,m),1),0),f=i(p,t,d,f),v=i(y,e,m,v),n[0]=Ta(p,d,f),n[1]=Ta(y,m,v),g[0]=Ca(p,d,f),g[1]=Ca(y,m,v),r=o[u++],a=o[u++];break;case Ba.A:var p=o[u++],d=o[u++],f=o[u++],g=o[u++],y=o[u++],m=o[u++]+y;u+=1;var v=!o[u++];c&&(s=Za(y)*f+p,l=ja(y)*g+d),function(t,e,n,i,o,r,a,s,l){var u=Rt,h=Nt,c=Math.abs(o-r);if(c%ka<1e-4&&1e-4<c)return s[0]=t-n,s[1]=e-i,l[0]=t+n,l[1]=e+i;La[0]=Aa(o)*n+t,La[1]=Da(o)*i+e,Pa[0]=Aa(r)*n+t,Pa[1]=Da(r)*i+e,u(s,La,Pa),h(l,La,Pa),(o%=ka)<0&&(o+=ka),(r%=ka)<0&&(r+=ka),r<o&&!a?r+=ka:o<r&&a&&(o+=ka),a&&(a=r,r=o,o=a);for(var p=0;p<r;p+=Math.PI/2)o<p&&(Oa[0]=Aa(p)*n+t,Oa[1]=Da(p)*i+e,u(s,Oa,s),h(l,Oa,l))}(p,d,f,g,y,m,v,Wa,Ua),r=Za(m)*f+p,a=ja(m)*g+d;break;case Ba.R:Na(s=r=o[u++],l=a=o[u++],s+o[u++],l+o[u++],Wa,Ua);break;case Ba.Z:r=s,a=l}Rt(Fa,Fa,Wa),Nt(Ha,Ha,Ua)}return 0===u&&(Fa[0]=Fa[1]=Ha[0]=Ha[1]=0),new Li(Fa[0],Fa[1],Ha[0]-Fa[0],Ha[1]-Fa[1])},os.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,o=0,r=0,a=0,s=0;this._pathSegLen||(this._pathSegLen=[]);for(var l=this._pathSegLen,u=0,h=0,c=0;c<e;){var p=t[c++],d=1===c;d&&(a=o=t[c],s=r=t[c+1]);var f=-1;switch(p){case Ba.M:o=a=t[c++],r=s=t[c++];break;case Ba.L:var g=t[c++],y=(_=t[c++])-r;(Ka(C=g-o)>n||Ka(y)>i||c===e-1)&&(f=Math.sqrt(C*C+y*y),o=g,r=_);break;case Ba.C:var m=t[c++],v=t[c++],g=t[c++],_=t[c++],x=t[c++],b=t[c++],f=function(t,e,n,i,o,r,a,s,l){for(var u=t,h=e,c=0,p=1/l,d=1;d<=l;d++){var f=d*p,g=ga(t,n,o,a,f),y=ga(e,i,r,s,f),m=g-u,f=y-h;c+=Math.sqrt(m*m+f*f),u=g,h=y}return c}(o,r,m,v,g,_,x,b,10),o=x,r=b;break;case Ba.Q:f=function(t,e,n,i,o,r,a){for(var s=t,l=e,u=0,h=1/a,c=1;c<=a;c++){var p=c*h,d=ba(t,n,o,p),f=ba(e,i,r,p),g=d-s,p=f-l;u+=Math.sqrt(g*g+p*p),s=d,l=f}return u}(o,r,m=t[c++],v=t[c++],g=t[c++],_=t[c++],10),o=g,r=_;break;case Ba.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],x=t[c++],b=x+T;c+=1;t[c++];d&&(a=Za(T)*M+w,s=ja(T)*I+S),f=Xa(M,I)*Ya(Ja,Math.abs(x)),o=Za(b)*M+w,r=ja(b)*I+S;break;case Ba.R:a=o=t[c++],s=r=t[c++];f=2*t[c++]+2*t[c++];break;case Ba.Z:var C=a-o,y=s-r;f=Math.sqrt(C*C+y*y),o=a,r=s}0<=f&&(u+=l[h++]=f)}return this._pathLen=u},os.prototype.rebuildPath=function(t,e){var n,i,o,r,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0,m=0;if(!f||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=e*this._pathLen))t:for(var v=0;v<d;){var _=h[v++],x=1===v;switch(x&&(n=o=h[v],i=r=h[v+1]),_!==Ba.L&&0<m&&(t.lineTo(l,u),m=0),_){case Ba.M:n=o=h[v++],i=r=h[v++],t.moveTo(o,r);break;case Ba.L:var b=h[v++],w=h[v++],S=Ka(b-o),M=Ka(w-r);if(c<S||p<M){if(f){if(s<g+(G=a[y++])){var I=(s-g)/G;t.lineTo(o*(1-I)+b*I,r*(1-I)+w*I);break t}g+=G}t.lineTo(b,w),o=b,r=w,m=0}else{var T=S*S+M*M;m<T&&(l=b,u=w,m=T)}break;case Ba.C:var C=h[v++],D=h[v++],A=h[v++],k=h[v++],L=h[v++],P=h[v++];if(f){if(s<g+(G=a[y++])){_a(o,C,A,L,I=(s-g)/G,Va),_a(r,D,k,P,I,Ga),t.bezierCurveTo(Va[1],Ga[1],Va[2],Ga[2],Va[3],Ga[3]);break t}g+=G}t.bezierCurveTo(C,D,A,k,L,P),o=L,r=P;break;case Ba.Q:C=h[v++],D=h[v++],A=h[v++],k=h[v++];if(f){if(s<g+(G=a[y++])){Ma(o,C,A,I=(s-g)/G,Va),Ma(r,D,k,I,Ga),t.quadraticCurveTo(Va[1],Ga[1],Va[2],Ga[2]);break t}g+=G}t.quadraticCurveTo(C,D,A,k),o=A,r=k;break;case Ba.A:var O=h[v++],R=h[v++],N=h[v++],E=h[v++],z=h[v++],B=h[v++],S=h[v++],M=!h[v++],T=E<N?N:E,L=.001<Ka(N-E),V=z+B,P=!1;if(f&&(s<g+(G=a[y++])&&(V=z+B*(s-g)/G,P=!0),g+=G),L&&t.ellipse?t.ellipse(O,R,N,E,S,z,V,M):t.arc(O,R,T,z,V,M),P)break t;x&&(n=Za(z)*N+O,i=ja(z)*E+R),o=Za(V)*N+O,r=ja(V)*E+R;break;case Ba.R:n=o=h[v],i=r=h[v+1],b=h[v++],w=h[v++];var G,V=h[v++],E=h[v++];if(f){if(s<g+(G=a[y++])){R=s-g;t.moveTo(b,w),t.lineTo(b+Ya(R,V),w),0<(R-=V)&&t.lineTo(b+V,w+Ya(R,E)),0<(R-=E)&&t.lineTo(b+Xa(V-R,0),w+E),0<(R-=V)&&t.lineTo(b,w+Xa(E-R,0));break t}g+=G}t.rect(b,w,V,E);break;case Ba.Z:if(f){if(s<g+(G=a[y++])){I=(s-g)/G;t.lineTo(o*(1-I)+n*I,r*(1-I)+i*I);break t}g+=G}t.closePath(),o=n,r=i}}},os.prototype.clone=function(){var t=new os,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},os.CMD=Ba,os.initDefaultProps=((Zy=os.prototype)._saveData=!0,Zy._needsDash=!1,Zy._dashOffset=0,Zy._dashIdx=0,Zy._dashSum=0,Zy._ux=0,Zy._uy=0,Zy._pendingPtDist=0,void(Zy._version=0)),os);function os(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}function rs(t,e,n,i,o,r,a){if(0!==o){var s=o,o=0;if(!(e+s<a&&i+s<a||a<e-s&&a<i-s||t+s<r&&n+s<r||r<t-s&&r<n-s)){if(t===n)return Math.abs(r-t)<=s/2;n=(o=(e-i)/(t-n))*r-a+(t*i-n*e)/(t-n);return n*n/(o*o+1)<=s/2*s/2}}}function as(t,e,n,i,o,r,a,s,l){if(0!==a){a=a;return e+a<l&&i+a<l&&r+a<l||l<e-a&&l<i-a&&l<r-a||t+a<s&&n+a<s&&o+a<s||s<t-a&&s<n-a&&s<o-a?void 0:Ia(t,e,n,i,o,r,s,l,null)<=a/2}}var ss=2*Math.PI;function ls(t){return(t%=ss)<0&&(t+=ss),t}var us=2*Math.PI;function hs(t,e,n,i,o,r){if(e<r&&i<r||r<e&&r<i)return 0;if(i===e)return 0;var a=(r-e)/(i-e),r=i<e?1:-1;1!=a&&0!=a||(r=i<e?.5:-.5);t=a*(n-t)+t;return t===o?1/0:o<t?r:0}var cs=is.CMD,ps=2*Math.PI,ds=1e-4;var fs=[-1,-1,-1],gs=[-1,-1];function ys(t,e,n,i,o,r,a,s,l,u){if(e<u&&i<u&&r<u&&s<u||u<e&&u<i&&u<r&&u<s)return 0;var h=ma(e,i,r,s,u,fs);if(0===h)return 0;for(var c,p=0,d=-1,f=void 0,g=void 0,y=0;y<h;y++){var m=fs[y],v=0===m||1===m?.5:1;ga(t,n,o,a,m)<l||(d<0&&(d=va(e,i,r,s,gs),gs[1]<gs[0]&&1<d&&(c=void 0,c=gs[0],gs[0]=gs[1],gs[1]=c),f=ga(e,i,r,s,gs[0]),1<d&&(g=ga(e,i,r,s,gs[1]))),2===d?m<gs[0]?p+=f<e?v:-v:m<gs[1]?p+=g<f?v:-v:p+=s<g?v:-v:m<gs[0]?p+=f<e?v:-v:p+=s<f?v:-v)}return p}function ms(t,e,n,i,o,r,a,s){if(e<s&&i<s&&r<s||s<e&&s<i&&s<r)return 0;var l,u,h,c,p,d,f=(c=fs,d=(l=e)-2*(u=i)+(h=r),h=2*(u-l),u=l-(s=s),l=0,da(d)?fa(h)&&0<=(p=-u/h)&&p<=1&&(c[l++]=p):da(s=h*h-4*d*u)?0<=(p=-h/(2*d))&&p<=1&&(c[l++]=p):0<s&&(s=(-h-(u=ra(s)))/(2*d),0<=(p=(-h+u)/(2*d))&&p<=1&&(c[l++]=p),0<=s&&s<=1&&(c[l++]=s)),l);if(0===f)return 0;var g=Sa(e,i,r);if(0<=g&&g<=1){for(var y=0,m=ba(e,i,r,g),v=0;v<f;v++){var _=0===fs[v]||1===fs[v]?.5:1;ba(t,n,o,fs[v])<a||(fs[v]<g?y+=m<e?_:-_:y+=r<m?_:-_)}return y}_=0===fs[0]||1===fs[0]?.5:1;return ba(t,n,o,fs[0])<a?0:r<e?_:-_}function vs(t,e,n,i,o){for(var r,a=t.data,s=t.len(),l=0,u=0,h=0,c=0,p=0,d=0;d<s;){var f=a[d++],g=1===d;switch(f===cs.M&&1<d&&(n||(l+=hs(u,h,c,p,i,o))),g&&(c=u=a[d],p=h=a[d+1]),f){case cs.M:u=c=a[d++],h=p=a[d++];break;case cs.L:if(n){if(rs(u,h,a[d],a[d+1],e,i,o))return!0}else l+=hs(u,h,a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case cs.C:if(n){if(function(t,e,n,i,o,r,a,s,l,u,h){if(0!==l){l=l;return e+l<h&&i+l<h&&r+l<h&&s+l<h||h<e-l&&h<i-l&&h<r-l&&h<s-l||t+l<u&&n+l<u&&o+l<u&&a+l<u||u<t-l&&u<n-l&&u<o-l&&u<a-l?void 0:xa(t,e,n,i,o,r,a,s,u,h,null)<=l/2}}(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=ys(u,h,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case cs.Q:if(n){if(as(u,h,a[d++],a[d++],a[d],a[d+1],e,i,o))return!0}else l+=ms(u,h,a[d++],a[d++],a[d],a[d+1],i,o)||0;u=a[d++],h=a[d++];break;case cs.A:var y=a[d++],m=a[d++],v=a[d++],_=a[d++],x=a[d++],b=a[d++];d+=1;var w=!!(1-a[d++]),S=Math.cos(x)*v+y,M=Math.sin(x)*_+m;g?(c=S,p=M):l+=hs(u,h,S,M,i,o);var I=(i-y)*_/v+y;if(n){if(function(t,e,n,i,o,r,a,s,l){if(0!==a){a=a;s-=t,l-=e;e=Math.sqrt(s*s+l*l);if(!(n<e-a||e+a<n)){if(Math.abs(i-o)%us<1e-4)return 1;(o=r?(r=i,i=ls(o),ls(r)):(i=ls(i),ls(o)))<i&&(o+=us);s=Math.atan2(l,s);return s<0&&(s+=us),i<=s&&s<=o||i<=s+us&&s+us<=o}}}(y,m,_,x,x+b,w,e,I,o))return!0}else l+=function(t,e,n,i,o,r,a,s){if(n<(s-=e)||s<-n)return 0;if(n=Math.sqrt(n*n-s*s),fs[0]=-n,fs[1]=n,(n=Math.abs(i-o))<1e-4)return 0;if(ps-1e-4<=n){o=ps;var l=r?1:-1;return a>=fs[i=0]+t&&a<=fs[1]+t?l:0}o<i&&(n=i,i=o,o=n),i<0&&(i+=ps,o+=ps);for(var u=0,h=0;h<2;h++){var c=fs[h];a<c+t&&(l=r?1:-1,(i<=(c=(c=Math.atan2(s,c))<0?ps+c:c)&&c<=o||i<=c+ps&&c+ps<=o)&&(u+=l=c>Math.PI/2&&c<1.5*Math.PI?-l:l))}return u}(y,m,_,x,x+b,w,I,o);u=Math.cos(x+b)*v+y,h=Math.sin(x+b)*_+m;break;case cs.R:c=u=a[d++],p=h=a[d++];if(S=c+a[d++],M=p+a[d++],n){if(rs(c,p,S,p,e,i,o)||rs(S,p,S,M,e,i,o)||rs(S,M,c,M,e,i,o)||rs(c,M,c,p,e,i,o))return!0}else l+=hs(S,p,S,M,i,o),l+=hs(c,M,c,p,i,o);break;case cs.Z:if(n){if(rs(u,h,c,p,e,i,o))return!0}else l+=hs(u,h,c,p,i,o);u=c,h=p}}return n||(r=h,t=p,Math.abs(r-t)<ds)||(l+=hs(u,h,c,p,i,o)||0),0!==l}var _s,xs=A({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},qr),bs={style:A({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Kr.style)},ws=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Ss=(u(Ms,_s=ta),Ms.prototype.update=function(){var e=this;_s.prototype.update.call(this);var t=this.style;if(t.decal){var n=this._decalEl=this._decalEl||new Ms;n.buildPath===Ms.prototype.buildPath&&(n.buildPath=function(t){e.buildPath(t,e.shape)}),n.silent=!0;var i,o=n.style;for(i in t)o[i]!==t[i]&&(o[i]=t[i]);o.fill=t.fill?t.decal:null,o.decal=null,o.shadowColor=null,t.strokeFirst&&(o.stroke=null);for(var r=0;r<ws.length;++r)n[ws[r]]=this[ws[r]];n.__dirty|=De}else this._decalEl&&(this._decalEl=null)},Ms.prototype.getDecalElement=function(){return this._decalEl},Ms.prototype._init=function(t){var e=z(t);this.shape=this.getDefaultShape();var n=this.getDefaultStyle();n&&this.useStyle(n);for(var i=0;i<e.length;i++){var o=e[i],r=t[o];"style"===o?this.style?P(this.style,r):this.useStyle(r):"shape"===o?P(this.shape,r):_s.prototype.attrKV.call(this,o,r)}this.style||this.useStyle({})},Ms.prototype.getDefaultStyle=function(){return null},Ms.prototype.getDefaultShape=function(){return{}},Ms.prototype.canBeInsideText=function(){return this.hasFill()},Ms.prototype.getInsideTextFill=function(){var t=this.style.fill;if("none"!==t){if(H(t)){var e=pn(t,0);return.5<e?ti:.2<e?"#eee":ei}if(t)return ei}return ti},Ms.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())==pn(t,0)<.4)return e}},Ms.prototype.buildPath=function(t,e,n){},Ms.prototype.pathUpdated=function(){this.__dirty&=~Ae},Ms.prototype.getUpdatedPathProxy=function(t){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},Ms.prototype.createPathProxy=function(){this.path=new is(!1)},Ms.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))},Ms.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Ms.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n&&(o=!1,this.path||(o=!0,this.createPathProxy()),i=this.path,(o||this.__dirty&Ae)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),t=i.getBoundingRect()),this._rect=t,this.hasStroke()&&this.path&&0<this.path.len()){var i,o=this._rectWithStroke||(this._rectWithStroke=t.clone());return(this.__dirty||n)&&(o.copy(t),i=e.strokeNoScale?this.getLineScale():1,n=e.lineWidth,this.hasFill()||(e=this.strokeContainThreshold,n=Math.max(n,null==e?4:e)),1e-10<i&&(o.width+=n/i,o.height+=n/i,o.x-=n/i/2,o.y-=n/i/2)),o}return t},Ms.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),o=this.style;if(t=n[0],e=n[1],i.contain(t,e)){n=this.path;if(this.hasStroke()){i=o.lineWidth,o=o.strokeNoScale?this.getLineScale():1;if(1e-10<o&&(this.hasFill()||(i=Math.max(i,this.strokeContainThreshold)),vs(n,i/o,!0,t,e)))return!0}if(this.hasFill())return vs(n,0,!1,t,e)}return!1},Ms.prototype.dirtyShape=function(){this.__dirty|=Ae,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},Ms.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},Ms.prototype.animateShape=function(t){return this.animate("shape",t)},Ms.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},Ms.prototype.attrKV=function(t,e){"shape"===t?this.setShape(e):_s.prototype.attrKV.call(this,t,e)},Ms.prototype.setShape=function(t,e){var n=(n=this.shape)||(this.shape={});return"string"==typeof t?n[t]=e:P(n,t),this.dirtyShape(),this},Ms.prototype.shapeChanged=function(){return!!(this.__dirty&Ae)},Ms.prototype.createStyle=function(t){return dt(xs,t)},Ms.prototype._innerSaveToNormal=function(t){_s.prototype._innerSaveToNormal.call(this,t);var e=this._normalState;t.shape&&!e.shape&&(e.shape=P({},this.shape))},Ms.prototype._applyStateObj=function(t,e,n,i,o,r){_s.prototype._applyStateObj.call(this,t,e,n,i,o,r);var a,s=!(e&&i);if(e&&e.shape?o?i?a=e.shape:(a=P({},n.shape),P(a,e.shape)):(a=P({},(i?this:n).shape),P(a,e.shape)):s&&(a=n.shape),a)if(o){this.shape=P({},this.shape);for(var l={},u=z(a),h=0;h<u.length;h++){var c=u[h];"object"===_typeof(a[c])?this.shape[c]=a[c]:l[c]=a[c]}this._transitionState(t,{shape:l},r)}else this.shape=a,this.dirtyShape()},Ms.prototype._mergeStates=function(t){for(var e,n=_s.prototype._mergeStates.call(this,t),i=0;i<t.length;i++){var o=t[i];o.shape&&(e=e||{},this._mergeStyle(e,o.shape))}return e&&(n.shape=e),n},Ms.prototype.getAnimationStyleProps=function(){return bs},Ms.prototype.isZeroArea=function(){return!1},Ms.extend=function(n){var i,t,e=(u(o,i=Ms),o.prototype.getDefaultStyle=function(){return S(n.style)},o.prototype.getDefaultShape=function(){return S(n.shape)},o);function o(t){var e=i.call(this,t)||this;return n.init&&n.init.call(e,t),e}for(t in n)"function"==typeof n[t]&&(e.prototype[t]=n[t]);return e},Ms.initDefaultProps=((Uf=Ms.prototype).type="path",Uf.strokeContainThreshold=5,Uf.segmentIgnoreThreshold=0,Uf.subPixelOptimize=!1,Uf.autoBatch=!1,void(Uf.__dirty=2|De|Ae)),Ms);function Ms(t){return _s.call(this,t)||this}var Is,Ts=A({strokeFirst:!0,font:Ei,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},xs),Cs=(u(Ds,Is=ta),Ds.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return null!=e&&"none"!==e&&0<t.lineWidth},Ds.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},Ds.prototype.createStyle=function(t){return dt(Ts,t)},Ds.prototype.setBoundingRect=function(t){this._rect=t},Ds.prototype.getBoundingRect=function(){var t,e=this.style;return this._rect||(null!=(t=e.text)?t+="":t="",(t=Gi(t,e.font,e.textAlign,e.textBaseline)).x+=e.x||0,t.y+=e.y||0,this.hasStroke()&&(e=e.lineWidth,t.x-=e/2,t.y-=e/2,t.width+=e,t.height+=e),this._rect=t),this._rect},Ds.initDefaultProps=void(Ds.prototype.dirtyRectTolerance=10),Ds);function Ds(){return null!==Is&&Is.apply(this,arguments)||this}Cs.prototype.type="tspan";var As=A({x:0,y:0},qr),ks={style:A({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Kr.style)};var Ls,Ps=(u(Os,Ls=ta),Os.prototype.createStyle=function(t){return dt(As,t)},Os.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;n=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!n)return 0;var i="width"===t?"height":"width",e=e[i];return null==e?n[t]:n[t]/n[i]*e},Os.prototype.getWidth=function(){return this._getSize("width")},Os.prototype.getHeight=function(){return this._getSize("height")},Os.prototype.getAnimationStyleProps=function(){return ks},Os.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Li(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},Os);function Os(){return null!==Ls&&Ls.apply(this,arguments)||this}Ps.prototype.type="image";var Rs=Math.round;function Ns(t,e,n){if(e){var i=e.x1,o=e.x2,r=e.y1,e=e.y2;t.x1=i,t.x2=o,t.y1=r,t.y2=e;n=n&&n.lineWidth;return n?(Rs(2*i)===Rs(2*o)&&(t.x1=t.x2=zs(i,n,!0)),Rs(2*r)===Rs(2*e)&&(t.y1=t.y2=zs(r,n,!0)),t):t}}function Es(t,e,n){if(e){var i=e.x,o=e.y,r=e.width,e=e.height;t.x=i,t.y=o,t.width=r,t.height=e;n=n&&n.lineWidth;return n?(t.x=zs(i,n,!0),t.y=zs(o,n,!0),t.width=Math.max(zs(i+r,n,!1)-t.x,0===r?0:1),t.height=Math.max(zs(o+e,n,!1)-t.y,0===e?0:1),t):t}}function zs(t,e,n){if(!e)return t;t=Rs(2*t);return(t+Rs(e))%2==0?t/2:(t+(n?1:-1))/2}var Bs,Vs=function(){this.x=0,this.y=0,this.width=0,this.height=0},Gs={},Fs=(u(Hs,Bs=Ss),Hs.prototype.getDefaultShape=function(){return new Vs},Hs.prototype.buildPath=function(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g;this.subPixelOptimize?(n=(g=Es(Gs,e,this.style)).x,i=g.y,o=g.width,r=g.height,g.r=e.r,e=g):(n=e.x,i=e.y,o=e.width,r=e.height),e.r?(a=t,d=(s=e).x,f=s.y,g=s.width,e=s.height,s=s.r,g<0&&(d+=g,g=-g),e<0&&(f+=e,e=-e),"number"==typeof s?l=u=h=c=s:s instanceof Array?1===s.length?l=u=h=c=s[0]:2===s.length?(l=h=s[0],u=c=s[1]):3===s.length?(l=s[0],u=c=s[1],h=s[2]):(l=s[0],u=s[1],h=s[2],c=s[3]):l=u=h=c=0,g<l+u&&(l*=g/(p=l+u),u*=g/p),g<h+c&&(h*=g/(p=h+c),c*=g/p),e<u+h&&(u*=e/(p=u+h),h*=e/p),e<l+c&&(l*=e/(p=l+c),c*=e/p),a.moveTo(d+l,f),a.lineTo(d+g-u,f),0!==u&&a.arc(d+g-u,f+u,u,-Math.PI/2,0),a.lineTo(d+g,f+e-h),0!==h&&a.arc(d+g-h,f+e-h,h,0,Math.PI/2),a.lineTo(d+c,f+e),0!==c&&a.arc(d+c,f+e-c,c,Math.PI/2,Math.PI),a.lineTo(d,f+l),0!==l&&a.arc(d+l,f+l,l,Math.PI,1.5*Math.PI)):t.rect(n,i,o,r)},Hs.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},Hs);function Hs(t){return Bs.call(this,t)||this}Fs.prototype.type="rect";var Ws,Us={fill:"#000"},Ys={style:A({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Kr.style)},Xs=(u(Zs,Ws=ta),Zs.prototype.childrenRef=function(){return this._children},Zs.prototype.update=function(){Ws.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t<this._children.length;t++){var e=this._children[t];e.zlevel=this.zlevel,e.z=this.z,e.z2=this.z2,e.culling=this.culling,e.cursor=this.cursor,e.invisible=this.invisible}},Zs.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):Ws.prototype.updateTransform.call(this)},Zs.prototype.getLocalTransform=function(t){var e=this.innerTransformable;return e?e.getLocalTransform(t):Ws.prototype.getLocalTransform.call(this,t)},Zs.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),Ws.prototype.getComputedTransform.call(this)},Zs.prototype._updateSubTexts=function(){var t;this._childCursor=0,Ks(t=this.style),E(t.rich,Ks),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},Zs.prototype.addSelfToZr=function(t){Ws.prototype.addSelfToZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=t},Zs.prototype.removeSelfFromZr=function(t){Ws.prototype.removeSelfFromZr.call(this,t);for(var e=0;e<this._children.length;e++)this._children[e].__zr=null},Zs.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new Li(0,0,0,0),e=this._children,n=[],i=null,o=0;o<e.length;o++){var r=e[o],a=r.getBoundingRect(),r=r.getLocalTransform(n);r?(t.copy(a),t.applyTransform(r),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a)}this._rect=i||t}return this._rect},Zs.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||Us},Zs.prototype.setTextContent=function(t){throw new Error("Can't attach text on another text")},Zs.prototype._mergeStyle=function(t,e){if(!e)return t;var n=e.rich,i=t.rich||n&&{};return P(t,e),n&&i?(this._mergeRich(i,n),t.rich=i):i&&(t.rich=i),t},Zs.prototype._mergeRich=function(t,e){for(var n=z(e),i=0;i<n.length;i++){var o=n[i];t[o]=t[o]||{},P(t[o],e[o])}},Zs.prototype.getAnimationStyleProps=function(){return Ys},Zs.prototype._getOrCreateChild=function(t){var e=this._children[this._childCursor];return e&&e instanceof t||(e=new t),(this._children[this._childCursor++]=e).__zr=this.__zr,e.parent=this,e},Zs.prototype._updatePlainTexts=function(){var t,e,n=this.style,i=n.font||Ei,o=n.padding,r=function(t,e){null!=t&&(t+="");var n,i=e.overflow,o=e.padding,r=e.font,a="truncate"===i,s=Wi(r),l=tt(e.lineHeight,s),u="truncate"===e.lineOverflow,h=e.width,c=(n=null!=h&&"break"===i||"breakAll"===i?t?Zr(t,e.font,h,"breakAll"===i,0).lines:[]:t?t.split("\n"):[]).length*l;(i=tt(e.height,c))<c&&u&&(p=Math.floor(i/l),n=n.slice(0,p));var u=i,p=h;if(o&&(u+=o[0]+o[2],null!=p&&(p+=o[1]+o[3])),t&&a&&null!=p)for(var d=Vr(h,r,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),f=0;f<n.length;f++)n[f]=Gr(n[f],d);if(null==h){for(var g=0,f=0;f<n.length;f++)g=Math.max(Bi(n[f],r),g);h=g}return{lines:n,height:i,outerHeight:u,lineHeight:l,calculatedLineHeight:s,contentHeight:c,width:h}}(tl(n),n),a=el(n),s=!!n.backgroundColor,l=r.outerHeight,u=r.lines,h=r.lineHeight,c=this._defaultStyle,p=n.x||0,d=n.y||0,f=n.align||c.align||"left",g=n.verticalAlign||c.verticalAlign||"top",y=p,m=Hi(d,r.contentHeight,g);(a||o)&&(t=r.width,o&&(t+=o[1]+o[3]),e=Fi(p,t,f),d=Hi(d,l,g),a&&this._renderBackground(n,n,e,d,t,l)),m+=h/2,o&&(y=Qs(p,f,o),"top"===g?m+=o[0]:"bottom"===g&&(m-=o[2]));for(var v=0,o=!1,_=(Js("fill"in n?n.fill:(o=!0,c.fill))),x=($s("stroke"in n?n.stroke:s||c.autoStroke&&!o?null:(v=2,c.stroke))),b=0<n.textShadowBlur,w=null!=n.width&&("truncate"===n.overflow||"break"===n.overflow||"breakAll"===n.overflow),S=r.calculatedLineHeight,M=0;M<u.length;M++){var I=this._getOrCreateChild(Cs),T=I.createStyle();I.useStyle(T),T.text=u[M],T.x=y,T.y=m,f&&(T.textAlign=f),T.textBaseline="middle",T.opacity=n.opacity,T.strokeFirst=!0,b&&(T.shadowBlur=n.textShadowBlur||0,T.shadowColor=n.textShadowColor||"transparent",T.shadowOffsetX=n.textShadowOffsetX||0,T.shadowOffsetY=n.textShadowOffsetY||0),x&&(T.stroke=x,T.lineWidth=n.lineWidth||v,T.lineDash=n.lineDash,T.lineDashOffset=n.lineDashOffset||0),_&&(T.fill=_),T.font=i,m+=h,w&&I.setBoundingRect(new Li(Fi(T.x,n.width,T.textAlign),Hi(T.y,S,T.textBaseline),n.width,S))}},Zs.prototype._updateRichTexts=function(){var t=this.style,e=Ur(tl(t),t),n=e.width,i=e.outerWidth,o=e.outerHeight,r=t.padding,a=t.x||0,s=t.y||0,l=this._defaultStyle,u=t.align||l.align,l=t.verticalAlign||l.verticalAlign,u=Fi(a,i,u),l=Hi(s,o,l),h=u,c=l;r&&(h+=r[3],c+=r[0]);var p=h+n;el(t)&&this._renderBackground(t,t,u,l,i,o);for(var d=!!t.backgroundColor,f=0;f<e.lines.length;f++){for(var g=e.lines[f],y=g.tokens,m=y.length,v=g.lineHeight,_=g.width,x=0,b=h,w=p,S=m-1,M=void 0;x<m&&(!(M=y[x]).align||"left"===M.align);)this._placeToken(M,t,v,c,b,"left",d),_-=M.width,b+=M.width,x++;for(;0<=S&&"right"===(M=y[S]).align;)this._placeToken(M,t,v,c,w,"right",d),_-=M.width,w-=M.width,S--;for(b+=(n-(b-h)-(p-w)-_)/2;x<=S;)M=y[x],this._placeToken(M,t,v,c,b+M.width/2,"center",d),b+=M.width,x++;c+=v}},Zs.prototype._placeToken=function(t,e,n,i,o,r,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&el(s)&&this._renderBackground(s,e,"right"===r?o-t.width:"center"===r?o-t.width/2:o,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(o=Qs(o,r,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(Cs),d=p.createStyle();p.useStyle(d);l=this._defaultStyle,i=!1,n=0,c=Js("fill"in s?s.fill:"fill"in e?e.fill:(i=!0,l.fill)),i=$s("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||l.autoStroke&&!i?null:(n=2,l.stroke)),l=0<s.textShadowBlur||0<e.textShadowBlur;d.text=t.text,d.x=o,d.y=u,l&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=r,d.textBaseline="middle",d.font=t.font||Ei,d.opacity=et(s.opacity,e.opacity,1),i&&(d.lineWidth=et(s.lineWidth,e.lineWidth,n),d.lineDash=tt(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=i),c&&(d.fill=c);c=t.contentWidth,t=t.contentHeight;p.setBoundingRect(new Li(Fi(d.x,c,d.textAlign),Hi(d.y,t,d.textBaseline),c,t))},Zs.prototype._renderBackground=function(t,e,n,i,o,r){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;(d||t.lineHeight||h&&c)&&((a=this._getOrCreateChild(Fs)).useStyle(a.createStyle()),a.style.fill=null,(s=a.shape).x=n,s.y=i,s.width=o,s.height=r,s.r=f,a.dirtyShape()),d?((l=a.style).fill=u||null,l.fillOpacity=tt(t.fillOpacity,1)):p&&((y=this._getOrCreateChild(Ps)).onload=function(){g.dirtyStyle()},(p=y.style).image=u.image,p.x=n,p.y=i,p.width=o,p.height=r),h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=tt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var y=(a||y).style;y.shadowBlur=t.shadowBlur||0,y.shadowColor=t.shadowColor||"transparent",y.shadowOffsetX=t.shadowOffsetX||0,y.shadowOffsetY=t.shadowOffsetY||0,y.opacity=et(t.opacity,e.opacity,1)},Zs.makeFont=function(t){var e,n="";return(t.fontSize||t.fontFamily||t.fontWeight)&&(e="",e="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,n=[t.fontStyle,t.fontWeight,e,t.fontFamily||"sans-serif"].join(" ")),n&&rt(n)||t.textFont||t.font},Zs);function Zs(t){var e=Ws.call(this)||this;return e.type="text",e._children=[],e._defaultStyle=Us,e.attr(t),e}var js={left:!0,right:1,center:1},qs={top:1,bottom:1,middle:1};function Ks(t){var e;t&&(t.font=Xs.makeFont(t),"middle"===(e=t.align)&&(e="center"),t.align=null==e||js[e]?e:"left","center"===(e=t.verticalAlign)&&(e="middle"),t.verticalAlign=null==e||qs[e]?e:"top",t.padding&&(t.padding=it(t.padding)))}function $s(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function Js(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function Qs(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function tl(t){t=t.text;return null!=t&&(t+=""),t}function el(t){return!!(t.backgroundColor||t.lineHeight||t.borderWidth&&t.borderColor)}function nl(e,n,i,t){var o;t&&((o=il(t)).dataIndex=i,o.dataType=n,o.seriesIndex=e,"group"===t.type&&t.traverse(function(t){t=il(t);t.seriesIndex=e,t.dataIndex=i,t.dataType=n}))}var il=ur(),ol=1,rl={},al=ur(),sl=0,ll=1,ul=2,hl=["emphasis","blur","select"],cl=["normal","emphasis","blur","select"],pl=10,dl=9,fl="highlight",gl="downplay",yl="select",ml="unselect",vl="toggleSelect";function _l(t){return null!=t&&"none"!==t}var xl=new He(100);function bl(t){if("string"!=typeof t)return t;var e=xl.get(t);return e||(e=rn(t,-.1),xl.put(t,e)),e}function wl(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function Sl(t){wl(t,"emphasis",ul)}function Ml(t){t.hoverState===ul&&wl(t,"normal",sl)}function Il(t){wl(t,"blur",ll)}function Tl(t){t.hoverState===ll&&wl(t,"normal",sl)}function Cl(t){t.selected=!0}function Dl(t){t.selected=!1}function Al(t,e,n){e(t,n)}function kl(t,e,n){Al(t,e,n),t.isGroup&&t.traverse(function(t){Al(t,e,n)})}function Ll(t,e){switch(e){case"emphasis":t.hoverState=ul;break;case"normal":t.hoverState=sl;break;case"blur":t.hoverState=ll;break;case"select":t.selected=!0}}function Pl(t,e,n){var i=0<=C(t.currentStates,e),o=t.style.opacity,t=i?null:function(t,e,n,i){for(var o=t.style,r={},a=0;a<e.length;a++){var s=e[a],l=o[s];r[s]=null==l?i&&i[s]:l}for(a=0;a<t.animators.length;a++){var u=t.animators[a];u.__fromStateTransition&&u.__fromStateTransition.indexOf(n)<0&&"style"===u.targetName&&u.saveFinalToTarget(r,e)}return r}(t,["opacity"],e,{opacity:1}),e=(n=n||{}).style||{};return null==e.opacity&&(n=P({},n),e=P({opacity:i?o:.1*t.opacity},e),n.style=e),n}function Ol(t,e){var n,i,o,r,a,s=this.states[t];if(this.style){if("emphasis"===t)return n=this,o=s,r=(i=e)&&0<=C(i,"select"),a=!1,n instanceof Ss&&(e=al(n),i=r&&e.selectFill||e.normalFill,r=r&&e.selectStroke||e.normalStroke,(_l(i)||_l(r))&&("inherit"===(e=(o=o||{}).style||{}).fill?(a=!0,o=P({},o),(e=P({},e)).fill=i):!_l(e.fill)&&_l(i)?(a=!0,o=P({},o),(e=P({},e)).fill=bl(i)):!_l(e.stroke)&&_l(r)&&(a||(o=P({},o),e=P({},e)),e.stroke=bl(r)),o.style=e)),o&&null==o.z2&&(a||(o=P({},o)),a=n.z2EmphasisLift,o.z2=n.z2+(null!=a?a:pl)),o;if("blur"===t)return Pl(this,t,s);if("select"===t)return a=this,(o=s)&&null==o.z2&&(o=P({},o),t=a.z2SelectLift,o.z2=a.z2+(null!=t?t:dl)),o}return s}function Rl(t){t.stateProxy=Ol;var e=t.getTextContent(),t=t.getTextGuideLine();e&&(e.stateProxy=Ol),t&&(t.stateProxy=Ol)}function Nl(t,e){Wl(t,e)||t.__highByOuter||kl(t,Sl)}function El(t,e){Wl(t,e)||t.__highByOuter||kl(t,Ml)}function zl(t,e){t.__highByOuter|=1<<(e||0),kl(t,Sl)}function Bl(t,e){(t.__highByOuter&=~(1<<(e||0)))||kl(t,Ml)}function Vl(t){kl(t,Il)}function Gl(t){kl(t,Tl)}function Fl(t){kl(t,Cl)}function Hl(t){kl(t,Dl)}function Wl(t,e){return t.__highDownSilentOnTouch&&e.zrByTouch}function Ul(n){n.getModel().eachComponent(function(t,e){("series"===t?n.getViewOfSeriesModel(e):n.getViewOfComponentModel(e)).group.traverse(function(t){Tl(t)})})}function Yl(t,r,a,s){var l,u,h,n=s.getModel();function c(t,e){for(var n=0;n<e.length;n++){var i=t.getItemGraphicEl(e[n]);i&&Gl(i)}}a=a||"coordinateSystem",null!=t&&r&&"none"!==r&&(l=n.getSeriesByIndex(t),(u=l.coordinateSystem)&&u.master&&(u=u.master),h=[],n.eachSeries(function(t){var e=l===t,n=t.coordinateSystem;if(n&&n.master&&(n=n.master),!("series"===a&&!e||"coordinateSystem"===a&&!(n&&u?n===u:e)||"series"===r&&e)){if(s.getViewOfSeriesModel(t).group.traverse(function(t){Il(t)}),k(r))c(t.getData(),r);else if(Y(r))for(var i=z(r),o=0;o<i.length;o++)c(t.getData(i[o]),r[i[o]]);h.push(t)}}),n.eachComponent(function(t,e){"series"===t||(e=s.getViewOfComponentModel(e))&&e.blurSeries&&e.blurSeries(h,n)}))}function Xl(t,e,n){null!=t&&null!=e&&(!(e=n.getModel().getComponent(t,e))||(e=n.getViewOfComponentModel(e))&&e.focusBlurEnabled&&e.group.traverse(function(t){Il(t)}))}function Zl(t,e,n,i){var o={focusSelf:!1,dispatchers:null};if(null==t||"series"===t||null==e||null==n)return o;e=i.getModel().getComponent(t,e);if(!e)return o;e=i.getViewOfComponentModel(e);if(!e||!e.findHighDownDispatchers)return o;for(var r,a=e.findHighDownDispatchers(n),s=0;s<a.length;s++)if(eu(a[s])||Ho("param should be highDownDispatcher"),"self"===il(a[s]).focus){r=!0;break}return{focusSelf:r,dispatchers:a}}function jl(i){E(i.getAllData(),function(t){var e=t.data,n=t.type;e.eachItemGraphicEl(function(t,e){(i.isSelected(e,n)?Fl:Hl)(t)})})}function ql(t,e,n){tu(t,!0),kl(t,Rl),Kl(t,e,n)}function Kl(t,e,n){t=il(t);null!=e?(t.focus=e,t.blurScope=n):t.focus&&(t.focus=null)}var $l=["emphasis","blur","select"],Jl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ql(t,e,n,i){n=n||"itemStyle";for(var o=0;o<$l.length;o++){var r=$l[o],a=e.getModel([r,n]);t.ensureState(r).style=i?i(a):a[Jl[n]]()}}function tu(t,e){var n=!1===e,e=t;t.highDownSilentOnTouch&&(e.__highDownSilentOnTouch=t.highDownSilentOnTouch),n&&!e.__highDownDispatcher||(e.__highByOuter=e.__highByOuter||0,e.__highDownDispatcher=!n)}function eu(t){return!(!t||!t.__highDownDispatcher)}function nu(t){t=t.type;return t===yl||t===ml||t===vl}function iu(t){t=t.type;return t===fl||t===gl}var ou=is.CMD,ru=[[],[],[]],au=Math.sqrt,su=Math.atan2;function lu(t,e){if(e){for(var n,i,o,r,a=t.data,s=t.len(),l=ou.M,u=ou.C,h=ou.L,c=ou.R,p=ou.A,d=ou.Q,f=0,g=0;f<s;){switch(n=a[f++],g=f,i=0,n){case l:case h:i=1;break;case u:i=3;break;case d:i=2;break;case p:var y=e[4],m=e[5],v=au(e[0]*e[0]+e[1]*e[1]),_=au(e[2]*e[2]+e[3]*e[3]),x=su(-e[1]/_,e[0]/v);a[f]*=v,a[f++]+=y,a[f]*=_,a[f++]+=m,a[f++]*=v,a[f++]*=_,a[f++]+=x,a[f++]+=x,g=f+=2;break;case c:r[0]=a[f++],r[1]=a[f++],Ot(r,r,e),a[g++]=r[0],a[g++]=r[1],r[0]+=a[f++],r[1]+=a[f++],Ot(r,r,e),a[g++]=r[0],a[g++]=r[1]}for(o=0;o<i;o++){var b=ru[o];b[0]=a[f++],b[1]=a[f++],Ot(b,b,e),a[g++]=b[0],a[g++]=b[1]}}t.increaseVersion()}}var uu=Math.sqrt,hu=Math.sin,cu=Math.cos,pu=Math.PI;function du(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])}function fu(t,e){return(t[0]*e[0]+t[1]*e[1])/(du(t)*du(e))}function gu(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(fu(t,e))}function yu(t,e,n,i,o,r,a,s,l,u,h){var c=l*(pu/180),p=cu(c)*(t-n)/2+hu(c)*(e-i)/2,d=-1*hu(c)*(t-n)/2+cu(c)*(e-i)/2,l=p*p/(a*a)+d*d/(s*s);1<l&&(a*=uu(l),s*=uu(l));l=(o===r?-1:1)*uu((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,o=l*a*d/s,l=l*-s*p/a,t=(t+n)/2+cu(c)*o-hu(c)*l,n=(e+i)/2+hu(c)*o+cu(c)*l,e=gu([1,0],[(p-o)/a,(d-l)/s]),i=[(p-o)/a,(d-l)/s],d=[(-1*p-o)/a,(-1*d-l)/s],l=gu(i,d);fu(i,d)<=-1&&(l=pu),(l=1<=fu(i,d)?0:l)<0&&(d=Math.round(l/pu*1e6)/1e6,l=2*pu+d%2*pu),h.addData(u,t,n,a,s,e,l,c,r)}var mu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,vu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var _u,xu=(u(bu,_u=Ss),bu.prototype.applyTransform=function(t){},bu);function bu(){return null!==_u&&_u.apply(this,arguments)||this}function wu(t){return null!=t.setData}function Su(t,e){var n=function(t){var e=new is;if(!t)return e;var n,i=0,o=0,r=i,a=o,s=is.CMD,l=t.match(mu);if(!l)return e;for(var u=0;u<l.length;u++){for(var h=l[u],c=h.charAt(0),p=void 0,d=h.match(vu)||[],f=d.length,g=0;g<f;g++)d[g]=parseFloat(d[g]);for(var y=0;y<f;){var m=void 0,v=void 0,_=void 0,x=void 0,b=void 0,w=void 0,S=void 0,M=i,I=o,T=void 0,C=void 0;switch(c){case"l":i+=d[y++],o+=d[y++],p=s.L,e.addData(p,i,o);break;case"L":i=d[y++],o=d[y++],p=s.L,e.addData(p,i,o);break;case"m":i+=d[y++],o+=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="l";break;case"M":i=d[y++],o=d[y++],p=s.M,e.addData(p,i,o),r=i,a=o,c="L";break;case"h":i+=d[y++],p=s.L,e.addData(p,i,o);break;case"H":i=d[y++],p=s.L,e.addData(p,i,o);break;case"v":o+=d[y++],p=s.L,e.addData(p,i,o);break;case"V":o=d[y++],p=s.L,e.addData(p,i,o);break;case"C":p=s.C,e.addData(p,d[y++],d[y++],d[y++],d[y++],d[y++],d[y++]),i=d[y-2],o=d[y-1];break;case"c":p=s.C,e.addData(p,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o,d[y++]+i,d[y++]+o),i+=d[y-2],o+=d[y-1];break;case"S":m=i,v=o,T=e.len(),C=e.data,n===s.C&&(m+=i-C[T-4],v+=o-C[T-3]),p=s.C,M=d[y++],I=d[y++],i=d[y++],o=d[y++],e.addData(p,m,v,M,I,i,o);break;case"s":m=i,v=o,T=e.len(),C=e.data,n===s.C&&(m+=i-C[T-4],v+=o-C[T-3]),p=s.C,M=i+d[y++],I=o+d[y++],i+=d[y++],o+=d[y++],e.addData(p,m,v,M,I,i,o);break;case"Q":M=d[y++],I=d[y++],i=d[y++],o=d[y++],p=s.Q,e.addData(p,M,I,i,o);break;case"q":M=d[y++]+i,I=d[y++]+o,i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,M,I,i,o);break;case"T":m=i,v=o,T=e.len(),C=e.data,n===s.Q&&(m+=i-C[T-4],v+=o-C[T-3]),i=d[y++],o=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"t":m=i,v=o,T=e.len(),C=e.data,n===s.Q&&(m+=i-C[T-4],v+=o-C[T-3]),i+=d[y++],o+=d[y++],p=s.Q,e.addData(p,m,v,i,o);break;case"A":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],yu(M=i,I=o,i=d[y++],o=d[y++],w,S,_,x,b,p=s.A,e);break;case"a":_=d[y++],x=d[y++],b=d[y++],w=d[y++],S=d[y++],yu(M=i,I=o,i+=d[y++],o+=d[y++],w,S,_,x,b,p=s.A,e)}}"z"!==c&&"Z"!==c||(p=s.Z,e.addData(p),i=r,o=a),n=p}return e.toStatic(),e}(t),e=P({},e);return e.buildPath=function(t){var e;wu(t)?(t.setData(n.data),(e=t.getContext())&&t.rebuildPath(e,1)):(e=t,n.rebuildPath(e,1))},e.applyTransform=function(t){lu(n,t),this.dirtyShape()},e}function Mu(t,e){return new xu(Su(t,e))}function Iu(t,e){e=e||{};var n=new Ss;return t.shape&&n.setShape(t.shape),n.setStyle(t.style),e.bakeTransform?lu(n.path,t.getComputedTransform()):e.toLocal?n.setLocalTransform(t.getComputedTransform()):n.copyTransform(t),n.buildPath=t.buildPath,n.applyTransform=n.applyTransform,n.z=t.z,n.z2=t.z2,n.zlevel=t.zlevel,n}var Tu,Cu=function(){this.cx=0,this.cy=0,this.r=0},Du=(u(Au,Tu=Ss),Au.prototype.getDefaultShape=function(){return new Cu},Au.prototype.buildPath=function(t,e,n){n&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI)},Au);function Au(t){return Tu.call(this,t)||this}Du.prototype.type="circle";var ku,Lu=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0},Pu=(u(Ou,ku=Ss),Ou.prototype.getDefaultShape=function(){return new Lu},Ou.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=e.rx,r=e.ry,a=.5522848*o,e=.5522848*r;t.moveTo(n-o,i),t.bezierCurveTo(n-o,i-e,n-a,i-r,n,i-r),t.bezierCurveTo(n+a,i-r,n+o,i-e,n+o,i),t.bezierCurveTo(n+o,i+e,n+a,i+r,n,i+r),t.bezierCurveTo(n-a,i+r,n-o,i+e,n-o,i),t.closePath()},Ou);function Ou(t){return ku.call(this,t)||this}Pu.prototype.type="ellipse";var Ru=Math.PI,Nu=2*Ru,Eu=Math.sin,zu=Math.cos,Bu=Math.acos,Vu=Math.atan2,Gu=Math.abs,Fu=Math.sqrt,Hu=Math.max,Wu=Math.min,Uu=1e-4;function Yu(t,e,n,i,o,r,a){var s=t-n,l=e-i,u=(a?r:-r)/Fu(s*s+l*l),h=u*l,c=-u*s,p=t+h,d=e+c,a=n+h,l=i+c,u=(p+a)/2,s=(d+l)/2,t=a-p,e=l-d,n=t*t+e*e,i=o-r,r=p*l-a*d,p=(e<0?-1:1)*Fu(Hu(0,i*i*n-r*r)),l=(r*e-t*p)/n,a=(-r*t-e*p)/n,d=(r*e+t*p)/n,e=(-r*t+e*p)/n,p=l-u,n=a-s,u=d-u,s=e-s;return u*u+s*s<p*p+n*n&&(l=d,a=e),{cx:l,cy:a,x01:-h,y01:-c,x11:l*(o/i-1),y11:a*(o/i-1)}}function Xu(t,e){var n,i,o,r,a,s,l,u,h,c,p,d,f,g,y,m,v,_,x,b,w,S,M,I=Hu(e.r,0),T=Hu(e.r0||0,0),C=0<I;(C||0<T)&&(C||(I=T,T=0),I<T&&(w=I,I=T,T=w),n=!!e.clockwise,r=(i=e.startAngle)===(o=e.endAngle)?0:(ns(m=[i,o],!n),Gu(m[0]-m[1])),a=e.cx,s=e.cy,f=e.cornerRadius||0,y=e.innerCornerRadius||0,Uu<I?Nu-Uu<r?(t.moveTo(a+I*zu(i),s+I*Eu(i)),t.arc(a,s,I,i,o,!n),Uu<T&&(t.moveTo(a+T*zu(o),s+T*Eu(o)),t.arc(a,s,T,o,i,n))):(g=Gu(I-T)/2,l=Wu(g,f),v=u=Wu(g,y),_=l,h=I*zu(i),c=I*Eu(i),p=T*zu(o),d=T*Eu(o),w=C=b=x=void 0,(Uu<l||Uu<u)&&(x=I*zu(o),b=I*Eu(o),C=T*zu(i),w=T*Eu(i),r<Ru&&((m=function(t,e,n,i,o,r,a,s){var l=n-t,n=i-e,i=a-o;if(!((s=(a=s-r)*l-i*n)*s<Uu))return[t+(s=(i*(e-r)-a*(t-o))/s)*l,e+s*n]}(h,c,C,w,x,b,p,d))&&(e=h-m[0],f=c-m[1],g=x-m[0],y=b-m[1],y=1/Eu(Bu((e*g+f*y)/(Fu(e*e+f*f)*Fu(g*g+y*y)))/2),m=Fu(m[0]*m[0]+m[1]*m[1]),v=Wu(u,(T-m)/(y-1)),_=Wu(l,(I-m)/(1+y))))),Uu<r?Uu<_?(S=Yu(C,w,h,c,I,_,n),M=Yu(x,b,p,d,I,_,n),t.moveTo(a+S.cx+S.x01,s+S.cy+S.y01),_<l?t.arc(a+S.cx,s+S.cy,_,Vu(S.y01,S.x01),Vu(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,_,Vu(S.y01,S.x01),Vu(S.y11,S.x11),!n),t.arc(a,s,I,Vu(S.cy+S.y11,S.cx+S.x11),Vu(M.cy+M.y11,M.cx+M.x11),!n),t.arc(a+M.cx,s+M.cy,_,Vu(M.y11,M.x11),Vu(M.y01,M.x01),!n))):(t.moveTo(a+h,s+c),t.arc(a,s,I,i,o,!n)):t.moveTo(a+h,s+c),Uu<T&&Uu<r?Uu<v?(S=Yu(p,d,x,b,T,-v,n),M=Yu(h,c,C,w,T,-v,n),t.lineTo(a+S.cx+S.x01,s+S.cy+S.y01),v<u?t.arc(a+S.cx,s+S.cy,v,Vu(S.y01,S.x01),Vu(M.y01,M.x01),!n):(t.arc(a+S.cx,s+S.cy,v,Vu(S.y01,S.x01),Vu(S.y11,S.x11),!n),t.arc(a,s,T,Vu(S.cy+S.y11,S.cx+S.x11),Vu(M.cy+M.y11,M.cx+M.x11),n),t.arc(a+M.cx,s+M.cy,v,Vu(M.y11,M.x11),Vu(M.y01,M.x01),!n))):(t.lineTo(a+p,s+d),t.arc(a,s,T,o,i,n)):t.lineTo(a+p,s+d)):t.moveTo(a,s),t.closePath())}var Zu,ju=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0,this.innerCornerRadius=0},qu=(u(Ku,Zu=Ss),Ku.prototype.getDefaultShape=function(){return new ju},Ku.prototype.buildPath=function(t,e){Xu(t,e)},Ku.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},Ku);function Ku(t){return Zu.call(this,t)||this}qu.prototype.type="sector";var $u,Ju=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Qu=(u(th,$u=Ss),th.prototype.getDefaultShape=function(){return new Ju},th.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,o,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,o,!0)},th);function th(t){return $u.call(this,t)||this}function eh(t,e,n,i,o,r,a){t=.5*(n-t),i=.5*(i-e);return(2*(e-n)+t+i)*a+(-3*(e-n)-2*t-i)*r+t*o+e}function nh(t,e,n){var i=e.smooth,o=e.points;if(o&&2<=o.length){if(i&&"spline"!==i){var r=function(t,e,n,i){var o,r,a=[],s=[],l=[],u=[];if(i){for(var h=[1/0,1/0],c=[-1/0,-1/0],p=0,d=t.length;p<d;p++)Rt(h,h,t[p]),Nt(c,c,t[p]);Rt(h,h,i[0]),Nt(c,c,i[1])}for(p=0,d=t.length;p<d;p++){var f=t[p];if(n)o=t[p?p-1:d-1],r=t[(p+1)%d];else{if(0===p||p===d-1){a.push(_t(t[p]));continue}o=t[p-1],r=t[p+1]}St(s,r,o),Tt(s,s,e);var g=Dt(f,o),y=Dt(f,r),m=g+y;0!==m&&(g/=m,y/=m),Tt(l,s,-g),Tt(u,s,y);y=bt([],f,l),f=bt([],f,u);i&&(Nt(y,y,h),Rt(y,y,c),Nt(f,f,h),Rt(f,f,c)),a.push(y),a.push(f)}return n&&a.push(a.shift()),a}(o,i,n,e.smoothConstraint);t.moveTo(o[0][0],o[0][1]);for(var a=o.length,s=0;s<(n?a:a-1);s++){var l=r[2*s],u=r[2*s+1],h=o[(s+1)%a];t.bezierCurveTo(l[0],l[1],u[0],u[1],h[0],h[1])}}else{"spline"===i&&(o=function(t,e){for(var n=t.length,i=[],o=0,r=1;r<n;r++)o+=Dt(t[r-1],t[r]);for(var a=(a=o/2)<n?n:a,r=0;r<a;r++){var s=r/(a-1)*(e?n:n-1),l=Math.floor(s),u=s-l,h=void 0,c=t[l%n],p=void 0,d=void 0,d=e?(h=t[(l-1+n)%n],p=t[(l+1)%n],t[(l+2)%n]):(h=t[0===l?l:l-1],p=t[n-2<l?n-1:l+1],t[n-3<l?n-1:l+2]),s=u*u,l=u*s;i.push([eh(h[0],c[0],p[0],d[0],u,s,l),eh(h[1],c[1],p[1],d[1],u,s,l)])}return i}(o,n)),t.moveTo(o[0][0],o[0][1]);for(var s=1,c=o.length;s<c;s++)t.lineTo(o[s][0],o[s][1])}n&&t.closePath()}}Qu.prototype.type="ring";var ih,oh=function(){this.points=null,this.smooth=0,this.smoothConstraint=null},rh=(u(ah,ih=Ss),ah.prototype.getDefaultShape=function(){return new oh},ah.prototype.buildPath=function(t,e){nh(t,e,!0)},ah);function ah(t){return ih.call(this,t)||this}rh.prototype.type="polygon";var sh,lh=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null},uh=(u(hh,sh=Ss),hh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},hh.prototype.getDefaultShape=function(){return new lh},hh.prototype.buildPath=function(t,e){nh(t,e,!1)},hh);function hh(t){return sh.call(this,t)||this}uh.prototype.type="polyline";var ch,ph={},dh=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1},fh=(u(gh,ch=Ss),gh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},gh.prototype.getDefaultShape=function(){return new dh},gh.prototype.buildPath=function(t,e){var n,i,o,r;r=this.subPixelOptimize?(n=(r=Ns(ph,e,this.style)).x1,i=r.y1,o=r.x2,r.y2):(n=e.x1,i=e.y1,o=e.x2,e.y2);e=e.percent;0!==e&&(t.moveTo(n,i),e<1&&(o=n*(1-e)+o*e,r=i*(1-e)+r*e),t.lineTo(o,r))},gh.prototype.pointAt=function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]},gh);function gh(t){return ch.call(this,t)||this}fh.prototype.type="line";var yh=[],mh=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function vh(t,e,n){var i=t.cpx2,o=t.cpy2;return null===i||null===o?[(n?ya:ga)(t.x1,t.cpx1,t.cpx2,t.x2,e),(n?ya:ga)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(n?wa:ba)(t.x1,t.cpx1,t.x2,e),(n?wa:ba)(t.y1,t.cpy1,t.y2,e)]}var _h,xh=(u(bh,_h=Ss),bh.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},bh.prototype.getDefaultShape=function(){return new mh},bh.prototype.buildPath=function(t,e){var n=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.cpx1,s=e.cpy1,l=e.cpx2,u=e.cpy2,e=e.percent;0!==e&&(t.moveTo(n,i),null==l||null==u?(e<1&&(Ma(n,a,o,e,yh),a=yh[1],o=yh[2],Ma(i,s,r,e,yh),s=yh[1],r=yh[2]),t.quadraticCurveTo(a,s,o,r)):(e<1&&(_a(n,a,l,o,e,yh),a=yh[1],l=yh[2],o=yh[3],_a(i,s,u,r,e,yh),s=yh[1],u=yh[2],r=yh[3]),t.bezierCurveTo(a,s,l,u,o,r)))},bh.prototype.pointAt=function(t){return vh(this.shape,t,!1)},bh.prototype.tangentAt=function(t){t=vh(this.shape,t,!0);return Ct(t,t)},bh);function bh(t){return _h.call(this,t)||this}xh.prototype.type="bezier-curve";var wh,Sh=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},Mh=(u(Ih,wh=Ss),Ih.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Ih.prototype.getDefaultShape=function(){return new Sh},Ih.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r,0),r=e.startAngle,a=e.endAngle,s=e.clockwise,l=Math.cos(r),e=Math.sin(r);t.moveTo(l*o+n,e*o+i),t.arc(n,i,o,r,a,!s)},Ih);function Ih(t){return wh.call(this,t)||this}Mh.prototype.type="arc";var Th,Ch=(u(Dh,Th=Ss),Dh.prototype._updatePathDirty=function(){for(var t=this.shape.paths,e=this.shapeChanged(),n=0;n<t.length;n++)e=e||t[n].shapeChanged();e&&this.dirtyShape()},Dh.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),n=0;n<t.length;n++)t[n].path||t[n].createPathProxy(),t[n].path.setScale(e[0],e[1],t[n].segmentIgnoreThreshold)},Dh.prototype.buildPath=function(t,e){for(var n=e.paths||[],i=0;i<n.length;i++)n[i].buildPath(t,n[i].shape,!0)},Dh.prototype.afterBrush=function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].pathUpdated()},Dh.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Ss.prototype.getBoundingRect.call(this)},Dh);function Dh(){var t=null!==Th&&Th.apply(this,arguments)||this;return t.type="compound",t}var Ah=(kh.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},kh);function kh(t){this.colorStops=t||[]}var Lh,Ph=(u(Oh,Lh=Ah),Oh);function Oh(t,e,n,i,o,r){o=Lh.call(this,o)||this;return o.x=null==t?0:t,o.y=null==e?0:e,o.x2=null==n?1:n,o.y2=null==i?0:i,o.type="linear",o.global=r||!1,o}var Rh,Nh=(u(Eh,Rh=Ah),Eh);function Eh(t,e,n,i,o){i=Rh.call(this,i)||this;return i.x=null==t?.5:t,i.y=null==e?.5:e,i.r=null==n?.5:n,i.type="radial",i.global=o||!1,i}var zh=[0,0],Bh=[0,0],Vh=new bi,Gh=new bi,Fh=(Hh.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,o=t.x,r=t.y,a=o+t.width,t=r+t.height;if(n[0].set(o,r),n[1].set(a,r),n[2].set(a,t),n[3].set(o,t),e)for(var s=0;s<4;s++)n[s].transform(e);bi.sub(i[0],n[1],n[0]),bi.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(s=0;s<2;s++)this._origin[s]=i[s].dot(n[0])},Hh.prototype.intersect=function(t,e){var n=!0,i=!e;return Vh.set(1/0,1/0),Gh.set(0,0),!this._intersectCheckOneSide(this,t,Vh,Gh,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,Vh,Gh,i,-1)&&(n=!1,i)||i||bi.copy(e,n?Vh:Gh),n},Hh.prototype._intersectCheckOneSide=function(t,e,n,i,o,r){for(var a=!0,s=0;s<2;s++){var l=this._axes[s];if(this._getProjMinMaxOnAxis(s,t._corners,zh),this._getProjMinMaxOnAxis(s,e._corners,Bh),zh[1]<Bh[0]||Bh[1]<zh[0]){if(a=!1,o)return a;var u=Math.abs(Bh[0]-zh[1]),h=Math.abs(zh[0]-Bh[1]);Math.min(u,h)>i.len()&&(u<h?bi.scale(i,l,-u*r):bi.scale(i,l,h*r))}else n&&(u=Math.abs(Bh[0]-zh[1]),h=Math.abs(zh[0]-Bh[1]),Math.min(u,h)<n.len()&&(u<h?bi.scale(n,l,u*r):bi.scale(n,l,-h*r)))}return a},Hh.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],o=this._origin,r=e[0].dot(i)+o[t],a=r,s=r,l=1;l<e.length;l++)var u=e[l].dot(i)+o[t],a=Math.min(u,a),s=Math.max(u,s);n[0]=a,n[1]=s},Hh);function Hh(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new bi;for(n=0;n<2;n++)this._axes[n]=new bi;t&&this.fromBoundingRect(t,e)}var Wh,Uh=[],Yh=(u(Xh,Wh=ta),Xh.prototype.traverse=function(t,e){t.call(e,this)},Xh.prototype.useStyle=function(){this.style={}},Xh.prototype.getCursor=function(){return this._cursor},Xh.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},Xh.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},Xh.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},Xh.prototype.addDisplayable=function(t,e){(e?this._temporaryDisplayables:this._displayables).push(t),this.markRedraw()},Xh.prototype.addDisplayables=function(t,e){e=e||!1;for(var n=0;n<t.length;n++)this.addDisplayable(t[n],e)},Xh.prototype.getDisplayables=function(){return this._displayables},Xh.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},Xh.prototype.eachPendingDisplayable=function(t){for(var e=this._cursor;e<this._displayables.length;e++)t&&t(this._displayables[e]);for(e=0;e<this._temporaryDisplayables.length;e++)t&&t(this._temporaryDisplayables[e])},Xh.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++)(e=this._displayables[t]).parent=this,e.update(),e.parent=null;for(var e,t=0;t<this._temporaryDisplayables.length;t++)(e=this._temporaryDisplayables[t]).parent=this,e.update(),e.parent=null},Xh.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new Li(1/0,1/0,-1/0,-1/0),e=0;e<this._displayables.length;e++){var n=this._displayables[e],i=n.getBoundingRect().clone();n.needLocalTransform()&&i.applyTransform(n.getLocalTransform(Uh)),t.union(i)}this._rect=t}return this._rect},Xh.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e);if(this.getBoundingRect().contain(n[0],n[1]))for(var i=0;i<this._displayables.length;i++)if(this._displayables[i].contain(t,e))return!0;return!1},Xh);function Xh(){var t=null!==Wh&&Wh.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}var Zh=ur();function jh(t,e,n,i,o){var r;e&&e.ecModel&&(r=(l=e.ecModel.getUpdatePayload())&&l.animation);var a="update"===t;if(e&&e.isAnimationEnabled()){var s=void 0,l=void 0,t=void 0,t=i?(s=tt(i.duration,200),l=tt(i.easing,"cubicOut"),0):(s=e.getShallow(a?"animationDurationUpdate":"animationDuration"),l=e.getShallow(a?"animationEasingUpdate":"animationEasing"),e.getShallow(a?"animationDelayUpdate":"animationDelay"));return r&&(null!=r.duration&&(s=r.duration),null!=r.easing&&(l=r.easing),null!=r.delay&&(t=r.delay)),"function"==typeof t&&(t=t(n,o)),{duration:(s="function"==typeof s?s(n):s)||0,delay:t,easing:l}}return null}function qh(t,e,n,i,o,r,a){var s,l=!1;"function"==typeof o?(a=r,r=o,o=null):Y(o)&&(r=o.cb,a=o.during,l=o.isFrom,s=o.removeOpt,o=o.dataIndex);var u="remove"===t;u||e.stopAnimation("remove");o=jh(t,i,o,u?s||{}:null,i&&i.getAnimationDelayParams?i.getAnimationDelayParams(e,o):null);o&&0<o.duration?(t={duration:o.duration,delay:o.delay||0,easing:o.easing,done:r,force:!!r||!!a,setToFinal:!u,scope:t,during:a},l?e.animateFrom(n,t):e.animateTo(n,t)):(e.stopAnimation(),l||e.attr(n),a&&a(1),r&&r())}function Kh(t,e,n,i,o,r){qh("update",t,e,n,i,o,r)}function $h(t,e,n,i,o,r){qh("init",t,e,n,i,o,r)}function Jh(t){if(!t.__zr)return!0;for(var e=0;e<t.animators.length;e++)if("remove"===t.animators[e].scope)return!0;return!1}function Qh(t,e,n,i,o,r){Jh(t)||qh("remove",t,e,n,i,o,r)}function tc(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),Qh(t,{style:{opacity:0}},e,n,i)}function ec(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse(function(t){t.isGroup||tc(t,e,n,i)}):tc(t,e,n,i)}function nc(t){Zh(t).oldStyle=t.style}var ic=Math.max,oc=Math.min,rc={};function ac(t){return Ss.extend(t)}var sc=function(t,e){var n,i=Su(t,e);function o(t){t=n.call(this,t)||this;return t.applyTransform=i.applyTransform,t.buildPath=i.buildPath,t}return u(o,n=xu),o};function lc(t,e){return sc(t,e)}function uc(t,e){rc[t]=e}function hc(t){if(rc.hasOwnProperty(t))return rc[t]}function cc(t,e,n,i){e=Mu(t,e);return n&&("center"===i&&(n=dc(n,e.getBoundingRect())),gc(e,n)),e}function pc(t,e,n){var i=new Ps({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){"center"===n&&(t={width:t.width,height:t.height},i.setStyle(dc(e,t)))}});return i}function dc(t,e){var n=e.width/e.height,e=t.height*n,n=e<=t.width?t.height:(e=t.width)/n;return{x:t.x+t.width/2-e/2,y:t.y+t.height/2-n/2,width:e,height:n}}var fc=function(t,e){for(var n=[],i=t.length,o=0;o<i;o++){var r=t[o];n.push(r.getUpdatedPathProxy(!0))}return(e=new Ss(e)).createPathProxy(),e.buildPath=function(t){var e;wu(t)&&(t.appendPath(n),(e=t.getContext())&&t.rebuildPath(e,1))},e};function gc(t,e){t.applyTransform&&(e=t.getBoundingRect().calculateTransform(e),t.applyTransform(e))}var yc=zs;function mc(t,e){for(var n=ii([]);t&&t!==e;)ri(n,t.getLocalTransform(),n),t=t.parent;return n}function vc(t,e,n){return e&&!k(e)&&(e=vi.getLocalTransform(e)),Ot([],t,e=n?ui([],e):e)}function _c(t,e,n){var i=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),o=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=vc(o=["left"===t?-i:"right"===t?i:0,"top"===t?-o:"bottom"===t?o:0],e,n);return Math.abs(o[0])>Math.abs(o[1])?0<o[0]?"right":"left":0<o[1]?"bottom":"top"}function xc(t){return!t.isGroup}function bc(t,e,i){var o,n;function r(t){var e={x:t.x,y:t.y,rotation:t.rotation};return null!=t.shape&&(e.shape=P({},t.shape)),e}t&&e&&(n={},t.traverse(function(t){xc(t)&&t.anid&&(n[t.anid]=t)}),o=n,e.traverse(function(t){var e,n;xc(t)&&t.anid&&((e=o[t.anid])&&(n=r(t),t.attr(r(e)),Kh(t,n,i,il(t).dataIndex)))}))}function wc(t,n){return L(t,function(t){var e=t[0],e=ic(e,n.x);e=oc(e,n.x+n.width);t=t[1],t=ic(t,n.y);return[e,t=oc(t,n.y+n.height)]})}function Sc(t,e){var n=ic(t.x,e.x),i=oc(t.x+t.width,e.x+e.width),o=ic(t.y,e.y),e=oc(t.y+t.height,e.y+e.height);if(n<=i&&o<=e)return{x:n,y:o,width:i-n,height:e-o}}function Mc(t,e,n){var i=P({rectHover:!0},e),e=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(e.image=t.slice(8),A(e,n),new Ps(i)):cc(t.replace("path://",""),i,n,"center")}function Ic(t,e,n,i,o){for(var r=0,a=o[o.length-1];r<o.length;r++){var s=o[r];if(Tc(t,e,n,i,s[0],s[1],a[0],a[1]))return!0;a=s}}function Tc(t,e,n,i,o,r,a,s){var l=n-t,u=i-e,n=a-o,i=s-r,a=n*u-l*i;if((s=a)<=1e-6&&-1e-6<=s)return!1;o=t-o,r=e-r,l=(o*u-l*r)/a;if(l<0||1<l)return!1;a=(o*i-n*r)/a;return!(a<0||1<a)}function Cc(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,o=H(e)?{formatter:e}:e,e=n.mainType,n=n.componentIndex,r={componentType:e,name:i,$vars:["name"]};r[e+"Index"]=n;var a=t.formatterParamsExtra;a&&E(z(a),function(t){ft(r,t)||(r[t]=a[t],r.$vars.push(t))});t=il(t.el);t.componentMainType=e,t.componentIndex=n,t.tooltipConfig={name:i,option:A({content:i,formatterParams:r},o)}}uc("circle",Du),uc("ellipse",Pu),uc("sector",qu),uc("ring",Qu),uc("polygon",rh),uc("polyline",uh),uc("rect",Fs),uc("line",fh),uc("bezierCurve",xh),uc("arc",Mh);var Dc=Object.freeze({__proto__:null,updateProps:Kh,initProps:$h,removeElement:Qh,removeElementWithFadeOut:ec,isElementRemoved:Jh,extendShape:ac,extendPath:lc,registerShape:uc,getShapeClass:hc,makePath:cc,makeImage:pc,mergePath:fc,resizePath:gc,subPixelOptimizeLine:function(t){return Ns(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return Es(t.shape,t.shape,t.style),t},subPixelOptimize:yc,getTransform:mc,applyTransform:vc,transformDirection:_c,groupTransition:bc,clipPointsByRect:wc,clipRectByRect:Sc,createIcon:Mc,linePolygonIntersect:Ic,lineLineIntersect:Tc,setTooltipConfig:Cc,Group:io,Image:Ps,Text:Xs,Circle:Du,Ellipse:Pu,Sector:qu,Ring:Qu,Polygon:rh,Polyline:uh,Rect:Fs,Line:fh,BezierCurve:xh,Arc:Mh,IncrementalDisplayable:Yh,CompoundPath:Ch,LinearGradient:Ph,RadialGradient:Nh,BoundingRect:Li,OrientedBoundingRect:Fh,Point:bi,Path:Ss}),Ac={};function kc(t,e){for(var n=0;n<hl.length;n++){var i=hl[n],o=e[i],i=t.ensureState(i);i.style=i.style||{},i.style.text=o}var r=t.currentStates.slice();t.clearStates(!0),t.setStyle({text:e.normal}),t.useStates(r,!0)}function Lc(t,e,n){for(var i,o=t.labelFetcher,r=t.labelDataIndex,a=t.labelDimIndex,s=e.normal,l={normal:i=null==(i=o?o.getFormattedLabel(r,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null):i)?F(t.defaultText)?t.defaultText(r,t,n):t.defaultText:i},u=0;u<hl.length;u++){var h=hl[u],c=e[h];l[h]=tt(o?o.getFormattedLabel(r,h,null,a,c&&c.get("formatter")):null,i)}return l}function Pc(t,e,n,i){n=n||Ac;for(var o=t instanceof Xs,r=!1,a=0;a<cl.length;a++)if((p=e[cl[a]])&&p.getShallow("show")){r=!0;break}var s=o?t:t.getTextContent();if(r){o||(s||(s=new Xs,t.setTextContent(s)),t.stateProxy&&(s.stateProxy=t.stateProxy));var l=Lc(n,e),u=e.normal,h=!!u.getShallow("show"),c=Rc(u,i&&i.normal,n,!1,!o);c.text=l.normal,o||t.setTextConfig(Nc(u,n,!1));for(a=0;a<hl.length;a++){var p,d,f,g=hl[a];(p=e[g])&&(d=s.ensureState(g),(f=!!tt(p.getShallow("show"),h))!=h&&(d.ignore=!f),d.style=Rc(p,i&&i[g],n,!0,!o),d.style.text=l[g],o||(t.ensureState(g).textConfig=Nc(p,n,!0)))}s.silent=!!u.getShallow("silent"),null!=s.style.x&&(c.x=s.style.x),null!=s.style.y&&(c.y=s.style.y),s.ignore=!h,s.useStyle(c),s.dirty(),n.enableTextSetter&&(Fc(s).setLabelText=function(t){t=Lc(n,e,t);kc(s,t)})}else s&&(s.ignore=!0);t.dirty()}function Oc(t,e){e=e||"label";for(var n={normal:t.getModel(e)},i=0;i<hl.length;i++){var o=hl[i];n[o]=t.getModel([o,e])}return n}function Rc(t,e,n,i,o){var r={};return function(t,e,n,i,o){n=n||Ac;var r,a=e.ecModel,s=a&&a.option.textStyle,l=function(t){var e;for(;t&&t!==t.ecModel;){var n=(t.option||Ac).rich;if(n){e=e||{};for(var i=z(n),o=0;o<i.length;o++){var r=i[o];e[r]=1}}t=t.parentModel}return e}(e);if(l)for(var u in r={},l){var h;l.hasOwnProperty(u)&&(h=e.getModel(["rich",u]),Vc(r[u]={},h,s,n,i,o,!1,!0))}r&&(t.rich=r);a=e.get("overflow");a&&(t.overflow=a);a=e.get("minMargin");null!=a&&(t.margin=a);Vc(t,e,s,n,i,o,!0,!1)}(r,t,n,i,o),e&&P(r,e),r}function Nc(t,e,n){e=e||{};var i={},o=t.getShallow("rotate"),r=tt(t.getShallow("distance"),n?null:5),a=t.getShallow("offset"),n=t.getShallow("position")||(n?null:"inside");return null!=(n="outside"===n?e.defaultOutsidePosition||"top":n)&&(i.position=n),null!=a&&(i.offset=a),null!=o&&(o*=Math.PI/180,i.rotation=o),null!=r&&(i.distance=r),i.outsideFill="inherit"===t.get("color")?e.inheritColor||null:"auto",i}var Ec=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],zc=["align","lineHeight","width","height","tag","verticalAlign"],Bc=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function Vc(t,e,n,i,o,r,a,s){n=!o&&n||Ac;var l=i&&i.inheritColor,u=e.getShallow("color"),h=e.getShallow("textBorderColor"),c=tt(e.getShallow("opacity"),n.opacity);"inherit"!==u&&"auto"!==u||("auto"===u&&Uo("color: 'auto'","color: 'inherit'"),u=l||null),"inherit"!==h&&"auto"!==h||("auto"===h&&Uo("color: 'auto'","color: 'inherit'"),h=l||null),r||(u=u||n.color,h=h||n.textBorderColor),null!=u&&(t.fill=u),null!=h&&(t.stroke=h);h=tt(e.getShallow("textBorderWidth"),n.textBorderWidth);null!=h&&(t.lineWidth=h);h=tt(e.getShallow("textBorderType"),n.textBorderType);null!=h&&(t.lineDash=h);h=tt(e.getShallow("textBorderDashOffset"),n.textBorderDashOffset);null!=h&&(t.lineDashOffset=h),null!=(c=!o&&null==c&&!s?i&&i.defaultOpacity:c)&&(t.opacity=c),o||r||null==t.fill&&i.inheritColor&&(t.fill=i.inheritColor);for(var p=0;p<Ec.length;p++){var d=Ec[p];null!=(f=tt(e.getShallow(d),n[d]))&&(t[d]=f)}for(p=0;p<zc.length;p++){d=zc[p];null!=(f=e.getShallow(d))&&(t[d]=f)}if(null!=t.verticalAlign||null!=(r=e.getShallow("baseline"))&&(t.verticalAlign=r),!a||!i.disableBox){for(p=0;p<Bc.length;p++){var f,d=Bc[p];null!=(f=e.getShallow(d))&&(t[d]=f)}i=e.getShallow("borderType");null!=i&&(t.borderDash=i),"auto"!==t.backgroundColor&&"inherit"!==t.backgroundColor||!l||("auto"===t.backgroundColor&&Uo("backgroundColor: 'auto'","backgroundColor: 'inherit'"),t.backgroundColor=l),"auto"!==t.borderColor&&"inherit"!==t.borderColor||!l||("auto"===t.borderColor&&Uo("borderColor: 'auto'","borderColor: 'inherit'"),t.borderColor=l)}}function Gc(t,e){e=e&&e.getModel("textStyle");return rt([t.fontStyle||e&&e.getShallow("fontStyle")||"",t.fontWeight||e&&e.getShallow("fontWeight")||"",(t.fontSize||e&&e.getShallow("fontSize")||12)+"px",t.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var Fc=ur();function Hc(t,e,n,i){t&&((t=Fc(t)).prevValue=t.value,t.value=n,n=e.normal,t.valueAnimation=n.get("valueAnimation"),t.valueAnimation&&(t.precision=n.get("precision"),t.defaultInterpolatedText=i,t.statesModels=e))}function Wc(n,i,o,t,r){var a,s,l,u=Fc(n);u.valueAnimation&&u.prevValue!==u.value&&(a=u.defaultInterpolatedText,s=tt(u.interpolatedValue,u.prevValue),l=u.value,n.percent=0,(null==u.prevValue?$h:Kh)(n,{percent:1},t,i,null,function(t){var e=vr(o,u.precision,s,l,t);u.interpolatedValue=1===t?null:e,e=Lc({labelDataIndex:i,labelFetcher:r,defaultText:a?a(e):e+""},u.statesModels,e),kc(n,e)}))}var Uc=["textStyle","color"],Yc=new Xs,Xc=(Zc.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(Uc):null)},Zc.prototype.getFont=function(){return Gc({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},Zc.prototype.getTextRect=function(t){return Yc.useStyle({text:t,fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily"),verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline"),padding:this.getShallow("padding"),lineHeight:this.getShallow("lineHeight"),rich:this.getShallow("rich")}),Yc.update(),Yc.getBoundingRect()},Zc);function Zc(){}var jc=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],qc=Ar(jc),n=(Kc.prototype.getLineStyle=function(t){return qc(this,t)},Kc);function Kc(){}var r=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],$c=Ar(r),f=(Jc.prototype.getItemStyle=function(t,e){return $c(this,t,e)},Jc);function Jc(){}var Qc,tp,ep=(np.prototype.init=function(t,e,n){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o]},np.prototype.mergeOption=function(t,e){b(this.option,t,!0)},np.prototype.get=function(t,e){return null==t?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},np.prototype.getShallow=function(t,e){var n=this.option,n=null==n?n:n[t];return null!=n||e||(e=this.parentModel)&&(n=e.getShallow(t)),n},np.prototype.getModel=function(t,e){var n=null!=t,t=n?this.parsePath(t):null;return new np(n?this._doGet(t):this.option,e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(t)),this.ecModel)},np.prototype.isEmpty=function(){return null==this.option},np.prototype.restoreData=function(){},np.prototype.clone=function(){return new this.constructor(S(this.option))},np.prototype.parsePath=function(t){return"string"==typeof t?t.split("."):t},np.prototype.resolveParentPath=function(t){return t},np.prototype.isAnimationEnabled=function(){if(!w.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},np.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&(!t[i]||null!=(n=n&&"object"===_typeof(n)?n[t[i]]:null));i++);return n=null==n&&e?e._doGet(this.resolveParentPath(t),e.parentModel):n},np);function np(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}Sr(ep),Qc=ep,tp=["__\0is_clz",Ir++].join("_"),Qc.prototype[tp]=!0,ot(!Qc.isInstance,'The method "is" can not be defined.'),Qc.isInstance=function(t){return!(!t||!t[tp])},T(ep,n),T(ep,f),T(ep,Lr),T(ep,Xc);var ip=Math.round(10*Math.random());function op(t){return[t||"",ip++].join("_")}function rp(t,e){return b(b({},t,!0),e,!0)}var ap="ZH",sp="EN",lp=sp,up={},hp={},cp=w.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf(ap)?ap:lp;function pp(t,e){t=t.toUpperCase(),hp[t]=new ep(e),up[t]=e}function dp(t){return hp[t]}pp(sp,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),pp(ap,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var fp=1e3,gp=60*fp,yp=60*gp,mp=24*yp,vp=365*mp,_p={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Jn="{yyyy}-{MM}-{dd}",xp={year:"{yyyy}",month:"{yyyy}-{MM}",day:Jn,hour:Jn+" "+_p.hour,minute:Jn+" "+_p.minute,second:Jn+" "+_p.second,millisecond:_p.none},bp=["year","month","day","hour","minute","second","millisecond"],wp=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Sp(t,e){return"0000".substr(0,e-(t+="").length)+t}function Mp(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Ip(t,e,n,i){var o=Do(t),r=o[Dp(n)](),a=o[Ap(n)]()+1,s=Math.floor((a-1)/4)+1,l=o[kp(n)](),u=o["get"+(n?"UTC":"")+"Day"](),h=o[Lp(n)](),c=(h-1)%12+1,p=o[Pp(n)](),d=o[Op(n)](),f=o[Rp(n)](),t=(i instanceof ep?i:dp(i||cp)||hp[lp]).getModel("time"),o=t.get("month"),n=t.get("monthAbbr"),i=t.get("dayOfWeek"),t=t.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,r+"").replace(/{yy}/g,r%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,o[a-1]).replace(/{MMM}/g,n[a-1]).replace(/{MM}/g,Sp(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Sp(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,i[u]).replace(/{ee}/g,t[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Sp(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Sp(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Sp(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Sp(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Sp(f,3)).replace(/{S}/g,f+"")}function Tp(t,e){var n=Do(t),i=n[Ap(e)]()+1,o=n[kp(e)](),r=n[Lp(e)](),a=n[Pp(e)](),t=n[Op(e)](),e=0===n[Rp(e)](),t=e&&0===t,a=t&&0===a,r=a&&0===r,o=r&&1===o;return o&&1===i?"year":o?"month":r?"day":a?"hour":t?"minute":e?"second":"millisecond"}function Cp(t,e,n){var i="number"==typeof t?Do(t):t;switch(e=e||Tp(t,n)){case"year":return i[Dp(n)]();case"half-year":return 6<=i[Ap(n)]()?1:0;case"quarter":return Math.floor((i[Ap(n)]()+1)/4);case"month":return i[Ap(n)]();case"day":return i[kp(n)]();case"half-day":return i[Lp(n)]()/24;case"hour":return i[Lp(n)]();case"minute":return i[Pp(n)]();case"second":return i[Op(n)]();case"millisecond":return i[Rp(n)]()}}function Dp(t){return t?"getUTCFullYear":"getFullYear"}function Ap(t){return t?"getUTCMonth":"getMonth"}function kp(t){return t?"getUTCDate":"getDate"}function Lp(t){return t?"getUTCHours":"getHours"}function Pp(t){return t?"getUTCMinutes":"getMinutes"}function Op(t){return t?"getUTCSeconds":"getSeconds"}function Rp(t){return t?"getUTCMilliseconds":"getMilliseconds"}function Np(t){return t?"setUTCMonth":"setMonth"}function Ep(t){return t?"setUTCDate":"setDate"}function zp(t){return t?"setUTCHours":"setHours"}function Bp(t){return t?"setUTCMinutes":"setMinutes"}function Vp(t){return t?"setUTCSeconds":"setSeconds"}function Gp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function Fp(t){if(!No(t))return H(t)?t:"-";t=(t+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:"")}function Hp(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()}),t=e&&t?t.charAt(0).toUpperCase()+t.slice(1):t}var Wp=it,Up=/([&<>"'])/g,Yp={"&":"&","<":"<",">":">",'"':""","'":"'"};function Xp(t){return null==t?"":(t+"").replace(Up,function(t,e){return Yp[e]})}function Zp(t,e,n){function i(t){return t&&rt(t)?t:"-"}function o(t){return null!=t&&!isNaN(t)&&isFinite(t)}var r="time"===e,a=t instanceof Date;if(r||a){r=r?Do(t):t;if(!isNaN(+r))return Ip(r,"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):U(t)&&o(t)?t+"":"-";e=Ro(t);return o(e)?Fp(e):W(t)?i(t):"boolean"==typeof t?t+"":"-"}function jp(t,e){return"{"+t+(null==e?"":e)+"}"}var qp=["a","b","c","d","e","f","g"];function Kp(t,e,n){var i=(e=!G(e)?[e]:e).length;if(!i)return"";for(var o=e[0].$vars||[],r=0;r<o.length;r++){var a=qp[r];t=t.replace(jp(a),jp(a,0))}for(var s=0;s<i;s++)for(var l=0;l<o.length;l++){var u=e[s][o[l]];t=t.replace(jp(qp[l],s),n?Xp(u):u)}return t}function $p(t,e){var n=H(t)?{color:t,extraCssText:e}:t||{},i=n.color,o=n.type;e=n.extraCssText;t=n.renderMode||"html";return i?"html"===t?"subItem"===o?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Xp(i)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Xp(i)+";"+(e||"")+'"></span>':{renderMode:t,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===o?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Jp(t,e){return e=e||"transparent",H(t)?t:Y(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Qp(t,e){var n;"_blank"===e||"blank"===e?((n=window.open()).opener=null,n.location.href=t):window.open(t,e)}var td=E,ed=["left","right","top","bottom","width","height"],nd=[["width","left","right"],["height","top","bottom"]];function id(a,s,l,u,h){var c=0,p=0;null==u&&(u=1/0),null==h&&(h=1/0);var d=0;s.eachChild(function(t,e){var n,i,o=t.getBoundingRect(),r=s.childAt(e+1),e=r&&r.getBoundingRect();d="horizontal"===a?(r=o.width+(e?-e.x+o.x:0),u<(n=c+r)||t.newline?(c=0,n=r,p+=d+l,o.height):Math.max(d,o.height)):(e=o.height+(e?-e.y+o.y:0),h<(i=p+e)||t.newline?(c+=d+l,p=0,i=e,o.width):Math.max(d,o.width)),t.newline||(t.x=c,t.y=p,t.markRedraw(),"horizontal"===a?c=n+l:p=i+l)})}var od=id;V(id,"vertical"),V(id,"horizontal");function rd(t,e,n){n=Wp(n||0);var i=e.width,o=e.height,r=mo(t.left,i),a=mo(t.top,o),s=mo(t.right,i),l=mo(t.bottom,o),u=mo(t.width,i),h=mo(t.height,o),c=n[2]+n[0],p=n[1]+n[3],e=t.aspect;switch(isNaN(u)&&(u=i-s-p-r),isNaN(h)&&(h=o-l-c-a),null!=e&&(isNaN(u)&&isNaN(h)&&(i/o<e?u=.8*i:h=.8*o),isNaN(u)&&(u=e*h),isNaN(h)&&(h=u/e)),isNaN(r)&&(r=i-s-u-p),isNaN(a)&&(a=o-l-h-c),t.left||t.right){case"center":r=i/2-u/2-n[3];break;case"right":r=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=o/2-h/2-n[0];break;case"bottom":a=o-h-c}r=r||0,a=a||0,isNaN(u)&&(u=i-p-r-(s||0)),isNaN(h)&&(h=o-c-a-(l||0));l=new Li(r+n[3],a+n[0],u,h);return l.margin=n,l}function ad(t,e,n,i,o){var r,a=!o||!o.hv||o.hv[0],s=!o||!o.hv||o.hv[1],l=o&&o.boundingMode||"all";(a||s)&&("raw"===l?r="group"===t.type?new Li(0,0,+e.width||0,+e.height||0):t.getBoundingRect():(r=t.getBoundingRect(),t.needLocalTransform()&&(o=t.getLocalTransform(),(r=r.clone()).applyTransform(o))),i=rd(A({width:r.width,height:r.height},e),n,i),a=a?i.x-r.x:0,r=s?i.y-r.y:0,"raw"===l?(t.x=a,t.y=r):(t.x+=a,t.y+=r),t.markRedraw())}function sd(t){t=t.layoutMode||t.constructor.layoutMode;return Y(t)?t:t?{type:t}:null}function ld(l,u,t){var h=t&&t.ignoreSize;G(h)||(h=[h,h]);var e=n(nd[0],0),t=n(nd[1],1);function n(t,e){var n={},i=0,o={},r=0;if(td(t,function(t){o[t]=l[t]}),td(t,function(t){c(u,t)&&(n[t]=o[t]=u[t]),p(n,t)&&i++,p(o,t)&&r++}),h[e])return p(u,t[1])?o[t[2]]=null:p(u,t[2])&&(o[t[1]]=null),o;if(2!==r&&i){if(2<=i)return n;for(var a=0;a<t.length;a++){var s=t[a];if(!c(n,s)&&c(l,s)){n[s]=l[s];break}}return n}return o}function c(t,e){return t.hasOwnProperty(e)}function p(t,e){return null!=t[e]&&"auto"!==t[e]}function i(t,e,n){td(t,function(t){e[t]=n[t]})}i(nd[0],l,e),i(nd[1],l,t)}function ud(t){return hd({},t)}function hd(e,n){return n&&e&&td(ed,function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e}var cd,pd,dd,fd,gd=ur(),yd=(u(md,cd=ep),md.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},md.prototype.mergeDefaultAndTheme=function(t,e){var n=sd(this),i=n?ud(t):{};b(t,e.getTheme().get(this.mainType)),b(t,this.getDefaultOption()),n&&ld(t,i,n)},md.prototype.mergeOption=function(t,e){b(this.option,t,!0);var n=sd(this);n&&ld(this.option,t,n)},md.prototype.optionUpdated=function(t,e){},md.prototype.getDefaultOption=function(){var t=this.constructor;if(!(e=t)||!e[br])return t.defaultOption;var e=gd(this);if(!e.defaultOption){for(var n=[],i=t;i;){var o=i.prototype.defaultOption;o&&n.push(o),i=i.superClass}for(var r={},a=n.length-1;0<=a;a--)r=b(r,n[a],!0);e.defaultOption=r}return e.defaultOption},md.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return gr(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},md.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},md.protoInitialize=((Rg=md.prototype).type="component",Rg.id="",Rg.name="",Rg.mainType="",Rg.subType="",void(Rg.componentIndex=0)),md);function md(t,e,n){n=cd.call(this,t,e,n)||this;return n.uid=op("ec_cpt_model"),n}function vd(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}Mr(yd,ep),Dr(yd),dd={},(pd=yd).registerSubTypeDefaulter=function(t,e){t=wr(t);dd[t.main]=e},pd.determineSubType=function(t,e){var n,i=e.type;return i||(n=wr(t).main,pd.hasSubTypes(t)&&dd[n]&&(i=dd[n](e))),i},fd=function(t){var e=[];E(yd.getClassesByMainType(t),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=L(e,function(t){return wr(t).main}),"dataset"!==t&&C(e,"dataset")<=0&&e.unshift("dataset");return e},yd.topologicalTravel=function(e,n,t,i){if(e.length){var r,a,s,o=(a={},s=[],E(r=n,function(n){var e,i,o=vd(a,n),t=o.originalDeps=fd(n),t=(e=r,i=[],E(t,function(t){0<=C(e,t)&&i.push(t)}),i);o.entryCount=t.length,0===o.entryCount&&s.push(n),E(t,function(t){C(o.predecessor,t)<0&&o.predecessor.push(t);var e=vd(a,t);C(e.successor,t)<0&&e.successor.push(n)})}),{graph:a,noEntryList:s}),l=o.graph,u=o.noEntryList,h={};for(E(e,function(t){h[t]=!0});u.length;){var c=u.pop(),p=l[c],d=!!h[c];d&&(t.call(i,c,p.originalDeps.slice()),delete h[c]),E(p.successor,d?g:f)}E(h,function(){var t="",t=Yo("Circular dependency may exists: ",h,e,n);throw new Error(t)})}function f(t){l[t].entryCount--,0===l[t].entryCount&&u.push(t)}function g(t){h[t]=!0,f(t)}};$i="";"undefined"!=typeof navigator&&($i=navigator.platform||"");var _d="rgba(0, 0, 0, 0.2)",xd={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:_d,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:_d,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:_d,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:_d,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:_d,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:_d,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:$i.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},bd=ct(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),wd="original",Sd="arrayRows",Md="objectRows",Id="keyedColumns",Td="typedArray",Cd="unknown",Dd="column",Ad="row",kd={Must:1,Might:2,Not:3},Ld=ur();function Pd(n,t,e){var o={},i=Rd(t);if(!i||!n)return o;var r,a,s=[],l=[],t=t.ecModel,t=Ld(t).datasetMap,e=i.uid+"_"+e.seriesLayoutBy;E(n=n.slice(),function(t,e){t=Y(t)?t:n[e]={name:t};"ordinal"===t.type&&null==r&&(r=e,a=c(t)),o[t.name]=[]});var u=t.get(e)||t.set(e,{categoryWayDim:a,valueWayDim:0});function h(t,e,n){for(var i=0;i<n;i++)t.push(e+i)}function c(t){t=t.dimsDef;return t?t.length:1}return E(n,function(t,e){var n,i=t.name,t=c(t);null==r?(n=u.valueWayDim,h(o[i],n,t),h(l,n,t),u.valueWayDim+=t):r===e?(h(o[i],0,t),h(s,0,t)):(n=u.categoryWayDim,h(o[i],n,t),h(l,n,t),u.categoryWayDim+=t)}),s.length&&(o.itemName=s),l.length&&(o.seriesName=l),o}function Od(t,l,u){var e={};if(!Rd(t))return e;var h,c=l.sourceFormat,p=l.dimensionsDefine;c!==Md&&c!==Id||E(p,function(t,e){"name"===(Y(t)?t.name:t)&&(h=e)});t=function(){for(var t={},e={},n=[],i=0,o=Math.min(5,u);i<o;i++){var r=Ed(l.data,c,l.seriesLayoutBy,p,l.startIndex,i);n.push(r);var a=r===kd.Not;if(a&&null==t.v&&i!==h&&(t.v=i),null!=t.n&&t.n!==t.v&&(a||n[t.n]!==kd.Not)||(t.n=i),s(t)&&n[t.n]!==kd.Not)return t;a||(r===kd.Might&&null==e.v&&i!==h&&(e.v=i),null!=e.n&&e.n!==e.v||(e.n=i))}function s(t){return null!=t.v&&null!=t.n}return s(t)?t:s(e)?e:null}();return t&&(e.value=[t.v],t=null!=h?h:t.n,e.itemName=[t],e.seriesName=[t]),e}function Rd(t){if(!t.get("data",!0))return gr(t.ecModel,"dataset",{index:t.get("datasetIndex",!0),id:t.get("datasetId",!0)},dr).models[0]}function Nd(t,e){return Ed(t.data,t.sourceFormat,t.seriesLayoutBy,t.dimensionsDefine,t.startIndex,e)}function Ed(t,e,n,i,o,r){var a,s,l;if(Z(t))return kd.Not;if(i&&(Y(i=i[r])?(s=i.name,l=i.type):H(i)&&(s=i)),null!=l)return"ordinal"===l?kd.Must:kd.Not;if(e===Sd){var u=t;if(n===Ad){for(var h=u[r],c=0;c<(h||[]).length&&c<5;c++)if(null!=(a=m(h[o+c])))return a}else for(c=0;c<u.length&&c<5;c++){var p=u[o+c];if(p&&null!=(a=m(p[r])))return a}}else if(e===Md){var d=t;if(!s)return kd.Not;for(c=0;c<d.length&&c<5;c++)if((g=d[c])&&null!=(a=m(g[s])))return a}else if(e===Id){if(!s)return kd.Not;if(!(h=t[s])||Z(h))return kd.Not;for(c=0;c<h.length&&c<5;c++)if(null!=(a=m(h[c])))return a}else if(e===wd)for(var f=t,c=0;c<f.length&&c<5;c++){var g,y=Jo(g=f[c]);if(!G(y))return kd.Not;if(null!=(a=m(y[r])))return a}function m(t){var e=H(t);return null!=t&&isFinite(t)&&""!==t?e?kd.Might:kd.Not:e&&"-"!==t?kd.Must:void 0}return kd.Not}var zd=ct();var Bd,Vd,Gd,Fd=ur(),Hd=ur(),Wd=(Ud.prototype.getColorFromPalette=function(t,e,n){var i=qo(this.get("color",!0)),o=this.get("colorLayer",!0);return Xd(this,Fd,i,o,t,e,n)},Ud.prototype.clearColorPalette=function(){var t,e;(e=Fd)(t=this).paletteIdx=0,e(t).paletteNameMap={}},Ud);function Ud(){}function Yd(t,e,n,i){var o=qo(t.get(["aria","decal","decals"]));return Xd(t,Hd,o,null,e,n,i)}function Xd(t,e,n,i,o,r,a){e=e(r=r||t),t=e.paletteIdx||0,r=e.paletteNameMap=e.paletteNameMap||{};if(r.hasOwnProperty(o))return r[o];a=null!=a&&i?function(t,e){for(var n=t.length,i=0;i<n;i++)if(t[i].length>e)return t[i];return t[n-1]}(i,a):n;if((a=a||n)&&a.length){n=a[t];return o&&(r[o]=n),e.paletteIdx=(t+1)%a.length,n}}var Zd="\0_ec_inner",jd={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},qd={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Kd={};var $d,Jd=(u(Qd,$d=ep),Qd.prototype.init=function(t,e,n,i,o,r){i=i||{},this.option=null,this._theme=new ep(i),this._locale=new ep(o),this._optionManager=r},Qd.prototype.setOption=function(t,e,n){ot(null!=t,"option is null/undefined"),ot(1!==t[Zd],"please use chart.getOption()");e=nf(e);this._optionManager.setOption(t,n,e),this._resetOption(null,e)},Qd.prototype.resetOption=function(t,e){return this._resetOption(t,nf(e))},Qd.prototype._resetOption=function(t,e){var n,i=!1,o=this._optionManager;return t&&"recreate"!==t||(n=o.mountOption("recreate"===t),E(n,function(t,e){var n;yd.hasClass(e)||(n=jd[e])&&!Kd[n]&&(Ho("Component "+e+" is used but not imported.\nimport { "+n+" } from 'echarts/components';\necharts.use(["+n+"]);"),Kd[n]=!0)}),this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(n,e)):Gd(this,n),i=!0),"timeline"!==t&&"media"!==t||this.restoreData(),t&&"recreate"!==t&&"timeline"!==t||(n=o.getTimelineOption(this))&&(i=!0,this._mergeOption(n,e)),t&&"recreate"!==t&&"media"!==t||(o=o.getMediaOption(this)).length&&E(o,function(t){i=!0,this._mergeOption(t,e)},this),i},Qd.prototype.mergeOption=function(t){this._mergeOption(t,null)},Qd.prototype._mergeOption=function(i,t){var o=this.option,r=this._componentsMap,a=this._componentsCount,n=[],s=ct(),c=t&&t.replaceMergeMainTypeMap;Ld(this).datasetMap=ct(),E(i,function(t,e){null!=t&&(yd.hasClass(e)?e&&(n.push(e),s.set(e,!0)):o[e]=null==o[e]?S(t):b(o[e],t,!0))}),c&&c.each(function(t,e){yd.hasClass(e)&&!s.get(e)&&(n.push(e),s.set(e,!0))}),yd.topologicalTravel(n,yd.getAllClassMainTypes(),function(s){var t=function(t,e,n){if(!(e=zd.get(e)))return n;var i=e(t);if(!i)return n;for(var o=0;o<i.length;o++)ot(ar(i[o]));return n.concat(i)}(this,s,qo(i[s])),e=r.get(s),n=e?c&&c.get(s)?"replaceMerge":"normalMerge":"replaceAll",n=Qo(e,t,n);sr(n,s,yd),o[s]=null,r.set(s,null),a.set(s,0);var l=[],u=[],h=0;E(n,function(t,e){var n=t.existing,i=t.newOption;if(i){var o="series"===s,r=yd.getClass(s,t.keyInfo.subType,!o);if(!r){var a=t.keyInfo.subType,o=qd[a];return void(Kd[a]||(Kd[a]=!0,Ho(o?"Series "+a+" is used but not imported.\nimport { "+o+" } from 'echarts/charts';\necharts.use(["+o+"]);":"Unkown series "+a)))}n&&n.constructor===r?(n.name=t.keyInfo.name,n.mergeOption(i,this),n.optionUpdated(i,!1)):(e=P({componentIndex:e},t.keyInfo),P(n=new r(i,this,this,e),e),t.brandNew&&(n.__requireNewView=!0),n.init(i,this,this),n.optionUpdated(null,!0))}else n&&(n.mergeOption({},this),n.optionUpdated({},!1));n?(l.push(n.option),u.push(n),h++):(l.push(void 0),u.push(void 0))},this),o[s]=l,r.set(s,u),a.set(s,h),"series"===s&&Bd(this)},this),this._seriesIndices||Bd(this)},Qd.prototype.getOption=function(){var a=S(this.option);return E(a,function(t,e){if(yd.hasClass(e)){for(var n=qo(t),i=n.length,o=!1,r=i-1;0<=r;r--)n[r]&&!ar(n[r])?o=!0:(n[r]=null,o||i--);n.length=i,a[e]=n}}),delete a[Zd],a},Qd.prototype.getTheme=function(){return this._theme},Qd.prototype.getLocaleModel=function(){return this._locale},Qd.prototype.setUpdatePayload=function(t){this._payload=t},Qd.prototype.getUpdatePayload=function(){return this._payload},Qd.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){t=n[e||0];if(t)return t;if(null==e)for(var i=0;i<n.length;i++)if(n[i])return n[i]}},Qd.prototype.queryComponents=function(t){var e=t.mainType;if(!e)return[];var n,i=t.index,o=t.id,r=t.name,a=this._componentsMap.get(e);return a&&a.length?(null!=i?(n=[],E(qo(i),function(t){a[t]&&n.push(a[t])})):n=null!=o?tf("id",o,a):null!=r?tf("name",r,a):R(a,function(t){return!!t}),ef(n,t)):[]},Qd.prototype.findComponents=function(t){var e,n,i,o,r,a=t.query,s=t.mainType,l=(n=s+"Index",i=s+"Id",o=s+"Name",!(e=a)||null==e[n]&&null==e[i]&&null==e[o]?null:{mainType:s,index:e[n],id:e[i],name:e[o]}),l=l?this.queryComponents(l):R(this._componentsMap.get(s),function(t){return!!t});return r=ef(l,t),t.filter?R(r,t.filter):r},Qd.prototype.eachComponent=function(t,e,n){var i=this._componentsMap;if(F(t)){var o=e,r=t;i.each(function(t,e){for(var n=0;t&&n<t.length;n++){var i=t[n];i&&r.call(o,e,i,i.componentIndex)}})}else for(var a=H(t)?i.get(t):Y(t)?this.findComponents(t):null,s=0;a&&s<a.length;s++){var l=a[s];l&&e.call(n,l,l.componentIndex)}},Qd.prototype.getSeriesByName=function(t){var e=nr(t,null);return R(this._componentsMap.get("series"),function(t){return!!t&&null!=e&&t.name===e})},Qd.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},Qd.prototype.getSeriesByType=function(e){return R(this._componentsMap.get("series"),function(t){return!!t&&t.subType===e})},Qd.prototype.getSeries=function(){return R(this._componentsMap.get("series"),function(t){return!!t})},Qd.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},Qd.prototype.eachSeries=function(n,i){Vd(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)},this)},Qd.prototype.eachRawSeries=function(e,n){E(this._componentsMap.get("series"),function(t){t&&e.call(n,t,t.componentIndex)})},Qd.prototype.eachSeriesByType=function(n,i,o){Vd(this),E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];e.subType===n&&i.call(o,e,t)},this)},Qd.prototype.eachRawSeriesByType=function(t,e,n){return E(this.getSeriesByType(t),e,n)},Qd.prototype.isSeriesFiltered=function(t){return Vd(this),null==this._seriesIndicesMap.get(t.componentIndex)},Qd.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},Qd.prototype.filterSeries=function(n,i){Vd(this);var o=[];E(this._seriesIndices,function(t){var e=this._componentsMap.get("series")[t];n.call(i,e,t)&&o.push(t)},this),this._seriesIndices=o,this._seriesIndicesMap=ct(o)},Qd.prototype.restoreData=function(n){Bd(this);var t=this._componentsMap,i=[];t.each(function(t,e){yd.hasClass(e)&&i.push(e)}),yd.topologicalTravel(i,yd.getAllClassMainTypes(),function(e){E(t.get(e),function(t){!t||"series"===e&&function(t,e){if(e){var n=e.seriesIndex,i=e.seriesId,e=e.seriesName;return null!=n&&t.componentIndex!==n||null!=i&&t.id!==i||null!=e&&t.name!==e}}(t,n)||t.restoreData()})})},Qd.internalField=(Bd=function(t){var e=t._seriesIndices=[];E(t._componentsMap.get("series"),function(t){t&&e.push(t.componentIndex)}),t._seriesIndicesMap=ct(e)},Vd=function(t){if(1,!t._seriesIndices)throw new Error("Option should contains series.")},void(Gd=function(t,e){t.option={},t.option[Zd]=1,t._componentsMap=ct({series:[]}),t._componentsCount=ct();var n,i,o=e.aria;Y(o)&&null==o.enabled&&(o.enabled=!0),n=e,o=t._theme.option,i=n.color&&!n.colorLayer,E(o,function(t,e){"colorLayer"===e&&i||yd.hasClass(e)||("object"===_typeof(t)?n[e]=n[e]?b(n[e],t,!1):S(t):null==n[e]&&(n[e]=t))}),b(e,xd,!1),t._mergeOption(e,null)})),Qd);function Qd(){return null!==$d&&$d.apply(this,arguments)||this}function tf(e,t,n){if(G(t)){var i=ct();return E(t,function(t){null!=t&&null!=nr(t,null)&&i.set(t,!0)}),R(n,function(t){return t&&i.get(t[e])})}var o=nr(t,null);return R(n,function(t){return t&&null!=o&&t[e]===o})}function ef(t,e){return e.hasOwnProperty("subType")?R(t,function(t){return t&&t.subType===e.subType}):t}function nf(t){var e=ct();return t&&E(qo(t.replaceMerge),function(t){ot(yd.hasClass(t),'"'+t+'" is not valid component main type in "replaceMerge"'),e.set(t,!0)}),{replaceMergeMainTypeMap:e}}T(Jd,Wd);function of(e){E(rf,function(t){this[t]=B(e[t],e)},this)}var rf=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],af={},sf=(lf.prototype.create=function(n,i){var o=[];E(af,function(t,e){t=t.create(n,i);o=o.concat(t||[])}),this._coordinateSystems=o},lf.prototype.update=function(e,n){E(this._coordinateSystems,function(t){t.update&&t.update(e,n)})},lf.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},lf.register=function(t,e){af[t]=e},lf.get=function(t){return af[t]},lf);function lf(){this._coordinateSystems=[]}var uf=/^(min|max)?(.+)$/,hf=(cf.prototype.setOption=function(t,e,n){t&&(E(qo(t.series),function(t){t&&t.data&&Z(t.data)&&st(t.data)}),E(qo(t.dataset),function(t){t&&t.source&&Z(t.source)&&st(t.source)})),t=S(t);var i=this._optionBackup,e=function(t,n,i){var e,o,r=[],a=t.baseOption,s=t.timeline,l=t.options,u=t.media,h=!!t.media,c=!!(l||s||a&&a.timeline);a?(o=a).timeline||(o.timeline=s):((c||h)&&(t.options=t.media=null),o=t);h&&(G(u)?E(u,function(t){t&&!t.option&&Y(t.query)&&Y(t.query.option)&&Ho("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),t&&t.option&&(t.query?r.push(t):e=e||t)}):Ho("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }"));function p(e){E(n,function(t){t(e,i)})}return p(o),E(l,p),E(r,function(t){return p(t.option)}),{baseOption:o,timelineOptions:l||[],mediaDefault:e,mediaList:r}}(t,e,!i);this._newBaseOption=e.baseOption,i?(e.timelineOptions.length&&(i.timelineOptions=e.timelineOptions),e.mediaList.length&&(i.mediaList=e.mediaList),e.mediaDefault&&(i.mediaDefault=e.mediaDefault)):this._optionBackup=e},cf.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],S(t?e.baseOption:this._newBaseOption)},cf.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;return!n.length||(t=t.getComponent("timeline"))&&(e=S(n[t.getCurrentIndex()])),e},cf.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,o=this._mediaDefault,r=[],a=[];if(!i.length&&!o)return a;for(var s,l,u=0,h=i.length;u<h;u++)!function(t,e,n){var i={width:e,height:n,aspectratio:e/n},o=!0;return E(t,function(t,e){var n=e.match(uf);n&&n[1]&&n[2]&&(e=n[1],n=n[2].toLowerCase(),n=i[n],t=t,("min"===(e=e)?t<=n:"max"===e?n<=t:n===t)||(o=!1))}),o}(i[u].query,e,n)||r.push(u);return(r=!r.length&&o?[-1]:r).length&&(s=r,l=this._currentMediaIndices,s.join(",")!==l.join(","))&&(a=L(r,function(t){return S((-1===t?o:i[t]).option)})),this._currentMediaIndices=r,a},cf);function cf(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}var pf=E,df=Y,ff=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function gf(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=ff.length;n<i;n++){var o=ff[n],r=e.normal,a=e.emphasis;r&&r[o]&&(Uo("itemStyle.normal."+o,o),t[o]=t[o]||{},t[o].normal?b(t[o].normal,r[o]):t[o].normal=r[o],r[o]=null),a&&a[o]&&(Uo("itemStyle.emphasis."+o,"emphasis."+o),t[o]=t[o]||{},t[o].emphasis?b(t[o].emphasis,a[o]):t[o].emphasis=a[o],a[o]=null)}}function yf(t,e,n){var i,o;t&&t[e]&&(t[e].normal||t[e].emphasis)&&(i=t[e].normal,o=t[e].emphasis,i&&(Wo("'normal' hierarchy in "+e+" has been removed since 4.0. All style properties are configured in "+e+" directly now."),n?(t[e].normal=t[e].emphasis=null,A(t[e],i)):t[e]=i),o&&(Wo(e+".emphasis has been changed to emphasis."+e+" since 4.0"),t.emphasis=t.emphasis||{},(t.emphasis[e]=o).focus&&(t.emphasis.focus=o.focus),o.blurScope&&(t.emphasis.blurScope=o.blurScope)))}function mf(t){yf(t,"itemStyle"),yf(t,"lineStyle"),yf(t,"areaStyle"),yf(t,"label"),yf(t,"labelLine"),yf(t,"upperLabel"),yf(t,"edgeLabel")}function vf(t,e){var n=df(t)&&t[e],i=df(n)&&n.textStyle;if(i){Wo("textStyle hierarchy in "+e+" has been removed since 4.0. All textStyle properties are configured in "+e+" directly now.");for(var o=0,r=$o.length;o<r;o++){var a=$o[o];i.hasOwnProperty(a)&&(n[a]=i[a])}}}function _f(t){t&&(mf(t),vf(t,"label"),t.emphasis&&vf(t.emphasis,"label"))}function xf(t){return G(t)?t:t?[t]:[]}function bf(t){return(G(t)?t[0]:t)||{}}function wf(e,t){pf(xf(e.series),function(t){df(t)&&function(t){if(df(t)){gf(t),mf(t),vf(t,"label"),vf(t,"upperLabel"),vf(t,"edgeLabel"),t.emphasis&&(vf(t.emphasis,"label"),vf(t.emphasis,"upperLabel"),vf(t.emphasis,"edgeLabel"));var e=t.markPoint;e&&(gf(e),_f(e));var n=t.markLine;n&&(gf(n),_f(n));var i=t.markArea;i&&_f(i);var o=t.data;if("graph"===t.type){var o=o||t.nodes,r=t.links||t.edges;if(r&&!Z(r))for(var a=0;a<r.length;a++)_f(r[a]);E(t.categories,function(t){mf(t)})}if(o&&!Z(o))for(a=0;a<o.length;a++)_f(o[a]);if((e=t.markPoint)&&e.data)for(var s=e.data,a=0;a<s.length;a++)_f(s[a]);if((n=t.markLine)&&n.data)for(var l=n.data,a=0;a<l.length;a++)G(l[a])?(_f(l[a][0]),_f(l[a][1])):_f(l[a]);"gauge"===t.type?(vf(t,"axisLabel"),vf(t,"title"),vf(t,"detail")):"treemap"===t.type?(yf(t.breadcrumb,"itemStyle"),E(t.levels,function(t){mf(t)})):"tree"===t.type&&mf(t.leaves)}}(t)});var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),pf(n,function(t){pf(xf(e[t]),function(t){t&&(vf(t,"axisLabel"),vf(t.axisPointer,"label"))})}),pf(xf(e.parallel),function(t){t=t&&t.parallelAxisDefault;vf(t,"axisLabel"),vf(t&&t.axisPointer,"label")}),pf(xf(e.calendar),function(t){yf(t,"itemStyle"),vf(t,"dayLabel"),vf(t,"monthLabel"),vf(t,"yearLabel")}),pf(xf(e.radar),function(t){vf(t,"name"),t.name&&null==t.axisName&&(t.axisName=t.name,delete t.name,Wo("name property in radar component has been changed to axisName")),null!=t.nameGap&&null==t.axisNameGap&&(t.axisNameGap=t.nameGap,delete t.nameGap,Wo("nameGap property in radar component has been changed to axisNameGap"))}),pf(xf(e.geo),function(t){df(t)&&(_f(t),pf(xf(t.regions),function(t){_f(t)}))}),pf(xf(e.timeline),function(t){_f(t),yf(t,"label"),yf(t,"itemStyle"),yf(t,"controlStyle",!0);t=t.data;G(t)&&E(t,function(t){Y(t)&&(yf(t,"label"),yf(t,"itemStyle"))})}),pf(xf(e.toolbox),function(t){yf(t,"iconStyle"),pf(t.feature,function(t){yf(t,"iconStyle")})}),vf(bf(e.axisPointer),"label"),vf(bf(e.tooltip).axisPointer,"label")}function Sf(e){e&&E(Mf,function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])})}var Mf=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],If=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Tf=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Cf(t){var e=t&&t.itemStyle;if(e)for(var n=0;n<Tf.length;n++){var i=Tf[n][1],o=Tf[n][0];null!=e[i]&&(e[o]=e[i],Uo(i,o))}}function Df(t){t&&"edge"===t.alignTo&&null!=t.margin&&null==t.edgeDistance&&(Uo("label.margin","label.edgeDistance","pie"),t.edgeDistance=t.margin)}function Af(t){t&&t.downplay&&!t.blur&&(t.blur=t.downplay,Uo("downplay","blur","sunburst"))}function kf(e,t){wf(e,t),e.series=qo(e.series),E(e.series,function(t){if(Y(t)){var e,n,i=t.type;if("line"===i)null!=t.clipOverflow&&(t.clip=t.clipOverflow,Uo("clipOverflow","clip","line"));else if("pie"===i||"gauge"===i){if(null!=t.clockWise&&(t.clockwise=t.clockWise,Uo("clockWise","clockwise")),Df(t.label),(e=t.data)&&!Z(e))for(var o=0;o<e.length;o++)Df(e[o]);null!=t.hoverOffset&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(Uo("hoverOffset","emphasis.scaleSize"),t.emphasis.scaleSize=t.hoverOffset))}else if("gauge"===i){var r=function(t,e){for(var n=e.split(","),i=t,o=0;o<n.length&&null!=(i=i&&i[n[o]]);o++);return i}(t,"pointer.color");null!=r&&function(t,e,n,i){for(var o,r=e.split(","),a=t,s=0;s<r.length-1;s++)null==a[o=r[s]]&&(a[o]={}),a=a[o];!i&&null!=a[r[s]]||(a[r[s]]=n)}(t,"itemStyle.color",r)}else if("bar"===i){if(Cf(t),Cf(t.backgroundStyle),Cf(t.emphasis),(e=t.data)&&!Z(e))for(o=0;o<e.length;o++)"object"===_typeof(e[o])&&(Cf(e[o]),Cf(e[o]&&e[o].emphasis))}else"sunburst"===i?((n=t.highlightPolicy)&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=n,Uo("highlightPolicy","emphasis.focus","sunburst"))),Af(t),function t(e,n){if(e)for(var i=0;i<e.length;i++)n(e[i]),e[i]&&t(e[i].children,n)}(t.data,Af)):"graph"===i||"sankey"===i?(n=t)&&null!=n.focusNodeAdjacency&&(n.emphasis=n.emphasis||{},null==n.emphasis.focus&&(Uo("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),n.emphasis.focus="adjacency")):"map"===i&&(t.mapType&&!t.map&&(Uo("mapType","map","map"),t.map=t.mapType),t.mapLocation&&(Wo("`mapLocation` is not used anymore."),A(t,t.mapLocation)));null!=t.hoverAnimation&&(t.emphasis=t.emphasis||{},t.emphasis&&null==t.emphasis.scale&&(Uo("hoverAnimation","emphasis.scale"),t.emphasis.scale=t.hoverAnimation)),Sf(t)}}),e.dataRange&&(e.visualMap=e.dataRange),E(If,function(t){t=e[t];t&&E(t=!G(t)?[t]:t,function(t){Sf(t)})})}function Lf(v){E(v,function(p,d){var f=[],g=[NaN,NaN],t=[p.stackResultDimension,p.stackedOverDimension],y=p.data,m=p.isStackedByIndex;y.modify(t,function(t,e,n){var i,o,r=y.get(p.stackedDimension,n);if(isNaN(r))return g;m?o=y.getRawIndex(n):i=y.get(p.stackedByDimension,n);for(var a,s,l=NaN,u=d-1;0<=u;u--){var h=v[u];if(0<=(o=!m?h.data.rawIndexOf(h.stackedByDimension,i):o)){var c=h.data.getByRawIndex(h.stackResultDimension,o);if(0<=r&&0<c||r<=0&&c<0){a=r,s=c,h=void 0,h=Math.max(xo(a),xo(s)),s=a+s,r=go<h?s:vo(s,h),l=c;break}}}return f[0]=r,f[1]=l,f})})}var Pf,Of,Rf=function(t){this.data=t.data||(t.sourceFormat===Id?{}:[]),this.sourceFormat=t.sourceFormat||Cd,this.seriesLayoutBy=t.seriesLayoutBy||Dd,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];null==i.type&&Nd(this,n)===kd.Must&&(i.type="ordinal")}};function Nf(t){return t instanceof Rf}function Ef(t,e,n){n=n||Bf(t);var i=e.seriesLayoutBy,o=function(t,e,n,i,o){var r,a;if(!t)return{dimensionsDefine:Vf(o),startIndex:a,dimensionsDetectedCount:r};{var s;e===Sd?(s=t,"auto"===i||null==i?Gf(function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)},n,s,10):a=U(i)?i:i?1:0,o||1!==a||(o=[],Gf(function(t,e){o[e]=null!=t?t+"":""},n,s,1/0)),r=o?o.length:n===Ad?s.length:s[0]?s[0].length:null):e===Md?o=o||function(t){var e,n=0;for(;n<t.length&&!(e=t[n++]););if(e){var i=[];return E(e,function(t,e){i.push(e)}),i}}(t):e===Id?o||(o=[],E(t,function(t,e){o.push(e)})):e===wd?(t=Jo(t[0]),r=G(t)&&t.length||1):e===Td&&ot(!!o,"dimensions must be given if data is TypedArray.")}return{startIndex:a,dimensionsDefine:Vf(o),dimensionsDetectedCount:r}}(t,n,i,e.sourceHeader,e.dimensions);return new Rf({data:t,sourceFormat:n,seriesLayoutBy:i,dimensionsDefine:o.dimensionsDefine,startIndex:o.startIndex,dimensionsDetectedCount:o.dimensionsDetectedCount,metaRawOption:S(e)})}function zf(t){return new Rf({data:t,sourceFormat:Z(t)?Td:wd})}function Bf(t){var e=Cd;if(Z(t))e=Td;else if(G(t)){0===t.length&&(e=Sd);for(var n=0,i=t.length;n<i;n++){var o=t[n];if(null!=o){if(G(o)){e=Sd;break}if(Y(o)){e=Md;break}}}}else if(Y(t))for(var r in t)if(ft(t,r)&&k(t[r])){e=Id;break}return e}function Vf(t){if(t){var i=ct();return L(t,function(t,e){var n={name:(t=Y(t)?t:{name:t}).name,displayName:t.displayName,type:t.type};if(null==n.name)return n;n.name+="",null==n.displayName&&(n.displayName=n.name);t=i.get(n.name);return t?n.name+="-"+t.count++:i.set(n.name,{count:1}),n})}}function Gf(t,e,n,i){if(e===Ad)for(var o=0;o<n.length&&o<i;o++)t(n[o]?n[o][0]:null,o);else for(var r=n[0]||[],o=0;o<r.length&&o<i;o++)t(r[o],o)}function Ff(t){t=t.sourceFormat;return t===Md||t===Id}var Hf=(Wf.prototype.getSource=function(){return this._source},Wf.prototype.count=function(){return 0},Wf.prototype.getItem=function(t,e){},Wf.prototype.appendData=function(t){},Wf.prototype.clean=function(){},Wf.protoInitialize=((Zy=Wf.prototype).pure=!1,void(Zy.persistent=!0)),Wf.internalField=function(){var t;Of=function(t,e,n){var i=n.sourceFormat,o=n.seriesLayoutBy,r=n.startIndex,a=n.dimensionsDefine,n=Pf[$f(i,o)];ot(n,"Invalide sourceFormat: "+i),P(t,n),i===Td?(t.getItem=s,t.count=u,t.fillStorage=l):(n=Xf(i,o),t.getItem=B(n,null,e,r,a),o=jf(i,o),t.count=B(o,null,e,r,a))};var s=function(t,e){t-=this._offset,e=e||[];for(var n=this._data,i=this._dimSize,o=i*t,r=0;r<i;r++)e[r]=n[o+r];return e},l=function(t,e,n,i){for(var o=this._data,r=this._dimSize,a=0;a<r;a++){for(var s=i[a],l=null==s[0]?1/0:s[0],u=null==s[1]?-1/0:s[1],h=e-t,c=n[a],p=0;p<h;p++){var d=o[p*r+a];(c[t+p]=d)<l&&(l=d),u<d&&(u=d)}s[0]=l,s[1]=u}},u=function(){return this._data?this._data.length/this._dimSize:0};function e(t){for(var e=0;e<t.length;e++)this._data.push(t[e])}(t={})[Sd+"_"+Dd]={pure:!0,appendData:e},t[Sd+"_"+Ad]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Md]={pure:!0,appendData:e},t[Id]={pure:!0,appendData:function(t){var o=this._data;E(t,function(t,e){for(var n=o[e]||(o[e]=[]),i=0;i<(t||[]).length;i++)n.push(t[i])})}},t[wd]={appendData:e},t[Td]={persistent:!1,pure:!0,appendData:function(t){ot(Z(t),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=t},clean:function(){this._offset+=this.count(),this._data=null}},Pf=t}(),Wf);function Wf(t,e){var n=Nf(t)?t:zf(t);this._source=n;t=this._data=n.data;if(n.sourceFormat===Td){if(1,null==e)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=t}Of(this,t,n)}var Uf=function(t,e,n,i){return t[i]},Yf=((Ah={})[Sd+"_"+Dd]=function(t,e,n,i){return t[i+e]},Ah[Sd+"_"+Ad]=function(t,e,n,i,o){i+=e;for(var r=o||[],a=t,s=0;s<a.length;s++){var l=a[s];r[s]=l?l[i]:null}return r},Ah[Md]=Uf,Ah[Id]=function(t,e,n,i,o){for(var r=o||[],a=0;a<n.length;a++){var s=n[a].name;if(1,null==s)throw new Error;s=t[s];r[a]=s?s[i]:null}return r},Ah[wd]=Uf,Ah);function Xf(t,e){var n=Yf[$f(t,e)];return ot(n,'Do not support get item on "'+t+'", "'+e+'".'),n}var n=function(t,e,n){return t.length},Zf=((f={})[Sd+"_"+Dd]=function(t,e,n){return Math.max(0,t.length-e)},f[Sd+"_"+Ad]=function(t,e,n){t=t[0];return t?Math.max(0,t.length-e):0},f[Md]=n,f[Id]=function(t,e,n){n=n[0].name;if(1,null==n)throw new Error;n=t[n];return n?n.length:0},f[wd]=n,f);function jf(t,e){var n=Zf[$f(t,e)];return ot(n,'Do not suppport count on "'+t+'", "'+e+'".'),n}var Lr=function(t,e,n){return t[e]},qf=((Xc={})[Sd]=Lr,Xc[Md]=function(t,e,n){return t[n]},Xc[Id]=Lr,Xc[wd]=function(t,e,n){t=Jo(t);return t instanceof Array?t[e]:t},Xc[Td]=Lr,Xc);function Kf(t){var e=qf[t];return ot(e,'Do not suppport get value on "'+t+'".'),e}function $f(t,e){return t===Sd?t+"_"+e:t}function Jf(t,e,n){if(t){var i=t.getRawDataItem(e);if(null!=i){var o=t.getStore(),e=o.getSource().sourceFormat;if(null!=n){var n=t.getDimensionIndex(n),r=o.getDimensionProperty(n);return Kf(e)(i,n,r)}r=i;return r=e===wd?Jo(i):r}}}var Qf=/\{@(.+?)\}/g,Jn=(tg.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),o=n.getRawIndex(t),r=n.getName(t),a=n.getRawDataItem(t),s=n.getItemVisual(t,"style"),l=s&&s[n.getItemVisual(t,"drawType")||"fill"],u=s&&s.stroke,t=this.mainType,s="series"===t,n=n.userOutput&&n.userOutput.get();return{componentType:t,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:s?this.subType:null,seriesIndex:this.seriesIndex,seriesId:s?this.id:null,seriesName:s?this.name:null,name:r,dataIndex:o,data:a,dataType:e,value:i,color:l,borderColor:u,dimensionNames:n?n.fullDimensions:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},tg.prototype.getFormattedLabel=function(o,t,e,n,i,r){t=t||"normal";var a=this.getData(e),e=this.getDataParams(o,e);return r&&(e.value=r.interpolatedValue),null!=n&&G(e.value)&&(e.value=e.value[n]),"function"==typeof(i=i||a.getItemModel(o).get("normal"===t?["label","formatter"]:[t,"label","formatter"]))?(e.status=t,e.dimensionIndex=n,i(e)):"string"==typeof i?Kp(i,e).replace(Qf,function(t,e){var n=e.length,i=e;"["===i.charAt(0)&&"]"===i.charAt(n-1)&&(i=+i.slice(1,n-1),isNaN(i)&&Ho("Invalide label formatter: @"+e+", only support @[0], @[1], @[2], ..."));e=Jf(a,o,i);return r&&G(r.interpolatedValue)&&(0<=(i=a.getDimensionIndex(i))&&(e=r.interpolatedValue[i])),null!=e?e+"":""}):void 0},tg.prototype.getRawValue=function(t,e){return Jf(this.getData(e),t)},tg.prototype.formatTooltip=function(t,e,n){},tg);function tg(){}function eg(t){var e,n;return Y(t)?t.type?n=t:console.warn("The return type of `formatTooltip` is not supported: "+Yo(t)):e=t,{markupText:e,markupFragment:n}}function ng(t){return new ig(t)}var ig=(og.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;this._dirty&&n&&((r=this.context).data=r.outputData=n.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o=l(this._modBy),r=this._modDataCount||0,a=l(t&&t.modBy),s=t&&t.modDataCount||0;function l(t){return t=!(1<=t)?1:t}o===a&&r===s||(e="reset"),!this._dirty&&"reset"!==e||(this._dirty=!1,d=this._doReset(i)),this._modBy=a,this._modDataCount=s;t=t&&t.step;if(n?(ot(null!=n._outputDueEnd),this._dueEnd=n._outputDueEnd):(ot(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var u=this._dueIndex,h=Math.min(null!=t?this._dueIndex+t:1/0,this._dueEnd);if(!i&&(d||u<h)){var c=this._progress;if(G(c))for(var p=0;p<c.length;p++)this._doProgress(c[p],u,h,a,s);else this._doProgress(c,u,h,a,s)}this._dueIndex=h;var d=null!=this._settedOutputEnd?this._settedOutputEnd:h;ot(d>=this._outputDueEnd),this._outputDueEnd=d}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},og.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},og.prototype._doProgress=function(t,e,n,i,o){cg.reset(e,n,i,o),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:cg.next},this.context)},og.prototype._doReset=function(t){var e;this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!t&&this._reset&&((n=this._reset(this.context))&&n.progress&&(e=n.forceFirstProgress,n=n.progress),G(n)&&!n.length&&(n=null)),this._progress=n,this._modBy=this._modDataCount=null;var n=this._downstream;return n&&n.dirty(),e},og.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},og.prototype.pipe=function(t){ot(t&&!t._disposed&&t!==this),this._downstream===t&&!this._dirty||((this._downstream=t)._upstream=this,t.dirty())},og.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},og.prototype.getUpstream=function(){return this._upstream},og.prototype.getDownstream=function(){return this._downstream},og.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},og);function og(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}var rg,ag,sg,lg,ug,hg,cg=hg={reset:function(t,e,n,i){ag=t,rg=e,sg=n,lg=i,ug=Math.ceil(lg/sg),hg.next=1<sg&&0<lg?dg:pg}};function pg(){return ag<rg?ag++:null}function dg(){var t=ag%ug*sg+Math.ceil(ag/ug),t=rg<=ag?null:t<lg?t:ag;return ag++,t}function fg(t,e){e=e&&e.type;return"ordinal"===e?t:null==(t="time"===e&&"number"!=typeof t&&null!=t&&"-"!==t?+Do(t):t)||""===t?NaN:+t}var gg=ct({number:function(t){return parseFloat(t)},time:function(t){return+Do(t)},trim:function(t){return"string"==typeof t?rt(t):t}});function yg(t){return gg.get(t)}var mg={lt:function(t,e){return t<e},lte:function(t,e){return t<=e},gt:function(t,e){return e<t},gte:function(t,e){return e<=t}},vg=(_g.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(Ro(t),this._rvalFloat)},_g);function _g(t,e){"number"!=typeof e&&Xo('rvalue of "<", ">", "<=", ">=" can only be number in filter.'),this._opFn=mg[t],this._rvalFloat=Ro(e)}var xg=(bg.prototype.evaluate=function(t,e){var n=_typeof(t),i=_typeof(e),o="number"===n?t:Ro(t),r="number"===i?e:Ro(e),a=isNaN(o),s=isNaN(r);return a&&(o=this._incomparable),s&&(r=this._incomparable),a&&s&&(i="string"===i,(n="string"===n)&&(o=i?t:0),i&&(r=n?e:0)),o<r?this._resultLT:r<o?-this._resultLT:0},bg);function bg(t,e){t="desc"===t;this._resultLT=t?1:-1,null==e&&(e=t?"min":"max"),this._incomparable="min"===e?-1/0:1/0}var wg=(Sg.prototype.evaluate=function(t){var e,n=t===this._rval;return n||((e=_typeof(t))===this._rvalTypeof||"number"!==e&&"number"!==this._rvalTypeof||(n=Ro(t)===this._rvalFloat)),this._isEQ?n:!n},Sg);function Sg(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=_typeof(e),this._rvalFloat=Ro(e)}var Mg=(Ig.prototype.getRawData=function(){throw new Error("not supported")},Ig.prototype.getRawDataItem=function(t){throw new Error("not supported")},Ig.prototype.cloneRawData=function(){},Ig.prototype.getDimensionInfo=function(t){},Ig.prototype.cloneAllDimensionInfo=function(){},Ig.prototype.count=function(){},Ig.prototype.retrieveValue=function(t,e){},Ig.prototype.retrieveValueFromItem=function(t,e){},Ig.prototype.convertValue=fg,Ig);function Ig(){}function Tg(t){var e=t.sourceFormat;return Pg(e)||Xo("`getRawData` is not supported in source format "+e),t.data}function Cg(t){var e=t.sourceFormat,n=t.data;if(Pg(e)||Xo("`cloneRawData` is not supported in source format "+e),e===Sd){for(var i=[],o=0,r=n.length;o<r;o++)i.push(n[o].slice());return i}if(e===Md){for(i=[],o=0,r=n.length;o<r;o++)i.push(P({},n[o]));return i}}function Dg(t,e,n){if(null!=n)return"number"==typeof n||!isNaN(n)&&!ft(e,n)?t[n]:ft(e,n)?e[n]:void 0}function Ag(t){return S(t)}var kg=ct();function Lg(t,e,n){var i=qo(t),o=i.length;o||Xo("If `transform` declared, it should at least contain one transform.");for(var r=0,a=o;r<a;r++)e=function(t,i,n,o){i.length||Xo("Must have at least one upstream dataset.");Y(t)||Xo("transform declaration must be an object rather than "+_typeof(t)+".");var e=t.type,r=kg.get(e);r||Xo('Can not find transform on type "'+e+'".');e=L(i,function(t){return function(t,e){var n=new Mg,i=t.data,o=n.sourceFormat=t.sourceFormat,r=t.startIndex;t.seriesLayoutBy!==Dd&&Xo('`seriesLayoutBy` of upstream dataset can only be "column" in data transform.');var a=[],s={},l=t.dimensionsDefine;if(l)E(l,function(t,e){var n=t.name,t={index:e,name:n,displayName:t.displayName};a.push(t),null!=n&&(ft(s,n)&&Xo('dimension name "'+n+'" duplicated.'),s[n]=t)});else for(var u=0;u<t.dimensionsDetectedCount;u++)a.push({index:u});var h=Xf(o,Dd);e.__isBuiltIn&&(n.getRawDataItem=function(t){return h(i,r,a,t)},n.getRawData=B(Tg,null,t)),n.cloneRawData=B(Cg,null,t),e=jf(o,Dd),n.count=B(e,null,i,r,a);var c=Kf(o);n.retrieveValue=function(t,e){t=h(i,r,a,t);return p(t,e)};var p=n.retrieveValueFromItem=function(t,e){if(null!=t){var n=a[e];return n?c(t,e,n.name):void 0}};return n.getDimensionInfo=B(Dg,null,a,s),n.cloneAllDimensionInfo=B(Ag,null,a),n}(t,r)}),e=qo(r.transform({upstream:e[0],upstreamList:e,config:S(t.config)}));t.print&&function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];"undefined"!=typeof console&&console.log&&console.log.apply(console,t)}(L(e,function(t){var e=null!=o?" === pipe index: "+o:"";return["=== dataset index: "+n.datasetIndex+e+" ===","- transform result data:",Yo(t.data),"- transform result dimensions:",Yo(t.dimensions)].join("\n")}).join("\n"));return L(e,function(t,e){Y(t)||Xo("A transform should not return some empty results."),t.data||Xo("Transform result data should be not be null or undefined"),Pg(Bf(t.data))||Xo("Transform result data should be array rows or object rows.");var n=i[0],n=n&&0===e&&!t.dimensions?((e=n.startIndex)&&(t.data=n.data.slice(0,e).concat(t.data)),{seriesLayoutBy:Dd,sourceHeader:e,dimensions:n.metaRawOption.dimensions}):{seriesLayoutBy:Dd,sourceHeader:0,dimensions:t.dimensions};return Ef(t.data,n,null)})}(i[r],e,n,1===o?null:r),r!==a-1&&(e.length=Math.max(e.length,1));return e}function Pg(t){return t===Sd||t===Md}var Og,Rg="undefined",Ng=("undefined"==typeof Uint32Array?"undefined":_typeof(Uint32Array))===Rg?Array:Uint32Array,Eg=("undefined"==typeof Uint16Array?"undefined":_typeof(Uint16Array))===Rg?Array:Uint16Array,zg=("undefined"==typeof Int32Array?"undefined":_typeof(Int32Array))===Rg?Array:Int32Array,_d=("undefined"==typeof Float64Array?"undefined":_typeof(Float64Array))===Rg?Array:Float64Array,Bg={float:_d,int:zg,ordinal:Array,number:Array,time:_d};function Vg(t){return 65535<t?Ng:Eg}function Gg(){return[1/0,-1/0]}function Fg(t,e,n,i,o){n=Bg[n||"float"];if(o){var r=t[e],a=r&&r.length;if(a!==i){for(var s=new n(i),l=0;l<a;l++)s[l]=r[l];t[e]=s}}else t[e]=new n(i)}var Hg=(Wg.prototype.initData=function(t,e,n){ot(F(t.getItem)&&F(t.count),"Inavlid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),o=this.defaultDimValueGetter=Og[i.sourceFormat];this._dimValueGetter=n||o,this._rawExtent=[];var r=Ff(i);this._dimensions=L(e,function(t){return r&&ot(null!=t.property),{type:t.type,property:t.property}}),this._initDataFromProvider(0,t.count())},Wg.prototype.getProvider=function(){return this._provider},Wg.prototype.getSource=function(){return this._provider.getSource()},Wg.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,o=n.get(t);if(null!=o){if(i[o].type===e)return o}else o=i.length;return i[o]={type:e},n.set(t,o),this._chunks[o]=new Bg[e||"float"](this._rawCount),this._rawExtent[o]=Gg(),o},Wg.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],o=this._rawExtent,r=i.ordinalOffset||0,a=n.length;0===r&&(o[t]=Gg());for(var s=o[t],l=r;l<a;l++){var u=n[l]=e.parseAndCollect(n[l]);s[0]=Math.min(u,s[0]),s[1]=Math.max(u,s[1])}i.ordinalMeta=e,i.ordinalOffset=a,i.type="ordinal"},Wg.prototype.getOrdinalMeta=function(t){return this._dimensions[t].ordinalMeta},Wg.prototype.getDimensionProperty=function(t){t=this._dimensions[t];return t&&t.property},Wg.prototype.appendData=function(t){ot(!this._indices,"appendData can only be called on raw data.");var e=this._provider,n=this.count();e.appendData(t);t=e.count();return e.persistent||(t+=n),n<t&&this._initDataFromProvider(n,t,!0),[n,t]},Wg.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,o=i.length,r=this._rawExtent,a=this.count(),s=a+Math.max(t.length,e||0),l=0;l<o;l++)Fg(n,l,(d=i[l]).type,s,!0);for(var u=[],h=a;h<s;h++)for(var c=h-a,p=0;p<o;p++){var d=i[p],f=Og.arrayRows.call(this,t[c]||u,d.property,c,p);n[p][h]=f;var g=r[p];f<g[0]&&(g[0]=f),f>g[1]&&(g[1]=f)}return{start:a,end:this._rawCount=this._count=s}},Wg.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,o=this._chunks,r=this._dimensions,a=r.length,s=this._rawExtent,l=L(r,function(t){return t.property}),u=0;u<a;u++){var h=r[u];s[u]||(s[u]=Gg()),Fg(o,u,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,o,s);else for(var c=[],p=t;p<e;p++)for(var c=i.getItem(p,c),d=0;d<a;d++){var f=o[d],g=this._dimValueGetter(c,l[d],p,d);f[p]=g;f=s[d];g<f[0]&&(f[0]=g),g>f[1]&&(f[1]=g)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},Wg.prototype.count=function(){return this._count},Wg.prototype.get=function(t,e){if(!(0<=e&&e<this._count))return NaN;t=this._chunks[t];return t?t[this.getRawIndex(e)]:NaN},Wg.prototype.getValues=function(t,e){var n=[],i=[];if(null==e){e=t,t=[];for(var o=0;o<this._dimensions.length;o++)i.push(o)}else i=t;for(var o=0,r=i.length;o<r;o++)n.push(this.get(i[o],e));return n},Wg.prototype.getByRawIndex=function(t,e){if(!(0<=e&&e<this._rawCount))return NaN;t=this._chunks[t];return t?t[e]:NaN},Wg.prototype.getSum=function(t){var e=0;if(this._chunks[t])for(var n=0,i=this.count();n<i;n++){var o=this.get(t,n);isNaN(o)||(e+=o)}return e},Wg.prototype.getMedian=function(t){var e=[];this.each([t],function(t){isNaN(t)||e.push(t)});var n=e.sort(function(t,e){return t-e}),t=this.count();return 0===t?0:t%2==1?n[(t-1)/2]:(n[t/2]+n[t/2-1])/2},Wg.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&n<this._count&&n===t)return t;for(var i=0,o=this._count-1;i<=o;){var r=(i+o)/2|0;if(e[r]<t)i=1+r;else{if(!(e[r]>t))return r;o=r-1}}return-1},Wg.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],o=[];if(!i)return o;null==n&&(n=1/0);for(var r=1/0,a=-1,s=0,l=0,u=this.count();l<u;l++){var h=e-i[this.getRawIndex(l)],c=Math.abs(h);c<=n&&((c<r||c===r&&0<=h&&a<0)&&(r=c,a=h,s=0),h===a&&(o[s++]=l))}return o.length=s,o},Wg.prototype.getIndices=function(){var t=this._indices;if(t){var e=t.constructor,n=this._count;if(e===Array)for(var i=new e(n),o=0;o<n;o++)i[o]=t[o];else i=new e(t.buffer,0,n)}else{i=new(e=Vg(this._rawCount))(this.count());for(o=0;o<i.length;o++)i[o]=o}return i},Wg.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),o=new(Vg(n._rawCount))(i),r=[],a=t.length,s=0,l=t[0],u=n._chunks,h=0;h<i;h++){var c=void 0,p=n.getRawIndex(h);if(0===a)c=e(h);else if(1===a)c=e(u[l][p],h);else{for(var d=0;d<a;d++)r[d]=u[t[d]][p];r[d]=h,c=e.apply(null,r)}c&&(o[s++]=p)}return s<i&&(n._indices=o),n._count=s,n._extent=[],n._updateGetRawIdx(),n},Wg.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=z(t),o=i.length;if(!o)return this;var r=e.count(),a=new(Vg(e._rawCount))(r),s=0,l=i[0],u=t[l][0],h=t[l][1],c=e._chunks,l=!1;if(!e._indices){var p=0;if(1===o){for(var d=c[i[0]],f=0;f<n;f++)(u<=(v=d[f])&&v<=h||isNaN(v))&&(a[s++]=p),p++;l=!0}else if(2===o){for(var d=c[i[0]],g=c[i[1]],y=t[i[1]][0],m=t[i[1]][1],f=0;f<n;f++){var v=d[f],_=g[f];(u<=v&&v<=h||isNaN(v))&&(y<=_&&_<=m||isNaN(_))&&(a[s++]=p),p++}l=!0}}if(!l)if(1===o)for(f=0;f<r;f++){var x=e.getRawIndex(f);(u<=(v=c[i[0]][x])&&v<=h||isNaN(v))&&(a[s++]=x)}else for(f=0;f<r;f++){for(var b=!0,x=e.getRawIndex(f),w=0;w<o;w++){var S=i[w];((v=c[S][x])<t[S][0]||v>t[S][1])&&(b=!1)}b&&(a[s++]=e.getRawIndex(f))}return s<r&&(e._indices=a),e._count=s,e._extent=[],e._updateGetRawIdx(),e},Wg.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},Wg.prototype.modify=function(t,e){this._updateDims(this,t,e)},Wg.prototype._updateDims=function(t,e,n){for(var i=t._chunks,o=[],r=e.length,a=t.count(),s=[],l=t._rawExtent,u=0;u<e.length;u++)l[e[u]]=Gg();for(var h=0;h<a;h++){for(var c=t.getRawIndex(h),p=0;p<r;p++)s[p]=i[e[p]][c];s[r]=h;var d=n&&n.apply(null,s);if(null!=d){"object"!==_typeof(d)&&(o[0]=d,d=o);for(u=0;u<d.length;u++){var f=e[u],g=d[u],y=l[f],f=i[f];f&&(f[c]=g),g<y[0]&&(y[0]=g),g>y[1]&&(y[1]=g)}}}},Wg.prototype.lttbDownSample=function(t,e){var n,i=this.clone([t],!0),o=i._chunks[t],r=this.count(),a=0,s=Math.floor(1/e),l=this.getRawIndex(0),u=new(Vg(this._rawCount))(Math.ceil(r/s)+2);u[a++]=l;for(var h=1;h<r-1;h+=s){for(var c=Math.min(h+s,r-1),p=Math.min(h+2*s,r),d=(p+c)/2,f=0,g=c;g<p;g++){var y=o[w=this.getRawIndex(g)];isNaN(y)||(f+=y)}f/=p-c;for(var c=h,m=Math.min(h+s,r),v=h-1,_=o[l],x=-1,b=c,g=c;g<m;g++){var w,y=o[w=this.getRawIndex(g)];isNaN(y)||x<(n=Math.abs((v-d)*(y-_)-(v-g)*(f-_)))&&(x=n,b=w)}l=u[a++]=b}return u[a++]=this.getRawIndex(r-1),i._count=a,i._indices=u,i.getRawIndex=this._getRawIdx,i},Wg.prototype.downSample=function(t,e,n,i){for(var o=this.clone([t],!0),r=o._chunks,a=[],s=Math.floor(1/e),l=r[t],u=this.count(),h=o._rawExtent[t]=Gg(),c=new(Vg(this._rawCount))(Math.ceil(u/s)),p=0,d=0;d<u;d+=s){u-d<s&&(s=u-d,a.length=s);for(var f=0;f<s;f++){var g=this.getRawIndex(d+f);a[f]=l[g]}var y=n(a),m=this.getRawIndex(Math.min(d+i(a,y)||0,u-1));(l[m]=y)<h[0]&&(h[0]=y),y>h[1]&&(h[1]=y),c[p++]=m}return o._count=p,o._indices=c,o._updateGetRawIdx(),o},Wg.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,o=0,r=this.count();o<r;o++){var a=this.getRawIndex(o);switch(n){case 0:e(o);break;case 1:e(i[t[0]][a],o);break;case 2:e(i[t[0]][a],i[t[1]][a],o);break;default:for(var s=0,l=[];s<n;s++)l[s]=i[t[s]][a];l[s]=o,e.apply(null,l)}}},Wg.prototype.getDataExtent=function(t){var e=this._chunks[t],n=Gg();if(!e)return n;var i=this.count();if(!this._indices)return this._rawExtent[t].slice();if(o=this._extent[t])return o.slice();for(var o,r=(o=n)[0],a=o[1],s=0;s<i;s++){var l=e[this.getRawIndex(s)];l<r&&(r=l),a<l&&(a=l)}return o=[r,a],this._extent[t]=o},Wg.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,o=0;o<i.length;o++)n.push(i[o][e]);return n},Wg.prototype.clone=function(t,e){var n,i,o=new Wg,r=this._chunks,a=t&&O(t,function(t,e){return t[e]=!0,t},{});if(a)for(var s=0;s<r.length;s++)o._chunks[s]=a[s]?(n=r[s],i=void 0,(i=n.constructor)===Array?n.slice():new i(n)):r[s];else o._chunks=r;return this._copyCommonProps(o),e||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},Wg.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=S(this._extent),t._rawExtent=S(this._rawExtent)},Wg.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array)for(var n=this._indices.length,e=new t(n),i=0;i<n;i++)e[i]=this._indices[i];else e=new t(this._indices);return e}return null},Wg.prototype._getRawIdxIdentity=function(t){return t},Wg.prototype._getRawIdx=function(t){return t<this._count&&0<=t?this._indices[t]:-1},Wg.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},Wg.internalField=void(Og={arrayRows:Ug,objectRows:function(t,e,n,i){return fg(t[e],this._dimensions[i])},keyedColumns:Ug,original:function(t,e,n,i){t=t&&(null==t.value?t:t.value);return fg(t instanceof Array?t[i]:t,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}),Wg);function Wg(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=ct()}function Ug(t,e,n,i){return fg(t[i],this._dimensions[i])}var Yg=(Xg.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},Xg.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},Xg.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},Xg.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},Xg.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n,i,o,r,a,s=this._sourceHost,l=this._getUpstreamSourceManagers(),u=!!l.length;jg(s)?(i=s,o=a=t=void 0,e=u?((n=l[0]).prepareSource(),t=(o=n.getSource()).data,a=o.sourceFormat,[n._getVersionSign()]):(a=Z(t=i.get("data",!0))?Td:wd,[]),r=this._getSourceMetaRawOption()||{},n=o&&o.metaRawOption||{},i=tt(r.seriesLayoutBy,n.seriesLayoutBy)||null,o=tt(r.sourceHeader,n.sourceHeader)||null,r=tt(r.dimensions,n.dimensions),a=i!==n.seriesLayoutBy||!!o!=!!n.sourceHeader||r?[Ef(t,{seriesLayoutBy:i,sourceHeader:o,dimensions:r},a)]:[]):(s=s,e=u?(a=(l=this._applyTransform(l)).sourceList,l.upstreamSignList):(a=[Ef(s.get("source",!0),this._getSourceMetaRawOption(),null)],[])),ot(a&&e),this._setLocalSource(a,e)},Xg.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),o=n.get("fromTransformResult",!0);ot(null!=o||null!=i),null==o||1!==t.length&&qg("When using `fromTransformResult`, there should be only one upstream dataset");var r=[],a=[];return E(t,function(t){t.prepareSource();var e=t.getSource(o||0);null==o||e||qg("Can not retrieve result by `fromTransformResult`: "+o),r.push(e),a.push(t._getVersionSign())}),i?e=Lg(i,r,{datasetIndex:n.componentIndex}):null!=o&&(e=[(n=r[0],new Rf({data:n.data,sourceFormat:n.sourceFormat,seriesLayoutBy:n.seriesLayoutBy,dimensionsDefine:S(n.dimensionsDefine),startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount}))]),{sourceList:e,upstreamSignList:a}},Xg.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},Xg.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(e)return e;e=this._getUpstreamSourceManagers();return e[0]&&e[0].getSource(t)},Xg.prototype.getSharedDataStore=function(t){ot(jg(this._sourceHost),"Can only call getDataStore on series source manager.");var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},Xg.prototype._innerGetDataStore=function(t,e,n){var i=this._storeList,o=i[0],r=(o=o||(i[0]={}))[n];return r||(i=this._getUpstreamSourceManagers()[0],jg(this._sourceHost)&&i?r=i._innerGetDataStore(t,e,n):(r=new Hg).initData(new Hf(e,t.length),t),o[n]=r),r},Xg.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(jg(t)){var e=Rd(t);return e?[e.getSourceManager()]:[]}return L((t=t).get("transform",!0)||t.get("fromTransformResult",!0)?gr(t.ecModel,"dataset",{index:t.get("fromDatasetIndex",!0),id:t.get("fromDatasetId",!0)},dr).models:[],function(t){return t.getSourceManager()})},Xg.prototype._getSourceMetaRawOption=function(){var t,e,n,i=this._sourceHost;return jg(i)?(t=i.get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(t=(i=i).get("seriesLayoutBy",!0),e=i.get("sourceHeader",!0),n=i.get("dimensions",!0)),{seriesLayoutBy:t,sourceHeader:e,dimensions:n}},Xg);function Xg(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}function Zg(t){t.option.transform&&st(t.option.transform)}function jg(t){return"series"===t.mainType}function qg(t){throw new Error(t)}var Kg="line-height:1";function $g(t,e){var n=t.color||"#6e7079",i=t.fontSize||12,o=t.fontWeight||"400",r=t.color||"#464646",a=t.fontSize||14,t=t.fontWeight||"900";return"html"===e?{nameStyle:"font-size:"+Xp(i+"")+"px;color:"+Xp(n)+";font-weight:"+Xp(o+""),valueStyle:"font-size:"+Xp(a+"")+"px;color:"+Xp(r)+";font-weight:"+Xp(t+"")}:{nameStyle:{fontSize:i,fill:n,fontWeight:o},valueStyle:{fontSize:a,fill:r,fontWeight:t}}}var Jg=[0,10,20,30],Qg=["","\n","\n\n","\n\n\n"];function ty(t,e){return e.type=t,e}function ey(t){return ft(ny,t.type)&&ny[t.type]}var ny={section:{planLayout:function(t){var e=t.blocks.length,n=1<e||0<e&&!t.noHeader,i=0;E(t.blocks,function(t){ey(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;i<=e&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))}),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var o=e.noHeader,r=oy(e),a=function(n,t,e,i){var o=[],r=t.blocks||[];ot(!r||G(r)),r=r||[];var a=n.orderMode;{var s,l;t.sortBlocks&&a&&(r=r.slice(),ft(s={valueAsc:"asc",valueDesc:"desc"},a)?(l=new xg(s[a],null),r.sort(function(t,e){return l.evaluate(t.sortParam,e.sortParam)})):"seriesDesc"===a&&r.reverse())}var u=oy(t);return E(r,function(t,e){e=ey(t).build(n,t,0<e?u.html:0,i);null!=e&&o.push(e)}),o.length?"richText"===n.renderMode?o.join(u.richText):ry(o.join(""),e):void 0}(t,e,o?n:r.html,i);if(o)return a;e=Zp(e.header,"ordinal",t.useUTC),i=$g(i,t.renderMode).nameStyle;return"richText"===t.renderMode?ay(t,e,i)+r.richText+a:ry('<div style="'+i+";"+Kg+';">'+Xp(e)+"</div>"+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var o=t.renderMode,r=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!r||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",o),p=r?"":Zp(l,"ordinal",h),d=e.valueType,f=a?[]:G(u)?L(u,function(t,e){return Zp(t,G(d)?d[e]:d,h)}):[Zp(u,G(d)?d[0]:d,h)],l=!s||!r,e=!s&&r,u=$g(i,o),i=u.nameStyle,u=u.valueStyle;return"richText"===o?(s?"":c)+(r?"":ay(t,p,i))+(a?"":function(t,e,n,i,o){o=[o],i=i?10:20;return n&&o.push({padding:[0,0,0,i],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,l,e,u)):ry((s?"":c)+(r?"":'<span style="'+i+";"+(!s?"margin-left:2px":"")+'">'+Xp(p)+"</span>")+(a?"":function(t,e,n,i){n=n?"10px":"20px";return'<span style="'+(e?"float:right;margin-left:"+n:"")+";"+i+'">'+L(t,Xp).join(" ")+"</span>"}(f,l,e,u)),n)}}}};function iy(t,e,n,i,o,r){if(t){var a=ey(t);a.planLayout(t);e={useUTC:o,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(e,t,0,r)}}function oy(t){t=t.__gapLevelBetweenSubBlocks;return{html:Jg[t],richText:Qg[t]}}function ry(t,e){return'<div style="'+("margin: "+e+"px 0 0")+";"+Kg+';">'+t+'<div style="clear:both"></div></div>'}function ay(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function sy(t,e){return Jp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function ly(t,e){t=t.get("padding");return null!=t?t:"richText"===e?[8,10]:10}var uy=(hy.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},hy.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,n=$p({color:e,type:t,renderMode:n,markerId:i});return H(n)?n:(ot(i),this.richTextStyles[i]=n.style,n.content)},hy.prototype.wrapRichTextStyle=function(t,e){var n={};G(e)?E(e,function(t){return P(n,t)}):P(n,e);e=this._generateStyleName();return this.richTextStyles[e]=n,"{"+e+"|"+t+"}"},hy);function hy(){this.richTextStyles={},this._nextStyleNameId=Eo()}function cy(t){var e,n,i,o,r,a,s,l,u,h,c,p=t.series,d=t.dataIndex,f=t.multipleSeries,g=p.getData(),y=g.mapDimensionsAll("defaultedTooltip"),m=y.length,v=p.getRawValue(d),_=G(v),t=sy(p,d);function x(t,e){e=s.getDimensionInfo(e);e&&!1!==e.otherDims.tooltip&&(l?c.push(ty("nameValue",{markerType:"subItem",markerColor:a,name:e.displayName,value:t,valueType:e.type})):(u.push(t),h.push(e.type)))}1<m||_&&!m?(e=(n=(i=v,o=d,r=y,a=t,s=p.getData(),l=O(i,function(t,e,n){n=s.getDimensionInfo(n);return t||n&&!1!==n.tooltip&&null!=n.displayName},!1),u=[],h=[],c=[],r.length?E(r,function(t){x(Jf(s,o,t),t)}):E(i,x),{inlineValues:u,inlineValueTypes:h,blocks:c})).inlineValueTypes,r=n.blocks,n=(i=n.inlineValues)[0]):m?(m=g.getDimensionInfo(y[0]),n=i=Jf(g,d,y[0]),e=m.type):n=i=_?v[0]:v;v=rr(p),p=v&&p.name||"",d=g.getName(d),d=f?p:d;return ty("section",{header:p,noHeader:f||!v,sortParam:n,blocks:[ty("nameValue",{markerType:"item",markerColor:t,name:d,noName:!rt(d),value:i,valueType:e})].concat(r||[])})}var py=ur();function dy(t,e){return t.getName(e)||t.getId(e)}var fy,gy="__universalTransitionEnabled",yy=(u(my,fy=yd),my.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=ng({count:_y,reset:xy}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(py(this).sourceManager=new Yg(this)).prepareSource();n=this.getInitialData(t,n);wy(n,this),ot(this.dataTask.context.data=n,"getInitialData returned invalid data."),py(this).dataBeforeProcessed=n,vy(this),this._initSelectedMapFromData(n)},my.prototype.mergeDefaultAndTheme=function(t,e){var n=sd(this),i=n?ud(t):{},o=this.subType;yd.hasClass(o),b(t,e.getTheme().get(this.subType)),b(t,this.getDefaultOption()),Ko(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ld(t,i,n)},my.prototype.mergeOption=function(t,e){t=b(this.option,t,!0),this.fillDataTextStyle(t.data);var n=sd(this);n&&ld(this.option,t,n);n=py(this).sourceManager;n.dirty(),n.prepareSource();e=this.getInitialData(t,e);wy(e,this),this.dataTask.dirty(),this.dataTask.context.data=e,py(this).dataBeforeProcessed=e,vy(this),this._initSelectedMapFromData(e)},my.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var e=["show"],n=0;n<t.length;n++)t[n]&&t[n].label&&Ko(t[n],"label",e)},my.prototype.getInitialData=function(t,e){},my.prototype.appendData=function(t){this.getRawData().appendData(t.data)},my.prototype.getData=function(t){var e=My(this);if(e){e=e.context.data;return null==t?e:e.getLinkedData(t)}return py(this).data},my.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},my.prototype.setData=function(t){var e,n=My(this);n&&((e=n.context).outputData=t,n!==this.dataTask&&(e.data=t)),py(this).data=t},my.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return ct(t)},my.prototype.getSourceManager=function(){return py(this).sourceManager},my.prototype.getSource=function(){return this.getSourceManager().getSource()},my.prototype.getRawData=function(){return py(this).dataBeforeProcessed},my.prototype.getColorBy=function(){return this.get("colorBy")||"series"},my.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},my.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},my.prototype.formatTooltip=function(t,e,n){return cy({series:this,dataIndex:t,multipleSeries:e})},my.prototype.isAnimationEnabled=function(){if(w.node)return!1;var t=this.getShallow("animation");return!!(t=t&&this.getData().count()>this.getShallow("animationThreshold")?!1:t)},my.prototype.restoreData=function(){this.dataTask.dirty()},my.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel;return Wd.prototype.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},my.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},my.prototype.getProgressive=function(){return this.get("progressive")},my.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},my.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},my.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),o=0;o<t.length;o++){var r=dy(i,t[o]);n[r]=!1,this._selectedDataIndicesMap[r]=-1}},my.prototype.toggleSelect=function(t,e){for(var n=[],i=0;i<t.length;i++)n[0]=t[i],this.isSelected(t[i],e)?this.unselect(n,e):this.select(n,e)},my.prototype.getSelectedDataIndices=function(){for(var t=this._selectedDataIndicesMap,e=z(t),n=[],i=0;i<e.length;i++){var o=t[e[i]];0<=o&&n.push(o)}return n},my.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[dy(this.getData(e),t)]||!1},my.prototype.isUniversalTransitionEnabled=function(){if(this[gy])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},my.prototype._innerSelect=function(t,e){var n,i=this.option.selectedMode,o=e.length;if(i&&o)if("multiple"===i)for(var r=this.option.selectedMap||(this.option.selectedMap={}),a=0;a<o;a++){var s,l=e[a];r[s=dy(t,l)]=!0,this._selectedDataIndicesMap[s]=t.getRawIndex(l)}else"single"!==i&&!0!==i||(s=dy(t,n=e[o-1]),this.option.selectedMap=((i={})[s]=!0,i),this._selectedDataIndicesMap=((i={})[s]=t.getRawIndex(n),i))},my.prototype._initSelectedMapFromData=function(n){var i;this.option.selectedMap||(i=[],n.hasItemOption&&n.each(function(t){var e=n.getRawDataItem(t);e&&e.selected&&i.push(t)}),0<i.length&&this._innerSelect(n,i))},my.registerClass=function(t){return yd.registerClass(t)},my.protoInitialize=(($i=my.prototype).type="series.__base__",$i.seriesIndex=0,$i.ignoreStyleOnData=!1,$i.hasSymbolVisual=!1,$i.defaultSymbol="circle",$i.visualStyleAccessPath="itemStyle",void($i.visualDrawType="fill")),my);function my(){var t=null!==fy&&fy.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}function vy(t){var e,n,i=t.name;rr(t)||(t.name=(t=(e=(t=t).getRawData()).mapDimensionsAll("seriesName"),n=[],E(t,function(t){t=e.getDimensionInfo(t);t.displayName&&n.push(t.displayName)}),n.join(" ")||i))}function _y(t){return t.model.getRawData().count()}function xy(t){t=t.model;return t.setData(t.getRawData().cloneShallow()),by}function by(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function wy(e,n){E(pt(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(t){e.wrapMethod(t,V(Sy,n))})}function Sy(t,e){t=My(t);return t&&t.setOutputEnd((e||this).count()),e}function My(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){e=n.currentTask;return!e||(n=e.agentStubMap)&&(e=n.get(t.uid)),e}}T(yy,Jn),T(yy,Wd),Mr(yy,yd);var Iy=(Ty.prototype.init=function(t,e){},Ty.prototype.render=function(t,e,n,i){},Ty.prototype.dispose=function(t,e){},Ty.prototype.updateView=function(t,e,n,i){},Ty.prototype.updateLayout=function(t,e,n,i){},Ty.prototype.updateVisual=function(t,e,n,i){},Ty.prototype.blurSeries=function(t,e){},Ty);function Ty(){this.group=new io,this.uid=op("viewComponent")}function Cy(){var r=ur();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,o=!!e.progressiveRender,t=e.large=!(!n||!n.large),n=e.progressiveRender=!(!n||!n.progressiveRender);return!(i==t&&o==n)&&"reset"}}Sr(Iy),Dr(Iy);var Dy=ur(),Ay=Cy(),ky=(Ly.prototype.init=function(t,e){},Ly.prototype.render=function(t,e,n,i){},Ly.prototype.highlight=function(t,e,n,i){Oy(t.getData(),i,"emphasis")},Ly.prototype.downplay=function(t,e,n,i){Oy(t.getData(),i,"normal")},Ly.prototype.remove=function(t,e){this.group.removeAll()},Ly.prototype.dispose=function(t,e){},Ly.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},Ly.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},Ly.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},Ly.markUpdateMethod=function(t,e){Dy(t).updateMethod=e},Ly.protoInitialize=void(Ly.prototype.type="chart"),Ly);function Ly(){this.group=new io,this.uid=op("viewChart"),this.renderTask=ng({plan:Ry,reset:Ny}),this.renderTask.context={view:this}}function Py(t,e,n){t&&("emphasis"===e?zl:Bl)(t,n)}function Oy(e,t,n){var i,o=lr(e,t),r=t&&null!=t.highlightKey?(i=t.highlightKey,t=null==(t=rl[i])&&ol<=32?rl[i]=ol++:t):null;null!=o?E(qo(o),function(t){Py(e.getItemGraphicEl(t),n,r)}):e.eachItemGraphicEl(function(t){Py(t,n,r)})}function Ry(t){return Ay(t.model)}function Ny(t){var e=t.model,n=t.ecModel,i=t.api,o=t.payload,r=e.pipelineContext.progressiveRender,a=t.view,t=o&&Dy(o).updateMethod,t=r?"incrementalPrepareRender":t&&a[t]?t:"render";return"render"!==t&&a[t](e,n,i,o),Ey[t]}Sr(ky,["dispose"]),Dr(ky);var Ey={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},zy="\0__throttleOriginMethod",By="\0__throttleRate",Vy="\0__throttleType";function Gy(t,o,r){var a,s,l,u,h,c=0,p=0,d=null;function f(){p=(new Date).getTime(),d=null,t.apply(l,u||[])}o=o||0;function e(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];a=(new Date).getTime(),l=this,u=t;var n=h||o,i=h||r;h=null,s=a-(i?c:p)-n,clearTimeout(d),i?d=setTimeout(f,n):0<=s?f():d=setTimeout(f,-s),c=a}return e.clear=function(){d&&(clearTimeout(d),d=null)},e.debounceNextCall=function(t){h=t},e}function Fy(t,e,n,i){var o=t[e];if(o){var r=o[zy]||o,a=o[Vy];if(o[By]!==n||a!==i){if(null==n||!i)return t[e]=r;(o=t[e]=Gy(r,n,"debounce"===i))[zy]=r,o[Vy]=i,o[By]=n}return o}}var Hy=ur(),Wy={itemStyle:Ar(r,!0),lineStyle:Ar(jc,!0)},Uy={lineStyle:"stroke",itemStyle:"fill"};function Yy(t,e){t=t.visualStyleMapper||Wy[e];return t||(console.warn("Unkown style type '"+e+"'."),Wy.itemStyle)}function Xy(t,e){t=t.visualDrawType||Uy[e];return t||(console.warn("Unkown style type '"+e+"'."),"fill")}var Zy={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData(),n=o.visualStyleAccessPath||"itemStyle",i=o.getModel(n),r=Yy(o,n)(i),i=i.getShallow("decal");i&&(e.setVisual("decal",i),i.dirty=!0);var a=Xy(o,n),n=r[a],s=F(n)?n:null,n="auto"===r.fill||"auto"===r.stroke;if(r[a]&&!s&&!n||(n=o.getColorFromPalette(o.name,null,t.getSeriesCount()),r[a]||(r[a]=n,e.setVisual("colorFromPalette",!0)),r.fill="auto"===r.fill||"function"==typeof r.fill?n:r.fill,r.stroke="auto"===r.stroke||"function"==typeof r.stroke?n:r.stroke),e.setVisual("style",r),e.setVisual("drawType",a),!t.isSeriesFiltered(o)&&s)return e.setVisual("colorFromPalette",!1),{dataEach:function(t,e){var n=o.getDataParams(e),i=P({},r);i[a]=s(n),t.setItemVisual(e,"style",i)}}}},jy=new ep,Uf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var e=t.getData(),i=t.visualStyleAccessPath||"itemStyle",o=Yy(t,i),r=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(t,e){var n=t.getRawDataItem(e);n&&n[i]&&(jy.option=n[i],n=o(jy),P(t.ensureUniqueItemVisual(e,"style"),n),jy.option.decal&&(t.setItemVisual(e,"decal",jy.option.decal),jy.option.decal.dirty=!0),r in n&&t.setItemVisual(e,"colorFromPalette",!1))}:null}}}},Ah={performRawSeries:!0,overallReset:function(e){var i=ct();e.eachSeries(function(t){var e,n=t.getColorBy();t.isColorBySeries()||(e=t.type+"-"+n,(n=i.get(e))||(n={},i.set(e,n)),Hy(t).scope=n)}),e.eachSeries(function(i){var o,r,a,s,t,l;i.isColorBySeries()||e.isSeriesFiltered(i)||(o=i.getRawData(),r={},a=i.getData(),s=Hy(i).scope,t=i.visualStyleAccessPath||"itemStyle",l=Xy(i,t),a.each(function(t){var e=a.getRawIndex(t);r[e]=t}),o.each(function(t){var e,n=r[t];a.getItemVisual(n,"colorFromPalette")&&(e=a.ensureUniqueItemVisual(n,"style"),n=o.getName(t)||t+"",t=o.count(),e[l]=i.getColorFromPalette(n,s,t))}))})}},qy=Math.PI;var Ky=($y.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(t){t=t.overallTask;t&&t.dirty()})},$y.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,n=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,i=i&&i.modDataCount;return{step:n,modBy:null!=i?Math.ceil(i/n):null,modDataCount:i}}},$y.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},$y.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,e=t.get("large")&&i>=t.get("largeThreshold"),i="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:i,large:e}},$y.prototype.restorePipelines=function(t){var i=this,o=i._pipelineMap=ct();t.eachSeries(function(t){var e=t.getProgressive(),n=t.uid;o.set(n,{id:n,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),i._pipe(t,t.dataTask)})},$y.prototype.prepareStageTasks=function(){var i=this._stageTaskMap,o=this.api.getModel(),r=this.api;E(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,{}),n="",n='"reset" and "overallReset" must not be both specified.';ot(!(t.reset&&t.overallReset),n),t.reset&&this._createSeriesStageTask(t,e,o,r),t.overallReset&&this._createOverallStageTask(t,e,o,r)},this)},$y.prototype.prepareView=function(t,e,n,i){var o=t.renderTask,r=o.context;r.model=e,r.ecModel=n,r.api=i,o.__block=!t.incrementalPrepareRender,this._pipe(e,o)},$y.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},$y.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},$y.prototype._performStageTasks=function(t,s,l,u){u=u||{};var h=!1,c=this;function p(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,function(i,t){var e,n,o,r,a;u.visualType&&u.visualType!==i.visualType||(e=(r=c._stageTaskMap.get(i.uid)).seriesTaskMap,(n=r.overallTask)?((r=n.agentStubMap).each(function(t){p(u,t)&&(t.dirty(),o=!0)}),o&&n.dirty(),c.updatePayload(n,l),a=c.getPerformArgs(n,u.block),r.each(function(t){t.perform(a)}),n.perform(a)&&(h=!0)):e&&e.each(function(t,e){p(u,t)&&t.dirty();var n=c.getPerformArgs(t,u.block);n.skip=!i.performRawSeries&&s.isSeriesFiltered(t.context.model),c.updatePayload(t,l),t.perform(n)&&(h=!0)}))}),this.unfinished=h||this.unfinished},$y.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e=t.dataTask.perform()||e}),this.unfinished=e||this.unfinished},$y.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}}while(e=e.getUpstream())})},$y.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},$y.prototype._createSeriesStageTask=function(n,t,i,o){var r=this,a=t.seriesTaskMap,s=t.seriesTaskMap=ct(),e=n.seriesType,t=n.getTargetSeries;function l(t){var e=t.uid,e=s.set(e,a&&a.get(e)||ng({plan:nm,reset:im,count:am}));e.context={model:t,ecModel:i,api:o,useClearVisual:n.isVisual&&!n.isLayout,plan:n.plan,reset:n.reset,scheduler:r},r._pipe(t,e)}n.createOnAllSeries?i.eachRawSeries(l):e?i.eachRawSeriesByType(e,l):t&&t(i,o).each(l)},$y.prototype._createOverallStageTask=function(t,e,n,i){var o=this,r=e.overallTask=e.overallTask||ng({reset:Jy});r.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:o};var a=r.agentStubMap,s=r.agentStubMap=ct(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,e="";function p(t){var e=t.uid,e=s.set(e,a&&a.get(e)||(c=!0,ng({reset:Qy,onDirty:em})));e.context={model:t,overallProgress:h},e.agent=r,e.__block=h,o._pipe(t,e)}e='"createOnAllSeries" do not supported for "overallReset", becuase it will block all streams.',ot(!t.createOnAllSeries,e),l?n.eachRawSeriesByType(l,p):u?u(n,i).each(p):(h=!1,E(n.getSeries(),p)),c&&r.dirty()},$y.prototype._pipe=function(t,e){t=t.uid,t=this._pipelineMap.get(t);t.head||(t.head=e),t.tail&&t.tail.pipe(e),(t.tail=e).__idxInPipeline=t.count++,e.__pipeline=t},$y.wrapStageHandler=function(t,e){return(t=F(t)?{overallReset:t,seriesType:function(t){sm=null;try{t(lm,um)}catch(t){}return sm}(t)}:t).uid=op("stageHandler"),e&&(t.visualType=e),t},$y);function $y(t,e,n,i){this._stageTaskMap=ct(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}function Jy(t){t.overallReset(t.ecModel,t.api,t.payload)}function Qy(t){return t.overallProgress&&tm}function tm(){this.agent.dirty(),this.getDownstream().dirty()}function em(){this.agent&&this.agent.dirty()}function nm(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function im(t){t.useClearVisual&&t.data.clearAllVisual();t=t.resetDefines=qo(t.reset(t.model,t.ecModel,t.api,t.payload));return 1<t.length?L(t,function(t,e){return rm(e)}):om}var om=rm(0);function rm(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(n,o);else i&&i.progress&&i.progress(t,n)}}function am(t){return t.data.count()}var sm,lm={},um={};function hm(t,e){for(var n in e.prototype)t[n]=gt}hm(lm,Jd),hm(um,of),lm.eachSeriesByType=lm.eachRawSeriesByType=function(t){sm=t},lm.eachComponent=function(t){"series"===t.mainType&&t.subType&&(sm=t.subType)};var n=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],f={color:n,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],n]},cm="#B9B8CE",Lr="#100C2A",Xc=function(){return{axisLine:{lineStyle:{color:cm}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},Rg=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],_d={darkMode:!0,color:Rg,backgroundColor:Lr,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:cm}},textStyle:{color:cm},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:cm}},dataZoom:{borderColor:"#71708A",textStyle:{color:cm},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:cm}},timeline:{lineStyle:{color:cm},label:{color:cm},controlStyle:{color:cm,borderColor:cm}},calendar:{itemStyle:{color:Lr},dayLabel:{color:cm},monthLabel:{color:cm},yearLabel:{color:cm}},timeAxis:Xc(),logAxis:Xc(),valueAxis:Xc(),categoryAxis:Xc(),line:{symbol:"circle"},graph:{color:Rg},gauge:{title:{color:cm},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:cm},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};_d.categoryAxis.splitLine.show=!1;var pm=(dm.prototype.normalizeQuery=function(t){var e,a,s,l={},u={},h={};return H(t)?(e=wr(t),l.mainType=e.main||null,l.subType=e.sub||null):(a=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1},E(t,function(t,e){for(var n=!1,i=0;i<a.length;i++){var o=a[i],r=e.lastIndexOf(o);0<r&&r===e.length-o.length&&("data"!==(r=e.slice(0,r))&&(l.mainType=r,l[o.toLowerCase()]=t,n=!0))}s.hasOwnProperty(e)&&(u[e]=t,n=!0),n||(h[e]=t)})),{cptQuery:l,dataQuery:u,otherQuery:h}},dm.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,o=n.packedEvent,r=n.model,a=n.view;if(!r||!a)return!0;var s=e.cptQuery,n=e.dataQuery;return l(s,r,"mainType")&&l(s,r,"subType")&&l(s,r,"index","componentIndex")&&l(s,r,"name")&&l(s,r,"id")&&l(n,o,"name")&&l(n,o,"dataIndex")&&l(n,o,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,o));function l(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},dm.prototype.afterTrigger=function(){this.eventInfo=null},dm);function dm(){}$i={createOnAllSeries:!0,performRawSeries:!0,reset:function(o,t){var e=o.getData();if(o.legendIcon&&e.setVisual("legendIcon",o.legendIcon),o.hasSymbolVisual){var r=o.get("symbol"),a=o.get("symbolSize"),n=o.get("symbolKeepAspect"),s=o.get("symbolRotate"),l=o.get("symbolOffset"),u=F(r),h=F(a),c=F(s),p=F(l),i=u||h||c||p,d=!u&&r?r:o.defaultSymbol,f=h?null:a,g=c?null:s,y=p?null:l;if(e.setVisual({legendIcon:o.legendIcon||d,symbol:d,symbolSize:f,symbolKeepAspect:n,symbolRotate:g,symbolOffset:y}),!t.isSeriesFiltered(o))return{dataEach:i?function(t,e){var n=o.getRawValue(e),i=o.getDataParams(e);u&&t.setItemVisual(e,"symbol",r(n,i)),h&&t.setItemVisual(e,"symbolSize",a(n,i)),c&&t.setItemVisual(e,"symbolRotate",s(n,i)),p&&t.setItemVisual(e,"symbolOffset",l(n,i))}:null}}}},r={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=(a=t.getItemModel(e)).getShallow("symbol",!0),i=a.getShallow("symbolSize",!0),o=a.getShallow("symbolRotate",!0),r=a.getShallow("symbolOffset",!0),a=a.getShallow("symbolKeepAspect",!0);null!=n&&t.setItemVisual(e,"symbol",n),null!=i&&t.setItemVisual(e,"symbolSize",i),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=r&&t.setItemVisual(e,"symbolOffset",r),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}};function fm(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n);default:console.warn("Unknown visual type "+n)}}function gm(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:console.warn("Unknown visual type "+e)}}function ym(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i);break;default:console.warn("Unknown visual type "+n)}}function mm(r,t){E([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(o){t(o[0],function(t,e,n){var i;Uo((t=P({},t)).type,o[1]),n.dispatchAction(P(t,{type:o[1],seriesIndex:(t=t,i=[],e.eachComponent({mainType:"series",subType:r,query:t},function(t){i.push(t.seriesIndex)}),i)}))})})}function vm(t,e,a,n,s){var l=t+e;a.isSilent(l)||(Wo("event "+l+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(t){for(var e,n,i=t.seriesIndex,o=s.selected,r=0;r<o.length;r++)o[r].seriesIndex===i&&(n=lr(e=t.getData(),s.fromActionPayload),a.trigger(l,{type:l,seriesId:t.id,name:G(n)?e.getName(n[0]):e.getName(n),selected:P({},t.option.selectedMap)}))}))}function _m(t,e,n){for(var i;t&&(!e(t)||(i=t,!n));)t=t.__hostTarget||t.parent;return i}var xm=Math.round(9*Math.random()),bm="function"==typeof Object.defineProperty,jc=(wm.prototype.get=function(t){return this._guard(t)[this._id]},wm.prototype.set=function(t,e){t=this._guard(t);return bm?Object.defineProperty(t,this._id,{value:e,enumerable:!1,configurable:!0}):t[this._id]=e,this},wm.prototype.delete=function(t){return!!this.has(t)&&(delete this._guard(t)[this._id],!0)},wm.prototype.has=function(t){return!!this._guard(t)[this._id]},wm.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},wm);function wm(){this._id="__ec_inner_"+xm++}var n=Ss.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i+e),t.lineTo(n-o,i+e),t.closePath()}}),Lr=Ss.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var n=e.cx,i=e.cy,o=e.width/2,e=e.height/2;t.moveTo(n,i-e),t.lineTo(n+o,i),t.lineTo(n,i+e),t.lineTo(n-o,i),t.closePath()}}),Xc=Ss.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.x,i=e.y,o=e.width/5*3,r=Math.max(o,e.height),a=o/2,s=a*a/(r-a),l=i-r+a+s,u=Math.asin(s/a),h=Math.cos(u)*a,c=Math.sin(u),e=Math.cos(u),o=.6*a,r=.7*a;t.moveTo(n-h,l+s),t.arc(n,l,a,Math.PI-u,2*Math.PI+u),t.bezierCurveTo(n+h-c*o,l+s+e*o,n,i-r,n,i),t.bezierCurveTo(n,i-r,n-h+c*o,l+s+e*o,n-h,l+s),t.closePath()}}),Rg=Ss.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var n=e.height,i=e.width,o=e.x,e=e.y,i=i/3*2;t.moveTo(o,e),t.lineTo(o+i,e+n),t.lineTo(o,e+n/4*3),t.lineTo(o-i,e+n),t.lineTo(o,e),t.closePath()}}),Sm={line:function(t,e,n,i,o){o.x1=t,o.y1=e+i/2,o.x2=t+n,o.y2=e+i/2},rect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i},roundRect:function(t,e,n,i,o){o.x=t,o.y=e,o.width=n,o.height=i,o.r=Math.min(n,i)/4},square:function(t,e,n,i,o){i=Math.min(n,i);o.x=t,o.y=e,o.width=i,o.height=i},circle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.r=Math.min(n,i)/2},diamond:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i},pin:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},arrow:function(t,e,n,i,o){o.x=t+n/2,o.y=e+i/2,o.width=n,o.height=i},triangle:function(t,e,n,i,o){o.cx=t+n/2,o.cy=e+i/2,o.width=n,o.height=i}},Mm={};E({line:fh,rect:Fs,roundRect:Fs,square:Fs,circle:Du,diamond:Lr,pin:Xc,arrow:Rg,triangle:n},function(t,e){Mm[e]=new t});var Im=Ss.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(t,e,n){var i=Yi(t,e,n),t=this.shape;return t&&"pin"===t.symbolType&&"inside"===e.position&&(i.y=n.y+.4*n.height),i},buildPath:function(t,e,n){var i,o=e.symbolType;"none"!==o&&(i=(i=Mm[o])||Mm[o="rect"],Sm[o](e.x,e.y,e.width,e.height,i.shape),i.buildPath(t,i.shape,n))}});function Tm(t,e){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=t,n.fill=e||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=t:n.fill=t,this.markRedraw())}function Cm(t,e,n,i,o,r,a){var s=0===t.indexOf("empty");return(o=0===(t=s?t.substr(5,1).toLowerCase()+t.substr(6):t).indexOf("image://")?pc(t.slice(8),new Li(e,n,i,o),a?"center":"cover"):0===t.indexOf("path://")?cc(t.slice(7),{},new Li(e,n,i,o),a?"center":"cover"):new Im({shape:{symbolType:t,x:e,y:n,width:i,height:o}})).__isEmptyBrush=s,o.setColor=Tm,r&&o.setColor(r),o}function Dm(t){return[(t=!G(t)?[+t,+t]:t)[0]||0,t[1]||0]}function Am(t,e){if(null!=t)return[mo((t=!G(t)?[t,t]:t)[0],e[0])||0,mo(tt(t[1],t[0]),e[1])||0]}function km(t,e,n){for(var i,o,r,a,s,l,u,h,c,p="radial"===e.type?(i=t,o=e,a=(r=n).width,s=r.height,l=Math.min(a,s),u=null==o.x?.5:o.x,h=null==o.y?.5:o.y,c=null==o.r?.5:o.r,o.global||(u=u*a+r.x,h=h*s+r.y,c*=l),i.createRadialGradient(u,h,0,u,h,c)):(l=t,i=n,h=null==(u=e).x?0:u.x,c=null==u.x2?1:u.x2,t=null==u.y?0:u.y,n=null==u.y2?0:u.y2,u.global||(h=h*i.width+i.x,c=c*i.width+i.x,t=t*i.height+i.y,n=n*i.height+i.y),h=isNaN(h)?0:h,c=isNaN(c)?1:c,t=isNaN(t)?0:t,n=isNaN(n)?0:n,l.createLinearGradient(h,t,c,n)),d=e.colorStops,f=0;f<d.length;f++)p.addColorStop(d[f].offset,d[f].color);return p}function Lm(t,e){if(t!==e&&(t||e)){if(!t||!e||t.length!==e.length)return 1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return 1}}function Pm(t,e){return t&&"solid"!==t&&0<e?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:U(t)?[t]:G(t)?t:null):null}var Om=new is(!0);function Rm(t){var e=t.stroke;return!(null==e||"none"===e||!(0<t.lineWidth))}function Nm(t){return"string"==typeof t&&"none"!==t}function Em(t){t=t.fill;return null!=t&&"none"!==t}function zm(t,e){var n;null!=e.fillOpacity&&1!==e.fillOpacity?(n=t.globalAlpha,t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n):t.fill()}function Bm(t,e){var n;null!=e.strokeOpacity&&1!==e.strokeOpacity?(n=t.globalAlpha,t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n):t.stroke()}function Vm(t,e,n){n=Rr(e.image,e.__image,n);if(Er(n)){t=t.createPattern(n,e.repeat||"repeat");return"function"==typeof DOMMatrix&&t.setTransform&&((n=new DOMMatrix).rotateSelf(0,0,(e.rotation||0)/Math.PI*180),n.scaleSelf(e.scaleX||1,e.scaleY||1),n.translateSelf(e.x||0,e.y||0),t.setTransform(n)),t}}var Gm=["shadowBlur","shadowOffsetX","shadowOffsetY"],Fm=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function Hm(t,e,n,i,o){var r,a=!1;if(!i&&e===(n=n||{}))return!1;!i&&e.opacity===n.opacity||(a||(qm(t,o),a=!0),r=Math.max(Math.min(e.opacity,1),0),t.globalAlpha=isNaN(r)?qr.opacity:r),!i&&e.blend===n.blend||(a||(qm(t,o),a=!0),t.globalCompositeOperation=e.blend||qr.blend);for(var s=0;s<Gm.length;s++){var l=Gm[s];!i&&e[l]===n[l]||(a||(qm(t,o),a=!0),t[l]=t.dpr*(e[l]||0))}return!i&&e.shadowColor===n.shadowColor||(a||(qm(t,o),a=!0),t.shadowColor=e.shadowColor||qr.shadowColor),a}function Wm(t,e,n,i,o){var r=Km(e,o.inHover),a=i?null:n&&Km(n,o.inHover)||{};if(r!==a){var s=Hm(t,r,a,i,o);!i&&r.fill===a.fill||(s||(qm(t,o),s=!0),Nm(r.fill)&&(t.fillStyle=r.fill)),!i&&r.stroke===a.stroke||(s||(qm(t,o),s=!0),Nm(r.stroke)&&(t.strokeStyle=r.stroke)),!i&&r.opacity===a.opacity||(s||(qm(t,o),s=!0),t.globalAlpha=null==r.opacity?1:r.opacity),e.hasStroke()&&(e=r.lineWidth/(r.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1),t.lineWidth!==e&&(s||(qm(t,o),s=!0),t.lineWidth=e));for(var l=0;l<Fm.length;l++){var u=Fm[l],h=u[0];!i&&r[h]===a[h]||(s||(qm(t,o),s=!0),t[h]=r[h]||u[1])}return s}}function Um(t,e){var n=e.transform,e=t.dpr||1;n?t.setTransform(e*n[0],e*n[1],e*n[2],e*n[3],e*n[4],e*n[5]):t.setTransform(e,0,0,e,0,0)}var Ym=1,Xm=2,Zm=3,jm=4;function qm(t,e){e.batchFill&&t.fill(),e.batchStroke&&t.stroke(),e.batchFill="",e.batchStroke=""}function Km(t,e){return e&&t.__hoverStyle||t.style}function $m(t,e){Jm(t,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function Jm(t,e,n,i){var o=e.transform;if(!e.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1))return e.__dirty&=~De,void(e.__isRendered=!1);var r,a,s,l,u,h,c,p,d,f,g,y,m,v=e.__clipPaths,_=n.prevElClipPaths,x=!1,b=!1;_&&!Lm(v,_)||(_&&_.length&&(qm(t,n),t.restore(),b=x=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),v&&v.length&&(qm(t,n),t.save(),function(t,e,n){for(var i=!1,o=0;o<t.length;o++){var r=t[o],i=i||r.isZeroArea();Um(e,r),e.beginPath(),r.buildPath(e,r.shape),e.clip()}n.allClipped=i}(v,t,n),x=!0),n.prevElClipPaths=v),n.allClipped?e.__isRendered=!1:(e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush(),(u=n.prevEl)||(b=x=!0),r=e instanceof Ss&&e.autoBatch&&(r=e.style,_=Em(r),v=Rm(r),!(r.lineDash||!(+_^+v)||_&&"string"!=typeof r.fill||v&&"string"!=typeof r.stroke||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)),x||(a=o,c=u.transform,a&&c?a[0]!==c[0]||a[1]!==c[1]||a[2]!==c[2]||a[3]!==c[3]||a[4]!==c[4]||a[5]!==c[5]:a||c)?(qm(t,n),Um(t,e)):r||qm(t,n),a=Km(e,n.inHover),e instanceof Ss?(n.lastDrawType!==Ym&&(b=!0,n.lastDrawType=Ym),Wm(t,e,u,b,n),r&&(n.batchFill||n.batchStroke)||t.beginPath(),function(t,e,n,i){var o=Rm(n),r=Em(n),a=n.strokePercent,s=a<1,l=!e.path;e.silent&&!s||!l||e.createPathProxy();var u,h,c,p,d,f,g,y=e.path||Om;i||(u=n.fill,h=n.stroke,c=r&&!!u.colorStops,v=o&&!!h.colorStops,p=r&&!!u.image,x=o&&!!h.image,g=b=f=_=d=void 0,(c||v)&&(g=e.getBoundingRect()),c&&(d=e.__dirty?km(t,u,g):e.__canvasFillGradient,e.__canvasFillGradient=d),v&&(_=e.__dirty?km(t,h,g):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),p&&(f=e.__dirty||!e.__canvasFillPattern?Vm(t,u,e):e.__canvasFillPattern,e.__canvasFillPattern=f),x&&(b=e.__dirty||!e.__canvasStrokePattern?Vm(t,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=f),c?t.fillStyle=d:p&&(f?t.fillStyle=f:r=!1),v?t.strokeStyle=_:x&&(b?t.strokeStyle=b:o=!1));var m,v=n.lineDash&&0<n.lineWidth&&Pm(n.lineDash,n.lineWidth),_=n.lineDashOffset,x=!!t.setLineDash,b=e.getGlobalScale();y.setScale(b[0],b[1],e.segmentIgnoreThreshold),!v||(m=n.strokeNoScale&&e.getLineScale?e.getLineScale():1)&&1!==m&&(v=L(v,function(t){return t/m}),_/=m),b=!0,(l||e.__dirty&Ae||v&&!x&&o)&&(y.setDPR(t.dpr),s?y.setContext(null):(y.setContext(t),b=!1),y.reset(),v&&!x&&(y.setLineDash(v),y.setLineDashOffset(_)),e.buildPath(y,e.shape,i),y.toStatic(),e.pathUpdated()),b&&y.rebuildPath(t,s?a:1),v&&x&&(t.setLineDash(v),t.lineDashOffset=_),i||(n.strokeFirst?(o&&Bm(t,n),r&&zm(t,n)):(r&&zm(t,n),o&&Bm(t,n))),v&&x&&t.setLineDash([])}(t,e,a,r),r&&(n.batchFill=a.fill||"",n.batchStroke=a.stroke||"")):e instanceof Cs?(n.lastDrawType!==Zm&&(b=!0,n.lastDrawType=Zm),Wm(t,e,u,b,n),h=t,c=e,null!=(m=(p=a).text)&&(m+=""),m&&(h.font=p.font||Ei,h.textAlign=p.textAlign,h.textBaseline=p.textBaseline,d=void 0,h.setLineDash&&(f=p.lineDash&&0<p.lineWidth&&Pm(p.lineDash,p.lineWidth),g=p.lineDashOffset,f&&((y=p.strokeNoScale&&c.getLineScale?c.getLineScale():1)&&1!==y&&(f=L(f,function(t){return t/y}),g/=y),h.setLineDash(f),h.lineDashOffset=g,d=!0)),p.strokeFirst?(Rm(p)&&h.strokeText(m,p.x,p.y),Em(p)&&h.fillText(m,p.x,p.y)):(Em(p)&&h.fillText(m,p.x,p.y),Rm(p)&&h.strokeText(m,p.x,p.y)),d&&h.setLineDash([]))):e instanceof Ps?(n.lastDrawType!==Xm&&(b=!0,n.lastDrawType=Xm),f=u,g=b,Hm(t,Km(e,(m=n).inHover),f&&Km(f,m.inHover),g,m),p=t,d=a,(u=(h=e).__image=Rr(d.image,h.__image,h,h.onload))&&Er(u)&&(f=d.x||0,g=d.y||0,m=h.getWidth(),a=h.getHeight(),h=u.width/u.height,null==m&&null!=a?m=a*h:null==a&&null!=m?a=m/h:null==m&&null==a&&(m=u.width,a=u.height),d.sWidth&&d.sHeight?(s=d.sx||0,l=d.sy||0,p.drawImage(u,s,l,d.sWidth,d.sHeight,f,g,m,a)):d.sx&&d.sy?(h=m-(s=d.sx),d=a-(l=d.sy),p.drawImage(u,s,l,h,d,f,g,m,a)):p.drawImage(u,f,g,m,a))):e instanceof Yh&&(n.lastDrawType!==jm&&(b=!0,n.lastDrawType=jm),function(t,e,n){var i=e.getDisplayables(),o=e.getTemporalDisplayables();t.save();var r,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(r=e.getCursor(),a=i.length;r<a;r++)(h=i[r]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Jm(t,h,s,r===a-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h;for(var l=0,u=o.length;l<u;l++){var h;(h=o[l]).beforeBrush&&h.beforeBrush(),h.innerBeforeBrush(),Jm(t,h,s,l===u-1),h.innerAfterBrush(),h.afterBrush&&h.afterBrush(),s.prevEl=h}e.clearTemporalDisplayables(),e.notClear=!0,t.restore()}(t,e,n)),r&&i&&qm(t,n),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),(n.prevEl=e).__dirty=0,e.__isRendered=!0)}var Qm,tv=new jc,ev=new He(100),nv=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function iv(t,e){if("none"===t)return null;var M=e.getDevicePixelRatio(),I=e.getZr(),T="svg"===I.painter.type;t.dirty&&tv.delete(t);e=tv.get(t);if(e)return e;var C=A(t,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});"none"===C.backgroundColor&&(C.backgroundColor=null);e={repeat:"repeat"};return function(t){for(var e,n=[M],i=!0,o=0;o<nv.length;++o){var r=C[nv[o]],a=_typeof(r);if(null!=r&&!G(r)&&"string"!==a&&"number"!==a&&"boolean"!==a){i=!1;break}n.push(r)}{var s;i&&(e=n.join(",")+(T?"-svg":""),(s=ev.get(e))&&(T?t.svgElement=s:t.image=s))}var y,m=function t(e){if(!e||0===e.length)return[[0,0]];if("number"==typeof e){var n=Math.ceil(e);return[[n,n]]}var i=!0;for(var o=0;o<e.length;++o)if("number"!=typeof e[o]){i=!1;break}if(i)return t([e]);var r=[];for(var o=0;o<e.length;++o)"number"==typeof e[o]?(n=Math.ceil(e[o]),r.push([n,n])):(n=L(e[o],function(t){return Math.ceil(t)})).length%2==1?r.push(n.concat(n)):r.push(n);return r}(C.dashArrayX),v=function(t){if(!t||"object"===_typeof(t)&&0===t.length)return[0,0];if("number"==typeof t){var e=Math.ceil(t);return[e,e]}e=L(t,function(t){return Math.ceil(t)});return t.length%2?e.concat(e):e}(C.dashArrayY),_=function t(e){if(!e||0===e.length)return[["rect"]];if("string"==typeof e)return[[e]];var n=!0;for(var i=0;i<e.length;++i)if("string"!=typeof e[i]){n=!1;break}if(n)return t([e]);var o=[];for(var i=0;i<e.length;++i)"string"==typeof e[i]?o.push([e[i]]):o.push(e[i]);return o}(C.symbol),l=function(t){return L(t,ov)}(m),x=ov(v),b=!T&&D(),w=T&&I.painter.createSVGElement("g"),S=function(){for(var t=1,e=0,n=l.length;e<n;++e)t=zo(t,l[e]);for(var i=1,e=0,n=_.length;e<n;++e)i=zo(i,_[e].length);t*=i;var o=x*l.length*_.length;{var r=function(t){console.warn("Calculated decal size is greater than "+t+" due to decal option settings so "+t+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+t+" to be larger to avoid incontinuity.")};t>C.maxTileWidth&&r("maxTileWidth"),o>C.maxTileHeight&&r("maxTileHeight")}return{width:Math.max(1,Math.min(t,C.maxTileWidth)),height:Math.max(1,Math.min(o,C.maxTileHeight))}}();b&&(b.width=S.width*M,b.height=S.height*M,y=b.getContext("2d"));(function(){y&&(y.clearRect(0,0,b.width,b.height),C.backgroundColor&&(y.fillStyle=C.backgroundColor,y.fillRect(0,0,b.width,b.height)));for(var t=0,e=0;e<v.length;++e)t+=v[e];if(t<=0)return;var n=-x,i=0,o=0,r=0;for(;n<S.height;){if(i%2==0){for(var a=o/2%_.length,s=0,l=0,u=0;s<2*S.width;){for(var h,c,p,d,f,g=0,e=0;e<m[r].length;++e)g+=m[r][e];if(g<=0)break;l%2==0&&(f=.5*(1-C.symbolSize),h=s+m[r][l]*f,c=n+v[i]*f,p=m[r][l]*C.symbolSize,d=v[i]*C.symbolSize,f=u/2%_[a].length,function(t,e,n,i,o){var r=T?1:M,r=Cm(o,t*r,e*r,n*r,i*r,C.color,C.symbolKeepAspect);T?w.appendChild(I.painter.paintOne(r)):$m(y,r)}(h,c,p,d,_[a][f])),s+=m[r][l],++u,++l===m[r].length&&(l=0)}++r===m.length&&(r=0)}n+=v[i],++o,++i===v.length&&(i=0)}})(),i&&ev.put(e,b||w);t.image=b,t.svgElement=w,t.svgWidth=S.width,t.svgHeight=S.height}(e),e.rotation=C.rotation,e.scaleX=e.scaleY=T?1:1/M,tv.set(t,e),t.dirty=!1,e}function ov(t){for(var e=0,n=0;n<t.length;++n)e+=t[n];return t.length%2==1?2*e:e}function rv(t){var e=t=H(t)?(new DOMParser).parseFromString(t,"text/xml"):t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var av={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},sv=z(av),lv={"alignment-baseline":"textBaseline","stop-color":"stopColor"},uv=z(lv),hv=(cv.prototype.parse=function(t,e){e=e||{};var n=rv(t);if(!n)throw new Error("Illegal svg");this._defsUsePending=[];var i=new io;this._root=i;var o=[],r=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),t=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(t)&&(t=null),mv(n,i,null,!0,!1);for(var s,l,u,h=n.firstChild;h;)this._parseNode(h,i,o,null,!1,!1),h=h.nextSibling;return function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i[0].style[i[1]]=t[i[2]]}}(this._defs,this._defsUsePending),this._defsUsePending=[],!r||4<=(l=bv(r)).length&&(s={x:parseFloat(l[0]||0),y:parseFloat(l[1]||0),width:parseFloat(l[2]),height:parseFloat(l[3])}),s&&null!=a&&null!=t&&(u=Tv(s,{x:0,y:0,width:a,height:t}),e.ignoreViewBox||(l=i,(i=new io).add(l),l.scaleX=l.scaleY=u.scale,l.x=u.x,l.y=u.y)),e.ignoreRootClip||null==a||null==t||i.setClipPath(new Fs({shape:{x:0,y:0,width:a,height:t}})),{root:i,width:a,height:t,viewBoxRect:s,viewBoxTransform:u,named:o}},cv.prototype._parseNode=function(t,e,n,i,o,r){var a,s,l=t.nodeName.toLowerCase(),u=i;if("defs"===l&&(o=!0),"text"===l&&(r=!0),"defs"===l||"switch"===l?a=e:(o||(s=Qm[l])&&ft(Qm,l)&&(a=s.call(this,t,e),(s=t.getAttribute("name"))?(s={name:s,namedFrom:null,svgNodeTagLower:l,el:a},n.push(s),"g"===l&&(u=s)):i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:l,el:a}),e.add(a)),(e=pv[l])&&ft(pv,l)&&(l=e.call(this,t),(e=t.getAttribute("id"))&&(this._defs[e]=l))),a&&a.isGroup)for(var h=t.firstChild;h;)1===h.nodeType?this._parseNode(h,a,n,u,o,r):3===h.nodeType&&r&&this._parseText(h,a),h=h.nextSibling},cv.prototype._parseText=function(t,e){var n=new Cs({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});gv(e,n),mv(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;n&&(n=n.textBaseline,!(i=n)||"auto"===n||"baseline"===n?i="alphabetic":"before-edge"===n||"text-before-edge"===n?i="top":"after-edge"===n||"text-after-edge"===n?i="bottom":"central"!==n&&"mathematical"!==n||(i="middle"),t.style.textBaseline=i);var i=e.__inheritedStyle;i&&(e=i.textAlign,(i=e)&&("middle"===e&&(i="center"),t.style.textAlign=i))}(n,e);var i=n.style,t=i.fontSize;t&&t<9&&(i.fontSize=9,n.scaleX*=t/9,n.scaleY*=t/9);t=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=t;t=n.getBoundingRect();return this._textX+=t.width,e.add(n),n},cv.internalField=void(Qm={g:function(t,e){var n;return gv(e,n=new io),mv(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n;return gv(e,n=new Fs),mv(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n;return gv(e,n=new Du),mv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n;return gv(e,n=new fh),mv(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n;return gv(e,n=new Pu),mv(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i,o=t.getAttribute("points");return o&&(n=yv(o)),gv(e,i=new rh({shape:{points:n||[]},silent:!0})),mv(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var n,i,o=t.getAttribute("points");return o&&(n=yv(o)),gv(e,i=new uh({shape:{points:n||[]},silent:!0})),mv(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var n=new Ps;return gv(e,n),mv(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",o=t.getAttribute("dx")||"0",r=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(o),this._textY=parseFloat(i)+parseFloat(r);r=new io;return gv(e,r),mv(t,r,this._defsUsePending,!1,!0),r},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var o=t.getAttribute("dx")||"0",n=t.getAttribute("dy")||"0",i=new io;return gv(e,i),mv(t,i,this._defsUsePending,!1,!0),this._textX+=parseFloat(o),this._textY+=parseFloat(n),i},path:function(t,e){var n;return gv(e,n=Mu(t.getAttribute("d")||"")),mv(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),cv);function cv(){this._defs={},this._root=null}var pv={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),o=parseInt(t.getAttribute("y2")||"0",10),o=new Ph(e,n,i,o);return dv(t,o),fv(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),i=new Nh(e,n,i);return dv(t,i),fv(t,i),i}};function dv(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function fv(t,e){for(var n,i,o=t.firstChild;o;)1===o.nodeType&&"stop"===o.nodeName.toLocaleLowerCase()&&(n=void 0,n=(i=o.getAttribute("offset"))&&0<i.indexOf("%")?parseInt(i,10)/100:i?parseFloat(i):0,Iv(o,i={},i),i=i.stopColor||o.getAttribute("stop-color")||"#000000",e.colorStops.push({offset:n,color:i})),o=o.nextSibling}function gv(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),A(e.__inheritedStyle,t.__inheritedStyle))}function yv(t){for(var e=bv(t),n=[],i=0;i<e.length;i+=2){var o=parseFloat(e[i]),r=parseFloat(e[i+1]);n.push([o,r])}return n}function mv(t,e,n,i,o){var r=e,a=r.__inheritedStyle=r.__inheritedStyle||{},s={};1===t.nodeType&&(function(t,e){t=t.getAttribute("transform");if(t){t=t.replace(/,/g," ");var i=[],n=null;t.replace(wv,function(t,e,n){return i.push(e,n),""});for(var o=i.length-1;0<o;o-=2){var r=i[o],a=i[o-1],s=bv(r);switch(n=n||ni(),a){case"translate":ai(n,n,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":li(n,n,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":si(n,n,-parseFloat(s[0])*Sv);break;case"skewX":var l=Math.tan(parseFloat(s[0])*Sv);ri(n,[1,0,l,1,0,0],n);break;case"skewY":l=Math.tan(parseFloat(s[0])*Sv);ri(n,[1,l,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(s[0]),n[1]=parseFloat(s[1]),n[2]=parseFloat(s[2]),n[3]=parseFloat(s[3]),n[4]=parseFloat(s[4]),n[5]=parseFloat(s[5])}}e.setLocalTransform(n)}}(t,e),Iv(t,a,s),i||function(t,e,n){for(var i=0;i<sv.length;i++){var o=sv[i];null!=(r=t.getAttribute(o))&&(e[av[o]]=r)}for(i=0;i<uv.length;i++){var r,o=uv[i];null!=(r=t.getAttribute(o))&&(n[lv[o]]=r)}}(t,a,s)),r.style=r.style||{},null!=a.fill&&(r.style.fill=_v(r,"fill",a.fill,n)),null!=a.stroke&&(r.style.stroke=_v(r,"stroke",a.stroke,n)),E(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(t){null!=a[t]&&(r.style[t]=parseFloat(a[t]))}),E(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(t){null!=a[t]&&(r.style[t]=a[t])}),o&&(r.__selfStyle=s),a.lineDash&&(r.style.lineDash=L(bv(a.lineDash),function(t){return parseFloat(t)})),"hidden"!==a.visibility&&"collapse"!==a.visibility||(r.invisible=!0),"none"===a.display&&(r.ignore=!0)}var vv=/^url\(\s*#(.*?)\)/;function _v(t,e,n,i){var o=n&&n.match(vv);if(!o)return n="none"===n?null:n;o=rt(o[1]);i.push([t,e,o])}var xv=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function bv(t){return t.match(xv)||[]}var wv=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,Sv=Math.PI/180;var Mv=/([^\s:;]+)\s*:\s*([^:;]+)/g;function Iv(t,e,n){var i,o=t.getAttribute("style");if(o)for(Mv.lastIndex=0;null!=(i=Mv.exec(o));){var r=i[1],a=ft(av,r)?av[r]:null;a&&(e[a]=i[2]);r=ft(lv,r)?lv[r]:null;r&&(n[r]=i[2])}}function Tv(t,e){var n=e.width/t.width,i=e.height/t.height,i=Math.min(n,i);return{scale:i,x:-(t.x+t.width/2)*i+(e.x+e.width/2),y:-(t.y+t.height/2)*i+(e.y+e.height/2)}}var Cv=1e-8;function Dv(t,e){return Math.abs(t-e)<Cv}function Av(t,e,n){var i=0,o=t[0];if(!o)return!1;for(var r=1;r<t.length;r++){var a=t[r];i+=hs(o[0],o[1],a[0],a[1],e,n),o=a}var s=t[0];return Dv(o[0],s[0])&&Dv(o[1],s[1])||(i+=hs(o[0],o[1],s[0],s[1],e,n)),0!==i}var kv=[],Lr=(Lv.prototype.getCenter=function(){},Lv);function Lv(t){this.name=t}var Pv,Ov=(u(Rv,Pv=Lr),Rv.prototype.getBoundingRect=function(){var t=this._rect;if(t)return t;for(var t=Number.MAX_VALUE,e=[t,t],n=[-t,-t],i=[],o=[],r=this.geometries,a=0;a<r.length;a++)"polygon"===r[a].type&&(Ra(r[a].exterior,i,o),Rt(e,e,i),Nt(n,n,o));return 0===a&&(e[0]=e[1]=n[0]=n[1]=0),this._rect=new Li(e[0],e[1],n[0]-e[0],n[1]-e[1])},Rv.prototype.contain=function(t){var e=this.getBoundingRect(),n=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i<o;i++)if("polygon"===n[i].type){var r=n[i].exterior,a=n[i].interiors;if(Av(r,t[0],t[1])){for(var s=0;s<(a?a.length:0);s++)if(Av(a[s],t[0],t[1]))continue t;return!0}}return!1},Rv.prototype.transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=o.width/o.height;n?i=i||n/r:n=r*i;for(var i=new Li(t,e,n,i),a=o.calculateTransform(i),s=this.geometries,l=0;l<s.length;l++)if("polygon"===s[l].type){for(var u=s[l].exterior,h=s[l].interiors,c=0;c<u.length;c++)Ot(u[c],u[c],a);for(var p=0;p<(h?h.length:0);p++)for(c=0;c<h[p].length;c++)Ot(h[p][c],h[p][c],a)}(o=this._rect).copy(i),this._center=[o.x+o.width/2,o.y+o.height/2]},Rv.prototype.cloneShallow=function(t){t=new Rv(t=null==t?this.name:t,this.geometries,this._center);return t._rect=this._rect,t.transformTo=null,t},Rv.prototype.getCenter=function(){return this._center},Rv.prototype.setCenter=function(t){this._center=t},Rv);function Rv(t,e,n){t=Pv.call(this,t)||this;return t.type="geoJSON",t.geometries=e,n=n?[n[0],n[1]]:[(e=t.getBoundingRect()).x+e.width/2,e.y+e.height/2],t._center=n,t}var Nv,Ev=(u(zv,Nv=Lr),zv.prototype.getCenter=function(){return this._center||(this._center=this._calculateCenter())},zv.prototype._calculateCenter=function(){for(var t=this._elOnlyForCalculate,e=t.getBoundingRect(),e=[e.x+e.width/2,e.y+e.height/2],n=ii(kv),i=t;i&&!i.isGeoSVGGraphicRoot;)ri(n,i.getLocalTransform(),n),i=i.parent;return ui(n,n),Ot(e,e,n),e},zv);function zv(t,e){t=Nv.call(this,t)||this;return t.type="geoSVG",t._elOnlyForCalculate=e,t}var Bv=ct(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Vv=(Gv.prototype.load=function(){var t,n,i,e=this._firstGraphic;return e||(e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone(),t=e.named,n=[],i=ct(),E(t,function(t){var e;null==t.namedFrom&&(e=new Ev(t.name,t.el),n.push(e),i.set(t.name,e))}),t=(e={regions:n,regionsMap:i}).regions,e=e.regionsMap,this._regions=t,this._regionsMap=e),{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},Gv.prototype._buildGraphic=function(t){var e,n,i,o;try{ot(null!=(n=(e=t&&(i=t,o={ignoreViewBox:!0,ignoreRootClip:!0},(new hv).parse(i,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var r=new io;r.add(n),r.isGeoSVGGraphicRoot=!0;var a,s,l,u,h=e.width,c=e.height,p=e.viewBoxRect,d=this._boundingRect;d||(u=l=s=a=void 0,null!=h?(a=0,l=h):p&&(a=p.x,l=p.width),null!=c?(s=0,u=c):p&&(s=p.y,u=p.height),null!=a&&null!=s||(c=n.getBoundingRect(),null==a&&(a=c.x,l=c.width),null==s&&(s=c.y,u=c.height)),d=this._boundingRect=new Li(a,s,l,u)),p&&(p=Tv(p,d),n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y),r.setClipPath(new Fs({shape:d.plain()}));var f=[];return E(e.named,function(t){null!=Bv.get(t.svgNodeTagLower)&&(f.push(t),(t=t.el).silent=!1,t.isGroup&&t.traverse(function(t){t.silent=!1}))}),{root:r,boundingRect:d,named:f}},Gv.prototype.useGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),e.set(t,n),n)},Gv.prototype.freeGraphic=function(t){var e=this._usedGraphicMap,n=e.get(t);n&&(e.removeKey(t),this._freedGraphics.push(n))},Gv);function Gv(t,e){this.type="geoSVG",this._usedGraphicMap=ct(),this._freedGraphics=[],this._mapName=t,this._parsedXML=rv(e)}function Fv(t,e,n){for(var i=[],o=e[0],r=e[1],a=0;a<t.length;a+=2){var s=(s=t.charCodeAt(a)-64)>>1^-(1&s),l=(l=t.charCodeAt(a+1)-64)>>1^-(1&l),o=s+=o,r=l+=r;i.push([s/n,l/n])}return i}function Hv(t,o){return L(R((t=function(t){if(!t.UTF8Encoding)return t;var e=(t=t).UTF8Scale;null==e&&(e=1024);for(var n=t.features,i=0;i<n.length;i++){var o=n[i].geometry;if("Polygon"===o.type)for(var r=o.coordinates,a=0;a<r.length;a++)r[a]=Fv(r[a],o.encodeOffsets[a],e);else if("MultiPolygon"===o.type)for(r=o.coordinates,a=0;a<r.length;a++)for(var s=r[a],l=0;l<s.length;l++)s[l]=Fv(s[l],o.encodeOffsets[a][l],e)}return t.UTF8Encoding=!1,t}(t)).features,function(t){return t.geometry&&t.properties&&0<t.geometry.coordinates.length}),function(t){var e=t.properties,t=t.geometry,n=[];"Polygon"===t.type&&(i=t.coordinates,n.push({type:"polygon",exterior:i[0],interiors:i.slice(1)})),"MultiPolygon"===t.type&&E(i=t.coordinates,function(t){t[0]&&n.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})});var i=new Ov(e[o||"name"],n,e.cp);return i.properties=e,i})}for(var Wv=[126,25],Uv=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Yv=0;Yv<Uv.length;Yv++)for(var Xv=0;Xv<Uv[Yv].length;Xv++)Uv[Yv][Xv][0]/=10.5,Uv[Yv][Xv][1]/=-14,Uv[Yv][Xv][0]+=Wv[0],Uv[Yv][Xv][1]+=Wv[1];var Zv={"南海诸岛":[32,80],"广东":[0,-10],"香港":[10,5],"澳门":[-10,10],"天津":[5,5]};var jv={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var qv=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Kv=($v.prototype.load=function(n,t){t=t||"name";var e,i=this._parsedMap.get(t);i||(e=this._parseToRegions(t),i=this._parsedMap.set(t,{regions:e,boundingRect:function(t){for(var e,n=0;n<t.length;n++){var i=t[n].getBoundingRect();(e=e||i.clone()).union(i)}return e}(e)}));var o=ct(),r=[];return E(i.regions,function(t){var e=t.name;n&&n.hasOwnProperty(e)&&(t=t.cloneShallow(e=n[e])),r.push(t),o.set(e,t)}),{regions:r,boundingRect:i.boundingRect||new Li(0,0,0,0),regionsMap:o}},$v.prototype._parseToRegions=function(t){var e,r=this._mapName,n=this._geoJSON;try{e=n?Hv(n,t):[]}catch(t){throw new Error("Invalid geoJson format\n"+t.message)}return function(t,e){if("china"===t){for(var n=0;n<e.length;n++)if("南海诸岛"===e[n].name)return;e.push(new Ov("南海诸岛",L(Uv,function(t){return{type:"polygon",exterior:t}}),Wv))}}(r,e),E(e,function(t){var e,n,i,o=t.name;n=t,"china"!==(i=r)||(e=Zv[n.name])&&((i=n.getCenter())[0]+=e[0]/10.5,i[1]+=-e[1]/14,n.setCenter(i)),n=t,"world"!==(i=r)||(i=jv[n.name])&&(i=[i[0],i[1]],n.setCenter(i)),i=t,"china"===r&&"台湾"===i.name&&i.geometries.push({type:"polygon",exterior:qv[0]});o=this._specialAreas&&this._specialAreas[o];o&&t.transformTo(o.left,o.top,o.width,o.height)},this),e},$v.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},$v);function $v(t,e,n){this.type="geoJSON",this._parsedMap=ct(),this._mapName=t,this._specialAreas=n,this._geoJSON=H(e=e)?"undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")():e}var Jv=ct(),Qv=function(t,e,n){var i;n=e.svg?new Vv(t,e.svg):((i=e.geoJson||e.geoJSON)&&!e.features?n=e.specialAreas:i=e,new Kv(t,i,n)),Jv.set(t,n)},t_=function(t){return Jv.get(t)},e_=function(t){t=Jv.get(t);return t&&"geoJSON"===t.type&&t.getMapForUser()},n_=function(t,e,n){var i=Jv.get(t);if(i)return i.load(e,n);console.error("Map "+t+" not exists. The GeoJSON of the map must be provided.")},i_=new Gt,o_="undefined"!=typeof window,Xc={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},r_="__flagInMainProcess",a_="__pendingUpdate",s_="__needsUpdateStatus",l_=/^[a-zA-Z0-9_]+$/,u_="__connectUpdateStatus";function h_(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(!this.isDisposed())return p_(this,n,t);W_(this.id)}}function c_(n){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return p_(this,n,t)}}function p_(t,e,n){return n[0]=n[0]&&n[0].toLowerCase(),Gt.prototype[e].apply(t,n)}var d_,f_=(u(g_,d_=Gt),g_);function g_(){return null!==d_&&d_.apply(this,arguments)||this}var y_,m_,v_,__,x_,b_,w_,S_,M_,I_,T_,C_,D_,A_,k_,L_,P_,O_,R_,Rg=f_.prototype;Rg.on=c_("on"),Rg.off=c_("off");var N_,E_=(u(z_,N_=Gt),z_.prototype._onframe=function(){if(!this._disposed){R_(this);var t=this._scheduler;if(this[a_]){var e=this[a_].silent;this[r_]=!0,y_(this),__.update.call(this,null,this[a_].updateParams),this._zr.flush(),this[r_]=!1,this[a_]=null,S_.call(this,e),M_.call(this,e)}else if(t.unfinished){var n=1,i=this._model,o=this._api;t.unfinished=!1;do{var r=+new Date}while(t.performSeriesTasks(i),t.performDataProcessorTasks(i),b_(this,i),t.performVisualTasks(i),k_(this,this._model,o,"remain",{}),0<(n-=+new Date-r)&&t.unfinished);t.unfinished||this._zr.flush()}}},z_.prototype.getDom=function(){return this._dom},z_.prototype.getId=function(){return this.id},z_.prototype.getZr=function(){return this._zr},z_.prototype.setOption=function(t,e,n){var i,o,r,a,s;ot(!this[r_],"`setOption` should not be called during main process."),this._disposed?W_(this.id):(Y(e)&&(n=e.lazyUpdate,i=e.silent,o=e.replaceMerge,s=e.transition,e=e.notMerge),this[r_]=!0,this._model&&!e||(r=new hf(this._api),a=this._theme,(e=this._model=new Jd).scheduler=this._scheduler,e.init(null,null,null,a,this._locale,r)),this._model.setOption(t,{replaceMerge:o},Z_),s={seriesTransition:s,optionChanged:!0},n?(this[a_]={silent:i,updateParams:s},this[r_]=!1,this.getZr().wakeUp()):(y_(this),__.update.call(this,null,s),this._zr.flush(),this[a_]=null,this[r_]=!1,S_.call(this,i),M_.call(this,i)))},z_.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},z_.prototype.getModel=function(){return this._model},z_.prototype.getOption=function(){return this._model&&this._model.getOption()},z_.prototype.getWidth=function(){return this._zr.getWidth()},z_.prototype.getHeight=function(){return this._zr.getHeight()},z_.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||o_&&window.devicePixelRatio||1},z_.prototype.getRenderedCanvas=function(t){if(w.canvasSupported)return t=t||{},this._zr.painter.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},z_.prototype.getSvgDataURL=function(){if(w.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),function(t){t.stopAnimation(null,!0)}),t.painter.toDataURL()}},z_.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],o=this;E(e,function(t){n.eachComponent({mainType:t},function(t){t=o._componentsMap[t.__viewId];t.group.ignore||(i.push(t),t.group.ignore=!0)})});t="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return E(i,function(t){t.group.ignore=!1}),t}W_(this.id)},z_.prototype.getConnectedDataURL=function(i){if(this._disposed)W_(this.id);else if(w.canvasSupported){var o="svg"===i.type,r=this.group,a=Math.min,s=Math.max;if(J_[r]){var l=1/0,u=1/0,h=-1/0,c=-1/0,p=[],e=i&&i.pixelRatio||this.getDevicePixelRatio();E($_,function(t,e){var n;t.group===r&&(n=o?t.getZr().painter.getSvgDom().innerHTML:t.getRenderedCanvas(S(i)),t=t.getDom().getBoundingClientRect(),l=a(t.left,l),u=a(t.top,u),h=s(t.right,h),c=s(t.bottom,c),p.push({dom:n,left:t.left,top:t.top}))});var t=(h*=e)-(l*=e),n=(c*=e)-(u*=e),d=D(),f=ho(d,{renderer:o?"svg":"canvas"});if(f.resize({width:t,height:n}),o){var g="";return E(p,function(t){var e=t.left-l,n=t.top-u;g+='<g transform="translate('+e+","+n+')">'+t.dom+"</g>"}),f.painter.getSvgRoot().innerHTML=g,i.connectedBackgroundColor&&f.painter.setBackgroundColor(i.connectedBackgroundColor),f.refreshImmediately(),f.painter.toDataURL()}return i.connectedBackgroundColor&&f.add(new Fs({shape:{x:0,y:0,width:t,height:n},style:{fill:i.connectedBackgroundColor}})),E(p,function(t){t=new Ps({style:{x:t.left*e-l,y:t.top*e-u,image:t.dom}});f.add(t)}),f.refreshImmediately(),d.toDataURL("image/"+(i&&i.type||"png"))}return this.getDataURL(i)}},z_.prototype.convertToPixel=function(t,e){return x_(this,"convertToPixel",t,e)},z_.prototype.convertFromPixel=function(t,e){return x_(this,"convertFromPixel",t,e)},z_.prototype.containPixel=function(t,i){var o;if(!this._disposed)return E(cr(this._model,t),function(t,n){0<=n.indexOf("Models")&&E(t,function(t){var e=t.coordinateSystem;e&&e.containPoint?o=o||!!e.containPoint(i):"seriesModels"===n?(e=this._chartsMap[t.__viewId])&&e.containPoint?o=o||e.containPoint(i,t):console.warn(n+": "+(e?"The found component do not support containPoint.":"No view mapping to the found component.")):console.warn(n+": containPoint is not supported")},this)},this),!!o;W_(this.id)},z_.prototype.getVisual=function(t,e){var n=cr(this._model,t,{defaultMainType:"series"}),t=n.seriesModel;t||console.warn("There is no specified seires model");t=t.getData(),n=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?t.indexOfRawIndex(n.dataIndex):null;return null!=n?fm(t,n,e):gm(t,e)},z_.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},z_.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},z_.prototype._initEvents=function(){var t,n,i,l=this;E(H_,function(s){function t(t){var n,e,i,o=l.getModel(),r=t.target,a="globalout"===s;a?n={}:r&&_m(r,function(t){var e=il(t);if(e&&null!=e.dataIndex){t=e.dataModel||o.getSeriesByIndex(e.seriesIndex);return n=t&&t.getDataParams(e.dataIndex,e.dataType)||{},1}return e.eventData&&(n=P({},e.eventData),1)},!0),n&&(e=n.componentType,i=n.componentIndex,"markLine"!==e&&"markPoint"!==e&&"markArea"!==e||(e="series",i=n.seriesIndex),i=(e=e&&null!=i&&o.getComponent(e,i))&&l["series"===e.mainType?"_chartsMap":"_componentsMap"][e.__viewId],a||e&&i||console.warn("model or view can not be found by params"),n.event=t,n.type=s,l._$eventProcessor.eventInfo={targetEl:r,packedEvent:n,model:e,view:i},l.trigger(s,n))}t.zrEventfulCallAtLast=!0,l._zr.on(s,t,l)}),E(Y_,function(t,e){l._messageCenter.on(e,function(t){this.trigger(e,t)},l)}),E(["selectchanged"],function(e){l._messageCenter.on(e,function(t){this.trigger(e,t)},l)}),t=this._messageCenter,i=(n=this)._api,t.on("selectchanged",function(t){var e=i.getModel();t.isFromClick?(vm("map","selectchanged",n,e,t),vm("pie","selectchanged",n,e,t)):"select"===t.fromAction?(vm("map","selected",n,e,t),vm("pie","selected",n,e,t)):"unselect"===t.fromAction&&(vm("map","unselected",n,e,t),vm("pie","unselected",n,e,t))})},z_.prototype.isDisposed=function(){return this._disposed},z_.prototype.clear=function(){this._disposed?W_(this.id):this.setOption({series:[]},!0)},z_.prototype.dispose=function(){var t,e,n;this._disposed?W_(this.id):(this._disposed=!0,yr(this.getDom(),ex,""),e=(t=this)._api,n=t._model,E(t._componentsViews,function(t){t.dispose(n,e)}),E(t._chartsViews,function(t){t.dispose(n,e)}),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete $_[t.id])},z_.prototype.resize=function(t){var e,n;ot(!this[r_],"`resize` should not be called during main process."),this._disposed?W_(this.id):(this._zr.resize(t),n=this._model,this._loadingFX&&this._loadingFX.resize(),n&&(e=n.resetOption("media"),n=t&&t.silent,this[a_]&&(null==n&&(n=this[a_].silent),e=!0,this[a_]=null),this[r_]=!0,e&&y_(this),__.update.call(this,{type:"resize",animation:P({duration:0},t&&t.animation)}),this[r_]=!1,S_.call(this,n),M_.call(this,n)))},z_.prototype.showLoading=function(t,e){var n;this._disposed?W_(this.id):(Y(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),K_[t]?(n=K_[t](this._api,e),e=this._zr,this._loadingFX=n,e.add(n)):console.warn("Loading effects "+t+" not exists."))},z_.prototype.hideLoading=function(){this._disposed?W_(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},z_.prototype.makeActionFromEvent=function(t){var e=P({},t);return e.type=Y_[t.type],e},z_.prototype.dispatchAction=function(t,e){var n;this._disposed?W_(this.id):(Y(e)||(e={silent:!!e}),U_[t.type]&&this._model&&(this[r_]?this._pendingActions.push(t):(n=e.silent,w_.call(this,t,n),(e=e.flush)?this._zr.flush():!1!==e&&w.browser.weChat&&this._throttledZrFlush(),S_.call(this,n),M_.call(this,n))))},z_.prototype.updateLabelLayout=function(){i_.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},z_.prototype.appendData=function(t){var e;this._disposed?W_(this.id):(e=t.seriesIndex,e=this.getModel().getSeriesByIndex(e),ot(t.data&&e),e.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp())},z_.internalField=(y_=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),m_(t,!0),m_(t,!1),e.plan()},m_=function(t,r){for(var a=t._model,s=t._scheduler,l=r?t._componentsViews:t._chartsViews,u=r?t._componentsMap:t._chartsMap,h=t._zr,c=t._api,e=0;e<l.length;e++)l[e].__alive=!1;function n(t){var e=t.__requireNewView;t.__requireNewView=!1;var n,i="_ec_"+t.id+"_"+t.type,o=!e&&u[i];o||(n=wr(t.type),ot(e=r?Iy.getClass(n.main,n.sub):ky.getClass(n.sub),n.sub+" does not exist."),(o=new e).init(a,c),u[i]=o,l.push(o),h.add(o.group)),t.__viewId=o.__id=i,o.__alive=!0,o.__model=t,o.group.__ecComponentInfo={mainType:t.mainType,index:t.componentIndex},r||s.prepareView(o,t,a,c)}r?a.eachComponent(function(t,e){"series"!==t&&n(e)}):a.eachSeries(n);for(e=0;e<l.length;){var i=l[e];i.__alive?e++:(r||i.renderTask.dispose(),h.remove(i.group),i.dispose(a,c),l.splice(e,1),u[i.__id]===i&&delete u[i.__id],i.__id=i.group.__ecComponentInfo=null)}},v_=function(r,e,a,n,t){var i,s,o=r._model;function l(t){t&&t.__alive&&t[e]&&t[e](t.__model,o,r._api,a)}o.setUpdatePayload(a),n?((i={})[n+"Id"]=a[n+"Id"],i[n+"Index"]=a[n+"Index"],i[n+"Name"]=a[n+"Name"],i={mainType:n,query:i},t&&(i.subType=t),null!=(t=a.excludeSeriesId)&&(s=ct(),E(qo(t),function(t){t=nr(t,null);null!=t&&s.set(t,!0)})),iu(a)&&Ul(r._api),o&&o.eachComponent(i,function(t){var e,n,i,o;s&&null!==s.get(t.id)||(iu(a)?t instanceof yy?a.type!==fl||a.notBlur||function(t,e,n){var i,o=t.seriesIndex,r=t.getData(e.dataType),e=(G(e=lr(r,e))?e[0]:e)||0,a=r.getItemGraphicEl(e);if(!a)for(var s=r.count(),l=0;!a&&l<s;)a=r.getItemGraphicEl(l++);a?Yl(o,(i=il(a)).focus,i.blurScope,n):(i=t.get(["emphasis","focus"]),t=t.get(["emphasis","blurScope"]),null!=i&&Yl(o,i,t,n))}(t,a,r._api):(i=(n=Zl(t.mainType,t.componentIndex,a.name,r._api)).focusSelf,o=n.dispatchers,a.type===fl&&i&&!a.notBlur&&Xl(t.mainType,t.componentIndex,r._api),o&&E(o,function(t){(a.type===fl?zl:Bl)(t)})):nu(a)&&t instanceof yy&&(e=t,n=a,r._api,nu(n)&&(i=n.dataType,G(o=lr(e.getData(i),n))||(o=[o]),e[n.type===vl?"toggleSelect":n.type===yl?"select":"unselect"](o,i)),jl(t),O_(r)))},r),o&&o.eachComponent(i,function(t){s&&null!==s.get(t.id)||l(r["series"===n?"_chartsMap":"_componentsMap"][t.__viewId])},r)):E([].concat(r._componentsViews).concat(r._chartsViews),l)},__={prepareAndUpdate:function(t){y_(this),__.update.call(this,t,{optionChanged:null!=t.newOption})},update:function(t,e){var n=this._model,i=this._api,o=this._zr,r=this._coordSysMgr,a=this._scheduler;n&&(n.setUpdatePayload(t),a.restoreData(n,t),a.performSeriesTasks(n),r.create(n,i),a.performDataProcessorTasks(n,t),b_(this,n),r.update(n,i),C_(n),a.performVisualTasks(n,t),D_(this,n,i,t,e),t=n.get("backgroundColor")||"transparent",e=n.get("darkMode"),w.canvasSupported?(o.setBackgroundColor(t),null!=e&&"auto"!==e&&o.setDarkMode(e)):(t=cn(e=nn(t),"rgb"),0===e[3]&&(t="transparent")),i_.trigger("afterupdate",n,i))},updateTransform:function(n){var i,o,r=this,a=this._model,s=this._api;a&&(a.setUpdatePayload(n),i=[],a.eachComponent(function(t,e){"series"===t||(t=r.getViewOfComponentModel(e))&&t.__alive&&(!t.updateTransform||(e=t.updateTransform(e,a,s,n))&&e.update)&&i.push(t)}),o=ct(),a.eachSeries(function(t){var e=r._chartsMap[t.__viewId];(!e.updateTransform||(e=e.updateTransform(t,a,s,n))&&e.update)&&o.set(t.uid,1)}),C_(a),this._scheduler.performVisualTasks(a,n,{setDirty:!0,dirtyMap:o}),k_(this,a,s,n,{},o),i_.trigger("afterupdate",a,s))},updateView:function(t){var e=this._model;e&&(e.setUpdatePayload(t),ky.markUpdateMethod(t,"updateView"),C_(e),this._scheduler.performVisualTasks(e,t,{setDirty:!0}),D_(this,e,this._api,t,{}),i_.trigger("afterupdate",e,this._api))},updateVisual:function(n){var i=this,o=this._model;o&&(o.setUpdatePayload(n),o.eachSeries(function(t){t.getData().clearAllVisual()}),ky.markUpdateMethod(n,"updateVisual"),C_(o),this._scheduler.performVisualTasks(o,n,{visualType:"visual",setDirty:!0}),o.eachComponent(function(t,e){"series"===t||(t=i.getViewOfComponentModel(e))&&t.__alive&&t.updateVisual(e,o,i._api,n)}),o.eachSeries(function(t){i._chartsMap[t.__viewId].updateVisual(t,o,i._api,n)}),i_.trigger("afterupdate",o,this._api))},updateLayout:function(t){__.update.call(this,t)}},x_=function(t,e,n,i){if(t._disposed)W_(t.id);else{for(var o,r=t._model,a=t._coordSysMgr.getCoordinateSystems(),s=cr(r,n),l=0;l<a.length;l++){var u=a[l];if(u[e]&&null!=(o=u[e](r,s,i)))return o}console.warn("No coordinate system that supports "+e+" found by the given finder.")}},b_=function(t,e){var n=t._chartsMap,i=t._scheduler;e.eachSeries(function(t){i.updateStreamModes(t,n[t.__viewId])})},w_=function(i,t){var o=this,e=this.getModel(),n=i.type,r=i.escapeConnect,a=U_[n],s=a.actionInfo,l=(s.update||"update").split(":"),u=l.pop(),h=null!=l[0]&&wr(l[0]);this[r_]=!0;var c=[i],l=!1;i.batch&&(l=!0,c=L(i.batch,function(t){return(t=A(P({},t),i)).batch=null,t}));var p,d,f=[],g=nu(i),y=iu(i);E(c,function(t){var e,n;(p=(p=a.action(t,o._model,o._api))||P({},t)).type=s.event||p.type,f.push(p),y?(n=(e=pr(i)).queryOptionMap,n=e.mainTypeSpecified?n.keys()[0]:"series",v_(o,u,t,n),O_(o)):g?(v_(o,u,t,"series"),O_(o)):h&&v_(o,u,t,h.main,h.sub)}),"none"===u||y||g||h||(this[a_]?(y_(this),__.update.call(this,i),this[a_]=null):__[u].call(this,i)),p=l?{type:s.event||n,escapeConnect:r,batch:f}:f[0],this[r_]=!1,t||((t=this._messageCenter).trigger(p.type,p),g&&(e={type:"selectchanged",escapeConnect:r,selected:(d=[],e.eachSeries(function(n){E(n.getAllData(),function(t){t.data;var e=t.type,t=n.getSelectedDataIndices();0<t.length&&(t={dataIndex:t,seriesIndex:n.seriesIndex},null!=e&&(t.dataType=e),d.push(t))})}),d),isFromClick:i.isFromClick||!1,fromAction:i.type,fromActionPayload:i},t.trigger(e.type,e)))},S_=function(t){for(var e=this._pendingActions;e.length;){var n=e.shift();w_.call(this,n,t)}},M_=function(t){t||this.trigger("updated")},I_=function(e,n){e.on("rendered",function(t){n.trigger("rendered",t),!e.animation.isFinished()||n[a_]||n._scheduler.unfinished||n._pendingActions.length||n.trigger("finished")})},T_=function(t,n){t.on("mouseover",function(t){var e=_m(t.target,eu);e&&(function(t,e,n){eu(t)||Ho("param should be highDownDispatcher");var i=il(t),o=(r=Zl(i.componentMainType,i.componentIndex,i.componentHighDownName,n)).dispatchers,r=r.focusSelf;o?(r&&Xl(i.componentMainType,i.componentIndex,n),E(o,function(t){return Nl(t,e)})):(Yl(i.seriesIndex,i.focus,i.blurScope,n),"self"===i.focus&&Xl(i.componentMainType,i.componentIndex,n),Nl(t,e))}(e,t,n._api),O_(n))}).on("mouseout",function(t){var e=_m(t.target,eu);e&&(function(t,e,n){eu(t)||Ho("param should be highDownDispatcher"),Ul(n);var i=il(t);(n=Zl(i.componentMainType,i.componentIndex,i.componentHighDownName,n).dispatchers)?E(n,function(t){return El(t,e)}):El(t,e)}(e,t,n._api),O_(n))}).on("click",function(t){var e=_m(t.target,function(t){return null!=il(t).dataIndex},!0);e&&(t=e.selected?"unselect":"select",e=il(e),n._api.dispatchAction({type:t,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0}))})},C_=function(t){t.clearColorPalette(),t.eachSeries(function(t){t.clearColorPalette()})},D_=function(t,e,n,i,o){A_(t,e,n,i,o),E(t._chartsViews,function(t){t.__alive=!1}),k_(t,e,n,i,o),E(t._chartsViews,function(t){t.__alive||t.remove(e,n)})},A_=function(t,n,i,o,e,r){E(r||t._componentsViews,function(t){var e=t.__model;G_(0,t),t.render(e,n,i,o),V_(e,t),F_(e,t)})},k_=function(i,t,e,o,n,r){var a=i._scheduler;n=P(n||{},{updatedSeries:t.getSeries()}),i_.trigger("series:beforeupdate",t,e,n);var s,l,u,h,c=!1;t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];e.__alive=!0;var n=e.renderTask;a.updatePayload(n,o),G_(0,e),r&&r.get(t.uid)&&n.dirty(),n.perform(a.getPerformArgs(n))&&(c=!0),e.group.silent=!!t.get("silent"),function(t,e){var n=t.get("blendMode")||null;!w.canvasSupported&&n&&"source-over"!==n&&console.warn("Only canvas support blendMode");e.group.traverse(function(t){t.isGroup||(t.style.blend=n),t.eachPendingDisplayable&&t.eachPendingDisplayable(function(t){t.style.blend=n})})}(t,e),jl(t)}),a.unfinished=c||a.unfinished,i_.trigger("series:layoutlabels",t,e,n),i_.trigger("series:transition",t,e,n),t.eachSeries(function(t){var e=i._chartsMap[t.__viewId];V_(t,e),F_(t,e)}),l=t,u=(s=i)._zr.storage,h=0,u.traverse(function(t){t.isGroup||h++}),h>l.get("hoverLayerThreshold")&&!w.node&&!w.worker&&l.eachSeries(function(t){t.preventUsingHoverLayer||(t=s._chartsMap[t.__viewId]).__alive&&t.group.traverse(function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)})}),i_.trigger("series:afterupdate",t,e,n)},O_=function(t){t[s_]=!0,t.getZr().wakeUp()},R_=function(t){t[s_]&&(t.getZr().storage.traverse(function(t){Jh(t)||B_(t)}),t[s_]=!1)},L_=function(n){return u(t,e=of),t.prototype.getCoordinateSystems=function(){return n._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return n._model.getComponent(e.mainType,e.index);t=t.parent}},t.prototype.enterEmphasis=function(t,e){zl(t,e),O_(n)},t.prototype.leaveEmphasis=function(t,e){Bl(t,e),O_(n)},t.prototype.enterBlur=function(t){Vl(t),O_(n)},t.prototype.leaveBlur=function(t){Gl(t),O_(n)},t.prototype.enterSelect=function(t){Fl(t),O_(n)},t.prototype.leaveSelect=function(t){Hl(t),O_(n)},t.prototype.getModel=function(){return n.getModel()},t.prototype.getViewOfComponentModel=function(t){return n.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return n.getViewOfSeriesModel(t)},new t(n);function t(){return null!==e&&e.apply(this,arguments)||this}var e},void(P_=function(i){function o(t,e){for(var n=0;n<t.length;n++)t[n][u_]=e}E(Y_,function(t,e){i._messageCenter.on(e,function(t){var e,n;J_[i.group]&&0!==i[u_]&&(t&&t.escapeConnect||(e=i.makeActionFromEvent(t),n=[],E($_,function(t){t!==i&&t.group===i.group&&n.push(t)}),o(n,0),E(n,function(t){1!==t[u_]&&t.dispatchAction(e)}),o(n,2)))})})})),z_);function z_(t,e,n){var i=N_.call(this,new pm)||this;i._chartsViews=[],i._chartsMap={},i._componentsViews=[],i._componentsMap={},i._pendingActions=[],n=n||{},"string"==typeof e&&(e=q_[e]),i._dom=t;var o="canvas",r=!1,a=o_?window:global,o=a.__ECHARTS__DEFAULT__RENDERER__||o,a=a.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,r=null==a?r:a,r=i._zr=ho(t,{renderer:n.renderer||o,devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,useDirtyRect:null==n.useDirtyRect?r:n.useDirtyRect});i._throttledZrFlush=Gy(B(r.flush,r),17),(e=S(e))&&kf(e,!0),i._theme=e,i._locale=function(t){if(H(t)){var e=up[t.toUpperCase()]||{};return t===ap||t===sp?S(e):b(S(e),S(up[lp]),!1)}return b(S(t),S(up[lp]),!1)}(n.locale||cp),i._coordSysMgr=new sf;n=i._api=L_(i);function s(t,e){return t.__prio-e.__prio}return Ce(j_,s),Ce(X_,s),i._scheduler=new Ky(i,n,X_,j_),i._messageCenter=new f_,i._initEvents(),i.resize=B(i.resize,i),r.animation.on("frame",i._onframe,i),I_(r,i),T_(r,i),st(i),i}function B_(t){for(var e=[],n=t.currentStates,i=0;i<n.length;i++){var o=n[i];"emphasis"!==o&&"blur"!==o&&"select"!==o&&e.push(o)}t.selected&&t.states.select&&e.push("select"),t.hoverState===ul&&t.states.emphasis?e.push("emphasis"):t.hoverState===ll&&t.states.blur&&e.push("blur"),t.useStates(e)}function V_(t,e){t.preventAutoZ||!function t(e,n,i,o){var r=e.getTextContent();var a=e.getTextGuideLine();var s=e.isGroup;if(s)for(var l=e.childrenRef(),u=0;u<l.length;u++)o=Math.max(t(l[u],n,i,o),o);else e.z=n,e.zlevel=i,o=Math.max(e.z2,o);r&&(r.z=n,r.zlevel=i,isFinite(o)&&(r.z2=o+2));a&&(e=e.textGuideLineConfig,a.z=n,a.zlevel=i,isFinite(o)&&(a.z2=o+(e&&e.showAbove?1:-1)));return o}(e.group,t.get("z")||0,t.get("zlevel")||0,-1/0)}function G_(t,e){e.group.traverse(function(t){var e,n;Jh(t)||(e=t.getTextContent(),n=t.getTextGuideLine(),t.stateTransition&&(t.stateTransition=null),e&&e.stateTransition&&(e.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),t.hasState()?(t.prevStates=t.currentStates,t.clearStates()):t.prevStates&&(t.prevStates=null))})}function F_(t,e){var n=t.getModel("stateAnimation"),o=t.isAnimationEnabled(),t=n.get("duration"),r=0<t?{duration:t,delay:n.get("delay"),easing:n.get("easing")}:null;e.group.traverse(function(t){var e,n,i;t.states&&t.states.emphasis&&(Jh(t)||(t instanceof Ss&&((i=al(n=t)).normalFill=n.style.fill,i.normalStroke=n.style.stroke,n=n.states.select||{},i.selectFill=n.style&&n.style.fill||null,i.selectStroke=n.style&&n.style.stroke||null),!t.__dirty||(e=t.prevStates)&&t.useStates(e),o&&(t.stateTransition=r,n=t.getTextContent(),e=t.getTextGuideLine(),n&&(n.stateTransition=r),e&&(e.stateTransition=r)),t.__dirty&&B_(t)))})}n=E_.prototype;n.on=h_("on"),n.off=h_("off"),n.one=function(i,o,t){var r=this;Wo("ECharts#one is deprecated."),this.on.call(this,i,function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];o&&o.apply&&o.apply(this,e),r.off(i,t)},t)};var H_=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function W_(t){console.warn("Instance "+t+" has been disposed")}var U_={},Y_={},X_=[],Z_=[],j_=[],q_={},K_={},$_={},J_={},Q_=+new Date,tx=+new Date,ex="_echarts_instance_";function nx(t){J_[t]=!1}Lr=nx;function ix(t){return $_[e=ex,(t=t).getAttribute?t.getAttribute(e):t[e]];var e}function ox(t,e){q_[t]=e}function rx(t){C(Z_,t)<0&&Z_.push(t)}function ax(t,e){gx(X_,t,e,2e3)}function sx(t){ux("afterinit",t)}function lx(t){ux("afterupdate",t)}function ux(t,e){i_.on(t,e)}function hx(t,e,n){"function"==typeof e&&(n=e,e="");var i=Y(t)?t.type:[t,t={event:e}][0];t.event=(t.event||i).toLowerCase(),e=t.event,Y_[e]||(ot(l_.test(i)&&l_.test(e)),U_[i]||(U_[i]={action:n,actionInfo:t}),Y_[e]=i)}function cx(t,e){sf.register(t,e)}function px(t,e){gx(j_,t,e,1e3,"layout")}function dx(t,e){gx(j_,t,e,3e3,"visual")}var fx=[];function gx(t,e,n,i,o){if((F(e)||Y(e))&&(n=e,e=i),1,isNaN(e)||null==e)throw new Error("Illegal priority");E(t,function(t){ot(t.__raw!==n)}),0<=C(fx,n)||(fx.push(n),(o=Ky.wrapStageHandler(n,o)).__prio=e,o.__raw=n,t.push(o))}function yx(t,e){K_[t]=e}function mx(t,e,n){Qv(t,e,n)}Rg=function(t){var e=(t=S(t)).type;e||Xo("Must have a `type` when `registerTransform`.");var n=e.split(":");2!==n.length&&Xo('Name must include namespace like "ns:regression".');var i=!1;"echarts"===n[0]&&(e=n[1],i=!0),t.__isBuiltIn=i,kg.set(e,t)};dx(2e3,Zy),dx(4500,Uf),dx(4500,Ah),dx(2e3,$i),dx(4500,r),dx(7e3,function(e,i){e.eachRawSeries(function(t){var n;e.isSeriesFiltered(t)||((n=t.getData()).hasItemVisual()&&n.each(function(t){var e=n.getItemVisual(t,"decal");e&&(n.ensureUniqueItemVisual(t,"style").decal=iv(e,i))}),(t=n.getVisual("decal"))&&(n.getVisual("style").decal=iv(t,i)))})}),rx(kf),ax(900,function(t){var i=ct();t.eachSeries(function(t){var e,n=t.get("stack");n&&(e=i.get(n)||i.set(n,[]),(t={stackResultDimension:(n=t.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:t}).stackedDimension&&(t.isStackedByIndex||t.stackedByDimension)&&(e.length&&n.setCalculationInfo("stackedOnSeries",e[e.length-1].seriesModel),e.push(t)))}),i.each(Lf)}),yx("default",function(i,o){A(o=o||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new io,r=new Fs({style:{fill:o.maskColor},zlevel:o.zlevel,z:1e4});t.add(r);var a,s=new Xs({style:{text:o.text,fill:o.textColor,fontSize:o.fontSize,fontWeight:o.fontWeight,fontStyle:o.fontStyle,fontFamily:o.fontFamily},zlevel:o.zlevel,z:10001}),l=new Fs({style:{fill:"none"},textContent:s,textConfig:{position:"right",distance:10},zlevel:o.zlevel,z:10001});return t.add(l),o.showSpinner&&((a=new Mh({shape:{startAngle:-qy/2,endAngle:-qy/2+.1,r:o.spinnerRadius},style:{stroke:o.color,lineCap:"round",lineWidth:o.lineWidth},zlevel:o.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*qy/2}).start("circularInOut"),a.animateShape(!0).when(1e3,{startAngle:3*qy/2}).delay(300).start("circularInOut"),t.add(a)),t.resize=function(){var t=s.getBoundingRect().width,e=o.showSpinner?o.spinnerRadius:0,n=(i.getWidth()-2*e-(o.showSpinner&&t?10:0)-t)/2-(o.showSpinner&&t?0:5+t/2)+(o.showSpinner?0:t/2)+(t?0:e),t=i.getHeight()/2;o.showSpinner&&a.setShape({cx:n,cy:t}),l.setShape({x:n-e,y:t-e,width:2*e,height:2*e}),r.setShape({x:0,y:0,width:i.getWidth(),height:i.getHeight()})},t.resize(),t}),hx({type:fl,event:fl,update:fl},gt),hx({type:gl,event:gl,update:gl},gt),hx({type:yl,event:yl,update:yl},gt),hx({type:ml,event:ml,update:ml},gt),hx({type:vl,event:vl,update:vl},gt),ox("light",f),ox("dark",_d);var vx=[],_x={registerPreprocessor:rx,registerProcessor:ax,registerPostInit:sx,registerPostUpdate:lx,registerUpdateLifecycle:ux,registerAction:hx,registerCoordinateSystem:cx,registerLayout:px,registerVisual:dx,registerTransform:Rg,registerLoading:yx,registerMap:mx,PRIORITY:Xc,ComponentModel:yd,ComponentView:Iy,SeriesModel:yy,ChartView:ky,registerComponentModel:function(t){yd.registerClass(t)},registerComponentView:function(t){Iy.registerClass(t)},registerSeriesModel:function(t){yy.registerClass(t)},registerChartView:function(t){ky.registerClass(t)},registerSubTypeDefaulter:function(t,e){yd.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){co(t,e)}};function xx(t){G(t)?E(t,function(t){xx(t)}):0<=C(vx,t)||(vx.push(t),(t=F(t)?{install:t}:t).install(_x))}function bx(t){return null==t?0:t.length||1}function Sx(t){return t}var Mx=(Ix.prototype.add=function(t){return this._add=t,this},Ix.prototype.update=function(t){return this._update=t,this},Ix.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},Ix.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},Ix.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},Ix.prototype.remove=function(t){return this._remove=t,this},Ix.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},Ix.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),o=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var r=0;r<t.length;r++){var a,s=i[r],l=n[s],u=bx(l);1<u?(a=l.shift(),1===l.length&&(n[s]=l[0]),this._update&&this._update(a,r)):1===u?(n[s]=null,this._update&&this._update(l,r)):this._remove&&this._remove(r)}this._performRestAdd(o,n)},Ix.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},o=[],r=[];this._initIndexMap(t,n,o,"_oldKeyGetter"),this._initIndexMap(e,i,r,"_newKeyGetter");for(var a=0;a<o.length;a++){var s=o[a],l=n[s],u=i[s],h=bx(l),c=bx(u);if(1<h&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&1<c)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(1<h&&1<c)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(1<h)for(var p=0;p<h;p++)this._remove&&this._remove(l[p]);else this._remove&&this._remove(l)}this._performRestAdd(r,i)},Ix.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=e[i],r=bx(o);if(1<r)for(var a=0;a<r;a++)this._add&&this._add(o[a]);else 1===r&&this._add&&this._add(o);e[i]=null}},Ix.prototype._initIndexMap=function(t,e,n,i){for(var o=this._diffModeMultiple,r=0;r<t.length;r++){var a,s,l="_ec_"+this[i](t[r],r);o||(n[r]=l),e&&(0===(s=bx(a=e[l]))?(e[l]=r,o&&n.push(l)):1===s?e[l]=[a,r]:a.push(r))}},Ix);function Ix(t,e,n,i,o,r){this._old=t,this._new=e,this._oldKeyGetter=n||Sx,this._newKeyGetter=i||Sx,this.context=o,this._diffModeMultiple="multiple"===r}var Tx=(Cx.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},Cx.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},Cx);function Cx(t,e){this._encode=t,this._schema=e}function Dx(r,t){var e={},a=e.encode={},s=ct(),l=[],u=[],h={};E(r.dimensions,function(t){var e,n,i=r.getDimensionInfo(t),o=i.coordDim;o&&(ot(null==bd.get(o)),e=i.coordDimIndex,Ax(a,o)[e]=t,i.isExtraCoord||(s.set(o,1),"ordinal"===(n=i.type)||"time"===n||(l[0]=t),Ax(h,o)[e]=r.getDimensionIndex(i.name)),i.defaultTooltip&&u.push(t)),bd.each(function(t,e){var n=Ax(a,e),e=i.otherDims[e];null!=e&&!1!==e&&(n[e]=i.name)})});var i=[],o={};s.each(function(t,e){var n=a[e];o[e]=n[0],i=i.concat(n)}),e.dataDimsOnCoord=i,e.dataDimIndicesOnCoord=L(i,function(t){return r.getDimensionInfo(t).storeDimIndex}),e.encodeFirstDimNotExtra=o;var n=a.label;n&&n.length&&(l=n.slice());n=a.tooltip;return n&&n.length?u=n.slice():u.length||(u=l.slice()),a.defaultedLabel=l,a.defaultedTooltip=u,e.userOutput=new Tx(h,t),e}function Ax(t,e){return t.hasOwnProperty(e)||(t[e]=[]),t[e]}function kx(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Lx=function(t){this.otherDims={},null!=t&&P(this,t)},Px=ur(),Ox={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},Rx=(Nx.prototype.isDimensionOmitted=function(){return this._dimOmitted},Nx.prototype._updateDimOmitted=function(t){(this._dimOmitted=t)&&(this._dimNameMap||(this._dimNameMap=Bx(this.source)))},Nx.prototype.getSourceDimensionIndex=function(t){return tt(this._dimNameMap.get(t),-1)},Nx.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},Nx.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=Ff(this.source),n=!(30<t),i="",o=[],r=0,a=0;r<t;r++){var s,l=void 0,u=void 0,h=void 0,c=this.dimensions[a];c&&c.storeDimIndex===r?(l=e?c.name:null,u=c.type,h=c.ordinalMeta,a++):(s=this.getSourceDimension(r))&&(l=e?s.name:null,u=s.type),o.push({property:l,type:u,ordinalMeta:h}),!e||null==l||c&&c.isCalculationCoord||(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=Ox[u]||"f",h&&(i+=h.uid),i+="$"}var p=this.source;return{dimensions:o,hash:[p.seriesLayoutBy,p.startIndex,i].join("$$")}},Nx.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,o=this.dimensions[n];o&&o.storeDimIndex===e?(o.isCalculationCoord||(i=o.name),n++):(o=this.getSourceDimension(e))&&(i=o.name),t.push(i)}return t},Nx.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},Nx);function Nx(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}function Ex(t){return t instanceof Rx}function zx(t){for(var e=ct(),n=0;n<(t||[]).length;n++){var i=t[n],i=Y(i)?i.name:i;null!=i&&null==e.get(i)&&e.set(i,n)}return e}function Bx(t){var e=Px(t);return e.dimNameMap||(e.dimNameMap=zx(t.dimensionsDefine))}var Vx,Gx,Fx,Hx,Wx,Ux,Yx,Xx=Y,Zx=L,jx="undefined"==typeof Int32Array?Array:Int32Array,qx=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],Kx=["_approximateExtent"],$x=(Jx.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(null==e)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];t=this._dimIdxToName.get(e);if(null!=t)return t;e=this._schema.getSourceDimension(e);return e?e.name:void 0},Jx.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(null!=e)return e;if(null==t)return-1;e=this._getDimInfo(t);return e?e.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},Jx.prototype._recognizeDimIndex=function(t){if("number"==typeof t||null!=t&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},Jx.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);if(1,null==e)throw new Error("Unkown dimension "+t);return e},Jx.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},Jx.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(t){return e.hasOwnProperty(t)?e[t]:void 0}:function(t){return e[t]}},Jx.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},Jx.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(null==e)return n.encodeFirstDimNotExtra[t];t=n.encode[t];return t?t[e]:null},Jx.prototype.mapDimensionsAll=function(t){return(this._dimSummary.encode[t]||[]).slice()},Jx.prototype.getStore=function(){return this._store},Jx.prototype.initData=function(t,e,n){var i,o,r=this;(i=t instanceof Hg?t:i)||(o=this.dimensions,t=Nf(t)||k(t)?new Hf(t,o.length):t,i=new Hg,o=Zx(o,function(t){return{type:r._dimInfos[t].type,property:t}}),i.initData(t,o,n)),this._store=i,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,i.count()),this._dimSummary=Dx(this,this._schema),this.userOutput=this._dimSummary.userOutput},Jx.prototype.appendData=function(t){t=this._store.appendData(t);this._doInit(t[0],t[1])},Jx.prototype.appendValues=function(t,e){var t=this._store.appendValues(t,e.length),n=t.start,i=t.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var r=n;r<i;r++){var a=r-n;this._nameList[r]=e[a],o&&Yx(this,r)}},Jx.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},Jx.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return null==this._idDimIdx&&t.getSource().sourceFormat!==Td&&!t.fillStorage},Jx.prototype._doInit=function(t,e){if(!(e<=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList;if(n.getSource().sourceFormat===wd&&!n.pure)for(var r=[],a=t;a<e;a++){var s,l=n.getItem(a,r);this.hasItemOption||(!Y(s=l)||s instanceof Array)||(this.hasItemOption=!0),l&&(s=l.name,null==i[a]&&null!=s&&(i[a]=nr(s,null)),l=l.id,null==o[a]&&null!=l&&(o[a]=nr(l,null)))}if(this._shouldMakeIdFromName())for(a=t;a<e;a++)Yx(this,a);Vx(this)}},Jx.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},Jx.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},Jx.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},Jx.prototype.setCalculationInfo=function(t,e){Xx(t)?P(this._calculationInfo,t):this._calculationInfo[t]=e},Jx.prototype.getName=function(t){var e=this.getRawIndex(t),t=this._nameList[e];return t=null==(t=null==t&&null!=this._nameDimIdx?Fx(this,this._nameDimIdx,e):t)?"":t},Jx.prototype._getCategory=function(t,e){e=this._store.get(t,e),t=this._store.getOrdinalMeta(t);return t?t.categories[e]:e},Jx.prototype.getId=function(t){return Gx(this,this.getRawIndex(t))},Jx.prototype.count=function(){return this._store.count()},Jx.prototype.get=function(t,e){var n=this._store,t=this._dimInfos[t];if(t)return n.get(t.storeDimIndex,e)},Jx.prototype.getByRawIndex=function(t,e){var n=this._store,t=this._dimInfos[t];if(t)return n.getByRawIndex(t.storeDimIndex,e)},Jx.prototype.getIndices=function(){return this._store.getIndices()},Jx.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},Jx.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},Jx.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},Jx.prototype.getValues=function(t,e){var n=this,i=this._store;return G(t)?i.getValues(Zx(t,function(t){return n._getStoreDimIndex(t)}),e):i.getValues(t)},Jx.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},Jx.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},Jx.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},Jx.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},Jx.prototype.rawIndexOf=function(t,e){t=t&&this._invertedIndicesMap[t];if(1,!t)throw new Error("Do not supported yet");e=t[e];return null==e||isNaN(e)?-1:e},Jx.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},Jx.prototype.each=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]);n=n||this,t=Zx(Hx(t),this._getStoreDimIndex,this);this._store.each(t,n?B(e,n):e)},Jx.prototype.filterSelf=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]);n=n||this,t=Zx(Hx(t),this._getStoreDimIndex,this);return this._store=this._store.filter(t,n?B(e,n):e),this},Jx.prototype.selectRange=function(n){var i=this,o={};return E(z(n),function(t){var e=i._getStoreDimIndex(t);o[e]=n[t]}),this._store=this._store.selectRange(o),this},Jx.prototype.mapArray=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},Jx.prototype.map=function(t,e,n,i){n=n||i||this,i=Zx(Hx(t),this._getStoreDimIndex,this),t=Ux(this);return t._store=this._store.map(i,n?B(e,n):e),t},Jx.prototype.modify=function(t,e,n,i){var o=this,i=n||i||this;E(Hx(t),function(t){o.getDimensionInfo(t).isCalculationCoord||console.error("Danger: only stack dimension can be modified")});t=Zx(Hx(t),this._getStoreDimIndex,this);this._store.modify(t,i?B(e,i):e)},Jx.prototype.downSample=function(t,e,n,i){var o=Ux(this);return o._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),o},Jx.prototype.lttbDownSample=function(t,e){var n=Ux(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},Jx.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},Jx.prototype.getItemModel=function(t){var e=this.hostModel,t=this.getRawDataItem(t);return new ep(t,e,e&&e.ecModel)},Jx.prototype.diff=function(e){var n=this;return new Mx(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(t){return Gx(e,t)},function(t){return Gx(n,t)})},Jx.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},Jx.prototype.setVisual=function(t,e){this._visual=this._visual||{},Xx(t)?P(this._visual,t):this._visual[t]=e},Jx.prototype.getItemVisual=function(t,e){t=this._itemVisuals[t],t=t&&t[e];return null==t?this.getVisual(e):t},Jx.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},Jx.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t],t=(i=i||(n[t]={}))[e];return null==t&&(G(t=this.getVisual(e))?t=t.slice():Xx(t)&&(t=P({},t)),i[e]=t),t},Jx.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Xx(e)?P(i,e):i[e]=n},Jx.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},Jx.prototype.setLayout=function(t,e){if(Xx(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Jx.prototype.getLayout=function(t){return this._layout[t]},Jx.prototype.getItemLayout=function(t){return this._itemLayouts[t]},Jx.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?P(this._itemLayouts[t]||{},e):e},Jx.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},Jx.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;nl(n,this.dataType,t,e),this._graphicEls[t]=e},Jx.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},Jx.prototype.eachItemGraphicEl=function(n,i){E(this._graphicEls,function(t,e){t&&n&&n.call(i,t,e)})},Jx.prototype.cloneShallow=function(t){return t=t||new Jx(this._schema||Zx(this.dimensions,this._getDimInfo,this),this.hostModel),Wx(t,this),t._store=this._store,t},Jx.prototype.wrapMethod=function(t,e){var n=this[t];"function"==typeof n&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(nt(arguments)))})},Jx.internalField=(Vx=function(a){var s=a._invertedIndicesMap;E(s,function(t,e){var n=a._dimInfos[e],i=n.ordinalMeta,o=a._store;if(i){t=s[e]=new jx(i.categories.length);for(var r=0;r<t.length;r++)t[r]=-1;for(r=0;r<o.count();r++)t[o.get(n.storeDimIndex,r)]=r}})},Fx=function(t,e,n){return nr(t._getCategory(e,n),null)},Gx=function(t,e){var n=t._idList[e];return n=null==(n=null==n&&null!=t._idDimIdx?Fx(t,t._idDimIdx,e):n)?"e\0\0"+e:n},Hx=function(t){return t=!G(t)?null!=t?[t]:[]:t},Ux=function(t){var e=new Jx(t._schema||Zx(t.dimensions,t._getDimInfo,t),t.hostModel);return Wx(e,t),e},Wx=function(e,n){E(qx.concat(n.__wrappedMethods||[]),function(t){n.hasOwnProperty(t)&&(e[t]=n[t])}),e.__wrappedMethods=n.__wrappedMethods,E(Kx,function(t){e[t]=S(n[t])}),e._calculationInfo=P({},n._calculationInfo)},void(Yx=function(t,e){var n=t._nameList,i=t._idList,o=t._nameDimIdx,r=t._idDimIdx,a=n[e],s=i[e];null==a&&null!=o&&(n[e]=a=Fx(t,o,e)),null==s&&null!=r&&(i[e]=s=Fx(t,r,e)),null==s&&null!=a&&(s=a,1<(a=(t=t._nameRepeatCount)[a]=(t[a]||0)+1)&&(s+="__ec__"+a),i[e]=s)})),Jx);function Jx(t,e){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"];var n=!(this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"]);Ex(t)?(o=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,o=t);for(var i,o=o||["x","y"],r={},a=[],s={},l=!1,u={},h=0;h<o.length;h++){var c=o[h],p=H(c)?new Lx({name:c}):c instanceof Lx?c:new Lx(c),d=p.name;p.type=p.type||"float",p.coordDim||(p.coordDim=d,p.coordDimIndex=0);c=p.otherDims=p.otherDims||{};a.push(d),r[d]=p,null!=u[d]&&(l=!0),p.createInvertedIndices&&(s[d]=[]),0===c.itemName&&(this._nameDimIdx=h),0===c.itemId&&(this._idDimIdx=h),ot(n||0<=p.storeDimIndex),n&&(p.storeDimIndex=h)}this.dimensions=a,this._dimInfos=r,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted&&(i=this._dimIdxToName=ct(),E(a,function(t){i.set(r[t].storeDimIndex,t)}))}function Qx(t,e){Nf(t)||(t=zf(t));for(var n,i,o,r=(e=e||{}).coordDimensions||[],a=e.dimensionsDefine||t.dimensionsDefine||[],s=ct(),l=[],u=(n=t,d=r,i=a,h=e.dimensionsCount,o=Math.max(n.dimensionsDetectedCount||1,d.length,i.length,h||0),E(d,function(t){var e;Y(t)&&(e=t.dimsDef)&&(o=Math.max(o,e.length))}),o),h=e.canOmitUnusedDimensions&&30<u,c=a===t.dimensionsDefine,p=c?Bx(t):zx(a),d=e.encodeDefine,f=ct(d=!d&&e.encodeDefaulter?e.encodeDefaulter(t,u):d),g=new zg(u),y=0;y<g.length;y++)g[y]=-1;function m(t){var e=g[t];if(e<0){var n=a[t],i=Y(n)?n:{name:n},o=new Lx,n=i.name;null!=n&&null!=p.get(n)&&(o.name=o.displayName=n),null!=i.type&&(o.type=i.type),null!=i.displayName&&(o.displayName=i.displayName);i=l.length;return g[t]=i,o.storeDimIndex=t,l.push(o),o}return l[e]}if(!h)for(y=0;y<u;y++)m(y);f.each(function(t,n){var i,t=qo(t).slice();1===t.length&&!H(t[0])&&t[0]<0?f.set(n,!1):(i=f.set(n,[]),E(t,function(t,e){t=H(t)?p.get(t):t;null!=t&&t<u&&_(m(i[e]=t),n,e)}))});var v=0;function _(t,e,n){null!=bd.get(e)?t.otherDims[e]=n:(t.coordDim=e,t.coordDimIndex=n,s.set(e,!0))}E(r,function(t){var n,i,o,r;H(t)?(r=t,o={}):(r=(o=t).name,t=o.ordinalMeta,o.ordinalMeta=null,(o=P({},o)).ordinalMeta=t,n=o.dimsDef,i=o.otherDims,o.name=o.coordDim=o.coordDimIndex=o.dimsDef=o.otherDims=null);var e=f.get(r);if(!1!==e){if(!(e=qo(e)).length)for(var a=0;a<(n&&n.length||1);a++){for(;v<u&&null!=m(v).coordDim;)v++;v<u&&e.push(v++)}E(e,function(t,e){t=m(t);c&&null!=o.type&&(t.type=o.type),_(A(t,o),r,e),null==t.name&&n&&(Y(e=n[e])||(e={name:e}),t.name=t.displayName=e.name,t.defaultTooltip=e.defaultTooltip),i&&A(t.otherDims,i)})}});var x=e.generateCoord,b=null!=(w=e.generateCoordCount),w=x?w||1:0,S=x||"value";function M(t){null==t.name&&(t.name=t.coordDim)}if(h)E(l,function(t){M(t)}),l.sort(function(t,e){return t.storeDimIndex-e.storeDimIndex});else for(var I=0;I<u;I++){var T=m(I);null==T.coordDim&&(T.coordDim=function(t,e,n){var i=e.data;if(n||i.hasOwnProperty(t)){for(var o=0;i.hasOwnProperty(t+o);)o++;t+=o}return e.set(t,!0),t}(S,s,b),T.coordDimIndex=0,(!x||w<=0)&&(T.isExtraCoord=!0),w--),M(T),null!=T.type||Nd(t,I)!==kd.Must&&(!T.isExtraCoord||null==T.otherDims.itemName&&null==T.otherDims.seriesName)||(T.type="ordinal")}return function(t){for(var e=ct(),n=0;n<t.length;n++){var i=t[n],o=i.name,r=e.get(o)||0;0<r&&(i.name=o+(r-1)),r++,e.set(o,r)}}(l),new Rx({source:t,dimensions:l,fullDimensionCount:u,dimensionOmitted:h})}var tb=function(t){this.coordSysDims=[],this.axisMap=ct(),this.categoryAxisMap=ct(),this.coordSysName=t};var eb={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis",dr).models[0],r=t.getReferringComponents("yAxis",dr).models[0];if(1,!o)throw new Error('xAxis "'+Q(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!r)throw new Error('yAxis "'+Q(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found');e.coordSysDims=["x","y"],n.set("x",o),n.set("y",r),nb(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),nb(r)&&(i.set("y",r),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){t=t.getReferringComponents("singleAxis",dr).models[0];if(1,!t)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",t),nb(t)&&(i.set("single",t),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar",dr).models[0],t=o.findAxisModel("radiusAxis"),o=o.findAxisModel("angleAxis");if(1,!o)throw new Error("angleAxis option not found");if(!t)throw new Error("radiusAxis option not found");e.coordSysDims=["radius","angle"],n.set("radius",t),n.set("angle",o),nb(t)&&(i.set("radius",t),e.firstCategoryDimIndex=0),nb(o)&&(i.set("angle",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,i,o,r){var a=t.ecModel,t=a.getComponent("parallel",t.get("parallelIndex")),s=i.coordSysDims=t.dimensions.slice();E(t.parallelAxisIndex,function(t,e){var n=a.getComponent("parallelAxis",t),t=s[e];o.set(t,n),nb(n)&&(r.set(t,n),null==i.firstCategoryDimIndex&&(i.firstCategoryDimIndex=e))})}};function nb(t){return"category"===t.get("type")}function ib(t,e,n){var i,o,r,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;Ex(e.schema)?(o=e.schema,i=o.dimensions,r=e.store):i=e;var l,u,h,c,p,d,f=!(!t||!t.get("stack"));return E(i,function(t,e){H(t)&&(i[e]=t={name:t}),f&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))}),!u||a||l||(a=!0),u&&(h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0),p=u.coordDim,n=u.type,d=0,E(i,function(t){t.coordDim===p&&d++}),e={name:h,coordDim:p,coordDimIndex:d,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},t={name:c,coordDim:c,coordDimIndex:d+1,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1},o?(r&&(e.storeDimIndex=r.ensureCalculationDimension(c,n),t.storeDimIndex=r.ensureCalculationDimension(h,n)),o.appendCalculationDimension(e),o.appendCalculationDimension(t)):(i.push(e),i.push(t))),{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function ob(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function rb(t,e){return ob(t,e)?t.getCalculationInfo("stackResultDimension"):e}function ab(t,e,n){n=n||{};var i,o=e.getSourceManager(),r=!1;t?(r=!0,i=zf(t)):r=(i=o.getSource()).sourceFormat===wd;var a,s,l,u,h,c=function(t){var e=t.get("coordinateSystem"),n=new tb(e);if(e=eb[e])return e(t,n,n.axisMap,n.categoryAxisMap),n}(e),t=(a=c,t=(t=e).get("coordinateSystem"),t=sf.get(t),p=(p=a&&a.coordSysDims?L(a.coordSysDims,function(t){var e={name:t},t=a.axisMap.get(t);return t&&(t=t.get("type"),e.type=kx(t)),e}):p)||(t&&(t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice())||["x","y"])),p=n.useEncodeDefaulter,p=F(p)?p:p?V(Pd,t,e):null,t=Qx(i,{coordDimensions:t,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:p,canOmitUnusedDimensions:!r}),d=(p=t.dimensions,s=n.createInvertedIndices,(l=c)&&E(p,function(t,e){var n=t.coordDim,n=l.categoryAxisMap.get(n);n&&(null==u&&(u=e),t.ordinalMeta=n.getOrdinalMeta(),s&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(h=!0)}),h||null==u||(p[u].otherDims.itemName=0),u),p=r?null:o.getSharedDataStore(t),o=ib(e,{schema:t,store:p}),e=new $x(t,e);e.setCalculationInfo(o);o=null!=d&&function(t){if(t.sourceFormat===wd){t=function(t){var e=0;for(;e<t.length&&null==t[e];)e++;return t[e]}(t.data||[]);return null!=t&&!G(Jo(t))}}(i)?function(t,e,n,i){return i===d?n:this.defaultDimValueGetter(t,e,n,i)}:null;return e.hasItemOption=!1,e.initData(r?i:p,null,o),e}var sb=(lb.prototype.getSetting=function(t){return this._setting[t]},lb.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},lb.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},lb.prototype.getExtent=function(){return this._extent.slice()},lb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},lb.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},lb.prototype.isBlank=function(){return this._isBlank},lb.prototype.setBlank=function(t){this._isBlank=t},lb);function lb(t){this._setting=t||{},this._extent=[1/0,-1/0]}Dr(sb);var ub=0,hb=(cb.createByAxisModel=function(t){var e=t.option,t=e.data,t=t&&L(t,pb);return new cb({categories:t,needCollect:!t,deduplication:!1!==e.dedplication})},cb.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},cb.prototype.parseAndCollect=function(t){var e=this._needCollect;if("string"!=typeof t&&!e)return t;if(e&&!this._deduplication)return n=this.categories.length,this.categories[n]=t,n;var n,i=this._getOrCreateMap();return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n},cb.prototype._getOrCreateMap=function(){return this._map||(this._map=ct(this.categories))},cb);function cb(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++ub}function pb(t){return Y(t)&&null!=t.value?t.value:t+""}var db=vo;function fb(t,e,n,i){var o={},r=t[1]-t[0],e=o.interval=Lo(r/e,!0);null!=n&&e<n&&(e=o.interval=n),null!=i&&i<e&&(e=o.interval=i);i=o.intervalPrecision=gb(e),i=o.niceTickExtent=[db(Math.ceil(t[0]/e)*e,i),db(Math.floor(t[1]/e)*e,i)];return i=i,t=t,isFinite(i[0])||(i[0]=t[0]),isFinite(i[1])||(i[1]=t[1]),yb(i,0,t),yb(i,1,t),i[0]>i[1]&&(i[0]=i[1]),o}function gb(t){return xo(t)+2}function yb(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function mb(t,e){return t>=e[0]&&t<=e[1]}function vb(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function _b(t,e){return t*(e[1]-e[0])+e[0]}var xb,bb=(u(wb,xb=sb),wb.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},wb.prototype.contain=function(t){return mb(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},wb.prototype.normalize=function(t){return vb(t=this._getTickNumber(this.parse(t)),this._extent)},wb.prototype.scale=function(t){return t=Math.round(_b(t,this._extent)),this.getRawOrdinalNumber(t)},wb.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},wb.prototype.getMinorTicks=function(t){},wb.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,r=this._ordinalMeta.categories.length,a=Math.min(r,e.length);o<a;++o){var s=e[o];i[n[o]=s]=o}for(var l=0;o<r;++o){for(;null!=i[l];)l++;n.push(l),i[l]=o}}else this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null},wb.prototype._getTickNumber=function(t){var e=this._ticksByOrdinalNumber;return e&&0<=t&&t<e.length?e[t]:t},wb.prototype.getRawOrdinalNumber=function(t){var e=this._ordinalNumbersByTick;return e&&0<=t&&t<e.length?e[t]:t},wb.prototype.getLabel=function(t){if(!this.isBlank()){t=this.getRawOrdinalNumber(t.value),t=this._ordinalMeta.categories[t];return null==t?"":t+""}},wb.prototype.count=function(){return this._extent[1]-this._extent[0]+1},wb.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},wb.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},wb.prototype.getOrdinalMeta=function(){return this._ordinalMeta},wb.prototype.niceTicks=function(){},wb.prototype.niceExtent=function(){},wb.type="ordinal",wb);function wb(t){var e=xb.call(this,t)||this;e.type="ordinal";t=e.getSetting("ordinalMeta");return G(t=t||new hb({}))&&(t=new hb({categories:L(t,function(t){return Y(t)?t.value:t})})),e._ordinalMeta=t,e._extent=e.getSetting("extent")||[0,t.categories.length-1],e}sb.registerClass(bb);var Sb,Mb=vo,Ib=(u(Tb,Sb=sb),Tb.prototype.parse=function(t){return t},Tb.prototype.contain=function(t){return mb(t,this._extent)},Tb.prototype.normalize=function(t){return vb(t,this._extent)},Tb.prototype.scale=function(t){return _b(t,this._extent)},Tb.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},Tb.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},Tb.prototype.getInterval=function(){return this._interval},Tb.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=gb(t)},Tb.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,r=[];if(!e)return r;n[0]<i[0]&&(t?r.push({value:Mb(i[0]-e,o)}):r.push({value:n[0]}));for(var a=i[0];a<=i[1]&&(r.push({value:a}),(a=Mb(a+e,o))!==r[r.length-1].value);)if(1e4<r.length)return[];var s=r.length?r[r.length-1].value:i[1];return n[1]>s&&(t?r.push({value:Mb(s+e,o)}):r.push({value:n[1]})),r},Tb.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),o=1;o<e.length;o++){for(var r=e[o],a=e[o-1],s=0,l=[],u=(r.value-a.value)/t;s<t-1;){var h=Mb(a.value+(s+1)*u);h>i[0]&&h<i[1]&&l.push(h),s++}n.push(l)}return n},Tb.prototype.getLabel=function(t,e){if(null==t)return"";e=e&&e.precision;return null==e?e=xo(t.value)||0:"auto"===e&&(e=this._intervalPrecision),Fp(Mb(t.value,e,!0))},Tb.prototype.niceTicks=function(t,e,n){t=t||5;var i=this._extent,o=i[1]-i[0];isFinite(o)&&(o<0&&i.reverse(),n=fb(i,t,e,n),this._intervalPrecision=n.intervalPrecision,this._interval=n.interval,this._niceExtent=n.niceTickExtent)},Tb.prototype.niceExtent=function(t){var e=this._extent;e[0]===e[1]&&(0!==e[0]?(n=e[0],t.fixMax||(e[1]+=n/2),e[0]-=n/2):e[1]=1);var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);n=this._interval;t.fixMin||(e[0]=Mb(Math.floor(e[0]/n)*n)),t.fixMax||(e[1]=Mb(Math.ceil(e[1]/n)*n))},Tb.type="interval",Tb);function Tb(){var t=null!==Sb&&Sb.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}sb.registerClass(Ib);var Cb="__ec_stack_",Db="undefined"!=typeof Float32Array?Float32Array:Array;function Ab(t){return t.get("stack")||Cb+t.seriesIndex}function kb(t){return t.dim+t.index}function Lb(t,e){var n=[];return e.eachSeriesByType(t,function(t){zb(t)&&!Bb(t)&&n.push(t)}),n}function Pb(t){var l=function(t){var l={};E(t,function(t){var e=t.coordinateSystem.getBaseAxis();if("time"===e.type||"value"===e.type)for(var t=t.getData(),n=e.dim+"_"+e.index,i=t.getDimensionIndex(t.mapDimension(e.dim)),o=t.getStore(),r=0,a=o.count();r<a;++r){var s=o.get(i,r);l[n]?l[n].push(s):l[n]=[s]}});var e,n={};for(e in l)if(l.hasOwnProperty(e)){var i=l[e];if(i){i.sort(function(t,e){return t-e});for(var o=null,r=1;r<i.length;++r){var a=i[r]-i[r-1];0<a&&(o=null===o?a:Math.min(o,a))}n[e]=o}}return n}(t),u=[];return E(t,function(t){var e,n=t.coordinateSystem.getBaseAxis(),i=n.getExtent();e="category"===n.type?n.getBandWidth():"value"===n.type||"time"===n.type?(o=n.dim+"_"+n.index,r=l[o],a=Math.abs(i[1]-i[0]),e=n.scale.getExtent(),o=Math.abs(e[1]-e[0]),r?a/o*r:a):(s=t.getData(),Math.abs(i[1]-i[0])/s.count());var o=mo(t.get("barWidth"),e),r=mo(t.get("barMaxWidth"),e),a=mo(t.get("barMinWidth")||1,e),i=t.get("barGap"),s=t.get("barCategoryGap");u.push({bandWidth:e,barWidth:o,barMaxWidth:r,barMinWidth:a,barGap:i,barCategoryGap:s,axisKey:kb(n),stackId:Ab(t)})}),Ob(u)}function Ob(t){var a={};E(t,function(t,e){var n=t.axisKey,i=t.bandWidth,o=a[n]||{bandWidth:i,remainedWidth:i,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},r=o.stacks;a[n]=o;i=t.stackId;r[i]||o.autoWidthCount++,r[i]=r[i]||{width:0,maxWidth:0};n=t.barWidth;n&&!r[i].width&&(r[i].width=n,n=Math.min(o.remainedWidth,n),o.remainedWidth-=n);n=t.barMaxWidth;n&&(r[i].maxWidth=n);n=t.barMinWidth;n&&(r[i].minWidth=n);n=t.barGap;null!=n&&(o.gap=n);t=t.barCategoryGap;null!=t&&(o.categoryGap=t)});var d={};return E(a,function(t,n){d[n]={};var e,i=t.stacks,o=t.bandWidth,r=t.categoryGap;null==r&&(e=z(i).length,r=Math.max(35-4*e,15)+"%");var r=mo(r,o),a=mo(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);E(i,function(t){var e,n=t.maxWidth,i=t.minWidth;t.width?(e=t.width,n&&(e=Math.min(e,n)),i&&(e=Math.max(e,i)),t.width=e,s-=e+a*e,l--):(e=u,n&&n<e&&(e=Math.min(n,s)),(e=i&&e<i?i:e)!==u&&(t.width=e,s-=e+a*e,l--))}),u=(s-r)/(l+(l-1)*a),u=Math.max(u,0);var h,c=0;E(i,function(t,e){t.width||(t.width=u),c+=(h=t).width*(1+a)}),h&&(c-=h.width*a);var p=-c/2;E(i,function(t,e){d[n][e]=d[n][e]||{bandWidth:o,offset:p,width:t.width},p+=t.width*(1+a)})}),d}function Rb(t,e,n){if(t&&e){e=t[kb(e)];return null!=e&&null!=n?e[Ab(n)]:e}}function Nb(t,e){var e=Lb(t,e),C=Pb(e),D={};E(e,function(t){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=Ab(t),r=C[kb(i)][o],a=r.offset,s=r.width,l=n.getOtherAxis(i),u=t.get("barMinHeight")||0;D[o]=D[o]||[],e.setLayout({bandWidth:r.bandWidth,offset:a,size:s});for(var t=e.mapDimension(l.dim),r=e.mapDimension(i.dim),h=ob(e,t),c=l.isHorizontal(),p=Vb(0,l),d=e.getStore(),f=e.getDimensionIndex(t),g=e.getDimensionIndex(r),y=0,m=d.count();y<m;y++){var v=d.get(f,y),_=d.get(g,y),x=0<=v?"p":"n",b=p;h&&(D[o][_]||(D[o][_]={p:p,n:p}),b=D[o][_][x]);var w,S=void 0,M=void 0,I=void 0,T=void 0;c?(S=b,M=(w=n.dataToPoint([v,_]))[1]+a,I=w[0]-p,T=s,Math.abs(I)<u&&(I=(I<0?-1:1)*u),isNaN(I)||h&&(D[o][_][x]+=I)):(S=(w=n.dataToPoint([_,v]))[0]+a,M=b,I=s,T=w[1]-p,Math.abs(T)<u&&(T=(T<=0?-1:1)*u),isNaN(T)||h&&(D[o][_][x]+=T)),e.setItemLayout(y,{x:S,y:M,width:I,height:T})}})}var Eb={seriesType:"bar",plan:Cy(),reset:function(t){if(zb(t)&&Bb(t)){var e=t.getData(),p=t.coordinateSystem,d=p.master.getRect(),n=p.getBaseAxis(),f=p.getOtherAxis(n),g=e.getDimensionIndex(e.mapDimension(f.dim)),y=e.getDimensionIndex(e.mapDimension(n.dim)),m=f.isHorizontal(),v=m?0:1,_=Rb(Pb([t]),n,t).width;return.5<_||(_=.5),{progress:function(t,e){for(var n,i,o=t.count,r=new Db(2*o),a=new Db(2*o),s=new Db(o),l=[],u=0,h=0,c=e.getStore();null!=(n=t.next());)l[v]=c.get(g,n),l[1-v]=c.get(y,n),i=p.dataToPoint(l,null),a[u]=m?d.x+d.width:i[0],r[u++]=i[0],a[u]=m?i[1]:d.y+d.height,r[u++]=i[1],s[h++]=n;e.setLayout({largePoints:r,largeDataIndices:s,largeBackgroundPoints:a,barWidth:_,valueAxisStart:Vb(0,f),backgroundStart:m?d.x:d.y,valueAxisHorizontal:m})}}}}};function zb(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function Bb(t){return t.pipelineContext&&t.pipelineContext.large}function Vb(t,e){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var Gb,Fb=(u(Hb,Gb=Ib),Hb.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Ip(t.value,xp[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Mp(this._minLevelUnit))]||xp.second,e,this.getSetting("locale"))},Hb.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,o){var r=null;if("string"==typeof n)r=n;else if("function"==typeof n)r=n(t.value,e,{level:t.level});else{var a=P({},_p);if(0<t.level)for(var s=0;s<bp.length;++s)a[bp[s]]="{primary|"+a[bp[s]]+"}";var l=n?!1===n.inherit?n:A(n,a):a,u=Tp(t.value,o);if(l[u])r=l[u];else if(l.inherit){for(s=wp.indexOf(u)-1;0<=s;--s)if(l[u]){r=l[u];break}r=r||a.none}G(r)&&(n=null==t.level?0:0<=t.level?t.level:r.length+t.level,r=r[n=Math.min(n,r.length-1)])}return Ip(new Date(t.value),r,o,i)}(t,e,n,this.getSetting("locale"),i)},Hb.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});e=this.getSetting("useUTC"),e=function(t,d,f,g){var e=wp,n=0;function i(t,e,n){var i=[],o=!e.length;if(!function(t,e,n,i){function o(t){return Cp(c,t,i)===Cp(p,t,i)}function r(){return o("year")}function a(){return r()&&o("month")}function s(){return a()&&o("day")}function l(){return s()&&o("hour")}function u(){return l()&&o("minute")}function h(){return u()&&o("second")}var c=Do(e),p=Do(n);switch(t){case"year":return r();case"month":return a();case"day":return s();case"hour":return l();case"minute":return u();case"second":return h();case"millisecond":return h()&&o("millisecond")}}(Mp(t),g[0],g[1],f)){o&&(e=[{value:function(t,e,n){var i=new Date(t);switch(Mp(e)){case"year":case"month":i[Np(n)](0);case"day":i[Ep(n)](1);case"hour":i[zp(n)](0);case"minute":i[Bp(n)](0);case"second":i[Vp(n)](0),i[Gp(n)](0)}return i.getTime()}(new Date(g[0]),t,f)},{value:g[1]}]);for(var r,a,s=0;s<e.length-1;s++){var l=e[s].value,u=e[s+1].value;if(l!==u){var h=void 0,c=void 0,p=void 0;switch(t){case"year":h=Math.max(1,Math.round(d/mp/365)),c=Dp(f),p=f?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":a=d,h=6<(a/=30*mp)?6:3<a?3:2<a?2:1,c=Ap(f),p=Np(f);break;case"week":case"half-week":case"day":r=d,h=16<(r/=mp)?16:7.5<r?7:3.5<r?4:1.5<r?2:1,c=kp(f),p=Ep(f),0;break;case"half-day":case"quarter-day":case"hour":r=d,h=12<(r/=yp)?12:6<r?6:3.5<r?4:2<r?2:1,c=Lp(f),p=zp(f);break;case"minute":h=Ub(d,!0),c=Pp(f),p=Bp(f);break;case"second":h=Ub(d,!1),c=Op(f),p=Vp(f);break;case"millisecond":h=Lo(d,!0),c=Rp(f),p=Gp(f)}!function(t,e,n,i,o,r){for(var a=new Date(e),s=e,l=a[i]();s<n&&s<=g[1];)r.push({value:s}),l+=t,a[o](l),s=a.getTime();r.push({value:s,notAdd:!0})}(h,l,u,c,p,i),"year"===t&&1<n.length&&0===s&&n.unshift({value:n[0].value-h})}}for(s=0;s<i.length;s++)n.push(i[s]);return 1}}for(var o=[],r=[],a=0,s=0,l=0;l<e.length&&n++<1e4;++l){var u=Mp(e[l]);if(function(t){return t===Mp(t)}(e[l])){i(e[l],o[o.length-1]||[],r);var h=e[l+1]?Mp(e[l+1]):null;if(u!==h){if(r.length){s=a,r.sort(function(t,e){return t.value-e.value});for(var c=[],p=0;p<r.length;++p){var y=r[p].value;0!==p&&r[p-1].value===y||(c.push(r[p]),y>=g[0]&&y<=g[1]&&a++)}h=(g[1]-g[0])/d;if(1.5*h<a&&h/1.5<s)break;if(o.push(c),h<a||t===e[l])break}r=[]}}}1e4<=n&&Fo("Exceed safe limit.");for(var m=R(L(o,function(t){return R(t,function(t){return t.value>=g[0]&&t.value<=g[1]&&!t.notAdd})}),function(t){return 0<t.length}),v=[],_=m.length-1,l=0;l<m.length;++l)for(var x=m[l],b=0;b<x.length;++b)v.push({value:x[b].value,level:_-l});v.sort(function(t,e){return t.value-e.value});for(var w=[],l=0;l<v.length;++l)0!==l&&v[l].value===v[l-1].value||w.push(v[l]);return w}(this._minLevelUnit,this._approxInterval,e,n);return(i=i.concat(e)).push({value:n[1],level:0}),i},Hb.prototype.niceExtent=function(t){var e,n=this._extent;n[0]===n[1]&&(n[0]-=mp,n[1]+=mp),n[1]===-1/0&&n[0]===1/0&&(e=new Date,n[1]=+new Date(e.getFullYear(),e.getMonth(),e.getDate()),n[0]=n[1]-mp),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval)},Hb.prototype.niceTicks=function(t,e,n){t=t||10;var i=this._extent,i=i[1]-i[0];this._approxInterval=i/t,null!=e&&this._approxInterval<e&&(this._approxInterval=e),null!=n&&this._approxInterval>n&&(this._approxInterval=n);n=Wb.length,n=Math.min(function(t,e,n,i){for(;n<i;){var o=n+i>>>1;t[o][1]<e?n=1+o:i=o}return n}(Wb,this._approxInterval,0,n),n-1);this._interval=Wb[n][1],this._minLevelUnit=Wb[Math.max(n-1,0)][0]},Hb.prototype.parse=function(t){return"number"==typeof t?t:+Do(t)},Hb.prototype.contain=function(t){return mb(this.parse(t),this._extent)},Hb.prototype.normalize=function(t){return vb(this.parse(t),this._extent)},Hb.prototype.scale=function(t){return _b(t,this._extent)},Hb.type="time",Hb);function Hb(t){t=Gb.call(this,t)||this;return t.type="time",t}var Wb=[["second",fp],["minute",gp],["hour",yp],["quarter-day",6*yp],["half-day",12*yp],["day",1.2*mp],["half-week",3.5*mp],["week",7*mp],["month",31*mp],["quarter",95*mp],["half-year",vp/2],["year",vp]];function Ub(t,e){return 30<(t/=e?gp:fp)?30:20<t?20:15<t?15:10<t?10:5<t?5:2<t?2:1}sb.registerClass(Fb);var Yb,Xb=sb.prototype,Zb=Ib.prototype,jb=vo,qb=Math.floor,Kb=Math.ceil,$b=Math.pow,Jb=Math.log,Qb=(u(tw,Yb=sb),tw.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return L(Zb.getTicks.call(this,t),function(t){var e=t.value,t=vo($b(this.base,e)),t=e===n[0]&&this._fixMin?ew(t,i[0]):t;return{value:t=e===n[1]&&this._fixMax?ew(t,i[1]):t}},this)},tw.prototype.setExtent=function(t,e){var n=this.base;t=Jb(t)/Jb(n),e=Jb(e)/Jb(n),Zb.setExtent.call(this,t,e)},tw.prototype.getExtent=function(){var t=this.base,e=Xb.getExtent.call(this);e[0]=$b(t,e[0]),e[1]=$b(t,e[1]);t=this._originalScale.getExtent();return this._fixMin&&(e[0]=ew(e[0],t[0])),this._fixMax&&(e[1]=ew(e[1],t[1])),e},tw.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Jb(t[0])/Jb(e),t[1]=Jb(t[1])/Jb(e),Xb.unionExtent.call(this,t)},tw.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},tw.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n==1/0||n<=0)){var i=Ao(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&0<Math.abs(i);)i*=10;e=[vo(Kb(e[0]/i)*i),vo(qb(e[1]/i)*i)];this._interval=i,this._niceExtent=e}},tw.prototype.niceExtent=function(t){Zb.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},tw.prototype.parse=function(t){return t},tw.prototype.contain=function(t){return mb(t=Jb(t)/Jb(this.base),this._extent)},tw.prototype.normalize=function(t){return vb(t=Jb(t)/Jb(this.base),this._extent)},tw.prototype.scale=function(t){return t=_b(t,this._extent),$b(this.base,t)},tw.type="log",tw);function tw(){var t=null!==Yb&&Yb.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Ib,t._interval=0,t}n=Qb.prototype;function ew(t,e){return jb(t,xo(e))}n.getMinorTicks=Zb.getMinorTicks,n.getLabel=Zb.getLabel,sb.registerClass(Qb);var nw=(iw.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal="ordinal"===t.type;this._needCrossZero=e.getNeedCrossZero&&e.getNeedCrossZero();var o=this._modelMinRaw=e.get("min",!0);F(o)?this._modelMinNum=sw(t,o({min:n[0],max:n[1]})):"dataMin"!==o&&(this._modelMinNum=sw(t,o));o=this._modelMaxRaw=e.get("max",!0);F(o)?this._modelMaxNum=sw(t,o({min:n[0],max:n[1]})):"dataMax"!==o&&(this._modelMaxNum=sw(t,o)),i?this._axisDataLen=e.getCategories().length:"boolean"==typeof(e=G(e=e.get("boundaryGap"))?e:[e||0,e||0])[0]||"boolean"==typeof e[1]?(console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Ui(e[0],1),Ui(e[1],1)]},iw.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,o=this._boundaryGapInner,r=t?null:n-e||Math.abs(e),a="dataMin"===this._modelMinRaw?e:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,l=null!=a,u=null!=s;null==a&&(a=t?i?0:NaN:e-o[0]*r),null==s&&(s=t?i?i-1:NaN:n+o[1]*r),null!=a&&isFinite(a)||(a=NaN),null!=s&&isFinite(s)||(s=NaN);r=J(a)||J(s)||t&&!i;this._needCrossZero&&(a=0<a&&0<s&&!l?0:a)<0&&s<0&&!u&&(s=0);t=this._determinedMin,i=this._determinedMax;return null!=t&&(a=t,l=!0),null!=i&&(s=i,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:r}},iw.prototype.modifyDataMinMax=function(t,e){ot(!this.frozen),this[rw[t]]=e},iw.prototype.setDeterminedMinMax=function(t,e){t=ow[t];ot(!this.frozen&&null==this[t]),this[t]=e},iw.prototype.freeze=function(){this.frozen=!0},iw);function iw(t,e,n){this._prepareParams(t,e,n)}var ow={min:"_determinedMin",max:"_determinedMax"},rw={min:"_dataMin",max:"_dataMax"};function aw(t,e,n){var i=t.rawExtentInfo;return i||(i=new nw(t,e,n),t.rawExtentInfo=i)}function sw(t,e){return null==e?null:J(e)?NaN:t.parse(e)}function lw(t,e){var n=t.type,i=aw(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var o,r=i.min,a=i.max,t=e.ecModel;return t&&"time"===n&&(t=Lb("bar",t),o=!1,E(t,function(t){o=o||t.getBaseAxis()===e.axis}),o&&(t=Pb(t),r=(t=function(t,e,n,i){var o=n.axis.getExtent(),o=o[1]-o[0],i=Rb(i,n.axis);if(void 0===i)return{min:t,max:e};var r=1/0;E(i,function(t){r=Math.min(t.offset,r)});var a=-1/0;E(i,function(t){a=Math.max(t.offset+t.width,a)}),r=Math.abs(r),a=Math.abs(a);n=r+a,i=e-t,i=i/(1-(r+a)/o)-i;return{min:t-=r/n*i,max:e+=a/n*i}}(r,a,e,t)).min,a=t.max)),{extent:[r,a],fixMin:i.minFixed,fixMax:i.maxFixed}}function uw(t,e){var n=e,i=lw(t,n),o=i.extent,r=n.get("splitNumber");t instanceof Qb&&(t.base=n.get("logBase"));e=t.type;t.setExtent(o[0],o[1]),t.niceExtent({splitNumber:r,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:"interval"===e||"time"===e?n.get("minInterval"):null,maxInterval:"interval"===e||"time"===e?n.get("maxInterval"):null});n=n.get("interval");null!=n&&t.setInterval&&t.setInterval(n)}function hw(t,e){if(e=e||t.get("type"))switch(e){case"category":return new bb({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Fb({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(sb.getClass(e)||Ib)}}function cw(n){var i,e,o,t=n.getLabelModel().get("formatter"),r="category"===n.type?n.scale.getExtent()[0]:null;return"time"===n.scale.type?(o=t,function(t,e){return n.scale.getFormattedLabel(t,e,o)}):"string"==typeof t?(e=t,function(t){t=n.scale.getLabel(t);return e.replace("{value}",null!=t?t:"")}):"function"==typeof t?(i=t,function(t,e){return null!=r&&(e=t.value-r),i(pw(n,t),e,null!=t.level?{level:t.level}:null)}):function(t){return n.scale.getLabel(t)}}function pw(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function dw(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,o,r=n.getExtent(),a=n instanceof bb?n.count():(i=n.getTicks()).length,s=t.getLabelModel(),l=cw(t),u=1;40<a&&(u=Math.ceil(a/40));for(var h,c,p=0;p<a;p+=u){var d=l(i?i[p]:{value:r[0]+p},p),f=s.getTextRect(d),g=(h=f,c=s.get("rotate")||0,g=f=d=g=void 0,g=c*Math.PI/180,d=h.width,f=h.height,c=d*Math.abs(Math.cos(g))+Math.abs(f*Math.sin(g)),g=d*Math.abs(Math.sin(g))+Math.abs(f*Math.cos(g)),new Li(h.x,h.y,c,g));o?o.union(g):o=g}return o}}function fw(t){t=t.get("interval");return null==t?"auto":t}function gw(t){return"category"===t.type&&0===fw(t.getLabelModel())}function yw(e,t){var n={};return E(e.mapDimensionsAll(t),function(t){n[rb(e,t)]=!0}),z(n)}var mw=(vw.prototype.getNeedCrossZero=function(){return!this.option.scale},vw.prototype.getCoordSysModel=function(){},vw);function vw(){}Zy={isDimensionStacked:ob,enableDataStack:ib,getStackedDimension:rb};var Uf=Object.freeze({__proto__:null,createList:function(t){return ab(null,t)},getLayoutRect:rd,dataStack:Zy,createScale:function(t,e){var n=e;return(e=hw(n=!(e instanceof ep)?new ep(e):n)).setExtent(t[0],t[1]),uw(e,n),e},mixinAxisModelCommonMethods:function(t){T(t,mw)},getECData:il,createTextStyle:function(t,e){return Rc(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:function(t,e){return Qx(t,e).dimensions},createSymbol:Cm,enableHoverEmphasis:ql}),Ah=Object.freeze({__proto__:null,linearMap:yo,round:vo,asc:_o,getPrecision:xo,getPrecisionSafe:bo,getPixelPrecision:wo,getPercentWithPrecision:So,MAX_SAFE_INTEGER:Mo,remRadian:Io,isRadianAroundZero:To,parseDate:Do,quantity:Ao,quantityExponent:ko,nice:Lo,quantile:Po,reformIntervals:Oo,isNumeric:No,numericToNumber:Ro}),$i=Object.freeze({__proto__:null,parse:Do,format:Ip}),r=Object.freeze({__proto__:null,extendShape:ac,extendPath:lc,makePath:cc,makeImage:pc,mergePath:fc,resizePath:gc,createIcon:Mc,updateProps:Kh,initProps:$h,getTransform:mc,clipPointsByRect:wc,clipRectByRect:Sc,registerShape:uc,getShapeClass:hc,Group:io,Image:Ps,Text:Xs,Circle:Du,Ellipse:Pu,Sector:qu,Ring:Qu,Polygon:rh,Polyline:uh,Rect:Fs,Line:fh,BezierCurve:xh,Arc:Mh,IncrementalDisplayable:Yh,CompoundPath:Ch,LinearGradient:Ph,RadialGradient:Nh,BoundingRect:Li}),f=Object.freeze({__proto__:null,addCommas:Fp,toCamelCase:Hp,normalizeCssArray:Wp,encodeHTML:Xp,formatTpl:Kp,getTooltipMarker:$p,formatTime:function(t,e,n){Uo("echarts.format.formatTime","echarts.time.format"),"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=Do(e),o=i["get"+(l=n?"UTC":"")+"FullYear"](),r=i["get"+l+"Month"]()+1,a=i["get"+l+"Date"](),s=i["get"+l+"Hours"](),e=i["get"+l+"Minutes"](),n=i["get"+l+"Seconds"](),l=i["get"+l+"Milliseconds"]();return t=t.replace("MM",Sp(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100+"").replace("dd",Sp(a,2)).replace("d",a).replace("hh",Sp(s,2)).replace("h",s).replace("mm",Sp(e,2)).replace("m",e).replace("ss",Sp(n,2)).replace("s",n).replace("SSS",Sp(l,3))},capitalFirst:function(t){return t&&t.charAt(0).toUpperCase()+t.substr(1)},truncateText:Br,getTextRect:function(t,e,n,i,o,r,a,s){return new Xs({style:{text:t,font:e,align:n,verticalAlign:i,padding:o,rich:r,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),_d=Object.freeze({__proto__:null,map:L,each:E,indexOf:C,inherits:I,reduce:O,filter:R,bind:B,curry:V,isArray:G,isString:H,isObject:Y,isFunction:F,extend:P,defaults:A,clone:S,merge:b}),_w=ur();function xw(t){return"category"===t.type?(o=(e=t).getLabelModel(),r=ww(e,o),!o.get("show")||e.scale.isBlank()?{labels:[],labelCategoryInterval:r.labelCategoryInterval}:r):(t=(n=t).scale.getTicks(),i=cw(n),{labels:L(t,function(t,e){return{level:t.level,formattedLabel:i(t,e),rawLabel:n.scale.getLabel(t),tickValue:t.value}})});var n,i,e,o,r}function bw(t,e){return"category"===t.type?function(t,e){var n,i,o=Sw(t,"ticks"),r=fw(e),a=Mw(o,r);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);n=F(r)?Cw(t,r,!0):"auto"===r?(e=ww(t,t.getLabelModel()),i=e.labelCategoryInterval,L(e.labels,function(t){return t.tickValue})):Tw(t,i=r,!0);return Iw(o,r,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:L(t.scale.getTicks(),function(t){return t.value})}}function ww(t,e){var n,i=Sw(t,"labels"),o=fw(e),e=Mw(i,o);return e||Iw(i,o,{labels:F(o)?Cw(t,o):Tw(t,n="auto"===o?null!=(t=_w(n=t).autoInterval)?t:_w(n).autoInterval=n.calculateCategoryInterval():o),labelCategoryInterval:n})}function Sw(t,e){return _w(t)[e]||(_w(t)[e]=[])}function Mw(t,e){for(var n=0;n<t.length;n++)if(t[n].key===e)return t[n].value}function Iw(t,e,n){return t.push({key:e,value:n}),n}function Tw(t,e,n){var i=cw(t),o=t.scale,r=o.getExtent(),a=t.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=r[0],e=o.count();0!==u&&1<l&&2<e/l&&(u=Math.round(Math.ceil(u/l)*l));e=gw(t),t=a.get("showMinLabel")||e,e=a.get("showMaxLabel")||e;t&&u!==r[0]&&c(r[0]);for(var h=u;h<=r[1];h+=l)c(h);function c(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:o.getLabel(e),tickValue:t})}return e&&h-l!==r[1]&&c(r[1]),s}function Cw(t,i,o){var r=t.scale,a=cw(t),s=[];return E(r.getTicks(),function(t){var e=r.getLabel(t),n=t.value;i(t.value,e)&&s.push(o?n:{formattedLabel:a(t),rawLabel:e,tickValue:n})}),s}var Dw=[0,1],vp=(Aw.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),e=Math.max(e[0],e[1]);return n<=t&&t<=e},Aw.prototype.containData=function(t){return this.scale.contain(t)},Aw.prototype.getExtent=function(){return this._extent.slice()},Aw.prototype.getPixelPrecision=function(t){return wo(t||this.scale.getExtent(),this._extent)},Aw.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},Aw.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&kw(n=n.slice(),i.count()),yo(t,Dw,n,e)},Aw.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&kw(n=n.slice(),i.count());e=yo(t,n,Dw,e);return this.scale.scale(e)},Aw.prototype.pointToData=function(t,e){},Aw.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=L(bw(this,e).ticks,function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}},this);return function(t,e,n,i){var o=e.length;if(!t.onBand||n||!o)return;var r,a=t.getExtent();{var s;1===o?(e[0].coord=a[0],r=e[1]={coord:a[0]}):(n=e[o-1].tickValue-e[0].tickValue,s=(e[o-1].coord-e[0].coord)/n,E(e,function(t){t.coord-=s/2}),t=t.scale.getExtent(),t=1+t[1]-e[o-1].tickValue,r={coord:e[o-1].coord+s*t},e.push(r))}var l=a[0]>a[1];u(e[0].coord,a[0])&&(i?e[0].coord=a[0]:e.shift());i&&u(a[0],e[0].coord)&&e.unshift({coord:a[0]});u(a[1],r.coord)&&(i?r.coord=a[1]:e.pop());i&&u(r.coord,a[1])&&e.push({coord:a[1]});function u(t,e){return t=vo(t),e=vo(e),l?e<t:t<e}}(this,n,e.get("alignWithLabel"),t.clamp),n},Aw.prototype.getMinorTicksCoords=function(){if("ordinal"===this.scale.type)return[];var t=this.model.getModel("minorTick").get("splitNumber");return 0<t&&t<100||(t=5),L(this.scale.getMinorTicks(t),function(t){return L(t,function(t){return{coord:this.dataToCoord(t),tickValue:t}},this)},this)},Aw.prototype.getViewLabels=function(){return xw(this).labels},Aw.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},Aw.prototype.getTickModel=function(){return this.model.getModel("axisTick")},Aw.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),e=e[1]-e[0]+(this.onBand?1:0);0===e&&(e=1);t=Math.abs(t[1]-t[0]);return Math.abs(t)/e},Aw.prototype.calculateCategoryInterval=function(){return function(t){var e=(u=(l=t).getLabelModel(),{axisRotate:l.getRotate?l.getRotate():l.isHorizontal&&!l.isHorizontal()?90:0,labelRotate:u.get("rotate")||0,font:u.getFont()}),n=cw(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,o=(h=t.scale).getExtent(),r=h.count();if(o[1]-o[0]<1)return 0;var a=1;40<r&&(a=Math.max(1,Math.floor(r/40)));for(var s=o[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l*Math.cos(i)),h=Math.abs(l*Math.sin(i)),c=0,p=0;s<=o[1];s+=a)var d=Gi(n({value:s}),e.font,"center","top"),f=1.3*d.width,d=1.3*d.height,c=Math.max(c,f,7),p=Math.max(p,d,7);return l=c/u,i=p/h,isNaN(l)&&(l=1/0),isNaN(i)&&(i=1/0),u=Math.max(0,Math.floor(Math.min(l,i))),h=_w(t.model),l=t.getExtent(),i=h.lastAutoInterval,t=h.lastTickCount,null!=i&&null!=t&&Math.abs(i-u)<=1&&Math.abs(t-r)<=1&&u<i&&h.axisExtent0===l[0]&&h.axisExtent1===l[1]?u=i:(h.lastTickCount=r,h.lastAutoInterval=u,h.axisExtent0=l[0],h.axisExtent1=l[1]),u}(this)},Aw);function Aw(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}function kw(t,e){e=(t[1]-t[0])/e/2;t[0]+=e,t[1]-=e}var Lw=2*Math.PI,Pw=is.CMD,Ow=["top","right","bottom","left"];function Rw(t,e,n,i,o,r,a,s){var l=o-t,u=r-e,h=n-t,n=i-e,i=Math.sqrt(h*h+n*n),u=(l*(h/=i)+u*(n/=i))/i;s&&(u=Math.min(Math.max(u,0),1)),u*=i;h=a[0]=t+u*h,n=a[1]=e+u*n;return Math.sqrt((h-o)*(h-o)+(n-r)*(n-r))}function Nw(t,e,n,i,o,r,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);n=t+n,i=e+i,n=a[0]=Math.min(Math.max(o,t),n),i=a[1]=Math.min(Math.max(r,e),i);return Math.sqrt((n-o)*(n-o)+(i-r)*(i-r))}var Ew=[];function zw(t,e,n){for(var i=0,o=0,r=0,a=0,s=1/0,l=e.data,u=t.x,h=t.y,c=0;c<l.length;){var p=l[c++];1===c&&(r=i=l[c],a=o=l[c+1]);var d=s;switch(p){case Pw.M:i=r=l[c++],o=a=l[c++];break;case Pw.L:d=Rw(i,o,l[c],l[c+1],u,h,Ew,!0),i=l[c++],o=l[c++];break;case Pw.C:d=xa(i,o,l[c++],l[c++],l[c++],l[c++],l[c],l[c+1],u,h,Ew),i=l[c++],o=l[c++];break;case Pw.Q:d=Ia(i,o,l[c++],l[c++],l[c],l[c+1],u,h,Ew),i=l[c++],o=l[c++];break;case Pw.A:var f=l[c++],g=l[c++],y=l[c++],m=l[c++],v=l[c++],_=l[c++];c+=1;var x=!!(1-l[c++]),b=Math.cos(v)*y+f,w=Math.sin(v)*m+g;c<=1&&(r=b,a=w);d=function(t,e,n,i,o,r,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-o)%Lw<1e-4)return l[0]=h,l[1]=c,u-n;(o=r?(p=i,i=ls(o),ls(p)):(i=ls(i),ls(o)))<i&&(o+=Lw);var p=Math.atan2(s,a);return p<0&&(p+=Lw),i<=p&&p<=o||i<=p+Lw&&p+Lw<=o?(l[0]=h,l[1]=c,u-n):(u=n*Math.cos(i)+t,i=n*Math.sin(i)+e,t=n*Math.cos(o)+t,o=n*Math.sin(o)+e,(e=(u-a)*(u-a)+(i-s)*(i-s))<(s=(t-a)*(t-a)+(o-s)*(o-s))?(l[0]=u,l[1]=i,Math.sqrt(e)):(l[0]=t,l[1]=o,Math.sqrt(s)))}(f,g,m,v,v+_,x,(u-f)*m/y+f,h,Ew),i=Math.cos(v+_)*y+f,o=Math.sin(v+_)*m+g;break;case Pw.R:d=Nw(r=i=l[c++],a=o=l[c++],l[c++],l[c++],u,h,Ew);break;case Pw.Z:d=Rw(i,o,r,a,u,h,Ew,!0),i=r,o=a}d<s&&(s=d,n.set(Ew[0],Ew[1]))}return s}var Bw=new bi,Vw=new bi,Gw=new bi,Fw=new bi,Hw=new bi;function Ww(t,e){if(t){var n=t.getTextGuideLine(),i=t.getTextContent();if(i&&n){var o=t.textGuideLineConfig||{},r=[[0,0],[0,0],[0,0]],a=o.candidates||Ow,s=i.getBoundingRect().clone();s.applyTransform(i.getComputedTransform());var l=1/0,u=o.anchor,h=t.getComputedTransform(),c=h&&ui([],h),p=e.get("length2")||0;u&&Gw.copy(u);for(var d,f=0;f<a.length;f++){!function(t,e,n,i,o){var r=n.width,a=n.height;switch(t){case"top":i.set(n.x+r/2,n.y-e),o.set(0,-1);break;case"bottom":i.set(n.x+r/2,n.y+a+e),o.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),o.set(-1,0);break;case"right":i.set(n.x+r+e,n.y+a/2),o.set(1,0)}}(a[f],0,s,Bw,Fw),bi.scaleAndAdd(Vw,Bw,Fw,p),Vw.transform(c);var g=t.getBoundingRect(),y=u?u.distance(Vw):t instanceof Ss?zw(Vw,t.path,Gw):(y=Vw,d=Gw,y=Nw((g=g).x,g.y,g.width,g.height,y.x,y.y,Ew),d.set(Ew[0],Ew[1]),y);y<l&&(l=y,Vw.transform(h),Gw.transform(h),Gw.toArray(r[0]),Vw.toArray(r[1]),Bw.toArray(r[2]))}Xw(r,e.get("minTurnAngle")),n.setShape({points:r})}}}var Uw=[],Yw=new bi;function Xw(t,e){var n,i;e<=180&&0<e&&(e=e/180*Math.PI,Bw.fromArray(t[0]),Vw.fromArray(t[1]),Gw.fromArray(t[2]),bi.sub(Fw,Bw,Vw),bi.sub(Hw,Gw,Vw),n=Fw.len(),i=Hw.len(),n<.001||i<.001||(Fw.scale(1/n),Hw.scale(1/i),i=Fw.dot(Hw),Math.cos(e)<i&&(i=Rw(Vw.x,Vw.y,Gw.x,Gw.y,Bw.x,Bw.y,Uw,!1),Yw.fromArray(Uw),Yw.scaleAndAdd(Hw,i/Math.tan(Math.PI-e)),e=Gw.x!==Vw.x?(Yw.x-Vw.x)/(Gw.x-Vw.x):(Yw.y-Vw.y)/(Gw.y-Vw.y),isNaN(e)||(e<0?bi.copy(Yw,Vw):1<e&&bi.copy(Yw,Gw),Yw.toArray(t[1])))))}function Zw(t,e,n,i){var o="normal"===n,n=o?t:t.ensureState(n);n.ignore=e;e=i.get("smooth");e&&!0===e&&(e=.3),n.shape=n.shape||{},0<e&&(n.shape.smooth=e);i=i.getModel("lineStyle").getLineStyle();o?t.useStyle(i):n.style=i}function jw(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),0<n&&3<=i.length){var o=At(i[0],i[1]),e=At(i[1],i[2]);if(!o||!e)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);n=Math.min(o,e)*n,o=Pt([],i[1],i[0],n/o),n=Pt([],i[1],i[2],n/e),e=Pt([],o,n,.5);t.bezierCurveTo(o[0],o[1],o[0],o[1],e[0],e[1]),t.bezierCurveTo(n[0],n[1],n[0],n[1],i[2][0],i[2][1])}else for(var r=1;r<i.length;r++)t.lineTo(i[r][0],i[r][1])}function qw(t,e,n){var i=t.getTextGuideLine(),o=t.getTextContent();if(o){for(var r=e.normal,a=r.get("show"),s=o.ignore,l=0;l<cl.length;l++){var u,h=cl[l],c=e[h],p="normal"===h;c&&(u=c.get("show"),!(p?s:tt(o.states[h]&&o.states[h].ignore,s))&&tt(u,a)?(i||(i=new uh,t.setTextGuideLine(i),p||!s&&a||Zw(i,!0,"normal",e.normal),t.stateProxy&&(i.stateProxy=t.stateProxy)),Zw(i,!1,h,c)):(p=p?i:i&&i.states.normal)&&(p.ignore=!0))}i&&(A(i.style,n),i.style.fill=null,r=r.get("showAbove"),(t.textGuideLineConfig=t.textGuideLineConfig||{}).showAbove=r||!1,i.buildPath=jw)}else i&&t.removeTextGuideLine()}function Kw(t,e){e=e||"labelLine";for(var n={normal:t.getModel(e)},i=0;i<hl.length;i++){var o=hl[i];n[o]=t.getModel([o,e])}return n}function $w(t){for(var e=[],n=0;n<t.length;n++){var i,o,r,a,s,l,u=t[n];u.defaultAttr.ignore||(o=(i=u.label).getComputedTransform(),r=i.getBoundingRect(),a=!o||o[1]<1e-5&&o[2]<1e-5,l=i.style.margin||0,(s=r.clone()).applyTransform(o),s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l,l=a?new Fh(r,o):null,e.push({label:i,labelLine:u.labelLine,rect:s,localRect:r,obb:l,priority:u.priority,defaultAttr:u.defaultAttr,layoutOption:u.computedLayoutOption,axisAligned:a,transform:o}))}return e}function Jw(s,l,u,t,e,n){var h=s.length;if(!(h<2)){s.sort(function(t,e){return t.rect[l]-e.rect[l]});for(var i=0,r=!1,o=0,a=0;a<h;a++){var c,p=s[a],d=p.rect;(c=d[l]-i)<0&&(d[l]-=c,p.label[l]-=c,r=!0),o+=Math.max(-c,0),i=d[l]+d[u]}0<o&&n&&x(-o/h,0,h);var f,g,y=s[0],m=s[h-1];return v(),f<0&&b(-f,.8),g<0&&b(g,.8),v(),_(f,g,1),_(g,f,-1),v(),f<0&&w(-f),g<0&&w(g),r}function v(){f=y.rect[l]-t,g=e-m.rect[l]-m.rect[u]}function _(t,e,n){t<0&&(0<(e=Math.min(e,-t))?(x(e*n,0,h),(e=e+t)<0&&b(-e*n,1)):b(-t*n,1))}function x(t,e,n){0!==t&&(r=!0);for(var i=e;i<n;i++){var o=s[i];o.rect[l]+=t,o.label[l]+=t}}function b(t,e){for(var n=[],i=0,o=1;o<h;o++){var r=s[o-1].rect,r=Math.max(s[o].rect[l]-r[l]-r[u],0);n.push(r),i+=r}if(i){var a=Math.min(Math.abs(t)/i,e);if(0<t)for(o=0;o<h-1;o++)x(n[o]*a,0,o+1);else for(o=h-1;0<o;o--)x(-(n[o-1]*a),o,h)}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(h-1)),i=0;i<h-1;i++)if(0<e?x(n,0,i+1):x(-n,h-i-1,h),(t-=n)<=0)return}}function Qw(t,e,n,i){return Jw(t,"y","height",e,n,i)}function tS(t){var e=[];t.sort(function(t,e){return e.priority-t.priority});var n=new Li(0,0,0,0);function i(t){var e;t.ignore||null==(e=t.ensureState("emphasis")).ignore&&(e.ignore=!1),t.ignore=!0}for(var o=0;o<t.length;o++){var r=t[o],a=r.axisAligned,s=r.localRect,l=r.transform,u=r.label,h=r.labelLine;n.copy(r.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05;for(var c=r.obb,p=!1,d=0;d<e.length;d++){var f=e[d];if(n.intersect(f.rect)){if(a&&f.axisAligned){p=!0;break}if(f.obb||(f.obb=new Fh(f.localRect,f.transform)),(c=c||new Fh(s,l)).intersect(f.obb)){p=!0;break}}}p?(i(u),h&&i(h)):(u.attr("ignore",r.defaultAttr.ignore),h&&h.attr("ignore",r.defaultAttr.labelGuideIgnore),e.push(r))}}function eS(t,e){var n=t.label,e=e&&e.getTextGuideLine();return{dataIndex:t.dataIndex,dataType:t.dataType,seriesIndex:t.seriesModel.seriesIndex,text:t.label.style.text,rect:t.hostRect,labelRect:t.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(t){if(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n].slice());return e}}(e&&e.shape.points)}}var nS=["align","verticalAlign","width","height","fontSize"],iS=new vi,oS=ur(),rS=ur();function aS(t,e,n){for(var i=0;i<n.length;i++){var o=n[i];null!=e[o]&&(t[o]=e[o])}}var sS=["x","y","rotation"],lS=(uS.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},uS.prototype._addLabel=function(t,e,n,i,o){var r=i.style,a=i.__hostTarget.textConfig||{},s=i.getComputedTransform(),l=i.getBoundingRect().plain();Li.applyTransform(l,l,s),s?iS.setLocalTransform(s):(iS.x=iS.y=iS.rotation=iS.originX=iS.originY=0,iS.scaleX=iS.scaleY=1);var u,h=i.__hostTarget;h&&(u=h.getBoundingRect().plain(),s=h.getComputedTransform(),Li.applyTransform(u,u,s));h=u&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:h,seriesModel:n,dataIndex:t,dataType:e,layoutOption:o,computedLayoutOption:null,rect:l,hostRect:u,priority:u?u.width*u.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:h&&h.ignore,x:iS.x,y:iS.y,scaleX:iS.scaleX,scaleY:iS.scaleY,rotation:iS.rotation,style:{x:r.x,y:r.y,align:r.align,verticalAlign:r.verticalAlign,width:r.width,height:r.height,fontSize:r.fontSize},cursor:i.cursor,attachedPos:a.position,attachedRot:a.rotation}})},uS.prototype.addLabelsOfSeries=function(t){var n=this;this._chartViewList.push(t);var i=t.__model,o=i.get("labelLayout");(F(o)||z(o).length)&&t.group.traverse(function(t){if(t.ignore)return!0;var e=t.getTextContent(),t=il(t);e&&!e.disableLabelLayout&&n._addLabel(t.dataIndex,t.dataType,i,e,o)})},uS.prototype.updateLayoutConfig=function(t){var e=t.getWidth(),n=t.getHeight();for(var i=0;i<this._labelList.length;i++){var o=this._labelList[i],r=o.label,a=r.__hostTarget,s=o.defaultAttr,l=void 0;l=(l="function"==typeof o.layoutOption?o.layoutOption(eS(o,a)):o.layoutOption)||{},o.computedLayoutOption=l;var u=Math.PI/180;a&&a.setTextConfig({local:!1,position:null!=l.x||null!=l.y?null:s.attachedPos,rotation:null!=l.rotate?l.rotate*u:s.attachedRot,offset:[l.dx||0,l.dy||0]});var h,c=!1;null!=l.x?(r.x=mo(l.x,e),r.setStyle("x",0),c=!0):(r.x=s.x,r.setStyle("x",s.style.x)),null!=l.y?(r.y=mo(l.y,n),r.setStyle("y",0),c=!0):(r.y=s.y,r.setStyle("y",s.style.y)),!l.labelLinePoints||(h=a.getTextGuideLine())&&(h.setShape({points:l.labelLinePoints}),c=!1),oS(r).needsUpdateLabelLine=c,r.rotation=null!=l.rotate?l.rotate*u:s.rotation,r.scaleX=s.scaleX,r.scaleY=s.scaleY;for(var p=0;p<nS.length;p++){var d=nS[p];r.setStyle(d,(null!=l[d]?l:s.style)[d])}l.draggable?(r.draggable=!0,r.cursor="move",a&&(u=o.seriesModel,null!=o.dataIndex&&(u=o.seriesModel.getData(o.dataType).getItemModel(o.dataIndex)),r.on("drag",function(t,e){return function(){Ww(t,e)}}(a,u.getModel("labelLine"))))):(r.off("drag"),r.cursor=s.cursor)}},uS.prototype.layout=function(t){var e,n=t.getWidth(),i=t.getHeight(),o=$w(this._labelList),r=R(o,function(t){return"shiftX"===t.layoutOption.moveOverlap}),t=R(o,function(t){return"shiftY"===t.layoutOption.moveOverlap});Jw(r,"x","width",0,n,e),Qw(t,0,i),tS(R(o,function(t){return t.layoutOption.hideOverlap}))},uS.prototype.processLabelsOverall=function(){var a=this;E(this._chartViewList,function(t){var i=t.__model,o=t.ignoreLabelLineUpdate,r=i.isAnimationEnabled();t.group.traverse(function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var e=!o,n=t.getTextContent();(e=!e&&n?oS(n).needsUpdateLabelLine:e)&&a._updateLabelLine(t,i),r&&a._animateLabels(t,i)})})},uS.prototype._updateLabelLine=function(t,e){var n=t.getTextContent(),i=il(t),o=i.dataIndex;n&&null!=o&&(e=(n=e.getData(i.dataType)).getItemModel(o),i={},o=n.getItemVisual(o,"style"),n=n.getVisual("drawType"),i.stroke=o[n],n=e.getModel("labelLine"),qw(t,Kw(e),i),Ww(t,n))},uS.prototype._animateLabels=function(t,e){var n,i,o,r,a,s,l,u=t.getTextContent(),h=t.getTextGuideLine();!u||!t.forceLabelAnimation&&(u.ignore||u.invisible||t.disableLabelAnimation||Jh(t))||(s=(a=oS(u)).oldLayout,n=(l=il(t)).dataIndex,i={x:u.x,y:u.y,rotation:u.rotation},l=e.getData(l.dataType),s?(u.attr(s),(o=t.prevStates)&&(0<=C(o,"select")&&u.attr(a.oldLayoutSelect),0<=C(o,"emphasis")&&u.attr(a.oldLayoutEmphasis)),Kh(u,i,e,n)):(u.attr(i),Fc(u).valueAnimation||(o=tt(u.style.opacity,1),u.style.opacity=0,$h(u,{style:{opacity:o}},e,n))),a.oldLayout=i,u.states.select&&(aS(r=a.oldLayoutSelect={},i,sS),aS(r,u.states.select,sS)),u.states.emphasis&&(aS(r=a.oldLayoutEmphasis={},i,sS),aS(r,u.states.emphasis,sS)),Wc(u,n,l,e,e)),!h||h.ignore||h.invisible||(s=(a=rS(h)).oldLayout,l={points:h.shape.points},s?(h.attr({shape:s}),Kh(h,{shape:l},e)):(h.setShape(l),h.style.strokePercent=0,$h(h,{style:{strokePercent:1}},e)),a.oldLayout=l)},uS);function uS(){this._labelList=[],this._chartViewList=[]}var hS=ur();function cS(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function pS(t){var e,n;return t&&"transparent"!==t?"string"==typeof t&&-1<t.indexOf("rgba")&&((n=nn(t))&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])):t="none",{color:t,opacity:null==e?1:e}}function dS(s,l,u){u=u||function(t,e){return t===e},s=s.slice();var h=(l=l.slice()).length,c=s.length,p=1,t=h+c,d=[{newPos:-1,components:[]}],e=fS(d[0],l,s,0,u);if(d[0].newPos+1>=h&&c<=e+1){for(var n=[],i=0;i<l.length;i++)n.push(i);return[{indices:n,count:l.length,added:!1,removed:!1}]}for(;p<=t;){var o=function(){for(var t=-1*p;t<=p;t+=2){var e,n=d[t-1],i=d[t+1],o=(i?i.newPos:0)-t;n&&(d[t-1]=void 0);var r=n&&n.newPos+1<h,a=i&&0<=o&&o<c;if(r||a){if(!r||a&&n.newPos<i.newPos?gS((e={newPos:(e=i).newPos,components:e.components.slice(0)}).components,!1,!0):((e=n).newPos++,gS(e.components,!0,!1)),o=fS(e,l,s,t,u),e.newPos+1>=h&&c<=o+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e<n;e++){var r=t[e];if(r.removed){for(s=o;s<o+r.count;s++)r.indices.push(s);o+=r.count}else{for(var a=[],s=i;s<i+r.count;s++)a.push(s);r.indices=a,i+=r.count,r.added||(o+=r.count)}}return t}(e.components);d[t]=e}else d[t]=void 0}p++}();if(o)return o}}function fS(t,e,n,i,o){for(var r=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1<r&&l+1<a&&o(e[s+1],n[l+1]);)s++,l++,u++;return u&&t.components.push({count:u,added:!1,removed:!1,indices:[]}),t.newPos=s,l}function gS(t,e,n){var i=t[t.length-1];i&&i.added===e&&i.removed===n?t[t.length-1]={count:i.count+1,added:e,removed:n,indices:[]}:t.push({count:1,added:e,removed:n,indices:[]})}var yS="none",mS=Math.round,vS=Math.sin,_S=Math.cos,xS=Math.PI,bS=2*Math.PI,wS=180/xS;function SS(t){return mS(1e3*t)/1e3}function MS(t){return mS(1e4*t)/1e4}function IS(t){return t<1e-4&&-1e-4<t}function TS(t,e){e&&CS(t,"transform","matrix("+SS(e[0])+","+SS(e[1])+","+SS(e[2])+","+SS(e[3])+","+MS(e[4])+","+MS(e[5])+")")}function CS(t,e,n){n&&("linear"===n.type||"radial"===n.type)||t.setAttribute(e,n)}function DS(t,e,n){var i,o,r,a=null==e.opacity?1:e.opacity;n instanceof Ps?CS(t,"opacity",a+""):(null!=(r=(r=e).fill)&&r!==yS?(CS(t,"fill",(i=pS(e.fill)).color),CS(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i.opacity*a:i.opacity*a)+"")):CS(t,"fill",yS),null!=(r=(r=e).stroke)&&r!==yS?(CS(t,"stroke",(i=pS(e.stroke)).color),r=e.lineWidth,CS(t,"stroke-width",((o=e.strokeNoScale?n.getLineScale():1)?r/o:0)+""),CS(t,"paint-order",e.strokeFirst?"stroke":"fill"),CS(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i.opacity*a:i.opacity*a)+""),(a=e.lineDash&&0<r&&Pm(e.lineDash,r))?(r=e.lineDashOffset,o&&1!==o&&(a=L(a,function(t){return t/o}),r=r&&mS(r/=o)),CS(t,"stroke-dasharray",a.join(",")),CS(t,"stroke-dashoffset",(r||0)+"")):CS(t,"stroke-dasharray",yS),e.lineCap&&CS(t,"stroke-linecap",e.lineCap),e.lineJoin&&CS(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&CS(t,"stroke-miterlimit",e.miterLimit+"")):CS(t,"stroke",yS))}var AS=(kS.prototype.reset=function(){this._d=[],this._str=""},kS.prototype.moveTo=function(t,e){this._add("M",t,e)},kS.prototype.lineTo=function(t,e){this._add("L",t,e)},kS.prototype.bezierCurveTo=function(t,e,n,i,o,r){this._add("C",t,e,n,i,o,r)},kS.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},kS.prototype.arc=function(t,e,n,i,o,r){this.ellipse(t,e,n,n,0,i,o,r)},kS.prototype.ellipse=function(t,e,n,i,o,r,a,s){var l=0===this._d.length,u=a-r,h=!s,c=Math.abs(u),p=IS(c-bS)||(h?bS<=u:bS<=-u),a=!1,a=!!p||!IS(c)&&xS<=(0<u?u%bS:u%bS+bS)==!!h,s=MS(t+n*_S(r)),c=MS(e+i*vS(r));p&&(u=h?bS-1e-4:1e-4-bS,a=!0,l&&this._d.push("M",s,c));t=MS(t+n*_S(r+u)),u=MS(e+i*vS(r+u));if(isNaN(s)||isNaN(c)||isNaN(n)||isNaN(i)||isNaN(o)||isNaN(wS)||isNaN(t)||isNaN(u))return"";this._d.push("A",MS(n),MS(i),mS(o*wS),+a,+h,t,u)},kS.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e),this._add("Z")},kS.prototype.closePath=function(){0<this._d.length&&this._add("Z")},kS.prototype._add=function(t,e,n,i,o,r,a,s,l){this._d.push(t);for(var u=1;u<arguments.length;u++){var h=arguments[u];if(isNaN(h))return void(this._invalid=!0);this._d.push(MS(h))}},kS.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(" "),this._d=[]},kS.prototype.getStr=function(){return this._str},kS);function kS(){}var LS={brush:function(t){var e=t.style,n=t.__svgEl;n||(n=cS("path"),t.__svgEl=n),t.path||t.createPathProxy();var i=t.path;t.shapeChanged()&&(i.beginPath(),t.buildPath(i,t.shape),t.pathUpdated());var o=i.getVersion(),r=t,a=r.__svgPathBuilder;(r.__svgPathVersion!==o||!a||t.style.strokePercent<1)&&((a=a||(r.__svgPathBuilder=new AS)).reset(),i.rebuildPath(a,t.style.strokePercent),a.generateStr(),r.__svgPathVersion=o),CS(n,"d",a.getStr()),DS(n,e,t),TS(n,t.transform)}},PS={brush:function(t){var e,n,i,o,r,a,s,l=t.style,u=l.image;u instanceof HTMLImageElement?u=u.src:u instanceof HTMLCanvasElement&&(u=u.toDataURL()),u&&(e=l.x||0,n=l.y||0,i=l.width,o=l.height,(r=t.__svgEl)||(r=cS("image"),t.__svgEl=r),u!==t.__imageSrc&&(a="href",s=u,r.setAttributeNS("http://www.w3.org/1999/xlink",a,s),t.__imageSrc=u),CS(r,"width",i+""),CS(r,"height",o+""),CS(r,"x",e+""),CS(r,"y",n+""),DS(r,l,t),TS(r,t.transform))}},OS={left:"start",right:"end",center:"middle",middle:"middle"};var RS={brush:function(t){var e,n,i,o=t.style,r=o.text;null!=r&&(r+=""),!r||isNaN(o.x)||isNaN(o.y)||((e=t.__svgEl)||(e=cS("text"),i="xml:space",n="preserve",e.setAttributeNS("http://www.w3.org/XML/1998/namespace",i,n),t.__svgEl=e),i=o.font||Ei,e.style.font=i,e.textContent=r,DS(e,o,t),TS(e,t.transform),n=o.x||0,r=o.y||0,t=Wi(i),"top"===(i=o.textBaseline)?r+=t/2:"bottom"===i&&(r-=t/2),r=r,o=OS[o.textAlign]||o.textAlign,CS(e,"dominant-baseline","central"),CS(e,"text-anchor",o),CS(e,"x",n+""),CS(e,"y",r+""))}},n=(NS.prototype.getDefs=function(t){var e=this._svgRoot,n=this._svgRoot.getElementsByTagName("defs");if(0!==n.length)return n[0];if(t){var i=e.insertBefore(this.createElement("defs"),e.firstChild);return i.contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;0<=n;--n)if(e[n]===t)return!0;return!1}),i}return null},NS.prototype.doUpdate=function(t,e){var n;t&&(n=this.getDefs(!1),t[this._domName]&&n.contains(t[this._domName])?"function"==typeof e&&e(t):(e=this.add(t))&&(t[this._domName]=e))},NS.prototype.add=function(t){return null},NS.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},NS.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},NS.prototype.getDoms=function(){var i=this.getDefs(!1);if(!i)return[];var o=[];return E(this._tagNames,function(t){for(var e=i.getElementsByTagName(t),n=0;n<e.length;n++)o.push(e[n])}),o},NS.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;E(t,function(t){t[e._markLabel]="0"})},NS.prototype.markDomUsed=function(t){t&&(t[this._markLabel]="1")},NS.prototype.markDomUnused=function(t){t&&(t[this._markLabel]="0")},NS.prototype.isDomUnused=function(t){return t&&"1"!==t[this._markLabel]},NS.prototype.removeUnused=function(){var e=this,n=this.getDefs(!1);n&&E(this.getDoms(),function(t){e.isDomUnused(t)&&n.removeChild(t)})},NS.prototype.getSvgProxy=function(t){return t instanceof Ss?LS:t instanceof Ps?PS:t instanceof Cs?RS:LS},NS.prototype.getSvgElement=function(t){return t.__svgEl},NS);function NS(t,e,n,i,o){this.nextId=0,this._domName="_dom",this.createElement=cS,this._zrId=t,this._svgRoot=e,this._tagNames="string"==typeof n?[n]:n,this._markLabel=i,o&&(this._domName=o)}function ES(t){return"linear"===t.type}function zS(t){return"radial"===t.type}function BS(t){return t&&("linear"===t.type||"radial"===t.type)}var VS,GS=(u(FS,VS=n),FS.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,E(["fill","stroke"],function(t){var e,n,i=r.style[t];BS(i)&&(e=i,n=a.getDefs(!0),i=void 0,e.__dom?(i=e.__dom,n.contains(e.__dom)||a.addDom(i)):i=a.add(e),a.markUsed(r),i=i.getAttribute("id"),o.setAttribute(t,"url(#"+i+")"))}))},FS.prototype.add=function(t){var e;if(ES(t))e=this.createElement("linearGradient");else{if(!zS(t))return x("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr"+this._zrId+"-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},FS.prototype.update=function(n){var i;BS(n)&&(i=this).doUpdate(n,function(){var t,e=n.__dom;e&&(t=e.tagName,"linear"===(e=n.type)&&"linearGradient"===t||"radial"===e&&"radialGradient"===t?i.updateDom(n,n.__dom):(i.removeDom(n),i.add(n)))})},FS.prototype.updateDom=function(t,e){if(ES(t))e.setAttribute("x1",t.x+""),e.setAttribute("y1",t.y+""),e.setAttribute("x2",t.x2+""),e.setAttribute("y2",t.y2+"");else{if(!zS(t))return void x("Illegal gradient type.");e.setAttribute("cx",t.x+""),e.setAttribute("cy",t.y+""),e.setAttribute("r",t.r+"")}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var n=t.colorStops,i=0,o=n.length;i<o;++i){var r=this.createElement("stop");r.setAttribute("offset",100*n[i].offset+"%");var a,s=n[i].color;-1<s.indexOf("rgba")?(a=nn(s)[3],s=an(s),r.setAttribute("stop-color","#"+s),r.setAttribute("stop-opacity",a+"")):r.setAttribute("stop-color",n[i].color),e.appendChild(r)}t.__dom=e},FS.prototype.markUsed=function(t){var e;t.style&&((e=t.style.fill)&&e.__dom&&VS.prototype.markDomUsed.call(this,e.__dom),(e=t.style.stroke)&&e.__dom&&VS.prototype.markDomUsed.call(this,e.__dom))},FS);function FS(t,e){return VS.call(this,t,e,["linearGradient","radialGradient"],"__gradient_in_use__")||this}function HS(t){return t&&(t.image||t.svgElement)}var WS,US=new jc,YS=(u(XS,WS=n),XS.prototype.addWithoutUpdate=function(o,r){var a;r&&r.style&&(a=this,E(["fill","stroke"],function(t){var e,n,i=r.style[t];HS(i)&&(e=a.getDefs(!0),(n=US.get(i))?e.contains(n)||a.addDom(n):n=a.add(i),a.markUsed(r),n=n.getAttribute("id"),o.setAttribute(t,"url(#"+n+")"))}))},XS.prototype.add=function(t){if(HS(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},XS.prototype.update=function(e){var n;HS(e)&&(n=this).doUpdate(e,function(){var t=US.get(e);n.updateDom(e,t)})},XS.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,o=e.getElementsByTagName("image");if(o.length){if(!t.image)return void e.removeChild(o[0]);i=o[0]}else t.image&&(i=this.createElement("image"));i&&(n=void 0,"string"==typeof(o=t.image)?n=o:o instanceof HTMLImageElement?n=o.src:o instanceof HTMLCanvasElement&&(n=o.toDataURL()),n&&(i.setAttribute("href",n),i.setAttribute("x","0"),i.setAttribute("y","0"),(n=Rr(n,i,{dirty:function(){}},function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}))&&n.width&&n.height&&(e.setAttribute("width",n.width+""),e.setAttribute("height",n.height+"")),e.appendChild(i)))}i="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",i),US.set(t,e)},XS.prototype.markUsed=function(t){t.style&&(HS(t.style.fill)&&WS.prototype.markDomUsed.call(this,US.get(t.style.fill)),HS(t.style.stroke)&&WS.prototype.markDomUsed.call(this,US.get(t.style.stroke)))},XS);function XS(t,e){return WS.call(this,t,e,["pattern"],"__pattern_in_use__")||this}function ZS(t){t=t.__clipPaths;return t&&0<t.length}var jS,qS=(u(KS,jS=n),KS.prototype.markAllUnused=function(){jS.prototype.markAllUnused.call(this);var t,e=this._refGroups;for(t in e)e.hasOwnProperty(t)&&this.markDomUnused(e[t]);this._keyDuplicateCount={}},KS.prototype._getClipPathGroup=function(t,e){if(ZS(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,t=function(t){var e=[];if(t)for(var n=0;n<t.length;n++){var i=t[n];e.push(i.id)}return e.join(",")}(n);return Lm(n,e&&e.__clipPaths)&&(i[t]=i[t]||0,i[t]&&(t+="-"+i[t]),i[t]++),this._refGroups[t]||(this._refGroups[t]=this.createElement("g"))}},KS.prototype.update=function(t,e){e=this._getClipPathGroup(t,e);return e&&(this.markDomUsed(e),this.updateDom(e,t.__clipPaths)),e},KS.prototype.updateDom=function(t,e){var n,i,o,r;e&&0<e.length?(n=this.getDefs(!0),o=i=void 0,(r=e[0])._dom?(o=r._dom.getAttribute("id"),i=r._dom,n.contains(i)||n.appendChild(i)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(i=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(i),r._dom=i),this.getSvgProxy(r).brush(r),r=this.getSvgElement(r),i.innerHTML="",i.appendChild(r),t.setAttribute("clip-path","url(#"+o+")"),1<e.length&&this.updateDom(i,e.slice(1))):t&&t.setAttribute("clip-path","none")},KS.prototype.markUsed=function(t){var e=this;t.__clipPaths&&E(t.__clipPaths,function(t){t._dom&&jS.prototype.markDomUsed.call(e,t._dom)})},KS.prototype.removeUnused=function(){jS.prototype.removeUnused.call(this);var t,e,n={},i=this._refGroups;for(t in i)i.hasOwnProperty(t)&&(e=i[t],this.isDomUnused(e)?e.parentNode&&e.parentNode.removeChild(e):n[t]=e);this._refGroups=n},KS);function KS(t,e){e=jS.call(this,t,e,"clipPath","__clippath_in_use__")||this;return e._refGroups={},e._keyDuplicateCount={},e}var $S,JS=(u(QS,$S=n),QS.prototype._getFromPool=function(){var t,e=this._shadowDomPool.pop();return e||((e=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++),t=this.createElement("feDropShadow"),e.appendChild(t),this.addDom(e)),e},QS.prototype.update=function(t,e){var n,i=e.style;(n=i)&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)?(n=(i=e).style,i=i.getGlobalScale(),n=[n.shadowColor,(n.shadowBlur||0).toFixed(2),(n.shadowOffsetX||0).toFixed(2),(n.shadowOffsetY||0).toFixed(2),i[0],i[1]].join(","),(i=e._shadowDom=this._shadowDomMap[n])||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)):this.remove(t,e)},QS.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.removeAttribute("filter"))},QS.prototype.updateDom=function(t,e,n){var i,o,r=n.children[0],a=e.style,s=e.getGlobalScale(),l=s[0],u=s[1];l&&u&&(i=a.shadowOffsetX||0,o=a.shadowOffsetY||0,s=a.shadowBlur,a=pS(a.shadowColor),r.setAttribute("dx",i/l+""),r.setAttribute("dy",o/u+""),r.setAttribute("flood-color",a.color),r.setAttribute("flood-opacity",a.opacity+""),u=s/2/l+" "+s/2/u,r.setAttribute("stdDeviation",u),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),n=(e._shadowDom=n).getAttribute("id"),t.setAttribute("filter","url(#"+n+")"))},QS.prototype.removeUnused=function(){if(this.getDefs(!1)){var t,e=this._shadowDomPool,n=this._shadowDomMap;for(t in n)n.hasOwnProperty(t)&&e.push(n[t]);this._shadowDomMap={}}},QS);function QS(t,e){e=$S.call(this,t,e,["filter"],"__filter_in_use__","_shadowDom")||this;return e._shadowDomMap={},e._shadowDomPool=[],e}function tM(t){return parseInt(t,10)}function eM(t){return t instanceof Ss?LS:t instanceof Ps?PS:t instanceof Cs?RS:LS}function nM(t,e){return e&&t&&e.parentNode!==t}function iM(t,e,n){nM(t,e)&&n&&((n=n.nextSibling)?t.insertBefore(e,n):t.appendChild(e))}function oM(t,e){var n;nM(t,e)&&((n=t.firstChild)?t.insertBefore(e,n):t.appendChild(e))}function rM(t){return t.__svgEl}var aM=(sM.prototype.getType=function(){return"svg"},sM.prototype.getViewportRoot=function(){return this._viewport},sM.prototype.getSvgDom=function(){return this._svgDom},sM.prototype.getSvgRoot=function(){return this._svgRoot},sM.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},sM.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},sM.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=cS("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0);var n=pS(t),t=n.color,n=n.opacity;e.setAttribute("fill",t),e.setAttribute("fill-opacity",n),this._backgroundRoot.appendChild(e),this._backgroundNode=e},sM.prototype.createSVGElement=cS,sM.prototype.paintOne=function(t){var e=eM(t);return e&&e.brush(t),rM(t)},sM.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,o=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),o.markAllUnused();for(var r=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u<s;u++){var h=eM(b=t[u]),c=rM(b);b.invisible||(!b.__dirty&&c||(h&&h.brush(b),(c=rM(b))&&b.style&&(e.update(b.style.fill),e.update(b.style.stroke),n.update(b.style.fill),n.update(b.style.stroke),o.update(c,b)),b.__dirty=0),c&&l.push(b))}for(var p,d,f,g,y,m,v=dS(a,l),u=0;u<v.length;u++)if((x=v[u]).removed)for(var _=0;_<x.count;_++){c=rM(b=a[x.indices[_]]);ZS(b)?(g=c)&&g.parentNode&&g.parentNode.removeChild(g):(f=r,(g=c)&&f&&g.parentNode===f&&f.removeChild(g))}for(var x,u=0;u<v.length;u++)if(!(x=v[u]).removed)for(_=0;_<x.count;_++){var b=l[x.indices[_]],w=i.update(b,y);w!==m&&(p=d,w&&(p?iM(r,w,p):oM(r,w),d=w,p=null),m=w);c=rM(b);p?iM(m||r,c,p):oM(m||r,c),p=c||p,m||(d=p),e.markUsed(b),e.addWithoutUpdate(c,b),n.markUsed(b),n.addWithoutUpdate(c,b),i.markUsed(b),y=b}e.removeUnused(),n.removeUnused(),i.removeUnused(),o.removeUnused(),this._visibleList=l},sM.prototype.resize=function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width===t&&this._height===e||(this._width=t,this._height=e,(n=n.style).width=t+"px",n.height=e+"px",(n=this._svgDom).setAttribute("width",t+""),n.setAttribute("height",e+"")),this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},sM.prototype.getWidth=function(){return this._width},sM.prototype.getHeight=function(){return this._height},sM.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);t=this.root,e=document.defaultView.getComputedStyle(t);return(t[i]||tM(e[n])||tM(t.style[n]))-(tM(e[o])||0)-(tM(e[r])||0)|0},sM.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},sM.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},sM.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,t=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(t.replace(/></g,">\n\r<"))},sM);function sM(t,e,n,i){this.type="svg",this.refreshHover=lM("refreshHover"),this.pathToImage=lM("pathToImage"),this.configLayer=lM("configLayer"),this.root=t,this.storage=e,this._opts=n=P({},n||{});var o=cS("svg");o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),o.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),o.setAttribute("version","1.1"),o.setAttribute("baseProfile","full"),o.style.cssText="user-select:none;position:absolute;left:0;top:0;";var r=cS("g");o.appendChild(r);e=cS("g");o.appendChild(e),this._gradientManager=new GS(i,e),this._patternManager=new YS(i,e),this._clipPathManager=new qS(i,e),this._shadowManager=new JS(i,e);i=document.createElement("div");i.style.cssText="overflow:hidden;position:relative",this._svgDom=o,this._svgRoot=e,this._backgroundRoot=r,this._viewport=i,t.appendChild(i),i.appendChild(o),this.resize(n.width,n.height),this._visibleList=[]}function lM(t){return function(){x('In SVG mode painter not support method "'+t+'"')}}function uM(){return!1}function hM(t,e,n){var i=D(),o=e.getWidth(),r=e.getHeight(),e=i.style;return e&&(e.position="absolute",e.left="0",e.top="0",e.width=o+"px",e.height=r+"px",i.setAttribute("data-zr-dom-id",t)),i.width=o*n,i.height=r*n,i}var cM,pM=(u(dM,cM=Gt),dM.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},dM.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},dM.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},dM.prototype.setUnpainted=function(){this.__firstTimePaint=!0},dM.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=hM("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},dM.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var l=[],u=this.maxRepaintRectCount,h=!1,c=new Li(0,0,0,0);function o(t){if(t.isFinite()&&!t.isZero())if(0===l.length)(e=new Li(0,0,0,0)).copy(t),l.push(e);else{for(var e,n=!1,i=1/0,o=0,r=0;r<l.length;++r){var a=l[r];if(a.intersect(t)){var s=new Li(0,0,0,0);s.copy(a),s.union(t),l[r]=s,n=!0;break}h&&(c.copy(t),c.union(a),s=t.width*t.height,a=a.width*a.height,(a=c.width*c.height-s-a)<i&&(i=a,o=r))}h&&(l[o].union(t),n=!0),n||((e=new Li(0,0,0,0)).copy(t),l.push(e)),h=h||l.length>=u}}for(var r,a=this.__startIndex;a<this.__endIndex;++a)(s=t[a])&&(d=s.shouldBePainted(n,i,!0,!0),(p=s.__isRendered&&(s.__dirty&De||!d)?s.getPrevPaintRect():null)&&o(p),(r=d&&(s.__dirty&De||!s.__isRendered)?s.getPaintRect():null)&&o(r));for(a=this.__prevStartIndex;a<this.__prevEndIndex;++a){var s,p,d=(s=e[a]).shouldBePainted(n,i,!0,!0);!s||d&&s.__zr||!s.__isRendered||(p=s.getPrevPaintRect())&&o(p)}do{for(var f=!1,a=0;a<l.length;)if(l[a].isZero())l.splice(a,1);else{for(var g=a+1;g<l.length;)l[a].intersect(l[g])?(f=!0,l[a].union(l[g]),l.splice(g,1)):g++;a++}}while(f);return this._paintRects=l},dM.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},dM.prototype.resize=function(t,e){var n=this.dpr,i=this.dom,o=i.style,r=this.domBack;o&&(o.width=t+"px",o.height=e+"px"),i.width=t*n,i.height=e*n,r&&(r.width=t*n,r.height=e*n,1!==n&&this.ctxBack.scale(n,n))},dM.prototype.clear=function(t,r,e){var n=this.dom,a=this.ctx,i=n.width,o=n.height;r=r||this.clearColor;var s=this.motionBlur&&!t,l=this.lastFrameAlpha,u=this.dpr,h=this;s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(n,0,0,i/u,o/u));var c=this.domBack;function p(t,e,n,i){var o;a.clearRect(t,e,n,i),r&&"transparent"!==r&&(o=void 0,q(r)?(o=r.__canvasGradient||km(a,r,{x:0,y:0,width:n,height:i}),r.__canvasGradient=o):K(r)&&(o=Vm(a,r,{dirty:function(){h.setUnpainted(),h.__painter.refresh()}})),a.save(),a.fillStyle=o||r,a.fillRect(t,e,n,i),a.restore()),s&&(a.save(),a.globalAlpha=l,a.drawImage(c,t,e,n,i),a.restore())}!e||s?p(0,0,i,o):e.length&&E(e,function(t){p(t.x*u,t.y*u,t.width*u,t.height*u)})},dM);function dM(t,e,n){var i,o=cM.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,n=n||Qn,"string"==typeof t?i=hM(t,e,n):Y(t)&&(t=(i=t).id),o.id=t;t=(o.dom=i).style;return t&&(i.onselectstart=uM,t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none",t.padding="0",t.margin="0",t.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=e,o.config=null,o.dpr=n,o}var fM=314159;function gM(t){return parseInt(t,10)}var yM=(mM.prototype.getType=function(){return"canvas"},mM.prototype.isSingleCanvas=function(){return this._singleCanvas},mM.prototype.getViewportRoot=function(){return this._domRoot},mM.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},mM.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var o=0;o<i.length;o++){var r=i[o],a=this._layers[r];!a.__builtin__&&a.refresh&&(r=0===o?this._backgroundColor:null,a.refresh(r))}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},mM.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},mM.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),e){for(var i,o={inHover:!0,viewWidth:this._width,viewHeight:this._height},r=0;r<e;r++){var a=t[r];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),i||(i=n.ctx).save(),Jm(i,a,o,r===e-1))}i&&i.restore()}},mM.prototype.getHoverLayer=function(){return this.getLayer(1e5)},mM.prototype.paintOne=function(t,e){$m(t,e)},mM.prototype._paintList=function(t,e,n,i){var o,r,a;this._redrawId===i&&(n=n||!1,this._updateLayerStatus(t),o=(r=this._doPaintList(t,e,n)).finished,r=r.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),r&&this._paintHoverList(t),o?this.eachLayer(function(t){t.afterBrush&&t.afterBrush()}):(a=this,Ne(function(){a._paintList(t,e,n,i)})))},mM.prototype._compositeManually=function(){var e=this.getLayer(fM).ctx,n=this._domRoot.width,i=this._domRoot.height;e.clearRect(0,0,n,i),this.eachBuiltinLayer(function(t){t.virtual&&e.drawImage(t.dom,0,0,n,i)})},mM.prototype._doPaintList=function(d,f,g){for(var y=this,m=[],v=this._opts.useDirtyRect,t=0;t<this._zlevelList.length;t++){var e=this._zlevelList[t],e=this._layers[e];e.__builtin__&&e!==this._hoverlayer&&(e.__dirty||g)&&m.push(e)}for(var _=!0,x=!1,b=this,n=0;n<m.length;n++)!function(t){var i,o=m[t],r=o.ctx,e=v&&o.createRepaintRects(d,f,b._width,b._height),a=g?o.__startIndex:o.__drawIndex,s=!g&&o.incremental&&Date.now,l=s&&Date.now(),n=o.zlevel===b._zlevelList[0]?b._backgroundColor:null;o.__startIndex===o.__endIndex?o.clear(!1,n,e):a===o.__startIndex&&((t=d[a]).incremental&&t.notClear&&!g||o.clear(!1,n,e)),-1===a&&(console.error("For some unknown reason. drawIndex is -1"),a=o.__startIndex);function u(t){var e={inHover:!1,allClipped:!1,prevEl:null,viewWidth:y._width,viewHeight:y._height};for(i=a;i<o.__endIndex;i++){var n=d[i];if(n.__inHover&&(x=!0),y._doPaintEl(n,o,v,t,e,i===o.__endIndex-1),s)if(15<Date.now()-l)break}e.prevElClipPaths&&r.restore()}if(e)if(0===e.length)i=o.__endIndex;else for(var h=b.dpr,c=0;c<e.length;++c){var p=e[c];r.save(),r.beginPath(),r.rect(p.x*h,p.y*h,p.width*h,p.height*h),r.clip(),u(p),r.restore()}else r.save(),u(),r.restore();o.__drawIndex=i,o.__drawIndex<o.__endIndex&&(_=!1)}(n);return w.wxa&&E(this._layers,function(t){t&&t.ctx&&t.ctx.draw&&t.ctx.draw()}),{finished:_,needsRefreshHover:x}},mM.prototype._doPaintEl=function(t,e,n,i,o,r){e=e.ctx;n?(n=t.getPaintRect(),(!i||n&&n.intersect(i))&&(Jm(e,t,o,r),t.setPrevPaintRect(n))):Jm(e,t,o,r)},mM.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=fM);var n=this._layers[t];return n||((n=new pM("zr_"+t,this,this.dpr)).zlevel=t,n.__builtin__=!0,this._layerConfig[t]?b(n,this._layerConfig[t],!0):this._layerConfig[t-.01]&&b(n,this._layerConfig[t-.01],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},mM.prototype.insertLayer=function(t,e){var n,i=this._layers,o=this._zlevelList,r=o.length,a=this._domRoot,s=null,l=-1;if(i[t])x("ZLevel "+t+" has been used already");else if((n=e)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<r&&t>o[0]){for(l=0;l<r-1&&!(o[l]<t&&o[l+1]>t);l++);s=i[o[l]]}o.splice(l+1,0,t),(i[t]=e).virtual||(s?(s=s.dom).nextSibling?a.insertBefore(e.dom,s.nextSibling):a.appendChild(e.dom):a.firstChild?a.insertBefore(e.dom,a.firstChild):a.appendChild(e.dom)),e.__painter=this}else x("Layer of zlevel "+t+" is not valid")},mM.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i];t.call(e,this._layers[o],o)}},mM.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__&&t.call(e,r,o)}},mM.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var o=n[i],r=this._layers[o];r.__builtin__||t.call(e,r,o)}},mM.prototype.getLayers=function(){return this._layers},mM.prototype._updateLayerStatus=function(t){function e(t){o&&(o.__endIndex!==t&&(o.__dirty=!0),o.__endIndex=t)}if(this.eachBuiltinLayer(function(t,e){t.__dirty=t.__used=!1}),this._singleCanvas)for(var n=1;n<t.length;n++)if((s=t[n]).zlevel!==t[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}for(var i,o=null,r=0,a=0;a<t.length;a++){var s,l=(s=t[a]).zlevel,u=void 0;i!==l&&(i=l,r=0),s.incremental?((u=this.getLayer(l+.001,this._needsManuallyCompositing)).incremental=!0,r=1):u=this.getLayer(l+(0<r?.01:0),this._needsManuallyCompositing),u.__builtin__||x("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==a&&(u.__dirty=!0),u.__startIndex=a,u.incremental?u.__drawIndex=-1:u.__drawIndex=a,e(a),o=u),s.__dirty&De&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=a))}e(a),this.eachBuiltinLayer(function(t,e){!t.__used&&0<t.getElementCount()&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)})},mM.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},mM.prototype._clearLayer=function(t){t.clear()},mM.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,function(t){t.setUnpainted()})},mM.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?b(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var o=this._zlevelList[i];o!==t&&o!==t+.01||b(this._layers[o],n[t],!0)}}},mM.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(C(n,t),1))},mM.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||e!==this._height){for(var o in n.style.width=t+"px",n.style.height=e+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(null==t||null==e)return;this._width=t,this._height=e,this.getLayer(fM).resize(t,e)}return this},mM.prototype.clearLayer=function(t){t=this._layers[t];t&&t.clear()},mM.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},mM.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[fM].dom;var e=new pM("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,o=e.dom.height;this.eachLayer(function(t){t.__builtin__?n.drawImage(t.dom,0,0,i,o):t.renderToCanvas&&(n.save(),t.renderToCanvas(n),n.restore())})}else for(var r={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,l=a.length;s<l;s++){var u=a[s];Jm(n,u,r,s===l-1)}return e.dom},mM.prototype.getWidth=function(){return this._width},mM.prototype.getHeight=function(){return this._height},mM.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t],r=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);t=this.root,e=document.defaultView.getComputedStyle(t);return(t[i]||gM(e[n])||gM(t.style[n]))-(gM(e[o])||0)-(gM(e[r])||0)|0},mM.prototype.pathToImage=function(t,e){e=e||this.dpr;var n=document.createElement("canvas"),i=n.getContext("2d"),o=t.getBoundingRect(),r=t.style,a=r.shadowBlur*e,s=r.shadowOffsetX*e,l=r.shadowOffsetY*e,u=t.hasStroke()?r.lineWidth:0,h=Math.max(u/2,a-s),r=Math.max(u/2,s+a),s=Math.max(u/2,a-l),a=Math.max(u/2,l+a),r=o.width+h+r,a=o.height+s+a;n.width=r*e,n.height=a*e,i.scale(e,e),i.clearRect(0,0,r,a),i.dpr=e;e={x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY,rotation:t.rotation,originX:t.originX,originY:t.originY};t.x=h-o.x,t.y=s-o.y,t.rotation=0,t.scaleX=1,t.scaleY=1,t.updateTransform(),t&&Jm(i,t,{inHover:!1,viewWidth:this._width,viewHeight:this._height},!0);n=new Ps({style:{x:0,y:0,image:n}});return P(t,e),n},mM);function mM(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var o=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=n=P({},n||{}),this.dpr=n.devicePixelRatio||Qn,this._singleCanvas=o;var r=(this.root=t).style;r&&(r.webkitTapHighlightColor="transparent",r.webkitUserSelect="none",r.userSelect="none",r["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var a=this._zlevelList;this._prevDisplayList=[];var s,r=this._layers;o?(e=(s=t).width,o=s.height,null!=n.width&&(e=n.width),null!=n.height&&(o=n.height),this.dpr=n.devicePixelRatio||1,s.width=e*this.dpr,s.height=o*this.dpr,this._width=e,this._height=o,(s=new pM(s,this,this.dpr)).__builtin__=!0,s.initContext(),(r[fM]=s).zlevel=fM,a.push(fM),this._domRoot=t):(this._width=this._getSize(0),this._height=this._getSize(1),a=this._domRoot=(r=this._width,s=this._height,(a=document.createElement("div")).style.cssText=["position:relative","width:"+r+"px","height:"+s+"px","padding:0","margin:0","border-width:0"].join(";")+";",a),t.appendChild(a))}var vM,_M=(u(xM,vM=yy),xM.prototype.getInitialData=function(t){t=t.coordinateSystem;if("polar"!==t&&"cartesian2d"!==t)throw new Error("Line not support coordinateSystem besides cartesian and polar");return ab(null,this,{useEncodeDefaulter:!0})},xM.prototype.getLegendIcon=function(t){var e=new io,n=Cm("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);e.add(n),n.setStyle(t.lineStyle);var i=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),n="none"===i?"circle":i,i=.8*t.itemHeight,i=Cm(n,(t.itemWidth-i)/2,(t.itemHeight-i)/2,i,i,t.itemStyle.fill);e.add(i),i.setStyle(t.itemStyle);o="inherit"===t.iconRotate?o:t.iconRotate||0;return i.rotation=o*Math.PI/180,i.setOrigin([t.itemWidth/2,t.itemHeight/2]),-1<n.indexOf("empty")&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),e},xM.type="series.line",xM.dependencies=["grid","polar"],xM.defaultOption={zlevel:0,z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0,lineStyle:{width:"bolder"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},xM);function xM(){var t=null!==vM&&vM.apply(this,arguments)||this;return t.type=xM.type,t.hasSymbolVisual=!0,t}function bM(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var o=Jf(t,e,n[0]);return null!=o?o+"":null}if(i){for(var r=[],a=0;a<n.length;a++)r.push(Jf(t,e,n[a]));return r.join(" ")}}function wM(t,e){var n=t.mapDimensionsAll("defaultedLabel");if(!G(e))return e+"";for(var i=[],o=0;o<n.length;o++){var r=t.getDimensionIndex(n[o]);0<=r&&i.push(e[r])}return i.join(" ")}var SM,MM=(u(IM,SM=io),IM.prototype._createSymbol=function(t,e,n,i,o){this.removeAll();o=Cm(t,-1,-1,2,2,null,o);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=TM,this._symbolType=t,this.add(o)},IM.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},IM.prototype.getSymbolType=function(){return this._symbolType},IM.prototype.getSymbolPath=function(){return this.childAt(0)},IM.prototype.highlight=function(){zl(this.childAt(0))},IM.prototype.downplay=function(){Bl(this.childAt(0))},IM.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},IM.prototype.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":e.cursor},IM.prototype.updateData=function(t,e,n,i){this.silent=!1;var o,r,a,s=t.getItemVisual(e,"symbol")||"circle",l=t.hostModel,u=IM.getSymbolSize(t,e),h=s!==this._symbolType,c=i&&i.disableAnimation;h?(o=t.getItemVisual(e,"symbolKeepAspect"),this._createSymbol(s,t,e,u,o)):((r=this.childAt(0)).silent=!1,a={scaleX:u[0]/2,scaleY:u[1]/2},c?r.attr(a):Kh(r,a,l,e),nc(r)),this._updateCommon(t,e,u,n,i),h&&(r=this.childAt(0),c||(a={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:r.style.opacity}},r.scaleX=r.scaleY=0,r.style.opacity=0,$h(r,a,l,e))),c&&this.childAt(0).stopAnimation("remove"),this._seriesModel=l},IM.prototype._updateCommon=function(e,t,n,i,o){var r,a,s,l,u,h,c=this.childAt(0),p=e.hostModel;i&&(r=i.emphasisItemStyle,s=i.blurItemStyle,a=i.selectItemStyle,l=i.focus,u=i.blurScope,h=i.labelStatesModels,v=i.hoverScale,g=i.cursorStyle),i&&!e.hasItemOption||(r=(d=(f=i&&i.itemModel?i.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=f.getModel(["select","itemStyle"]).getItemStyle(),s=f.getModel(["blur","itemStyle"]).getItemStyle(),l=d.get("focus"),u=d.get("blurScope"),h=Oc(f),v=d.getShallow("scale"),g=f.getShallow("cursor"));var d=e.getItemVisual(t,"symbolRotate");c.attr("rotation",(d||0)*Math.PI/180||0);var f=Am(e.getItemVisual(t,"symbolOffset"),n);f&&(c.x=f[0],c.y=f[1]),g&&c.attr("cursor",g);d=e.getItemVisual(t,"style"),f=d.fill;c instanceof Ps?(y=c.style,c.useStyle(P({image:y.image,x:y.x,y:y.y,width:y.width,height:y.height},d))):(c.__isEmptyBrush?c.useStyle(P({},d)):c.useStyle(d),c.style.decal=null,c.setColor(f,o&&o.symbolInnerColor),c.style.strokeNoScale=!0);var g=e.getItemVisual(t,"liftZ"),y=this._z2;null!=g?null==y&&(this._z2=c.z2,c.z2+=g):null!=y&&(c.z2=y,this._z2=null);var m=o&&o.useNameLabel;Pc(c,h,{labelFetcher:p,labelDataIndex:t,defaultText:function(t){return m?e.getName(t):bM(e,t)},inheritColor:f,defaultOpacity:d.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var v,n=c.ensureState("emphasis");n.style=r,c.ensureState("select").style=a,c.ensureState("blur").style=s,v&&(v=Math.max(1.1,3/this._sizeY),n.scaleX=this._sizeX*v,n.scaleY=this._sizeY*v),this.setSymbolScale(1),ql(this,l,u)},IM.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},IM.prototype.fadeOut=function(t,e){var n=this.childAt(0),i=this._seriesModel,o=il(this).dataIndex,r=e&&e.animation;this.silent=n.silent=!0,e&&e.fadeLabel?(e=n.getTextContent())&&Qh(e,{style:{opacity:0}},i,{dataIndex:o,removeOpt:r,cb:function(){n.removeTextContent()}}):n.removeTextContent(),Qh(n,{style:{opacity:0},scaleX:0,scaleY:0},i,{dataIndex:o,cb:t,removeOpt:r})},IM.getSymbolSize=function(t,e){return Dm(t.getItemVisual(e,"symbolSize"))},IM);function IM(t,e,n,i){var o=SM.call(this)||this;return o.updateData(t,e,n,i),o}function TM(t,e){this.parent.drift(t,e)}function CM(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&(!i.isIgnore||!i.isIgnore(n))&&(!i.clipShape||i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function DM(t){return(t=null!=t&&!Y(t)?{isIgnore:t}:t)||{}}function AM(t){var e=t.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),hoverScale:t.get("scale"),labelStatesModels:Oc(e),cursorStyle:e.get("cursor")}}var kM=(LM.prototype.updateData=function(r,a){a=DM(a);var s=this.group,l=r.hostModel,u=this._data,h=this._SymbolCtor,c=a.disableAnimation,p=AM(r),d={disableAnimation:c},f=a.getSymbolPoint||function(t){return r.getItemLayout(t)};u||s.removeAll(),r.diff(u).add(function(t){var e,n=f(t);CM(r,n,t,a)&&((e=new h(r,t,p,d)).setPosition(n),r.setItemGraphicEl(t,e),s.add(e))}).update(function(t,e){var n,i=u.getItemGraphicEl(e),o=f(t);CM(r,o,t,a)?(n=r.getItemVisual(t,"symbol")||"circle",e=i&&i.getSymbolType&&i.getSymbolType(),!i||e&&e!==n?(s.remove(i),(i=new h(r,t,p,d)).setPosition(o)):(i.updateData(r,t,p,d),o={x:o[0],y:o[1]},c?i.attr(o):Kh(i,o,l)),s.add(i),r.setItemGraphicEl(t,i)):s.remove(i)}).remove(function(t){var e=u.getItemGraphicEl(t);e&&e.fadeOut(function(){s.remove(e)})}).execute(),this._getSymbolPoint=f,this._data=r},LM.prototype.isPersistent=function(){return!0},LM.prototype.updateLayout=function(){var n=this,t=this._data;t&&t.eachItemGraphicEl(function(t,e){e=n._getSymbolPoint(e);t.setPosition(e),t.markRedraw()})},LM.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=AM(t),this._data=null,this.group.removeAll()},LM.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}n=DM(n);for(var o=t.start;o<t.end;o++){var r,a=e.getItemLayout(o);CM(e,a,o,n)&&((r=new this._SymbolCtor(e,o,this._seriesScope)).traverse(i),r.setPosition(a),this.group.add(r),e.setItemGraphicEl(o,r))}},LM.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(t){t.fadeOut(function(){e.remove(t)})}):e.removeAll()},LM);function LM(t){this.group=new io,this._SymbolCtor=t||MM}function PM(t,e,n){var i=t.getBaseAxis(),o=t.getOtherAxis(i),r=function(t,e){var n=0,t=t.scale.getExtent();"start"===e?n=t[0]:"end"===e?n=t[1]:0<t[0]?n=t[0]:t[1]<0&&(n=t[1]);return n}(o,n),a=i.dim,s=o.dim,l=e.mapDimension(s),u=e.mapDimension(a),n="x"===s||"radius"===s?1:0,i=L(t.dimensions,function(t){return e.mapDimension(t)}),o=!1,t=e.getCalculationInfo("stackResultDimension");return ob(e,i[0])&&(o=!0,i[0]=t),ob(e,i[1])&&(o=!0,i[1]=t),{dataDimsForPoint:i,valueStart:r,valueAxisDim:s,baseAxisDim:a,stacked:!!o,valueDim:l,baseDim:u,baseDataOffset:n,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function OM(t,e,n,i){var o=NaN;t.stacked&&(o=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(o)&&(o=t.valueStart);var r=t.baseDataOffset,a=[];return a[r]=n.get(t.baseDim,i),a[1-r]=o,e.dataToPoint(a)}var RM="undefined"!=typeof Float32Array,NM=RM?Float32Array:Array;function EM(t){return G(t)?RM?new Float32Array(t):t:new NM(t)}var zM=Math.min,BM=Math.max;function VM(t,e){return isNaN(t)||isNaN(e)}function GM(t,e,n,i,o,r,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y<i;y++){var m=e[2*g],v=e[2*g+1];if(o<=g||g<0)break;if(VM(m,v)){if(l){g+=r;continue}break}if(g===n)t[0<r?"moveTo":"lineTo"](m,v),c=m,p=v;else{var _=m-u,x=v-h;if(_*_+x*x<.5){g+=r;continue}if(0<a){for(var b=g+r,w=e[2*b],S=e[2*b+1];w===m&&S===v&&y<i;)y++,g+=r,w=e[2*(b+=r)],S=e[2*b+1],m=e[2*g],v=e[2*g+1];var M=y+1;if(l)for(;VM(w,S)&&M<i;)M++,w=e[2*(b+=r)],S=e[2*b+1];var I,T,C,D,A,k,L,P=0,O=0,R=void 0,N=void 0;i<=M||VM(w,S)?(d=m,f=v):(P=w-u,O=S-h,T=m-u,C=w-m,D=v-h,A=S-v,L=k=void 0,N="x"===s?(k=Math.abs(T),L=Math.abs(C),d=m-k*a,R=m+k*a,f=v):"y"===s?(k=Math.abs(D),L=Math.abs(A),f=v-k*a,R=d=m,v+k*a):(k=Math.sqrt(T*T+D*D),d=m-P*a*(1-(I=(L=Math.sqrt(C*C+A*A))/(L+k))),f=v-O*a*(1-I),N=v+O*a*I,R=zM(R=m+P*a*I,BM(w,m)),N=zM(N,BM(S,v)),R=BM(R,zM(w,m)),f=v-(O=(N=BM(N,zM(S,v)))-v)*k/L,d=zM(d=m-(P=R-m)*k/L,BM(u,m)),f=zM(f,BM(h,v)),R=m+(P=m-(d=BM(d,zM(u,m))))*L/k,v+(O=v-(f=BM(f,zM(h,v))))*L/k)),t.bezierCurveTo(c,p,d,f,m,v),c=R,p=N}else t.lineTo(m,v)}u=m,h=v,g+=r}return y}var FM,HM=function(){this.smooth=0,this.smoothConstraint=!0},WM=(u(UM,FM=Ss),UM.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},UM.prototype.getDefaultShape=function(){return new HM},UM.prototype.buildPath=function(t,e){var n=e.points,i=0,o=n.length/2;if(e.connectNulls){for(;0<o&&VM(n[2*o-2],n[2*o-1]);o--);for(;i<o&&VM(n[2*i],n[2*i+1]);i++);}for(;i<o;)i+=GM(t,n,i,o,o,1,e.smooth,e.smoothMonotone,e.connectNulls)+1},UM.prototype.getPointOn=function(t,e){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,i,o=this.path.data,r=is.CMD,a="x"===e,s=[],l=0;l<o.length;){var u,h=void 0,c=void 0;switch(o[l++]){case r.M:n=o[l++],i=o[l++];break;case r.L:if(h=o[l++],c=o[l++],(u=a?(t-n)/(h-n):(t-i)/(c-i))<=1&&0<=u){var p=a?(c-i)*u+i:(h-n)*u+n;return a?[t,p]:[p,t]}n=h,i=c;break;case r.C:var h=o[l++],c=o[l++],d=o[l++],f=o[l++],g=o[l++],y=o[l++],m=a?ma(n,h,d,g,t,s):ma(i,c,f,y,t,s);if(0<m)for(var v=0;v<m;v++){var _=s[v];if(_<=1&&0<=_){p=a?ga(i,c,f,y,_):ga(n,h,d,g,_);return a?[t,p]:[p,t]}}n=g,i=y}}},UM);function UM(t){t=FM.call(this,t)||this;return t.type="ec-polyline",t}var YM,XM=(u(ZM,YM=HM),ZM);function ZM(){return null!==YM&&YM.apply(this,arguments)||this}var jM,qM=(u(KM,jM=Ss),KM.prototype.getDefaultShape=function(){return new XM},KM.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,o=0,r=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;0<r&&VM(n[2*r-2],n[2*r-1]);r--);for(;o<r&&VM(n[2*o],n[2*o+1]);o++);}for(;o<r;){var s=GM(t,n,o,r,r,1,e.smooth,a,e.connectNulls);GM(t,i,o+s-1,s,r,-1,e.stackedOnSmooth,a,e.connectNulls),o+=s+1,t.closePath()}},KM);function KM(t){t=jM.call(this,t)||this;return t.type="ec-polygon",t}function $M(t,e,n,i,o){var r=t.getArea(),a=r.x,s=r.y,l=r.width,u=r.height,r=n.get(["lineStyle","width"])||2;a-=r/2,s-=r/2,l+=r,u+=r;var a=Math.floor(a),l=Math.round(l),h=new Fs({shape:{x:a,y:s,width:l,height:u}});return e&&(t=(e=t.getBaseAxis()).isHorizontal(),e=e.inverse,t?(e&&(h.shape.x+=l),h.shape.width=0):(e||(h.shape.y+=u),h.shape.height=0),$h(h,{shape:{width:l,height:u,x:a,y:s}},n,null,i,"function"==typeof o?function(t){o(t,h)}:null)),h}function JM(t,e,n){var i=t.getArea(),o=vo(i.r0,1),r=vo(i.r,1),a=new qu({shape:{cx:vo(t.cx,1),cy:vo(t.cy,1),r0:o,r:r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}});return e&&("angle"===t.getBaseAxis().dim?a.shape.endAngle=i.startAngle:a.shape.r=o,$h(a,{shape:{endAngle:i.endAngle,r:r}},n)),a}function QM(t,e,n,i,o){return t?"polar"===t.type?JM(t,e,n):"cartesian2d"===t.type?$M(t,e,n,i,o):null:null}function tI(t,e){return t.type===e}function eI(t,e){if(t.length===e.length){for(var n=0;n<t.length;n++)if(t[n]!==e[n])return;return 1}}function nI(t){for(var e=1/0,n=1/0,i=-1/0,o=-1/0,r=0;r<t.length;){var a=t[r++],s=t[r++];isNaN(a)||(e=Math.min(a,e),i=Math.max(a,i)),isNaN(s)||(n=Math.min(s,n),o=Math.max(s,o))}return[[e,n],[i,o]]}function iI(t,e){var n=nI(t),i=n[0],t=n[1],n=nI(e),e=n[0],n=n[1];return Math.max(Math.abs(i[0]-e[0]),Math.abs(i[1]-e[1]),Math.abs(t[0]-n[0]),Math.abs(t[1]-n[1]))}function oI(t){return"number"==typeof t?t:t?.5:0}function rI(t,e,n){for(var e=e.getBaseAxis(),i="x"===e.dim||"radius"===e.dim?0:1,o=[],r=0,a=[],s=[],l=[];r<t.length-2;r+=2)switch(l[0]=t[r+2],l[1]=t[r+3],s[0]=t[r],s[1]=t[r+1],o.push(s[0],s[1]),n){case"end":a[i]=l[i],a[1-i]=s[1-i],o.push(a[0],a[1]);break;case"middle":var u=(s[i]+l[i])/2,h=[];a[i]=h[i]=u,a[1-i]=s[1-i],h[1-i]=l[1-i],o.push(a[0],a[1]),o.push(h[0],h[1]);break;default:a[i]=s[i],a[1-i]=l[1-i],o.push(a[0],a[1])}return o.push(t[r++],t[r++]),o}function aI(t,e,n){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count())if("cartesian2d"===e.type){for(var o,r=i.length-1;0<=r;r--){var a,s=t.getDimensionInfo(i[r].dimension);if("x"===(a=s&&s.coordDim)||"y"===a){o=i[r];break}}if(o){var l=e.getAxis(a),u=L(o.stops,function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}}),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());e=function(t,e){var n,i,o=[],r=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:ln((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;s<r;s++){var l=t[s],u=l.coord;if(u<0)n=l;else{if(e<u){i?o.push(a(i,l,e)):n&&o.push(a(n,l,0),a(n,l,e));break}n&&(o.push(a(n,l,0)),n=null),o.push(l),i=l}}return o}(u,"x"===a?n.getWidth():n.getHeight()),n=e.length;if(!n&&h)return u[0].coord<0?c[1]||u[h-1].color:c[0]||u[0].color;var p=e[0].coord-10,u=e[n-1].coord+10,d=u-p;if(d<.001)return"transparent";E(e,function(t){t.offset=(t.coord-p)/d}),e.push({offset:n?e[n-1].offset:.5,color:c[1]||"transparent"}),e.unshift({offset:n?e[0].offset:.5,color:c[0]||"transparent"});e=new Ph(0,0,0,0,e,!0);return e[a]=p,e[a+"2"]=u,e}console.warn("Visual map on line style only support x or y dimension.")}else console.warn("Visual map on line style is only supported on cartesian2d.")}function sI(t,e,n){var i=t.get("showAllSymbol"),t="auto"===i;if(!i||t){var o=n.getAxesByScale("ordinal")[0];if(o&&(!t||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var o=e.count(),r=Math.max(1,Math.round(o/5)),a=0;a<o;a+=r)if(1.5*MM.getSymbolSize(e,a)[t.isHorizontal()?1:0]>i)return!1;return!0}(o,e))){var r=e.mapDimension(o.dim),a={};return E(o.getViewLabels(),function(t){t=o.scale.getRawOrdinalNumber(t.tickValue);a[t]=1}),function(t){return!a.hasOwnProperty(e.get(r,t))}}}}function lI(t){for(var e,n,i=t.length/2;0<i&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}function uI(t,e){return[t[2*e],t[2*e+1]]}function hI(t){if(t.get(["endLabel","show"]))return 1;for(var e=0;e<hl.length;e++)if(t.get([hl[e],"endLabel","show"]))return 1}function cI(n,i,e,t){if(tI(i,"cartesian2d")){var o,r,a=t.getModel("endLabel"),s=a.get("valueAnimation"),l=t.getData(),u={lastFrameIndex:0},h=hI(t)?function(t,e){n._endLabelOnDuring(t,e,l,u,s,a,i)}:null,c=i.getBaseAxis().isHorizontal(),p=$M(i,e,t,function(){var t=n._endLabel;t&&e&&null!=u.originalX&&t.attr({x:u.originalX,y:u.originalY})},h);return t.get("clip",!0)||(o=p.shape,r=Math.max(o.width,o.height),c?(o.y-=r,o.height+=2*r):(o.x-=r,o.width+=2*r)),h&&h(1,p),p}return t.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),JM(i,e,t)}var pI,dI=(u(fI,pI=ky),fI.prototype.init=function(){var t=new io,e=new kM;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},fI.prototype.render=function(t,e,n){var i=this,o=t.coordinateSystem,r=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===o.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),m=!l.isEmpty(),v=l.get("origin"),_=PM(o,a,v),x=m&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),o=EM(2*i),r=0;r<i;r++){var a=OM(n,t,e,r);o[2*r]=a[0],o[2*r+1]=a[1]}return o}(o,a,_),b=t.get("showSymbol"),w=b&&!h&&sI(t,a,o),S=this._data;S&&S.eachItemGraphicEl(function(t,e){t.__temp&&(r.remove(t),S.setItemGraphicEl(e,null))}),b||p.remove(),r.add(g);var M=!h&&t.get("step");o&&o.getArea&&t.get("clip",!0)&&(null!=(I=o.getArea()).width?(I.x-=.1,I.y-=.1,I.width+=.2,I.height+=.2):I.r0&&(I.r0-=.5,I.r+=.5)),this._clipShapeForSymbol=I;_=aI(a,o,n)||a.getVisual("style")[a.getVisual("drawType")];d&&c.type===o.type&&M===this._step?(m&&!f?f=this._newPolygon(u,x):f&&!m&&(g.remove(f),f=this._polygon=null),h||this._initOrUpdateEndLabel(t,o,Jp(_)),(c=g.getClipPath())?$h(c,{shape:cI(this,o,!1,t).shape},t):g.setClipPath(cI(this,o,!0,t)),b&&p.updateData(a,{isIgnore:w,clipShape:I,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),eI(this._stackedOnPoints,x)&&eI(this._points,u)||(y?this._doUpdateAnimation(a,x,o,n,M,v):(M&&(u=rI(u,o,M),x=x&&rI(x,o,M)),d.setShape({points:u}),f&&f.setShape({points:u,stackedOnPoints:x})))):(b&&p.updateData(a,{isIgnore:w,clipShape:I,disableAnimation:!0,getSymbolPoint:function(t){return[u[2*t],u[2*t+1]]}}),y&&this._initSymbolLabelAnimation(a,o,I),M&&(u=rI(u,o,M),x=x&&rI(x,o,M)),d=this._newPolyline(u),m&&(f=this._newPolygon(u,x)),h||this._initOrUpdateEndLabel(t,o,Jp(_)),g.setClipPath(cI(this,o,!0,t)));w=t.get(["emphasis","focus"]),y=t.get(["emphasis","blurScope"]);d.useStyle(A(s.getLineStyle(),{fill:"none",stroke:_,lineJoin:"bevel"})),Ql(d,t,"lineStyle"),0<d.style.lineWidth&&"bolder"===t.get(["emphasis","lineStyle","width"])&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1),il(d).seriesIndex=t.seriesIndex,ql(d,w,y);var I=oI(t.get("smooth")),m=t.get("smoothMonotone"),h=t.get("connectNulls");d.setShape({smooth:I,smoothMonotone:m,connectNulls:h}),f&&(g=a.getCalculationInfo("stackedOnSeries"),s=0,f.useStyle(A(l.getAreaStyle(),{fill:_,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),g&&(s=oI(g.get("smooth"))),f.setShape({smooth:I,stackedOnSmooth:s,smoothMonotone:m,connectNulls:h}),Ql(f,t,"areaStyle"),il(f).seriesIndex=t.seriesIndex,ql(f,w,y));function T(t){i._changePolyState(t)}a.eachItemGraphicEl(function(t){t&&(t.onHoverStateChange=T)}),this._polyline.onHoverStateChange=T,this._data=a,this._coordSys=o,this._stackedOnPoints=x,this._points=u,this._step=M,this._valueOrigin=v,t.get("triggerLineEvent")&&(this.packEventData(t,d),f&&this.packEventData(t,f))},fI.prototype.packEventData=function(t,e){il(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},fI.prototype.highlight=function(t,e,n,i){var o=t.getData(),r=lr(o,i);if(this._changePolyState("emphasis"),!(r instanceof Array)&&null!=r&&0<=r){var a=o.getLayout("points");if(!(u=o.getItemGraphicEl(r))){var s=a[2*r],l=a[2*r+1];if(isNaN(s)||isNaN(l))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s,l))return;var u,h=t.get("zlevel"),a=t.get("z");(u=new MM(o,r)).x=s,u.y=l,u.setZ(h,a);l=u.getSymbolPath().getTextContent();l&&(l.zlevel=h,l.z=a,l.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(r,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ky.prototype.highlight.call(this,t,e,n,i)},fI.prototype.downplay=function(t,e,n,i){var o,r=t.getData(),a=lr(r,i);this._changePolyState("normal"),null!=a&&0<=a?(o=r.getItemGraphicEl(a))&&(o.__temp?(r.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay()):ky.prototype.downplay.call(this,t,e,n,i)},fI.prototype._changePolyState=function(t){var e=this._polygon;Ll(this._polyline,t),e&&Ll(e,t)},fI.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new WM({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e},fI.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new qM({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},fI.prototype._initSymbolLabelAnimation=function(t,l,u){var h,c,e=l.getBaseAxis(),p=e.inverse;"cartesian2d"===l.type?(h=e.isHorizontal(),c=!1):"polar"===l.type&&(h="angle"===e.dim,c=!0);var e=t.hostModel,d=e.get("animationDuration");"function"==typeof d&&(d=d(null));var f=e.get("animationDelay")||0,g="function"==typeof f?f(null):f;t.eachItemGraphicEl(function(t,e){var n,i,o,r,a,s=t;s&&(i=[t.x,t.y],o=a=r=void 0,u&&(o=c?(n=u,i=l.pointToCoord(i),h?(r=n.startAngle,a=n.endAngle,-i[1]/180*Math.PI):(r=n.r0,a=n.r,i[0])):h?(r=u.x,a=u.x+u.width,t.x):(r=u.y+u.height,a=u.y,t.y)),a=a===r?0:(o-r)/(a-r),p&&(a=1-a),r="function"==typeof f?f(e):d*a+g,a=(e=s.getSymbolPath()).getTextContent(),s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:r}),a&&a.animateFrom({style:{opacity:0}},{duration:300,delay:r}),e.disableLabelAnimation=!0)})},fI.prototype._initOrUpdateEndLabel=function(t,e,n){var i,o,r,a=t.getModel("endLabel");hI(t)?(i=t.getData(),o=this._polyline,this._endLabel||((this._endLabel=new Xs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0),0<=(r=lI(i.getLayout("points")))&&(Pc(o,Oc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:r,defaultText:function(t,e,n){return null!=n?wM(i,n):bM(i,t)},enableTextSetter:!0},(t=a,e=(a=(r=e).getBaseAxis()).isHorizontal(),r=a.inverse,a=e?r?"right":"left":"center",r=e?"middle":r?"top":"bottom",{normal:{align:t.get("align")||a,verticalAlign:t.get("verticalAlign")||r}})),o.textConfig.position=null)):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},fI.prototype._endLabelOnDuring=function(t,e,n,i,o,r,a){var s,l,u,h,c,p,d,f,g,y,m=this._endLabel,v=this._polyline;m&&(t<1&&null==i.originalX&&(i.originalX=m.x,i.originalY=m.y),s=n.getLayout("points"),u=(l=n.hostModel).get("connectNulls"),h=r.get("precision"),f=r.get("distance")||0,p=(d=a.getBaseAxis()).isHorizontal(),c=d.inverse,g=e.shape,r=(p?f:0)*(c?-1:1),a=(p?0:-f)*(c?-1:1),d=void 0,1<=(p=(g=(c=function(t,e,n){for(var i,o,r=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u<r;u++)if(o=t[2*u+a],!isNaN(o)&&!isNaN(t[2*u+1-a]))if(0!==u){if(i<=e&&e<=o||e<=i&&o<=e){l=u;break}s=u,i=o}else i=o;return{range:[s,l],t:(e-i)/(o-i)}}(s,e=c?p?g.x:g.y+g.height:p?g.x+g.width:g.y,f=p?"x":"y")).range)[1]-g[0])?(1<p&&!u?(y=uI(s,g[0]),m.attr({x:y[0]+r,y:y[1]+a}),o&&(d=l.getRawValue(g[0]))):((y=v.getPointOn(e,f))&&m.attr({x:y[0]+r,y:y[1]+a}),e=l.getRawValue(g[0]),f=l.getRawValue(g[1]),o&&(d=vr(n,h,e,f,c.t))),i.lastFrameIndex=g[0]):(y=uI(s,g=1===t||0<i.lastFrameIndex?g[0]:0),o&&(d=l.getRawValue(g)),m.attr({x:y[0]+r,y:y[1]+a})),o&&Fc(m).setLabelText(d))},fI.prototype._doUpdateAnimation=function(t,e,n,i,o,r){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,o,r){for(var a,s,l=(a=t,s=[],e.diff(a).add(function(t){s.push({cmd:"+",idx:t})}).update(function(t,e){s.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){s.push({cmd:"-",idx:t})}).execute(),s),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=PM(o,e,r),m=t.getLayout("points")||[],v=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],b=!0,w=void 0;switch(x.cmd){case"=":var S=2*x.idx,w=2*x.idx1,M=m[S],I=m[1+S],T=v[w],C=v[w+1];(isNaN(M)||isNaN(I))&&(M=T,I=C),u.push(M,I),h.push(T,C),c.push(n[S],n[1+S]),p.push(i[w],i[w+1]),g.push(e.getRawIndex(x.idx1));break;case"+":T=x.idx,C=y.dataDimsForPoint,C=o.dataToPoint([e.get(C[0],T),e.get(C[1],T)]);w=2*T,u.push(C[0],C[1]),h.push(v[w],v[w+1]);C=OM(y,o,e,T);c.push(C[0],C[1]),p.push(i[w],i[w+1]),g.push(e.getRawIndex(T));break;case"-":b=!1}b&&(d.push(x),f.push(f.length))}f.sort(function(t,e){return g[t]-g[e]});for(var D=EM(t=u.length),A=EM(t),k=EM(t),L=EM(t),P=[],_=0;_<f.length;_++){var O=f[_],R=2*_,N=2*O;D[R]=u[N],D[1+R]=u[1+N],A[R]=h[N],A[1+R]=h[1+N],k[R]=c[N],k[1+R]=c[1+N],L[R]=p[N],L[1+R]=p[1+N],P[_]=d[O]}return{current:D,next:A,stackedOnCurrent:k,stackedOnNext:L,status:P}}(this._data,t,this._stackedOnPoints,e,this._coordSys,this._valueOrigin),h=u.current,c=u.stackedOnCurrent,p=u.next,e=u.stackedOnNext;if(o&&(h=rI(u.current,n,o),c=rI(u.stackedOnCurrent,n,o),p=rI(u.next,n,o),e=rI(u.stackedOnNext,n,o)),3e3<iI(h,p)||s&&3e3<iI(c,e))return a.stopAnimation(),a.setShape({points:p}),void(s&&(s.stopAnimation(),s.setShape({points:p,stackedOnPoints:e})));a.shape.__points=u.current,a.shape.points=h;p={shape:{points:p}};u.current!==h&&(p.shape.__points=u.next),a.stopAnimation(),Kh(a,p,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Kh(s,{shape:{stackedOnPoints:e}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var d,f=[],g=u.status,y=0;y<g.length;y++)"="!==g[y].cmd||(d=t.getItemGraphicEl(g[y].idx1))&&f.push({el:d,ptIdx:y});a.animators&&a.animators.length&&a.animators[0].during(function(){s&&s.dirtyShape();for(var t=a.shape.__points,e=0;e<f.length;e++){var n=f[e].el,i=2*f[e].ptIdx;n.x=t[i],n.y=t[1+i],n.markRedraw()}})},fI.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(t,e){t.__temp&&(n.remove(t),i.setItemGraphicEl(e,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},fI.type="line",fI);function fI(){return null!==pI&&pI.apply(this,arguments)||this}function gI(t,i){return{seriesType:t,plan:Cy(),reset:function(t){var e=t.getData(),h=t.coordinateSystem,n=t.pipelineContext,c=i||n.large;if(h){var t=L(h.dimensions,function(t){return e.mapDimension(t)}).slice(0,2),p=t.length,n=e.getCalculationInfo("stackResultDimension");ob(e,t[0])&&(t[0]=n),ob(e,t[1])&&(t[1]=n);var d=e.getStore(),f=e.getDimensionIndex(t[0]),g=e.getDimensionIndex(t[1]);return p&&{progress:function(t,e){for(var n=t.end-t.start,i=c&&EM(n*p),o=[],r=[],a=t.start,s=0;a<t.end;a++){var l,u=void 0;u=1===p?(l=d.get(f,a),h.dataToPoint(l,null,r)):(o[0]=d.get(f,a),o[1]=d.get(g,a),h.dataToPoint(o,null,r)),c?(i[s++]=u[0],i[s++]=u[1]):e.setItemLayout(a,u.slice())}c&&e.setLayout("points",i)}}}}}}var yI={average:function(t){for(var e=0,n=0,i=0;i<t.length;i++)isNaN(t[i])||(e+=t[i],n++);return 0===n?NaN:e/n},sum:function(t){for(var e=0,n=0;n<t.length;n++)e+=t[n]||0;return e},max:function(t){for(var e=-1/0,n=0;n<t.length;n++)t[n]>e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n<t.length;n++)t[n]<e&&(e=t[n]);return isFinite(e)?e:NaN},nearest:function(t){return t[0]}},mI=function(t){return Math.round(t.length/2)};function vI(t){return{seriesType:t,reset:function(t,e,n){var i,o=t.getData(),r=t.get("sampling"),a=t.coordinateSystem,s=o.count();10<s&&"cartesian2d"===a.type&&r&&(i=a.getBaseAxis(),a=a.getOtherAxis(i),i=i.getExtent(),n=n.getDevicePixelRatio(),n=Math.abs(i[1]-i[0])*(n||1),1<(s=Math.round(s/n))&&("lttb"===r&&t.setData(o.lttbDownSample(o.mapDimension(a.dim),1/s)),n=void 0,"string"==typeof r?n=yI[r]:"function"==typeof r&&(n=r),n&&t.setData(o.downSample(o.mapDimension(a.dim),1/s,n,mI))))}}}var _I,Zy=(u(xI,_I=yy),xI.prototype.getInitialData=function(t,e){return ab(null,this,{useEncodeDefaulter:!0})},xI.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e&&e.clampData){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),t=i.getLayout("offset"),i=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=t+i/2,n}return[NaN,NaN]},xI.type="series.__base_bar__",xI.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},xI);function xI(){var t=null!==_I&&_I.apply(this,arguments)||this;return t.type=xI.type,t}yy.registerClass(Zy);var bI,wI=(u(SI,bI=Zy),SI.prototype.getInitialData=function(){return ab(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},SI.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},SI.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return t=t<e?e:t},SI.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},SI.type="series.bar",SI.dependencies=["grid","polar"],SI.defaultOption=rp(Zy.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),SI);function SI(){var t=null!==bI&&bI.apply(this,arguments)||this;return t.type=SI.type,t}var MI,II=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},TI=(u(CI,MI=Ss),CI.prototype.getDefaultShape=function(){return new II},CI.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,o=Math.max(e.r0||0,0),r=Math.max(e.r,0),a=.5*(r-o),s=o+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),e=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*o+n,p*o+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,r,l,u,!h),t.moveTo(d*r+n,e*r+i),t.arc(d*s+n,e*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==o&&(t.arc(n,i,o,u,l,h),t.moveTo(c*o+n,e*o+i)),t.closePath()},CI);function CI(t){t=MI.call(this,t)||this;return t.type="sausage",t}function DI(t,e,n){return e*Math.sin(t)*(n?-1:1)}function AI(t,e,n){return e*Math.cos(t)*(n?1:-1)}var kI=[0,0],LI=Math.max,PI=Math.min;var OI,RI=(u(NI,OI=ky),NI.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var o=t.get("coordinateSystem");"cartesian2d"===o||"polar"===o?this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i):Fo("Only cartesian2d and polar supported for bar.")},NI.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},NI.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},NI.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},NI.prototype._renderNormal=function(a,t,e,n){var s,l=this.group,u=a.getData(),h=this._data,c=a.coordinateSystem,p=c.getBaseAxis();"cartesian2d"===c.type?s=p.isHorizontal():"polar"===c.type&&(s="angle"===p.dim);var d=a.isAnimationEnabled()?a:null,f=function(t,e){var n=t.get("realtimeSort",!0),t=e.getBaseAxis();n&&("category"!==t.type&&Fo("`realtimeSort` will not work because this bar series is not based on a category axis."),"cartesian2d"!==e.type&&Fo("`realtimeSort` will not work because this bar series is not on cartesian2d."));if(n&&"category"===t.type&&"cartesian2d"===e.type)return{baseAxis:t,otherAxis:e.getOtherAxis(t)}}(a,c);f&&this._enableRealtimeSort(f,u,e);var i,o,g=a.get("clip",!0)||f,y=(o=u,e=(i=c).getArea&&i.getArea(),tI(i,"cartesian2d")&&("category"===(i=i.getBaseAxis()).type&&i.onBand||(o=o.getLayout("bandWidth"),i.isHorizontal()?(e.x-=o,e.width+=2*o):(e.y-=o,e.height+=2*o))),e);l.removeClipPath();var m=a.get("roundCap",!0),v=a.get("showBackground",!0),_=a.getModel("backgroundStyle"),x=_.get("borderRadius")||0,b=[],w=this._backgroundEls,S=n&&n.isInitSort,M=n&&"changeAxisOrder"===n.type;function I(t){var e,n,i=WI[c.type](u,t),i=(e=s,n=i,new("polar"===(i=c).type?qu:Fs)({shape:JI(e,n,i),silent:!0,z2:0}));return i.useStyle(_.getItemStyle()),"cartesian2d"===c.type&&i.setShape("r",x),b[t]=i}u.diff(h).add(function(t){var e,n,i=u.getItemModel(t),o=WI[c.type](u,t,i);v&&I(t),u.hasValue(t)&&HI[c.type](o)&&(e=!1,g&&(e=EI[c.type](y,o)),n=zI[c.type](a,u,t,o,s,d,p.model,!1,m),f&&(n.forceLabelAnimation=!0),YI(n,u,t,i,o,a,s,"polar"===c.type),S?n.attr({shape:o}):f?BI(f,d,n,o,t,s,!1,!1):$h(n,{shape:o},a,t),u.setItemGraphicEl(t,n),l.add(n),n.ignore=e)}).update(function(t,e){var n=u.getItemModel(t),i=WI[c.type](u,t,n);v&&(r=void 0,0===w.length?r=I(e):((r=w[e]).useStyle(_.getItemStyle()),"cartesian2d"===c.type&&r.setShape("r",x),b[t]=r),o=WI[c.type](u,t),Kh(r,{shape:JI(s,o,c)},d,t));var o,r=h.getItemGraphicEl(e);u.hasValue(t)&&HI[c.type](i)?(o=!1,g&&(o=EI[c.type](y,i))&&l.remove(r),r?nc(r):r=zI[c.type](a,u,t,i,s,d,p.model,!!r,m),f&&(r.forceLabelAnimation=!0),M&&(!(e=r.getTextContent())||null!=(e=Fc(e)).prevValue&&(e.prevValue=e.value)),M||YI(r,u,t,n,i,a,s,"polar"===c.type),S?r.attr({shape:i}):f?BI(f,d,r,i,t,s,!0,M):Kh(r,{shape:i},a,t,null),u.setItemGraphicEl(t,r),r.ignore=o,l.add(r)):l.remove(r)}).remove(function(t){var e=h.getItemGraphicEl(t);e&&ec(e,a,t)}).execute();var r=this._backgroundGroup||(this._backgroundGroup=new io);r.removeAll();for(var T=0;T<b.length;++T)r.add(b[T]);l.add(r),this._backgroundEls=b,this._data=u},NI.prototype._renderLarge=function(t,e,n){this._clear(),KI(t,this.group),this._updateLargeClip(t)},NI.prototype._incrementalRenderLarge=function(t,e){this._removeBackground(),KI(e,this.group,!0)},NI.prototype._updateLargeClip=function(t){t=t.get("clip",!0)?QM(t.coordinateSystem,!1,t):null;t?this.group.setClipPath(t):this.group.removeClipPath()},NI.prototype._enableRealtimeSort=function(t,e,n){var i,o,r=this;e.count()&&(i=t.baseAxis,this._isFirstFrame?(this._dispatchInitSort(e,t,n),this._isFirstFrame=!1):(o=function(t){t=e.getItemGraphicEl(t);if(t){t=t.shape;return(i.isHorizontal()?Math.abs(t.height):Math.abs(t.width))||0}return 0},this._onRendered=function(){r._updateSortWithinSameData(e,o,i,n)},n.getZr().on("rendered",this._onRendered)))},NI.prototype._dataSort=function(t,e,i){var o=[];return t.each(t.mapDimension(e.dim),function(t,e){var n=null==(n=i(e))?NaN:n;o.push({dataIndex:e,mappedValue:n,ordinalNumber:t})}),o.sort(function(t,e){return e.mappedValue-t.mappedValue}),{ordinalNumbers:L(o,function(t){return t.ordinalNumber})}},NI.prototype._isOrderChangedWithinSameData=function(t,e,n){for(var i=n.scale,o=t.mapDimension(n.dim),r=Number.MAX_VALUE,a=0,s=i.getOrdinalMeta().categories.length;a<s;++a){var l=t.rawIndexOf(o,i.getRawOrdinalNumber(a)),l=l<0?Number.MIN_VALUE:e(t.indexOfRawIndex(l));if(r<l)return!0;r=l}return!1},NI.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,e=n.getExtent(),i=Math.max(0,e[0]),o=Math.min(e[1],n.getOrdinalMeta().categories.length-1);i<=o;++i)if(t.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},NI.prototype._updateSortWithinSameData=function(t,e,n,i){this._isOrderChangedWithinSameData(t,e,n)&&(e=this._dataSort(t,n,e),this._isOrderDifferentInView(e,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:e})))},NI.prototype._dispatchInitSort=function(e,n,t){var i=n.baseAxis,o=this._dataSort(e,i,function(t){return e.get(e.mapDimension(n.otherAxis.dim),t)});t.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},NI.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},NI.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},NI.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},NI.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){ec(t,e,il(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},NI.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},NI.type="bar",NI);function NI(){var t=OI.call(this)||this;return t.type=NI.type,t._isFirstFrame=!0,t}var EI={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var o=t.x+t.width,r=t.y+t.height,a=LI(e.x,t.x),s=PI(e.x+e.width,o),l=LI(e.y,t.y),u=PI(e.y+e.height,r),h=s<a,t=u<l;return e.x=h&&o<a?s:a,e.y=t&&r<l?u:l,e.width=h?0:s-a,e.height=t?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||t},polar:function(t,e){var n=e.r0<=e.r?1:-1;n<0&&(i=e.r,e.r=e.r0,e.r0=i);var i,o=PI(e.r,t.r),t=LI(e.r0,t.r0),t=(e.r=o)-(e.r0=t)<0;return n<0&&(i=e.r,e.r=e.r0,e.r0=i),t}},zI={cartesian2d:function(t,e,n,i,o,r,a,s,l){i=new Fs({shape:P({},i),z2:1});return i.__dataIndex=n,i.name="item",r&&(i.shape[o?"height":"width"]=0),i},polar:function(t,e,n,i,o,r,a,s,l){var u=!o&&l?TI:qu,h=new u({shape:i,z2:1});h.name="item";var b,w,l=UI(o);return h.calculateTextPosition=(b=l,w=({isRoundCap:u===TI}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Yi(t,e,n);var o=b(i),r=null!=e.distance?e.distance:5,i=this.shape,a=i.cx,s=i.cy,l=i.r,u=i.r0,h=(l+u)/2,c=i.startAngle,p=i.endAngle,d=(c+p)/2,f=w?Math.abs(l-u)/2:0,g=Math.cos,y=Math.sin,m=a+l*g(c),v=s+l*y(c),_="left",x="top";switch(o){case"startArc":m=a+(u-r)*g(d),v=s+(u-r)*y(d),_="center",x="top";break;case"insideStartArc":m=a+(u+r)*g(d),v=s+(u+r)*y(d),_="center",x="bottom";break;case"startAngle":m=a+h*g(c)+DI(c,r+f,!1),v=s+h*y(c)+AI(c,r+f,!1),_="right",x="middle";break;case"insideStartAngle":m=a+h*g(c)+DI(c,f-r,!1),v=s+h*y(c)+AI(c,f-r,!1),_="left",x="middle";break;case"middle":m=a+h*g(d),v=s+h*y(d),_="center",x="middle";break;case"endArc":m=a+(l+r)*g(d),v=s+(l+r)*y(d),_="center",x="bottom";break;case"insideEndArc":m=a+(l-r)*g(d),v=s+(l-r)*y(d),_="center",x="top";break;case"endAngle":m=a+h*g(p)+DI(p,r+f,!0),v=s+h*y(p)+AI(p,r+f,!0),_="left",x="middle";break;case"insideEndAngle":m=a+h*g(p)+DI(p,f-r,!0),v=s+h*y(p)+AI(p,f-r,!0),_="right",x="middle";break;default:return Yi(t,e,n)}return(t=t||{}).x=m,t.y=v,t.align=_,t.verticalAlign=x,t}),r&&(l=o?"r":"endAngle",u={},h.shape[l]=o?0:i.startAngle,u[l]=i[l],(s?Kh:$h)(h,{shape:u},r)),h}};function BI(t,e,n,i,o,r,a,s){var l,i=r?(l={x:i.x,width:i.width},{y:i.y,height:i.height}):(l={y:i.y,height:i.height},{x:i.x,width:i.width});s||(a?Kh:$h)(n,{shape:i},e,o,null),(a?Kh:$h)(n,{shape:l},e?t.baseAxis.model:null,o)}function VI(t,e){for(var n=0;n<e.length;n++)if(!isFinite(t[e[n]]))return 1}var GI=["x","y","width","height"],FI=["cx","cy","r","startAngle","endAngle"],HI={cartesian2d:function(t){return!VI(t,GI)},polar:function(t){return!VI(t,FI)}},WI={cartesian2d:function(t,e,n){var i=t.getItemLayout(e),t=n?function(t,e){var n=t.get(["itemStyle","borderColor"]);if(!n||"none"===n)return 0;n=t.get(["itemStyle","borderWidth"])||0,t=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),e=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,t,e)}(n,i):0,e=0<i.width?1:-1,n=0<i.height?1:-1;return{x:i.x+e*t/2,y:i.y+n*t/2,width:i.width-e*t,height:i.height-n*t}},polar:function(t,e,n){e=t.getItemLayout(e);return{cx:e.cx,cy:e.cy,r0:e.r0,r:e.r,startAngle:e.startAngle,endAngle:e.endAngle,clockwise:e.clockwise}}};function UI(t){return e=t?"Arc":"Angle",function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}};var e}function YI(t,e,n,i,o,r,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(["itemStyle","borderRadius"])||0),t.useStyle(l);var u=i.getShallow("cursor");u&&t.attr("cursor",u);var h=s?a?o.r>=o.r0?"endArc":"startArc":o.endAngle>=o.startAngle?"endAngle":"startAngle":a?0<=o.height?"bottom":"top":0<=o.width?"right":"left",u=Oc(i);Pc(t,u,{labelFetcher:r,labelDataIndex:n,defaultText:bM(r.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});l=t.getTextContent();s&&l&&(s=i.get(["label","position"]),t.textConfig.inside="middle"===s||null,function(t,e,n,i){if("number"!=typeof i)if(G(e))t.setTextConfig({rotation:0});else{var o,r=t.shape,a=r.clockwise?r.startAngle:r.endAngle,s=r.clockwise?r.endAngle:r.startAngle,l=(a+s)/2,n=n(e);switch(n){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":o=l;break;case"startAngle":case"insideStartAngle":o=a;break;case"endAngle":case"insideEndAngle":o=s;break;default:return t.setTextConfig({rotation:0})}e=1.5*Math.PI-o;"middle"===n&&e>Math.PI/2&&e<1.5*Math.PI&&(e-=Math.PI),t.setTextConfig({rotation:e})}else t.setTextConfig({rotation:i})}(t,"outside"===s?h:s,UI(a),i.get(["label","rotate"]))),Hc(l,u,r.getRawValue(n),function(t){return wM(e,t)});n=i.getModel(["emphasis"]);ql(t,n.get("focus"),n.get("blurScope")),Ql(t,i),null!=(o=o).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(t.style.fill="none",t.style.stroke="none",E(t.states,function(t){t.style&&(t.style.fill=t.style.stroke="none")}))}var XI,ZI=function(){},jI=(u(qI,XI=Ss),qI.prototype.getDefaultShape=function(){return new ZI},qI.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,o=this.__baseDimIdx,r=0;r<n.length;r+=2)i[o]=n[r+o],t.moveTo(i[0],i[1]),t.lineTo(n[r],n[r+1])},qI);function qI(t){t=XI.call(this,t)||this;return t.type="largeBar",t}function KI(t,e,n){var i=t.getData(),o=[],r=i.getLayout("valueAxisHorizontal")?1:0;o[1-r]=i.getLayout("valueAxisStart");var a,s,l,u,h=i.getLayout("largeDataIndices"),c=i.getLayout("barWidth"),p=t.getModel("backgroundStyle");t.get("showBackground",!0)&&(u=i.getLayout("largeBackgroundPoints"),(l=[])[1-r]=i.getLayout("backgroundStart"),(a=new jI({shape:{points:u},incremental:!!n,silent:!0,z2:0})).__startPoint=l,a.__baseDimIdx=r,a.__largeDataIndices=h,a.__barWidth=c,s=a,u=i,p=(l=p).get("borderColor")||l.get("color"),l=l.getItemStyle(),s.useStyle(l),s.style.fill=null,s.style.stroke=p,s.style.lineWidth=u.getLayout("barWidth"),e.add(a));n=new jI({shape:{points:i.getLayout("largePoints")},incremental:!!n});n.__startPoint=o,n.__baseDimIdx=r,n.__largeDataIndices=h,n.__barWidth=c,e.add(n),c=n,i=(e=i).getVisual("style"),c.useStyle(P({},i)),c.style.fill=null,c.style.stroke=i.fill,c.style.lineWidth=e.getLayout("barWidth"),il(n).seriesIndex=t.seriesIndex,t.get("silent")||(n.on("mousedown",$I),n.on("mousemove",$I))}var $I=Gy(function(t){t=function(t,e,n){var i=t.__baseDimIdx,o=1-i,r=t.shape.points,a=t.__largeDataIndices,s=Math.abs(t.__barWidth/2),l=t.__startPoint[o];kI[0]=e,kI[1]=n;for(var n=kI[i],u=kI[1-i],h=n-s,c=n+s,p=0,d=r.length/2;p<d;p++){var f=2*p,g=r[f+i],f=r[f+o];if(h<=g&&g<=c&&(l<=f?l<=u&&u<=f:f<=u&&u<=l))return a[p]}return-1}(this,t.offsetX,t.offsetY);il(this).dataIndex=0<=t?t:null},30,!1);function JI(t,e,n){if(tI(n,"cartesian2d")){var i=e,o=n.getArea();return{x:(t?i:o).x,y:(t?o:i).y,width:(t?i:o).width,height:(t?o:i).height}}return{cx:(o=n.getArea()).cx,cy:o.cy,r0:(t?o:e).r0,r:(t?o:e).r,startAngle:t?e.startAngle:0,endAngle:t?e.endAngle:2*Math.PI}}var QI=2*Math.PI,tT=Math.PI/180;function eT(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function nT(t,e){var n=eT(t,e),i=t.get("center"),o=t.get("radius");G(o)||(o=[0,o]),G(i)||(i=[i,i]);var r=mo(n.width,e.getWidth()),t=mo(n.height,e.getHeight()),e=Math.min(r,t);return{cx:mo(i[0],r)+n.x,cy:mo(i[1],t)+n.y,r0:mo(o[0],e/2),r:mo(o[1],e/2)}}function iT(t,e,S){e.eachSeriesByType(t,function(t){var o=t.getData(),e=o.mapDimension("value"),n=eT(t,S),i=nT(t,S),r=i.cx,a=i.cy,s=i.r,l=i.r0,u=-t.get("startAngle")*tT,h=t.get("minAngle")*tT,c=0;o.each(e,function(t){isNaN(t)||c++});var p=o.getSum(e),d=Math.PI/(p||c)*2,f=t.get("clockwise"),g=t.get("roseType"),y=t.get("stillShowZeroSum"),m=o.getDataExtent(e);m[0]=0;var v,_=QI,x=0,b=u,w=f?1:-1;o.setLayout({viewRect:n,r:s}),o.each(e,function(t,e){var n,i;isNaN(t)?o.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:f,cx:r,cy:a,r0:l,r:g?NaN:s}):((n="area"!==g?0===p&&y?d:t*d:QI/c)<h?_-=n=h:x+=t,i=b+w*n,o.setItemLayout(e,{angle:n,startAngle:b,endAngle:i,clockwise:f,cx:r,cy:a,r0:l,r:g?yo(t,m,[l,s]):s}),b=i)}),_<QI&&c&&(_<=.001?(v=QI/c,o.each(e,function(t,e){isNaN(t)||((t=o.getItemLayout(e)).angle=v,t.startAngle=u+w*e*v,t.endAngle=u+w*(e+1)*v)})):(d=_/x,b=u,o.each(e,function(t,e){isNaN(t)||(t=(e=o.getItemLayout(e)).angle===h?h:t*d,e.startAngle=b,e.endAngle=b+w*t,b+=w*t)})))})}function oT(t){return{seriesType:t,reset:function(t,e){var i,o=e.findComponents({mainType:"legend"});o&&o.length&&(i=t.getData()).filterSelf(function(t){for(var e=i.getName(t),n=0;n<o.length;n++)if(!o[n].isSelected(e))return!1;return!0})}}}var rT=Math.PI/180;function aT(t,u,h,c,p,e,n,i,o,r){if(!(t.length<2)){for(var a,s=t.length,l=0;l<s;l++)"outer"===t[l].position&&"labelLine"===t[l].labelAlignTo&&(a=t[l].label.x-r,t[l].linePoints[1][0]+=a,t[l].label.x=r);Qw(t,o,o+n)&&function(t){for(var e,n,i,o,r,a={list:[],maxY:0},s={list:[],maxY:0},l=0;l<t.length;l++)"none"===t[l].labelAlignTo&&(n=(e=t[l]).label.y>h?s:a,(i=Math.abs(e.label.y-h))>n.maxY&&(o=e.label.x-u-e.len2*p,r=c+e.len,r=Math.abs(o)<r?Math.sqrt(i*i/(1-o*o/r/r)):r,n.rB=r,n.maxY=i),n.list.push(e));d(a),d(s)}(t)}function d(t){for(var e=t.rB,n=e*e,i=0;i<t.list.length;i++){var o=t.list[i],r=Math.abs(o.label.y-h),a=c+o.len,a=a*a,a=Math.sqrt((1-Math.abs(r*r/n))*a);o.label.x=u+(a+o.len2)*p}}}function sT(t){return"center"===t.position}function lT(t){var T,C,D=t.getData(),A=[],k=!1,L=(t.get("minShowLabelAngle")||0)*rT,e=D.getLayout("viewRect"),P=D.getLayout("r"),O=e.width,R=e.x,n=e.y,e=e.height;function N(t){t.ignore=!0}D.each(function(t){var e,n,i,o,r,a,s,l,u,h,c,p=D.getItemGraphicEl(t),d=p.shape,f=p.getTextContent(),g=p.getTextGuideLine(),y=D.getItemModel(t),m=y.getModel("label"),v=m.get("position")||y.get(["emphasis","label","position"]),_=m.get("distanceToLabelLine"),x=m.get("alignTo"),b=mo(m.get("edgeDistance"),O),w=m.get("bleedMargin"),S=y.getModel("labelLine"),M=mo(M=S.get("length"),O),I=mo(I=S.get("length2"),O);if(Math.abs(d.endAngle-d.startAngle)<L)return E(f.states,N),void(f.ignore=!0);!function(t){if(!t.ignore)return 1;for(var e in t.states)if(!1===t.states[e].ignore)return 1}(f)||(u=(d.startAngle+d.endAngle)/2,e=Math.cos(u),n=Math.sin(u),T=d.cx,C=d.cy,i="inside"===v||"inner"===v,l="center"===v?(r=d.cx,a=d.cy,"center"):(r=(o=(i?(d.r+d.r0)/2*e:d.r*e)+T)+3*e,a=(t=(i?(d.r+d.r0)/2*n:d.r*n)+C)+3*n,i||(y=o+e*(M+P-d.r),l=t+n*(M+P-d.r),s=y+(e<0?-1:1)*I,r="edge"===x?e<0?R+b:R+O-b:s+(e<0?-_:_),s=[[o,t],[y,a=l],[s,l]]),i?"center":"edge"===x?0<e?"right":"left":0<e?"left":"right"),"number"==typeof(m=m.get("rotate"))?h=m*(Math.PI/180):"center"===v?h=0:(u=e<0?-u+Math.PI:-u,"radial"===m||!0===m?h=u:"tangential"===m&&"outside"!==v&&"outer"!==v?(h=u+Math.PI/2)>Math.PI/2&&(h-=Math.PI):h=0),k=!!h,f.x=r,f.y=a,f.rotation=h,f.setStyle({verticalAlign:"middle"}),i?(f.setStyle({align:l}),(c=f.states.select)&&(c.x+=f.x,c.y+=f.y)):((h=f.getBoundingRect().clone()).applyTransform(f.getComputedTransform()),c=(f.style.margin||0)+2.1,h.y-=c/2,h.height+=c,A.push({label:f,labelLine:g,position:v,len:M,len2:I,minTurnAngle:S.get("minTurnAngle"),maxSurfaceAngle:S.get("maxSurfaceAngle"),surfaceNormal:new bi(e,n),linePoints:s,textAlign:l,labelDistance:_,labelAlignTo:x,edgeDistance:b,bleedMargin:w,rect:h})),p.setTextConfig({inside:i}))}),!k&&t.get("avoidLabelOverlap")&&function(t,e,n,i,o,r,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p<t.length;p++){var d=t[p].label;sT(t[p])||(d.x<e?(h=Math.min(h,d.x),l.push(t[p])):(c=Math.max(c,d.x),u.push(t[p])))}for(aT(u,e,n,i,1,0,r,0,s,c),aT(l,e,n,i,-1,0,r,0,s,h),p=0;p<t.length;p++){var f,g,y,m,v=t[p],d=v.label;sT(v)||(f=v.linePoints)&&(g="edge"===v.labelAlignTo,y=v.rect.width,m=void 0,(m=g?d.x<e?f[2][0]-v.labelDistance-a-v.edgeDistance:a+o-v.edgeDistance-f[2][0]-v.labelDistance:d.x<e?d.x-a-v.bleedMargin:a+o-d.x-v.bleedMargin)<v.rect.width&&(v.label.style.width=m,"edge"===v.labelAlignTo&&(y=m)),m=f[1][0]-f[2][0],g?d.x<e?f[2][0]=a+v.edgeDistance+y+v.labelDistance:f[2][0]=a+o-v.edgeDistance-y-v.labelDistance:(d.x<e?f[2][0]=d.x+v.labelDistance:f[2][0]=d.x-v.labelDistance,f[1][0]=f[2][0]+m),f[1][1]=f[2][1]=d.y)}}(A,T,C,P,O,e,R,n);for(var i=0;i<A.length;i++){var o,r=A[i],a=r.label,s=r.labelLine,l=isNaN(a.x)||isNaN(a.y);a&&(a.setStyle({align:r.textAlign}),l&&(E(a.states,N),a.ignore=!0),(o=a.states.select)&&(o.x+=a.x,o.y+=a.y)),s&&(o=r.linePoints,l||!o?(E(s.states,N),s.ignore=!0):(Xw(o,r.minTurnAngle),function(t,e,n){if(n<=180&&0<n){n=n/180*Math.PI,Bw.fromArray(t[0]),Vw.fromArray(t[1]),Gw.fromArray(t[2]),bi.sub(Fw,Vw,Bw),bi.sub(Hw,Gw,Vw);var i=Fw.len(),o=Hw.len();if(!(i<.001||o<.001))if(Fw.scale(1/i),Hw.scale(1/o),Fw.dot(e)<Math.cos(n)){i=Rw(Vw.x,Vw.y,Gw.x,Gw.y,Bw.x,Bw.y,Uw,!1);Yw.fromArray(Uw);o=Math.PI/2,n=o+Math.acos(Hw.dot(e))-n;if(o<=n)bi.copy(Yw,Gw);else{Yw.scaleAndAdd(Hw,i/Math.tan(Math.PI/2-n));n=Gw.x!==Vw.x?(Yw.x-Vw.x)/(Gw.x-Vw.x):(Yw.y-Vw.y)/(Gw.y-Vw.y);if(isNaN(n))return;n<0?bi.copy(Yw,Vw):1<n&&bi.copy(Yw,Gw)}Yw.toArray(t[1])}}}(o,r.surfaceNormal,r.maxSurfaceAngle),s.setShape({points:o}),a.__hostTarget.textGuideLineConfig={anchor:new bi(o[0][0],o[0][1])}))}}function uT(t,e,n){t=t.get("borderRadius");return null==t?n?{innerCornerRadius:0,cornerRadius:0}:null:{innerCornerRadius:Ui((t=!G(t)?[t,t]:t)[0],e.r0),cornerRadius:Ui(t[1],e.r)}}var hT,cT=(u(pT,hT=qu),pT.prototype.updateData=function(t,e,n,i){var o=this,r=t.hostModel,a=t.getItemModel(e),s=a.getModel("emphasis"),l=t.getItemLayout(e),u=P(uT(a.getModel("itemStyle"),l,!0),l);isNaN(u.startAngle)?o.setShape(u):(i?(o.setShape(u),"scale"===r.getShallow("animationType")?(o.shape.r=l.r0,$h(o,{shape:{r:l.r}},r,e)):null!=n?(o.setShape({startAngle:n,endAngle:n}),$h(o,{shape:{startAngle:l.startAngle,endAngle:l.endAngle}},r,e)):(o.shape.endAngle=l.startAngle,Kh(o,{shape:{endAngle:l.endAngle}},r,e))):(nc(o),Kh(o,{shape:u},r,e)),o.useStyle(t.getItemVisual(e,"style")),Ql(o,a),i=(l.startAngle+l.endAngle)/2,n=r.get("selectedOffset"),u=Math.cos(i)*n,i=Math.sin(i)*n,(n=a.getShallow("cursor"))&&o.attr("cursor",n),this._updateLabel(r,t,e),o.ensureState("emphasis").shape=h({r:l.r+(s.get("scale")&&s.get("scaleSize")||0)},uT(s.getModel("itemStyle"),l)),P(o.ensureState("select"),{x:u,y:i,shape:uT(a.getModel(["select","itemStyle"]),l)}),P(o.ensureState("blur"),{shape:uT(a.getModel(["blur","itemStyle"]),l)}),l=o.getTextGuideLine(),o=o.getTextContent(),l&&P(l.ensureState("select"),{x:u,y:i}),P(o.ensureState("select"),{x:u,y:i}),ql(this,s.get("focus"),s.get("blurScope")))},pT.prototype._updateLabel=function(t,e,n){var i=e.getItemModel(n),o=i.getModel("labelLine"),r=e.getItemVisual(n,"style"),a=r&&r.fill,r=r&&r.opacity;Pc(this,Oc(i),{labelFetcher:e.hostModel,labelDataIndex:n,inheritColor:a,defaultOpacity:r,defaultText:t.getFormattedLabel(n,"normal")||e.getName(n)});n=this.getTextContent();this.setTextConfig({position:null,rotation:null}),n.attr({z2:10});t=t.get(["label","position"]);"outside"!==t&&"outer"!==t?this.removeTextGuideLine():((t=this.getTextGuideLine())||(t=new uh,this.setTextGuideLine(t)),qw(this,Kw(i),{stroke:a,opacity:et(o.get(["lineStyle","opacity"]),r,1)}))},pT);function pT(t,e,n){var i=hT.call(this)||this;i.z2=2;var o=new Xs;return i.setTextContent(o),i.updateData(t,e,n,!0),i}var dT,fT=(u(gT,dT=ky),gT.prototype.init=function(){var t=new io;this._sectorGroup=t},gT.prototype.render=function(e,t,n,i){var o,r=e.getData(),a=this._data,s=this.group;if(!a&&0<r.count()){for(var l=r.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u<r.count();++u)l=r.getItemLayout(u);l&&(o=l.startAngle)}this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===r.count()&&e.get("showEmptyCircle")&&((n=new qu({shape:nT(e,n)})).useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=n,s.add(n)),r.diff(a).add(function(t){var e=new cT(r,t,o);r.setItemGraphicEl(t,e),s.add(e)}).update(function(t,e){e=a.getItemGraphicEl(e);e.updateData(r,t,o),e.off("click"),s.add(e),r.setItemGraphicEl(t,e)}).remove(function(t){ec(a.getItemGraphicEl(t),e,t)}).execute(),lT(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=r)},gT.prototype.dispose=function(){},gT.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},gT.type="pie",gT);function gT(){var t=null!==dT&&dT.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}function yT(t,e,n){e=G(e)?{coordDimensions:e}:P({encodeDefine:t.getEncode()},e);var i=t.getSource(),e=Qx(i,e).dimensions,t=new $x(e,t);return t.initData(i,n),t}var mT=(vT.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},vT.prototype.containName=function(t){return 0<=this._getRawData().indexOfName(t)},vT.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},vT.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},vT);function vT(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}var _T,xT=(u(bT,_T=yy),bT.prototype.init=function(t){_T.prototype.init.apply(this,arguments),this.legendVisualProvider=new mT(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},bT.prototype.mergeOption=function(){_T.prototype.mergeOption.apply(this,arguments)},bT.prototype.getInitialData=function(){return yT(this,{coordDimensions:["value"],encodeDefaulter:V(Od,this)})},bT.prototype.getDataParams=function(t){var e=this.getData(),n=_T.prototype.getDataParams.call(this,t),i=[];return e.each(e.mapDimension("value"),function(t){i.push(t)}),n.percent=So(i,t,e.hostModel.get("percentPrecision")),n.$vars.push("percent"),n},bT.prototype._defaultLabelLine=function(t){Ko(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},bT.type="series.pie",bT.defaultOption={zlevel:0,z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},bT);function bT(){return null!==_T&&_T.apply(this,arguments)||this}var wT,ST=(u(MT,wT=yy),MT.prototype.getInitialData=function(t,e){return ab(null,this,{useEncodeDefaulter:!0})},MT.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},MT.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},MT.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},MT.type="series.scatter",MT.dependencies=["grid","polar","geo","singleAxis","calendar"],MT.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},MT);function MT(){var t=null!==wT&&wT.apply(this,arguments)||this;return t.type=MT.type,t.hasSymbolVisual=!0,t}var IT,TT=function(){},CT=(u(DT,IT=Ss),DT.prototype.getDefaultShape=function(){return new TT},DT.prototype.buildPath=function(t,e){var n=e.points,i=e.size,o=this.symbolProxy,r=o.shape,e=t.getContext?t.getContext():t;if(e&&i[0]<4)this._ctx=e;else{this._ctx=null;for(var a=0;a<n.length;){var s=n[a++],l=n[a++];isNaN(s)||isNaN(l)||this.softClipShape&&!this.softClipShape.contain(s,l)||(r.x=s-i[0]/2,r.y=l-i[1]/2,r.width=i[0],r.height=i[1],o.buildPath(t,r,!0))}}},DT.prototype.afterBrush=function(){var t=this.shape,e=t.points,n=t.size,i=this._ctx;if(i)for(var o=0;o<e.length;){var r=e[o++],a=e[o++];isNaN(r)||isNaN(a)||this.softClipShape&&!this.softClipShape.contain(r,a)||i.fillRect(r-n[0]/2,a-n[1]/2,n[0],n[1])}},DT.prototype.findDataIndex=function(t,e){for(var n=this.shape,i=n.points,n=n.size,o=Math.max(n[0],4),r=Math.max(n[1],4),a=i.length/2-1;0<=a;a--){var s=2*a,l=i[s]-o/2,s=i[1+s]-r/2;if(l<=t&&s<=e&&t<=l+o&&e<=s+r)return a}return-1},DT);function DT(t){return IT.call(this,t)||this}var AT=(kT.prototype.isPersistent=function(){return!this._incremental},kT.prototype.updateData=function(t,e){this.group.removeAll();var n=new CT({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},kT.prototype.updateLayout=function(t){var i;this._incremental||(i=t.getLayout("points"),this.group.eachChild(function(t){var e,n;null!=t.startIndex&&(e=2*(t.endIndex-t.startIndex),n=4*t.startIndex*2,i=new Float32Array(i.buffer,n,e)),t.setShape("points",i)}))},kT.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),2e6<t.count()?(this._incremental||(this._incremental=new Yh({silent:!0})),this.group.add(this._incremental)):this._incremental=null},kT.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new CT,this._incremental.addDisplayable(i,!0)):((i=new CT({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},kT.prototype._setCommon=function(e,t,n,i){var o=t.hostModel;i=i||{};var r=t.getVisual("symbolSize");e.setShape("size",r instanceof Array?r:[r,r]),e.softClipShape=i.clipShape||null,e.symbolProxy=Cm(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;i=e.shape.size[0]<4;e.useStyle(o.getModel("itemStyle").getItemStyle(i?["color","shadowBlur","shadowColor"]:["color"]));var a,t=t.getVisual("style"),t=t&&t.fill;t&&e.setColor(t),n||((a=il(e)).seriesIndex=o.seriesIndex,e.on("mousemove",function(t){a.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<=t&&(a.dataIndex=t+(e.startIndex||0))}))},kT.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},kT.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},kT);function kT(){this.group=new io}var LT,PT=(u(OT,LT=ky),OT.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},OT.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},OT.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},OT.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||1e4<i.count()||!this._symbolDraw.isPersistent())return{update:!0};n=gI("").reset(t,e,n);n.progress&&n.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},OT.prototype._getClipShape=function(t){var e=t.coordinateSystem,e=e&&e.getArea&&e.getArea();return t.get("clip",!0)?e:null},OT.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,e=e.pipelineContext.large;return n&&e===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=new(e?AT:kM),this._isLargeDraw=e,this.group.removeAll()),this.group.add(n.group),n},OT.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},OT.prototype.dispose=function(){},OT.type="scatter",OT);function OT(){var t=null!==LT&<.apply(this,arguments)||this;return t.type=OT.type,t}var RT,NT=(u(ET,RT=yd),ET.type="grid",ET.dependencies=["xAxis","yAxis"],ET.layoutMode="box",ET.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},ET);function ET(){return null!==RT&&RT.apply(this,arguments)||this}var zT,BT=(u(VT,zT=yd),VT.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",dr).models[0]},VT.type="cartesian2dAxis",VT);function VT(){return null!==zT&&zT.apply(this,arguments)||this}T(BT,mw);var jc={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},n=b({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},jc),jc=b({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},jc),GT={category:n,value:jc,time:b({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},jc),log:A({scale:!0,logBase:10},jc)},FT={value:1,category:1,time:1,log:1};function HT(r,a,s,l){E(FT,function(t,o){var e,n=b(b({},GT[o],!0),l,!0),n=(u(i,e=s),i.prototype.mergeDefaultAndTheme=function(t,e){var n=sd(this),i=n?ud(t):{};b(t,e.getTheme().get(o+"Axis")),b(t,this.getDefaultOption()),t.type=WT(t),n&&ld(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=hb.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=a+"Axis."+o,i.defaultOption=n,i);function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.type=a+"Axis."+o,t}r.registerComponentModel(n)}),r.registerSubTypeDefaulter(a+"Axis",WT)}function WT(t){return t.type||(t.data?"category":"value")}UT.prototype.getAxis=function(t){return this._axes[t]},UT.prototype.getAxes=function(){return L(this._dimList,function(t){return this._axes[t]},this)},UT.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),R(this.getAxes(),function(t){return t.scale.type===e})},UT.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},n=UT;function UT(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}var YT=["x","y"];function XT(t){return"interval"===t.type||"time"===t.type}var ZT,jT=(u(qT,ZT=n),qT.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t,e,n,i,o=this.getAxis("x").scale,r=this.getAxis("y").scale;XT(o)&&XT(r)&&(n=o.getExtent(),i=r.getExtent(),t=this.dataToPoint([n[0],i[0]]),e=this.dataToPoint([n[1],i[1]]),o=n[1]-n[0],r=i[1]-i[0],o&&r&&(o=(e[0]-t[0])/o,r=(e[1]-t[1])/r,n=t[0]-n[0]*o,i=t[1]-i[0]*r,i=this._transform=[o,0,0,r,n,i],this._invTransform=ui([],i)))},qT.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},qT.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},qT.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},qT.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o))return Ot(n,t,this._transform);var r=this.getAxis("x"),t=this.getAxis("y");return n[0]=r.toGlobalCoord(r.dataToCoord(i,e)),n[1]=t.toGlobalCoord(t.dataToCoord(o,e)),n},qT.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=n.parse(t[0]),t=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(o[0],o[1]),n),Math.max(o[0],o[1])),e[1]=Math.min(Math.max(Math.min(r[0],r[1]),t),Math.max(r[0],r[1])),e},qT.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Ot(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=o.coordToData(o.toLocalCoord(t[1]),e),n},qT.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},qT.prototype.getArea=function(){var t=this.getAxis("x").getGlobalExtent(),e=this.getAxis("y").getGlobalExtent(),n=Math.min(t[0],t[1]),i=Math.min(e[0],e[1]),t=Math.max(t[0],t[1])-n,e=Math.max(e[0],e[1])-i;return new Li(n,i,t,e)},qT);function qT(){var t=null!==ZT&&ZT.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=YT,t}var KT,$T=(u(JT,KT=vp),JT.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},JT.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},JT.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},JT.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},JT);function JT(t,e,n,i,o){n=KT.call(this,t,e,n)||this;return n.index=0,n.type=i||"value",n.position=o||"bottom",n}function QT(t,e,n){n=n||{};var i=t.coordinateSystem,o=e.axis,r={},a=o.getAxesOnZeroOf()[0],s=o.position,l=a?"onZero":s,u=o.dim,h=i.getRect(),t=[h.x,h.x+h.width,h.y,h.y+h.height],o={left:0,right:1,top:0,bottom:1,onZero:2},i=e.get("offset")||0,h="x"===u?[t[2]-i,t[3]+i]:[t[0]-i,t[1]+i];a&&(i=a.toGlobalCoord(a.dataToCoord(0)),h[o.onZero]=Math.max(Math.min(i,h[1]),h[0])),r.position=["y"===u?h[o[l]]:t[0],"x"===u?h[o[l]]:t[3]],r.rotation=Math.PI/2*("x"===u?0:1);r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],r.labelOffset=a?h[o[s]]-h[o.onZero]:0,e.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);e=e.get(["axisLabel","rotate"]);return r.labelRotate="top"===l?-e:e,r.z2=1,r}function tC(t){return"cartesian2d"===t.get("coordinateSystem")}function eC(o){var r={xAxisModel:null,yAxisModel:null};return E(r,function(t,e){var n=e.replace(/Model$/,""),i=o.getReferringComponents(n,dr).models[0];if(1,!i)throw new Error(n+' "'+et(o.get(n+"Index"),o.get(n+"Id"),0)+'" not found');r[e]=i}),r}var nC=(iC.prototype.getRect=function(){return this._rect},iC.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),E(n.x,function(t){uw(t.scale,t.model)}),E(n.y,function(t){uw(t.scale,t.model)});var i={};E(n.x,function(t){rC(n,"y",t,i)}),E(n.y,function(t){rC(n,"x",t,i)}),this.resize(this.model,e)},iC.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),t=!n&&t.get("containLabel"),a=rd(i,{width:e.getWidth(),height:e.getHeight()});this._rect=a;var o=this._axesList;function r(){E(o,function(t){var e,n,i=t.isHorizontal(),o=i?[0,a.width]:[0,a.height],r=t.inverse?1:0;t.setExtent(o[r],o[1-r]),t=t,e=i?a.x:a.y,i=t.getExtent(),n=i[0]+i[1],t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}})}r(),t&&(E(o,function(t){var e,n,i;t.model.get(["axisLabel","inside"])||(e=dw(t))&&(n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]),a[n]-=e[n]+i,"top"===t.position?a.y+=e.height+i:"left"===t.position&&(a.x+=e.width+i))}),r()),E(this._coordsList,function(t){t.calcAffineTransform()})},iC.prototype.getAxis=function(t,e){t=this._axesMap[t];if(null!=t)return t[e||0]},iC.prototype.getAxes=function(){return this._axesList.slice()},iC.prototype.getCartesian=function(t,e){if(null!=t&&null!=e){var n="x"+t+"y"+e;return this._coordsMap[n]}Y(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,o=this._coordsList;i<o.length;i++)if(o[i].getAxis("x").index===t||o[i].getAxis("y").index===e)return o[i]},iC.prototype.getCartesians=function(){return this._coordsList.slice()},iC.prototype.convertToPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.dataToPoint(n):e.axis?e.axis.toGlobalCoord(e.axis.dataToCoord(n)):null},iC.prototype.convertFromPixel=function(t,e,n){e=this._findConvertTarget(e);return e.cartesian?e.cartesian.pointToData(n):e.axis?e.axis.coordToData(e.axis.toLocalCoord(n)):null},iC.prototype._findConvertTarget=function(t){var e,n,i=t.seriesModel,o=t.xAxisModel||i&&i.getReferringComponents("xAxis",dr).models[0],r=t.yAxisModel||i&&i.getReferringComponents("yAxis",dr).models[0],a=t.gridModel,t=this._coordsList;return i?C(t,e=i.coordinateSystem)<0&&(e=null):o&&r?e=this.getCartesian(o.componentIndex,r.componentIndex):o?n=this.getAxis("x",o.componentIndex):r?n=this.getAxis("y",r.componentIndex):a&&a.coordinateSystem===this&&(e=this._coordsList[0]),{cartesian:e,axis:n}},iC.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},iC.prototype._initCartesian=function(r,t,e){var a=this,s=this,l={left:!1,right:!1,top:!1,bottom:!1},u={x:{},y:{}},h={x:0,y:0};if(t.eachComponent("xAxis",n("x"),this),t.eachComponent("yAxis",n("y"),this),!h.x||!h.y)return this._axesMap={},void(this._axesList=[]);function n(o){return function(t,e){var n,i;oC(t,r)&&(i=t.get("position"),"x"===o?"top"!==i&&"bottom"!==i&&(i=l.bottom?"top":"bottom"):"left"!==i&&"right"!==i&&(i=l.left?"right":"left"),l[i]=!0,i="category"===(n=new $T(o,hw(t),[0,0],t.get("type"),i)).type,n.onBand=i&&t.get("boundaryGap"),n.inverse=t.get("inverse"),(t.axis=n).model=t,n.grid=s,n.index=e,s._axesList.push(n),u[o][e]=n,h[o]++)}}E((this._axesMap=u).x,function(i,o){E(u.y,function(t,e){var n="x"+o+"y"+e,e=new jT(n);e.master=a,e.model=r,a._coordsMap[n]=e,a._coordsList.push(e),e.addAxis(i),e.addAxis(t)})})},iC.prototype._updateScale=function(t,i){function o(e,n){E(yw(e,n.dim),function(t){n.scale.unionExtentFromData(e,t)})}E(this._axesList,function(t){var e;t.scale.setExtent(1/0,-1/0),"category"===t.type&&(e=t.model.get("categorySortInfo"),t.scale.setSortInfo(e))}),t.eachSeries(function(t){var e,n;tC(t)&&(n=(e=eC(t)).xAxisModel,e=e.yAxisModel,oC(n,i)&&oC(e,i)&&(n=this.getCartesian(n.componentIndex,e.componentIndex),e=t.getData(),t=n.getAxis("x"),n=n.getAxis("y"),"list"===e.type&&(o(e,t),o(e,n))))},this)},iC.prototype.getTooltipAxes=function(n){var i=[],o=[];return E(this.getCartesians(),function(t){var e=null!=n&&"auto"!==n?t.getAxis(n):t.getBaseAxis(),t=t.getOtherAxis(e);C(i,e)<0&&i.push(e),C(o,t)<0&&o.push(t)}),{baseAxes:i,otherAxes:o}},iC.create=function(i,o){var r=[];return i.eachComponent("grid",function(t,e){var n=new iC(t,i,o);n.name="grid_"+e,n.resize(t,o,!0),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){if(tC(t)){var e=eC(t),n=e.xAxisModel,i=e.yAxisModel,e=n.getCoordSysModel();if(1,!e)throw new Error('Grid "'+et(n.get("gridIndex"),n.get("gridId"),0)+'" not found');if(n.getCoordSysModel()!==i.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid");e=e.coordinateSystem;t.coordinateSystem=e.getCartesian(n.componentIndex,i.componentIndex)}}),r},iC.dimensions=YT,iC);function iC(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=YT,this._initCartesian(t,e,n),this.model=t}function oC(t,e){return t.getCoordSysModel()===e}function rC(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,r=t[e],e=n.model,n=e.get(["axisLine","onZero"]),e=e.get(["axisLine","onZeroAxisIndex"]);if(n){if(null!=e)aC(r[e])&&(o=r[e]);else for(var a in r)if(r.hasOwnProperty(a)&&aC(r[a])&&!i[s(r[a])]){o=r[a];break}o&&(i[s(o)]=!0)}function s(t){return t.dim+"_"+t.index}}function aC(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=(t=(e=t).scale.getExtent())[0],t=t[1],!(0<e&&0<t||e<0&&t<0));var e}var sC=Math.PI,lC=(uC.prototype.hasBuilder=function(t){return!!hC[t]},uC.prototype.add=function(t){hC[t](this.opt,this.axisModel,this.group,this._transformGroup)},uC.prototype.getGroup=function(){return this.group},uC.innerTextLayout=function(t,e,n){var i,t=Io(e-t),n=To(t)?(i=0<n?"top":"bottom","center"):To(t-sC)?(i=0<n?"bottom":"top","center"):(i="middle",0<t&&t<sC?0<n?"right":"left":0<n?"left":"right");return{rotation:t,textAlign:n,textVerticalAlign:i}},uC.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},uC.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},uC);function uC(t,e){this.group=new io,this.opt=e,this.axisModel=t,A(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});e=new io({x:e.position[0],y:e.position[1],rotation:e.rotation});e.updateTransform(),this._transformGroup=e}var hC={axisLine:function(i,t,o,e){var r,a,s,l,u,n=t.get(["axisLine","show"]);(n="auto"===n&&i.handleAutoShown?i.handleAutoShown("axisLine"):n)&&(n=t.axis.getExtent(),e=e.transform,r=[n[0],0],n=[n[1],0],e&&(Ot(r,r,e),Ot(n,n,e)),a=P({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),(e=new fh({subPixelOptimize:!0,shape:{x1:r[0],y1:r[1],x2:n[0],y2:n[1]},style:a,strokeContainThreshold:i.strokeContainThreshold||5,silent:!0,z2:1})).anid="line",o.add(e),null!=(s=t.get(["axisLine","symbol"]))&&(e=t.get(["axisLine","symbolSize"]),"string"==typeof s&&(s=[s,s]),"string"!=typeof e&&"number"!=typeof e||(e=[e,e]),t=Am(t.get(["axisLine","symbolOffset"])||0,e),l=e[0],u=e[1],E([{rotate:i.rotation+Math.PI/2,offset:t[0],r:0},{rotate:i.rotation-Math.PI/2,offset:t[1],r:Math.sqrt((r[0]-n[0])*(r[0]-n[0])+(r[1]-n[1])*(r[1]-n[1]))}],function(t,e){var n;"none"!==s[e]&&null!=s[e]&&(n=Cm(s[e],-l/2,-u/2,l,u,a.stroke,!0),e=t.r+t.offset,n.attr({rotation:t.rotate,x:r[0]+e*Math.cos(i.rotation),y:r[1]-e*Math.sin(i.rotation),silent:!0,z2:11}),o.add(n))})))},axisTickLabel:function(t,e,n,i){var o=function(t,e,n,i){var o=n.axis,r=n.getModel("axisTick"),a=r.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||o.scale.isBlank())return;for(var a=r.getModel("lineStyle"),r=i.tickDirection*r.get("length"),s=fC(o.getTicksCoords(),e.transform,r,A(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),l=0;l<s.length;l++)t.add(s[l]);return s}(n,i,e,t),r=function(l,u,h,c){var p=h.axis;if(!Q(c.axisLabelShow,h.get(["axisLabel","show"]))||p.scale.isBlank())return;var d=h.getModel("axisLabel"),f=d.get("margin"),t=p.getViewLabels(),e=(Q(c.labelRotate,d.get("rotate"))||0)*sC/180,g=lC.innerTextLayout(c.rotation,e,c.labelDirection),y=h.getCategories&&h.getCategories(!0),m=[],v=lC.isLabelSilent(h),_=h.get("triggerEvent");return E(t,function(t,e){var n="ordinal"===p.scale.type?p.scale.getRawOrdinalNumber(t.tickValue):t.tickValue,i=t.formattedLabel,o=t.rawLabel,r=d;y&&y[n]&&(Y(s=y[n])&&s.textStyle&&(r=new ep(s.textStyle,d,h.ecModel)));var a=r.getTextColor()||h.get(["axisLine","lineStyle","color"]),s=p.dataToCoord(n),a=new Xs({x:s,y:c.labelOffset+c.labelDirection*f,rotation:g.rotation,silent:v,z2:10+(t.level||0),style:Rc(r,{text:i,align:r.getShallow("align",!0)||g.textAlign,verticalAlign:r.getShallow("verticalAlign",!0)||r.getShallow("baseline",!0)||g.textVerticalAlign,fill:"function"==typeof a?a("category"===p.type?o:"value"===p.type?n+"":n,e):a})});a.anid="label_"+n,_&&((n=lC.makeAxisEventDataBase(h)).targetType="axisLabel",n.value=o,il(a).eventData=n),u.add(a),a.updateTransform(),m.push(a),l.add(a),a.decomposeTransform()}),m}(n,i,e,t);!function(t,e,n){if(gw(t.axis))return;var i=t.get(["axisLabel","showMinLabel"]),o=t.get(["axisLabel","showMaxLabel"]);n=n||[];var r=(e=e||[])[0],a=e[1],s=e[e.length-1],l=e[e.length-2],u=n[0],t=n[1],e=n[n.length-1],n=n[n.length-2];!1===i?(cC(r),cC(u)):pC(r,a)&&(i?(cC(a),cC(t)):(cC(r),cC(u)));!1===o?(cC(s),cC(e)):pC(l,s)&&(o?(cC(l),cC(n)):(cC(s),cC(e)))}(e,r,o),function(t,e,n,i){var o=n.axis,r=n.getModel("minorTick");if(!r.get("show")||o.scale.isBlank())return;var a=o.getMinorTicksCoords();if(!a.length)return;for(var o=r.getModel("lineStyle"),s=i*r.get("length"),l=A(o.getLineStyle(),A(n.getModel("axisTick").getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])})),u=0;u<a.length;u++)for(var h=fC(a[u],e.transform,s,l,"minorticks_"+u),c=0;c<h.length;c++)t.add(h[c])}(n,i,e,t.tickDirection),e.get(["axisLabel","hideOverlap"])&&tS($w(L(r,function(t){return{label:t,priority:t.z2,defaultAttr:{ignore:t.ignore}}})))},axisName:function(t,e,n,i){var o,r,a,s,l,u,h,c,p=Q(t.axisName,e.get("name"));p&&(s=e.get("nameLocation"),o=t.nameDirection,r=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,a=(u=e.axis.getExtent())[0]>u[1]?-1:1,a=["start"===s?u[0]-a*l:"end"===s?u[1]+a*l:(u[0]+u[1])/2,dC(s)?t.labelOffset+o*l:0],null!=(l=e.get("nameRotate"))&&(l=l*sC/180),dC(s)?c=lC.innerTextLayout(t.rotation,null!=l?l:t.rotation,o):(c=function(t,e,n,i){var o,t=Io(n-t),i=i[0]>i[1],i="start"===e&&!i||"start"!==e&&i;i=To(t-sC/2)?(o=i?"bottom":"top","center"):To(t-1.5*sC)?(o=i?"top":"bottom","center"):(o="middle",t<1.5*sC&&sC/2<t?i?"left":"right":i?"right":"left");return{rotation:t,textAlign:i,textVerticalAlign:o}}(t.rotation,s,l||0,u),null!=(h=t.axisNameAvailableWidth)&&(h=Math.abs(h/Math.sin(c.rotation)),isFinite(h)||(h=null))),s=r.getFont(),u=(l=e.get("nameTruncate",!0)||{}).ellipsis,h=Q(t.nameTruncateMaxWidth,l.maxWidth,h),Cc({el:c=new Xs({x:a[0],y:a[1],rotation:c.rotation,silent:lC.isLabelSilent(e),style:Rc(r,{text:p,font:s,overflow:"truncate",width:h,ellipsis:u,fill:r.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:r.get("align")||c.textAlign,verticalAlign:r.get("verticalAlign")||c.textVerticalAlign}),z2:1}),componentModel:e,itemName:p}),c.__fullText=p,c.anid="name",e.get("triggerEvent")&&((e=lC.makeAxisEventDataBase(e)).targetType="axisName",e.name=p,il(c).eventData=e),i.add(c),c.updateTransform(),n.add(c),c.decomposeTransform())}};function cC(t){t&&(t.ignore=!0)}function pC(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var o=ii([]);return si(o,o,-t.rotation),n.applyTransform(ri([],o,t.getLocalTransform())),i.applyTransform(ri([],o,e.getLocalTransform())),n.intersect(i)}}function dC(t){return"middle"===t||"center"===t}function fC(t,e,n,i,o){for(var r=[],a=[],s=[],l=0;l<t.length;l++){var u=t[l].coord;a[0]=u,s[a[1]=0]=u,s[1]=n,e&&(Ot(a,a,e),Ot(s,s,e));u=new fh({subPixelOptimize:!0,shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:i,z2:2,autoBatch:!0,silent:!0});u.anid=o+"_"+t[l].tickValue,r.push(u)}return r}function gC(t,e){var u,h,o,c,p,d,r,n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return u=n,e=e,o=(h=t).getComponent("tooltip"),c=h.getComponent("axisPointer"),p=c.get("link",!0)||[],d=[],E(e.getCoordinateSystems(),function(a){var s,l,t,e,n;function i(t,e,n){var i,o=n.model.getModel("axisPointer",c),r=o.get("show");r&&("auto"!==r||t||vC(o))&&(null==e&&(e=o.get("triggerTooltip")),i=(o=t?function(t,e,n,i,o,r){var a=e.getModel("axisPointer"),s={};E(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],function(t){s[t]=S(a.get(t))}),s.snap="category"!==t.type&&!!r,"cross"===a.get("type")&&(s.type="line");e=s.label||(s.label={});null==e.show&&(e.show=!1),"cross"===o&&(o=a.get(["label","show"]),e.show=null==o||o,r||(r=s.lineStyle=a.get("crossStyle"))&&A(e,r.textStyle));return t.model.getModel("axisPointer",new ep(s,n,i))}(n,l,c,h,t,e):o).get("snap"),r=_C(n.model),t=e||i||"category"===n.type,o=u.axesInfo[r]={key:r,axis:n,coordSys:a,axisPointerModel:o,triggerTooltip:e,involveSeries:t,snap:i,useHandle:vC(o),seriesModels:[],linkGroup:null},s[r]=o,u.seriesInvolved=u.seriesInvolved||t,null!=(t=function(t,e){for(var n=e.model,i=e.dim,o=0;o<t.length;o++){var r=t[o]||{};if(yC(r[i+"AxisId"],n.id)||yC(r[i+"AxisIndex"],n.componentIndex)||yC(r[i+"AxisName"],n.name))return o}}(p,n))&&((n=d[t]||(d[t]={axesInfo:{}})).axesInfo[r]=o,n.mapper=p[t].mapper,o.linkGroup=n))}a.axisPointerEnabled&&(n=_C(a.model),s=u.coordSysAxesInfo[n]={},l=(u.coordSysMap[n]=a).model.getModel("tooltip",o),E(a.getAxes(),V(i,!1,null)),a.getTooltipAxes&&o&&l.get("show")&&(t="axis"===l.get("trigger"),e="cross"===l.get(["axisPointer","type"]),n=a.getTooltipAxes(l.get(["axisPointer","axis"])),(t||e)&&E(n.baseAxes,V(i,!e||"cross",t)),e&&E(n.otherAxes,V(i,"cross",!1))))}),n.seriesInvolved&&(r=n,t.eachSeries(function(n){var i=n.coordinateSystem,t=n.get(["tooltip","trigger"],!0),e=n.get(["tooltip","show"],!0);i&&"none"!==t&&!1!==t&&"item"!==t&&!1!==e&&!1!==n.get(["axisPointer","show"],!0)&&E(r.coordSysAxesInfo[_C(i.model)],function(t){var e=t.axis;i.getAxis(e.dim)===e&&(t.seriesModels.push(n),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=n.getData().count())})})),n}function yC(t,e){return"all"===t||G(t)&&0<=C(t,e)||t===e}function mC(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[_C(t)]}function vC(t){return!!t.get(["handle","show"])}function _C(t){return t.type+"||"+t.id}var xC,bC={},wC=(u(SC,xC=Iy),SC.prototype.render=function(t,e,n,i){var o,r,a,s,l,u;!this.axisPointerClass||(u=mC(o=t))&&(s=u.axisPointerModel,l=u.axis.scale,r=s.option,a=s.get("status"),null!=(o=s.get("value"))&&(o=l.parse(o)),s=vC(s),null==a&&(r.status=s?"show":"hide"),(l=l.getExtent().slice())[0]>l[1]&&l.reverse(),(o=null==o||o>l[1]?l[1]:o)<l[0]&&(o=l[0]),r.value=o,s&&(r.status=u.axis.scale.isBlank()?"hide":"show")),xC.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,n,!0)},SC.prototype.updateAxisPointer=function(t,e,n,i){this._doUpdateAxisPointerClass(t,n,!1)},SC.prototype.remove=function(t,e){var n=this._axisPointer;n&&n.remove(e)},SC.prototype.dispose=function(t,e){this._disposeAxisPointer(e),xC.prototype.dispose.apply(this,arguments)},SC.prototype._doUpdateAxisPointerClass=function(t,e,n){var i,o=SC.getAxisPointerClass(this.axisPointerClass);o&&((i=(i=mC(i=t))&&i.axisPointerModel)?(this._axisPointer||(this._axisPointer=new o)).render(t,i,e,n):this._disposeAxisPointer(e))},SC.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},SC.registerAxisPointerClass=function(t,e){if(1,bC[t])throw new Error("axisPointer "+t+" exists");bC[t]=e},SC.getAxisPointerClass=function(t){return t&&bC[t]},SC.type="axis",SC);function SC(){var t=null!==xC&&xC.apply(this,arguments)||this;return t.type=SC.type,t}var MC=ur();function IC(t,e,n,i){var o=n.axis;if(!o.scale.isBlank()){var r=n.getModel("splitArea"),n=r.getModel("areaStyle"),a=n.get("color"),s=i.coordinateSystem.getRect(),l=o.getTicksCoords({tickModel:r,clamp:!0});if(l.length){var u=a.length,h=MC(t).splitAreaColors,c=ct(),p=0;if(h)for(var d=0;d<l.length;d++){var f=h.get(l[d].tickValue);if(null!=f){p=(f+(u-1)*d)%u;break}}for(var g=o.toGlobalCoord(l[0].coord),y=n.getAreaStyle(),a=G(a)?a:[a],d=1;d<l.length;d++){var m=o.toGlobalCoord(l[d].coord),v=void 0,_=void 0,x=void 0,b=void 0,g=o.isHorizontal()?(v=g,_=s.y,x=m-v,b=s.height,v+x):(v=s.x,_=g,x=s.width,_+(b=m-_)),m=l[d-1].tickValue;null!=m&&c.set(m,p),e.add(new Fs({anid:null!=m?"area_"+m:null,shape:{x:v,y:_,width:x,height:b},style:A({fill:a[p]},y),autoBatch:!0,silent:!0})),p=(p+1)%u}MC(t).splitAreaColors=c}}}function TC(t){MC(t).splitAreaColors=null}var CC,DC=["axisLine","axisTickLabel","axisName"],AC=["splitArea","splitLine","minorSplitLine"],jc=(u(kC,CC=wC),kC.prototype.render=function(o,t,e,n){this.group.removeAll();var r,i,a=this._axisGroup;this._axisGroup=new io,this.group.add(this._axisGroup),o.get("show")&&(i=QT(r=o.getCoordSysModel(),o),i=new lC(o,P({handleAutoShown:function(t){for(var e=r.coordinateSystem.getCartesians(),n=0;n<e.length;n++){var i=e[n].getOtherAxis(o.axis).type;if("value"===i||"log"===i)return!0}return!1}},i)),E(DC,i.add,i),this._axisGroup.add(i.getGroup()),E(AC,function(t){o.get([t,"show"])&&PC[t](this,this._axisGroup,o,r)},this),n&&"changeAxisOrder"===n.type&&n.isInitSort||bc(a,this._axisGroup,o),CC.prototype.render.call(this,o,t,e,n))},kC.prototype.remove=function(){TC(this)},kC.type="cartesianAxis",kC);function kC(){var t=null!==CC&&CC.apply(this,arguments)||this;return t.type=kC.type,t.axisPointerClass="CartesianAxisPointer",t}var LC,PC={splitLine:function(t,e,n,i){var o=n.axis;if(!o.scale.isBlank())for(var r=n.getModel("splitLine"),n=r.getModel("lineStyle"),a=G(a=n.get("color"))?a:[a],s=i.coordinateSystem.getRect(),l=o.isHorizontal(),u=0,h=o.getTicksCoords({tickModel:r}),c=[],p=[],d=n.getLineStyle(),f=0;f<h.length;f++){var g=o.toGlobalCoord(h[f].coord);l?(c[0]=g,c[1]=s.y,p[0]=g,p[1]=s.y+s.height):(c[0]=s.x,c[1]=g,p[0]=s.x+s.width,p[1]=g);var y=u++%a.length,g=h[f].tickValue;e.add(new fh({anid:null!=g?"line_"+h[f].tickValue:null,subPixelOptimize:!0,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:p[0],y2:p[1]},style:A({stroke:a[y]},d),silent:!0}))}},minorSplitLine:function(t,e,n,i){var o=n.axis,n=n.getModel("minorSplitLine").getModel("lineStyle"),r=i.coordinateSystem.getRect(),a=o.isHorizontal(),s=o.getMinorTicksCoords();if(s.length)for(var l=[],u=[],h=n.getLineStyle(),c=0;c<s.length;c++)for(var p=0;p<s[c].length;p++){var d=o.toGlobalCoord(s[c][p].coord);a?(l[0]=d,l[1]=r.y,u[0]=d,u[1]=r.y+r.height):(l[0]=r.x,l[1]=d,u[0]=r.x+r.width,u[1]=d),e.add(new fh({anid:"minor_line_"+s[c][p].tickValue,subPixelOptimize:!0,autoBatch:!0,shape:{x1:l[0],y1:l[1],x2:u[0],y2:u[1]},style:h,silent:!0}))}},splitArea:function(t,e,n,i){IC(t,e,n,i)}},OC=(u(RC,LC=jc),RC.type="xAxis",RC);function RC(){var t=null!==LC&&LC.apply(this,arguments)||this;return t.type=RC.type,t}var NC,EC=(u(zC,NC=jc),zC.type="yAxis",zC);function zC(){var t=null!==NC&&NC.apply(this,arguments)||this;return t.type=OC.type,t}var BC,VC=(u(GC,BC=Iy),GC.prototype.render=function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Fs({shape:t.coordinateSystem.getRect(),style:A({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},GC.type="grid",GC);function GC(){var t=null!==BC&&BC.apply(this,arguments)||this;return t.type="grid",t}var FC={offset:0};function HC(t){t.registerComponentView(VC),t.registerComponentModel(NT),t.registerCoordinateSystem("cartesian2d",nC),HT(t,"x",BT,FC),HT(t,"y",BT,FC),t.registerComponentView(OC),t.registerComponentView(EC),t.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function WC(t){t.eachSeriesByType("radar",function(t){var e,i=t.getData(),o=[],r=t.coordinateSystem;r&&(E(e=r.getIndicatorAxes(),function(t,n){i.each(i.mapDimension(e[n].dim),function(t,e){o[e]=o[e]||[];t=r.dataToPoint(t,n);o[e][n]=UC(t)?t:YC(r)})}),i.each(function(t){var e=N(o[t],UC)||YC(r);o[t].push(e.slice()),i.setItemLayout(t,o[t])}))})}function UC(t){return!isNaN(t[0])&&!isNaN(t[1])}function YC(t){return[t.cx,t.cy]}function XC(n){var i,t=n.polar;t&&(G(t)||(t=[t]),i=[],E(t,function(t,e){t.indicator?(t.type&&!t.shape&&(t.shape=t.type),n.radar=n.radar||[],G(n.radar)||(n.radar=[n.radar]),n.radar.push(t)):i.push(t)}),n.polar=i),E(n.series,function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)})}var ZC,jC=(u(qC,ZC=ky),qC.prototype.render=function(l,t,e){var n=l.coordinateSystem,h=this.group,c=l.getData(),a=this._data;function s(t,e,n,i,o,r){n.removeAll();for(var a=0;a<e.length-1;a++){var s=function(t,e){if("none"!==(i=t.getItemVisual(e,"symbol")||"circle")){var n=Dm(t.getItemVisual(e,"symbolSize")),i=Cm(i,-1,-1,2,2),e=t.getItemVisual(e,"symbolRotate")||0;return i.attr({style:{strokeNoScale:!0},z2:100,scaleX:n[0]/2,scaleY:n[1]/2,rotation:e*Math.PI/180||0}),i}}(i,o);s&&(t[s.__dimIdx=a]?(s.setPosition(t[a]),Dc[r?"initProps":"updateProps"](s,{x:e[a][0],y:e[a][1]},l,o)):s.setPosition(e[a]),n.add(s))}}function u(t){return L(t,function(t){return[n.cx,n.cy]})}c.diff(a).add(function(t){var e,n,i,o,r=c.getItemLayout(t);r&&(e=new rh,n=new uh,o={shape:{points:r}},e.shape.points=u(r),n.shape.points=u(r),$h(e,o,l,t),$h(n,o,l,t),i=new io,o=new io,i.add(n),i.add(e),i.add(o),s(n.shape.points,r,o,c,t,!0),c.setItemGraphicEl(t,i))}).update(function(t,e){var n=a.getItemGraphicEl(e),i=n.childAt(0),o=n.childAt(1),r=n.childAt(2),e={shape:{points:c.getItemLayout(t)}};e.shape.points&&(s(i.shape.points,e.shape.points,r,c,t,!1),nc(o),nc(i),Kh(i,e,l),Kh(o,e,l),c.setItemGraphicEl(t,n))}).remove(function(t){h.remove(a.getItemGraphicEl(t))}).execute(),c.eachItemGraphicEl(function(t,n){var i=c.getItemModel(n),e=t.childAt(0),o=t.childAt(1),r=t.childAt(2),a=c.getItemVisual(n,"style"),s=a.fill;h.add(t),e.useStyle(A(i.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:s})),Ql(e,i,"lineStyle"),Ql(o,i,"areaStyle");var e=i.getModel("areaStyle"),l=e.isEmpty()&&e.parentModel.isEmpty();o.ignore=l,E(["emphasis","select","blur"],function(t){var e=i.getModel([t,"areaStyle"]),e=e.isEmpty()&&e.parentModel.isEmpty();o.ensureState(t).ignore=e&&l}),o.useStyle(A(e.getAreaStyle(),{fill:s,opacity:.7,decal:a.decal}));var e=i.getModel("emphasis"),u=e.getModel("itemStyle").getItemStyle();r.eachChild(function(t){t instanceof Ps?(e=t.style,t.useStyle(P({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},a))):(t.useStyle(a),t.setColor(s),t.style.strokeNoScale=!0),t.ensureState("emphasis").style=S(u);var e=c.getStore().get(c.getDimensionIndex(t.__dimIdx),n);null!=e&&!isNaN(e)||(e=""),Pc(t,Oc(i),{labelFetcher:c.hostModel,labelDataIndex:n,labelDimIndex:t.__dimIdx,defaultText:e,inheritColor:s,defaultOpacity:a.opacity})}),ql(t,e.get("focus"),e.get("blurScope"))}),this._data=c},qC.prototype.remove=function(){this.group.removeAll(),this._data=null},qC.type="radar",qC);function qC(){var t=null!==ZC&&ZC.apply(this,arguments)||this;return t.type=qC.type,t}var KC,$C=(u(JC,KC=yy),JC.prototype.init=function(t){KC.prototype.init.apply(this,arguments),this.legendVisualProvider=new mT(B(this.getData,this),B(this.getRawData,this))},JC.prototype.getInitialData=function(t,e){return yT(this,{generateCoord:"indicator_",generateCoordCount:1/0})},JC.prototype.formatTooltip=function(n,t,e){var i=this.getData(),o=this.coordinateSystem.getIndicatorAxes(),r=this.getData().getName(n),r=""===r?this.name:r,a=sy(this,n);return ty("section",{header:r,sortBlocks:!0,blocks:L(o,function(t){var e=i.get(i.mapDimension(t.dim),n);return ty("nameValue",{markerType:"subItem",markerColor:a,name:t.name,value:e,sortParam:e})})})},JC.prototype.getTooltipPosition=function(t){if(null!=t)for(var e=this.getData(),n=this.coordinateSystem,i=e.getValues(L(n.dimensions,function(t){return e.mapDimension(t)}),t),o=0,r=i.length;o<r;o++)if(!isNaN(i[o])){var a=n.getIndicatorAxes();return n.coordToPoint(a[o].dataToCoord(i[o]),o)}},JC.type="series.radar",JC.dependencies=["radar"],JC.defaultOption={zlevel:0,z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},JC);function JC(){var t=null!==KC&&KC.apply(this,arguments)||this;return t.type=JC.type,t.hasSymbolVisual=!0,t}n=GT.value;function QC(t,e){return A({show:e},t)}var tD,eD=(u(nD,tD=yd),nD.prototype.optionUpdated=function(){var n=this.get("boundaryGap"),i=this.get("splitNumber"),o=this.get("scale"),r=this.get("axisLine"),a=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),h=this.get(["axisName","formatter"]),c=this.get("axisNameGap"),p=this.get("triggerEvent"),t=L(this.get("indicator")||[],function(t){null!=t.max&&0<t.max&&!t.min?t.min=0:null!=t.min&&t.min<0&&!t.max&&(t.max=0);var e=l;null!=t.color&&(e=A({color:t.color},l));t=b(S(t),{boundaryGap:n,splitNumber:i,scale:o,axisLine:r,axisTick:a,axisLabel:s,name:t.text,nameLocation:"end",nameGap:c,nameTextStyle:e,triggerEvent:p},!1);u||(t.name=""),"string"==typeof h?(e=t.name,t.name=h.replace("{value}",null!=e?e:"")):"function"==typeof h&&(t.name=h(t.name,t));t=new ep(t,null,this.ecModel);return T(t,mw.prototype),t.mainType="radar",t.componentIndex=this.componentIndex,t},this);this._indicatorModels=t},nD.prototype.getIndicatorModels=function(){return this._indicatorModels},nD.type="radar",nD.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:b({lineStyle:{color:"#bbb"}},n.axisLine),axisLabel:QC(n.axisLabel,!1),axisTick:QC(n.axisTick,!1),splitLine:QC(n.splitLine,!0),splitArea:QC(n.splitArea,!0),indicator:[]},nD);function nD(){var t=null!==tD&&tD.apply(this,arguments)||this;return t.type=nD.type,t}var iD,oD=["axisLine","axisTickLabel","axisName"],rD=(u(aD,iD=Iy),aD.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},aD.prototype._buildAxes=function(t){var e=t.coordinateSystem;E(L(e.getIndicatorAxes(),function(t){return new lC(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}),function(t){E(oD,t.add,t),this.group.add(t.getGroup())},this)},aD.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,e=n.getIndicatorAxes();if(e.length){var i=t.get("shape"),o=t.getModel("splitLine"),r=t.getModel("splitArea"),a=o.getModel("lineStyle"),t=r.getModel("areaStyle"),s=o.get("show"),l=r.get("show"),o=a.get("color"),r=t.get("color"),u=G(o)?o:[o],h=G(r)?r:[r],c=[],p=[];if("circle"===i)for(var d=e[0].getTicksCoords(),f=n.cx,g=n.cy,y=0;y<d.length;y++)s&&c[M(c,u,y)].push(new Du({shape:{cx:f,cy:g,r:d[y].coord}})),l&&y<d.length-1&&p[M(p,h,y)].push(new Qu({shape:{cx:f,cy:g,r0:d[y].coord,r:d[y+1].coord}}));else for(var m,v=L(e,function(t,e){t=t.getTicksCoords();return m=null==m?t.length-1:Math.min(t.length-1,m),L(t,function(t){return n.coordToPoint(t.coord,e)})}),_=[],y=0;y<=m;y++){for(var x=[],b=0;b<e.length;b++)x.push(v[b][y]);x[0]?x.push(x[0].slice()):console.error("Can't draw value axis "+y),s&&c[M(c,u,y)].push(new uh({shape:{points:x}})),l&&_&&p[M(p,h,y-1)].push(new rh({shape:{points:x.concat(_)}})),_=x.slice().reverse()}var w=a.getLineStyle(),S=t.getAreaStyle();E(p,function(t,e){this.group.add(fc(t,{style:A({stroke:"none",fill:h[e%h.length]},S),silent:!0}))},this),E(c,function(t,e){this.group.add(fc(t,{style:A({fill:"none",stroke:u[e%u.length]},w),silent:!0}))},this)}function M(t,e,n){e=n%e.length;return t[e]=t[e]||[],e}},aD.type="radar",aD);function aD(){var t=null!==iD&&iD.apply(this,arguments)||this;return t.type=aD.type,t}var sD,lD=(u(uD,sD=vp),uD);function uD(t,e,n){n=sD.call(this,t,e,n)||this;return n.type="value",n.angle=0,n.name="",n}var hD=(cD.prototype.getIndicatorAxes=function(){return this._indicatorAxes},cD.prototype.dataToPoint=function(t,e){var n=this._indicatorAxes[e];return this.coordToPoint(n.dataToCoord(t),e)},cD.prototype.coordToPoint=function(t,e){e=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(e),this.cy-t*Math.sin(e)]},cD.prototype.pointToData=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,t=Math.sqrt(e*e+n*n);e/=t,n/=t;for(var i,o=Math.atan2(-n,e),r=1/0,a=-1,s=0;s<this._indicatorAxes.length;s++){var l=this._indicatorAxes[s],u=Math.abs(o-l.angle);u<r&&(i=l,a=s,r=u)}return[a,+(i&&i.coordToData(t))]},cD.prototype.resize=function(t,e){var n=t.get("center"),i=e.getWidth(),o=e.getHeight(),e=Math.min(i,o)/2;this.cx=mo(n[0],i),this.cy=mo(n[1],o),this.startAngle=t.get("startAngle")*Math.PI/180;t=t.get("radius");"string"!=typeof t&&"number"!=typeof t||(t=[0,t]),this.r0=mo(t[0],e),this.r=mo(t[1],e),E(this._indicatorAxes,function(t,e){t.setExtent(this.r0,this.r);e=this.startAngle+e*Math.PI*2/this._indicatorAxes.length,e=Math.atan2(Math.sin(e),Math.cos(e));t.angle=e},this)},cD.prototype.update=function(i,t){var o=this._indicatorAxes,r=this._model;E(o,function(t){t.scale.setExtent(1/0,-1/0)}),i.eachSeriesByType("radar",function(t,e){var n;"radar"===t.get("coordinateSystem")&&i.getComponent("radar",t.get("radarIndex"))===r&&(n=t.getData(),E(o,function(t){t.scale.unionExtentFromData(n,n.mapDimension(t.dim))}))},this);var h=r.get("splitNumber");function c(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),t=t/e;return 2===t?t=5:t*=2,t*e}E(o,function(t,e){var n=lw(t.scale,t.model).extent;uw(t.scale,t.model);var i=t.model,o=t.scale,r=sw(o,i.get("min",!0)),a=sw(o,i.get("max",!0)),s=o.getInterval();if(null!=r&&null!=a)o.setExtent(+r,+a),o.setInterval((a-r)/h);else if(null!=r)for(var l=void 0;l=r+s*h,o.setExtent(+r,l),o.setInterval(s),s=c(s),l<n[1]&&isFinite(l)&&isFinite(n[1]););else if(null!=a)for(var u=void 0;u=a-s*h,o.setExtent(u,+a),o.setInterval(s),s=c(s),u>n[0]&&isFinite(u)&&isFinite(n[0]););else{i=o.getTicks().length-1;h<i&&(s=c(s));u=vo((l=Math.ceil(n[1]/s)*s)-s*h);o.setExtent(u,l),o.setInterval(s)}})},cD.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},cD.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},cD.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},cD.create=function(t,n){var i=[];return t.eachComponent("radar",function(t){var e=new cD(t,0,n);i.push(e),t.coordinateSystem=e}),t.eachSeriesByType("radar",function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])}),i},cD.dimensions=[],cD);function cD(t,e,n){this.dimensions=[],this._model=t,this._indicatorAxes=L(t.getIndicatorModels(),function(t,e){var n="indicator_"+e,e=new lD(n,new Ib);return e.name=t.get("name"),(e.model=t).axis=e,this.dimensions.push(n),e},this),this.resize(t,n)}function pD(t){t.registerCoordinateSystem("radar",hD),t.registerComponentModel(eD),t.registerComponentView(rD),t.registerVisual({seriesType:"radar",reset:function(t){var e=t.getData();e.each(function(t){e.setItemVisual(t,"legendIcon","roundRect")}),e.setVisual("legendIcon","roundRect")}})}var dD="\0_ec_interaction_mutex";function fD(t,e){return gD(t)[e]}function gD(t){return t[dD]||(t[dD]={})}hx({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},function(){});var yD,mD=(u(vD,yD=Gt),vD.prototype.isDragging=function(){return this._dragging},vD.prototype.isPinching=function(){return this._pinching},vD.prototype.setPointerChecker=function(t){this.pointerChecker=t},vD.prototype.dispose=function(){this.disable()},vD.prototype._mousedownHandler=function(t){var e,n;oe(t)||t.target&&t.target.draggable||(e=t.offsetX,n=t.offsetY,this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0))},vD.prototype._mousemoveHandler=function(t){var e,n,i,o,r,a;this._dragging&&bD("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!fD(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,r=e-(i=this._x),a=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ie(t.event),xD(this,"pan","moveOnMouseMove",t,{dx:r,dy:a,oldX:i,oldY:o,newX:e,newY:n,isAvailableBehavior:null}))},vD.prototype._mouseupHandler=function(t){oe(t)||(this._dragging=!1)},vD.prototype._mousewheelHandler=function(t){var e=bD("zoomOnMouseWheel",t,this._opt),n=bD("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,o=Math.abs(i),r=t.offsetX,a=t.offsetY;0!==i&&(e||n)&&(e&&(o=3<o?1.4:1<o?1.2:1.1,_D(this,"zoom","zoomOnMouseWheel",t,{scale:0<i?o:1/o,originX:r,originY:a,isAvailableBehavior:null})),n&&_D(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(0<i?1:-1)*(3<(i=Math.abs(i))?.4:1<i?.15:.05),originX:r,originY:a,isAvailableBehavior:null}))},vD.prototype._pinchHandler=function(t){fD(this._zr,"globalPan")||_D(this,"zoom",null,t,{scale:1<t.pinchScale?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},vD);function vD(n){var t=yD.call(this)||this;t._zr=n;var i=B(t._mousedownHandler,t),o=B(t._mousemoveHandler,t),r=B(t._mouseupHandler,t),a=B(t._mousewheelHandler,t),s=B(t._pinchHandler,t);return t.enable=function(t,e){this.disable(),this._opt=A(S(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),!0!==(t=null==t?!0:t)&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",r)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",a),n.on("pinch",s))},t.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",r),n.off("mousewheel",a),n.off("pinch",s)},t}function _D(t,e,n,i,o){t.pointerChecker&&t.pointerChecker(i,o.originX,o.originY)&&(ie(i.event),xD(t,e,n,i,o))}function xD(t,e,n,i,o){o.isAvailableBehavior=B(bD,null,n,i),t.trigger(e,o)}function bD(t,e,n){n=n[t];return!t||n&&(!H(n)||e.event[n+"Key"])}function wD(t,e,n){t=t.target;t.x+=e,t.y+=n,t.dirty()}function SD(t,e,n,i){var o=t.target,r=t.zoomLimit,a=t.zoom=t.zoom||1;a*=e,r&&(s=r.min||0,r=r.max||1/0,a=Math.max(Math.min(r,a),s));var s=a/t.zoom;t.zoom=a,o.x-=(n-o.x)*(s-1),o.y-=(i-o.y)*(s-1),o.scaleX*=s,o.scaleY*=s,o.dirty()}var MD={axisPointer:1,tooltip:1,brush:1};function ID(t,e,n){e=e.getComponentByElement(t.topTarget),t=e&&e.coordinateSystem;return e&&e!==n&&!MD.hasOwnProperty(e.mainType)&&t&&t.model!==n}var jc=["rect","circle","line","ellipse","polygon","polyline","path"],TD=ct(jc),CD=ct(jc.concat(["g"])),DD=ct(jc.concat(["g"])),AD=ur();function kD(t){var e=t.getItemStyle(),t=t.get("areaColor");return null!=t&&(e.fill=t),e}var LD=(PD.prototype.draw=function(e,t,n,i,o){var r="geo"===e.mainType,a=e.getData&&e.getData();r&&t.eachComponent({mainType:"series",subType:"map"},function(t){a||t.getHostGeoModel()!==e||(a=t.getData())});var s=e.coordinateSystem,l=this._regionsGroup,u=this.group,h=s.getTransformInfo(),c=h.raw,h=h.roam;!l.childAt(0)||o?(u.x=h.x,u.y=h.y,u.scaleX=h.scaleX,u.scaleY=h.scaleY,u.dirty()):Kh(u,h,e);h=a&&a.getVisual("visualMeta")&&0<a.getVisual("visualMeta").length,c={api:n,geo:s,mapOrGeoModel:e,data:a,isVisualEncodedByVisualMap:h,isGeo:r,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(c):"geoSVG"===s.resourceType&&this._buildSVG(c),this._updateController(e,t,n),this._updateMapSelectHandler(e,l,n,i)},PD.prototype._buildGeoJSON=function(r){function s(t){return[t[0]*e.scaleX+e.x,t[1]*e.scaleY+e.y]}var l=this._regionsGroupByName=ct(),u=ct(),h=this._regionsGroup,e=r.transformInfoRaw,c=r.mapOrGeoModel,p=r.data;h.removeAll(),E(r.geo.regions,function(t){var e=t.name,n=l.get(e),i=u.get(e)||{},o=i.dataIdx,i=i.regionModel;n||(n=l.set(e,new io),h.add(n),o=p?p.indexOfName(e):null,i=r.isGeo?c.getRegionModel(e):p?p.getItemModel(o):null,u.set(e,{dataIdx:o,regionModel:i}));var a=new Ch({segmentIgnoreThreshold:1,shape:{paths:[]}});n.add(a),E(t.geometries,function(t){if("polygon"===t.type){for(var e=[],n=0;n<t.exterior.length;++n)e.push(s(t.exterior[n]));a.shape.paths.push(new rh({segmentIgnoreThreshold:1,shape:{points:e}}));for(n=0;n<(t.interiors?t.interiors.length:0);++n){for(var i=t.interiors[n],o=[],r=0;r<i.length;++r)o.push(s(i[r]));a.shape.paths.push(new rh({segmentIgnoreThreshold:1,shape:{points:o}}))}}}),OD(r,a,o,i),a instanceof ta&&(a.culling=!0);t=s(t.getCenter());RD(r,a,e,i,c,o,t)}),l.each(function(t,e){var n=u.get(e),i=n.dataIdx,n=n.regionModel;ND(r,t,e,n,c,i),ED(r,t,e,n,c),zD(r,t,e,n,c)},this)},PD.prototype._buildSVG=function(s){var t=s.geo.map,e=s.transformInfoRaw;this._svgGroup.x=e.x,this._svgGroup.y=e.y,this._svgGroup.scaleX=e.scaleX,this._svgGroup.scaleY=e.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var l=this._svgDispatcherMap=ct(),u=!1;E(this._svgGraphicRecord.named,function(t){var e=t.name,n=s.mapOrGeoModel,i=s.data,o=t.svgNodeTagLower,r=t.el,a=i?i.indexOfName(e):null,i=n.getRegionModel(e);null!=TD.get(o)&&r instanceof ta&&OD(s,r,a,i),r instanceof ta&&(r.culling=!0),r.z2EmphasisLift=0,t.namedFrom||(null!=DD.get(o)&&RD(s,r,e,i,n,a,null),ND(s,r,e,i,n,a),ED(s,r,e,i,n),null!=CD.get(o)&&("self"===zD(s,r,e,i,n)&&(u=!0),(l.get(e)||l.set(e,[])).push(r)))},this),this._enableBlurEntireSVG(u,s)},PD.prototype._enableBlurEntireSVG=function(t,e){var n;t&&e.isGeo&&(n=e.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle().opacity,this._svgGraphicRecord.root.traverse(function(t){var e;t.isGroup||(Rl(t),null==(e=t.ensureState("blur").style||{}).opacity&&null!=n&&(e.opacity=n),t.ensureState("emphasis"))}))},PD.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},PD.prototype.findHighDownDispatchers=function(t,e){if(null==t)return[];var n=e.coordinateSystem;if("geoJSON"===n.resourceType){e=this._regionsGroupByName;if(e){e=e.get(t);return e?[e]:[]}}else if("geoSVG"===n.resourceType)return this._svgDispatcherMap&&this._svgDispatcherMap.get(t)||[]},PD.prototype._svgResourceChanged=function(t){return this._svgMapName!==t},PD.prototype._useSVG=function(t){var e=t_(t);e&&"geoSVG"===e.type&&(e=e.useGraphic(this.uid),this._svgGroup.add(e.root),this._svgGraphicRecord=e,this._svgMapName=t)},PD.prototype._freeSVG=function(){var t=this._svgMapName;null!=t&&((t=t_(t))&&"geoSVG"===t.type&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null)},PD.prototype._updateController=function(i,t,o){var r=i.coordinateSystem,e=this._controller,n=this._controllerHost;n.zoomLimit=i.get("scaleLimit"),n.zoom=r.getZoom(),e.enable(i.get("roam")||!1);var a=i.mainType;function s(){var t={type:"geoRoam",componentType:a};return t[a+"Id"]=i.id,t}e.off("pan").on("pan",function(t){this._mouseDownFlag=!1,wD(n,t.dx,t.dy),o.dispatchAction(P(s(),{dx:t.dx,dy:t.dy}))},this),e.off("zoom").on("zoom",function(t){this._mouseDownFlag=!1,SD(n,t.scale,t.originX,t.originY),o.dispatchAction(P(s(),{zoom:t.scale,originX:t.originX,originY:t.originY}))},this),e.setPointerChecker(function(t,e,n){return r.containPoint([e,n])&&!ID(t,o,i)})},PD.prototype.resetForLabelLayout=function(){this.group.traverse(function(t){t=t.getTextContent();t&&(t.ignore=AD(t).ignore)})},PD.prototype._updateMapSelectHandler=function(t,e,n,i){var o=this;e.off("mousedown"),e.off("click"),t.get("selectedMode")&&(e.on("mousedown",function(){o._mouseDownFlag=!0}),e.on("click",function(t){o._mouseDownFlag&&(o._mouseDownFlag=!1)}))},PD);function PD(t){var e=new io;this.uid=op("ec_map_draw"),this._controller=new mD(t.getZr()),this._controllerHost={target:e},(this.group=e).add(this._regionsGroup=new io),e.add(this._svgGroup=new io)}function OD(t,e,n,i){var o=i.getModel("itemStyle"),r=i.getModel(["emphasis","itemStyle"]),a=i.getModel(["blur","itemStyle"]),s=i.getModel(["select","itemStyle"]),l=kD(o),i=kD(r),o=kD(s),r=kD(a),s=t.data;s&&(a=s.getItemVisual(n,"style"),n=s.getItemVisual(n,"decal"),t.isVisualEncodedByVisualMap&&a.fill&&(l.fill=a.fill),n&&(l.decal=iv(n,t.api))),e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=i,e.ensureState("select").style=o,e.ensureState("blur").style=r,Rl(e)}function RD(t,e,n,i,o,r,a){var s=t.data,l=t.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),r)),t=s&&s.getItemLayout(r);l||u||t&&t.showLabel?(l=l?n:r,r=!s||0<=r?o:void 0,o=a?{normal:{align:"center",verticalAlign:"middle"}}:null,Pc(e,Oc(i),{labelFetcher:r,labelDataIndex:l,defaultText:n},o),(o=e.getTextContent())&&(AD(o).ignore=o.ignore,e.textConfig&&a&&(o=e.getBoundingRect().clone(),e.textConfig.layoutRect=o,e.textConfig.position=[(a[0]-o.x)/o.width*100+"%",(a[1]-o.y)/o.height*100+"%"])),e.disableLabelAnimation=!0):(e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null)}function ND(t,e,n,i,o,r){t.data?t.data.setItemGraphicEl(r,e):il(e).eventData={componentType:"geo",componentIndex:o.componentIndex,geoIndex:o.componentIndex,name:n,region:i&&i.option||{}}}function ED(t,e,n,i,o){t.data||Cc({el:e,componentModel:o,itemName:n,itemTooltipOption:i.get("tooltip")})}function zD(t,e,n,i,o){e.highDownSilentOnTouch=!!o.get("selectedMode");var r=i.getModel("emphasis"),i=r.get("focus");return ql(e,i,r.get("blurScope")),t.isGeo&&(o=o,n=n,(e=il(e=e)).componentMainType=o.mainType,e.componentIndex=o.componentIndex,e.componentHighDownName=n),i}var BD,VD=(u(GD,BD=ky),GD.prototype.render=function(t,e,n,i){var o,r;i&&"mapToggleSelect"===i.type&&i.from===this.uid||((o=this.group).removeAll(),t.getHostGeoModel()||(this._mapDraw&&i&&"geoRoam"===i.type&&this._mapDraw.resetForLabelLayout(),i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id?(r=this._mapDraw)&&o.add(r.group):t.needsDrawMap?(r=this._mapDraw||new LD(n),o.add(r.group),r.draw(t,e,n,this,i),this._mapDraw=r):(this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null),t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)))},GD.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},GD.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},GD.prototype._renderSymbols=function(r,t,e){var a=r.originalData,s=this.group;a.each(a.mapDimension("value"),function(t,e){var n,i,o;isNaN(t)||(o=a.getItemLayout(e))&&o.point&&(t=o.point,o=o.offset,n=new Du({style:{fill:r.getData().getVisual("style").fill},shape:{cx:t[0]+9*o,cy:t[1],r:3},silent:!0,z2:8+(o?0:pl+1)}),o||(t=r.mainSeries.getData(),o=a.getName(e),i=t.indexOfName(o),e=(o=a.getItemModel(e)).getModel("label"),t=t.getItemGraphicEl(i),Pc(n,Oc(o),{labelFetcher:{getFormattedLabel:function(t,e){return r.getFormattedLabel(i,e)}}}),n.disableLabelAnimation=!0,e.get("position")||n.setTextConfig({position:"bottom"}),t.onHoverStateChange=function(t){Ll(n,t)}),s.add(n))})},GD.type="map",GD);function GD(){var t=null!==BD&&BD.apply(this,arguments)||this;return t.type=GD.type,t}var FD,HD=(u(WD,FD=yy),WD.prototype.getInitialData=function(t){for(var e=yT(this,{coordDimensions:["value"],encodeDefaulter:V(Od,this)}),n=ct(),i=[],o=0,r=e.count();o<r;o++){var a=e.getName(o);n.set(a,!0)}return E(n_(this.getMapType(),this.option.nameMap,this.option.nameProperty).regions,function(t){t=t.name;n.get(t)||i.push(t)}),e.appendValues([],i),e},WD.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return null!=t?this.ecModel.getComponent("geo",t):null},WD.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},WD.prototype.getRawValue=function(t){var e=this.getData();return e.get(e.mapDimension("value"),t)},WD.prototype.getRegionModel=function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},WD.prototype.formatTooltip=function(t,e,n){for(var i=this.getData(),o=this.getRawValue(t),r=i.getName(t),a=this.seriesGroup,s=[],l=0;l<a.length;l++){var u=a[l].originalData.indexOfName(r),h=i.mapDimension("value");isNaN(a[l].originalData.get(h,u))||s.push(a[l].name)}return ty("section",{header:s.join(", "),noHeader:!s.length,blocks:[ty("nameValue",{name:r,value:o})]})},WD.prototype.setZoom=function(t){this.option.zoom=t},WD.prototype.setCenter=function(t){this.option.center=t},WD.prototype.getLegendIcon=function(t){var e=t.icon||"roundRect",n=Cm(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return n.setStyle(t.itemStyle),n.style.stroke="none",-1<e.indexOf("empty")&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},WD.type="series.map",WD.dependencies=["geo"],WD.layoutMode="box",WD.defaultOption={zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},WD);function WD(){var t=null!==FD&&FD.apply(this,arguments)||this;return t.type=WD.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),t=this.coordinateSystem,e=t.getRegion(e);return e&&t.dataToPoint(e.getCenter())}},t}function UD(t){var n={};t.eachSeriesByType("map",function(t){var e=t.getHostGeoModel(),e=e?"o"+e.id:"i"+t.getMapType();(n[e]=n[e]||[]).push(t)}),E(n,function(t,e){for(var l,u,h,n=(l=L(t,function(t){return t.getData()}),u=t[0].get("mapValueCalculation"),h={},E(l,function(n){n.each(n.mapDimension("value"),function(t,e){e="ec-"+n.getName(e);h[e]=h[e]||[],isNaN(t)||h[e].push(t)})}),l[0].map(l[0].mapDimension("value"),function(t,e){for(var n="ec-"+l[0].getName(e),i=0,o=1/0,r=-1/0,a=h[n].length,s=0;s<a;s++)o=Math.min(o,h[n][s]),r=Math.max(r,h[n][s]),i+=h[n][s];return e="min"===u?o:"max"===u?r:"average"===u?i/a:i,0===a?NaN:e})),i=0;i<t.length;i++)t[i].originalData=t[i].getData();for(i=0;i<t.length;i++)(t[i].seriesGroup=t)[i].needsDrawMap=0===i&&!t[i].getHostGeoModel(),t[i].setData(n.cloneShallow()),t[i].mainSeries=t[0]})}function YD(n){var o={};n.eachSeriesByType("map",function(t){var a,i,e=t.getMapType();t.getHostGeoModel()||o[e]||(a={},E(t.seriesGroup,function(t){var o=t.coordinateSystem,r=t.originalData;t.get("showLegendSymbol")&&n.getComponent("legend")&&r.each(r.mapDimension("value"),function(t,e){var n=r.getName(e),i=o.getRegion(n);i&&!isNaN(t)&&(t=a[n]||0,i=o.dataToPoint(i.getCenter()),a[n]=t+1,r.setItemLayout(e,{point:i,offset:t}))})}),(i=t.getData()).each(function(t){var e=i.getName(t),n=i.getItemLayout(t)||{};n.showLabel=!a[e],i.setItemLayout(t,n)}),o[e]=!0)})}var XD,ZD=Ot,jD=(u(qD,XD=vi),qD.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new Li(t,e,n,i),this._rect},qD.prototype.getBoundingRect=function(){return this._rect},qD.prototype.setViewRect=function(t,e,n,i){this._transformTo(t,e,n,i),this._viewRect=new Li(t,e,n,i)},qD.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._rawTransformable;r.transform=o.calculateTransform(new Li(t,e,n,i));i=r.parent;r.parent=null,r.decomposeTransform(),r.parent=i,this._updateTransform()},qD.prototype.setCenter=function(t){t&&(this._center=t,this._updateCenterAndZoom())},qD.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},qD.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},qD.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},qD.prototype.getZoom=function(){return this._zoom||1},qD.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},qD.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),o=this.getZoom(),i=Ot([],i,t),n=Ot([],n,t);e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=o,this._updateTransform()},qD.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;(e.parent=t).updateTransform(),e.updateTransform(),oi(this.transform||(this.transform=[]),e.transform||ni()),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],ui(this.invTransform,this.transform),this.decomposeTransform()},qD.prototype.getTransformInfo=function(){var t=this._rawTransformable,e=this._roamTransformable,n=new vi;return n.transform=e.transform,n.decomposeTransform(),{roam:{x:n.x,y:n.y,scaleX:n.scaleX,scaleY:n.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},qD.prototype.getViewRect=function(){return this._viewRect},qD.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},qD.prototype.dataToPoint=function(t,e,n){e=e?this._rawTransform:this.transform;return n=n||[],e?ZD(n,t,e):vt(n,t)},qD.prototype.pointToData=function(t){var e=this.invTransform;return e?ZD([],t,e):[t[0],t[1]]},qD.prototype.convertToPixel=function(t,e,n){e=KD(e);return e===this?e.dataToPoint(n):null},qD.prototype.convertFromPixel=function(t,e,n){e=KD(e);return e===this?e.pointToData(n):null},qD.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},qD.dimensions=["x","y"],qD);function qD(t){var e=XD.call(this)||this;return e.type="view",e.dimensions=["x","y"],e._roamTransformable=new vi,e._rawTransformable=new vi,e.name=t,e}function KD(t){t=t.seriesModel;return t?t.coordinateSystem:null}var $D,JD={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},QD=["lng","lat"],tA=(u(eA,$D=jD),eA.prototype._transformTo=function(t,e,n,i){var o=this.getBoundingRect(),r=this._invertLongitute,o=o.clone();r&&(o.y=-o.y-o.height);var a=this._rawTransformable;a.transform=o.calculateTransform(new Li(t,e,n,i));i=a.parent;a.parent=null,a.decomposeTransform(),a.parent=i,r&&(a.scaleY=-a.scaleY),this._updateTransform()},eA.prototype.getRegion=function(t){return this._regionsMap.get(t)},eA.prototype.getRegionByCoord=function(t){for(var e=this.regions,n=0;n<e.length;n++){var i=e[n];if("geoJSON"===i.type&&i.contain(t))return e[n]}},eA.prototype.addGeoCoord=function(t,e){this._nameCoordMap.set(t,e)},eA.prototype.getGeoCoord=function(t){var e=this._regionsMap.get(t);return this._nameCoordMap.get(t)||e&&e.getCenter()},eA.prototype.dataToPoint=function(t,e,n){if(t="string"==typeof t?this.getGeoCoord(t):t)return jD.prototype.dataToPoint.call(this,t,e,n)},eA.prototype.convertToPixel=function(t,e,n){e=nA(e);return e===this?e.dataToPoint(n):null},eA.prototype.convertFromPixel=function(t,e,n){e=nA(e);return e===this?e.pointToData(n):null},eA);function eA(t,e,n){var i=$D.call(this,t)||this;i.dimensions=QD,i.type="geo",i._nameCoordMap=ct(),i.map=e;t=n_(e,n.nameMap,n.nameProperty),e=t_(e);i.resourceType=e?e.type:null;e=JD[e.type];i._regionsMap=t.regionsMap,i._invertLongitute=e.invertLongitute,i.regions=t.regions,i.aspectScale=tt(n.aspectScale,e.aspectScale);t=t.boundingRect;return i.setBoundingRect(t.x,t.y,t.width,t.height),i}function nA(t){var e=t.geoModel,t=t.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",dr).models[0]||{}).coordinateSystem:null}function iA(t,e){var n=t.get("boundingCoords");null!=n&&(u=n[0],l=n[1],isNaN(u[0])||isNaN(u[1])||isNaN(l[0])||isNaN(l[1])?console.error("Invalid boundingCoords"):this.setBoundingRect(u[0],u[1],l[0]-u[0],l[1]-u[1]));var i,o,r,a=this.getBoundingRect(),s=t.get("layoutCenter"),n=t.get("layoutSize"),l=e.getWidth(),u=e.getHeight(),e=a.width/a.height*this.aspectScale,a=!1;s&&n&&(r=[mo(s[0],l),mo(s[1],u)],i=mo(n,Math.min(l,u)),isNaN(r[0])||isNaN(r[1])||isNaN(i)?console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."):a=!0),a?(o={},1<e?(o.width=i,o.height=i/e):(o.height=i,o.width=i*e),o.y=r[1]-o.height/2,o.x=r[0]-o.width/2):((r=t.getBoxLayoutParams()).aspect=e,o=rd(r,{width:l,height:u})),this.setViewRect(o.x,o.y,o.width,o.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function oA(){this.dimensions=QD}T(tA,jD);var rA,aA=new(oA.prototype.create=function(t,o){var r=[];t.eachComponent("geo",function(t,e){var n=t.get("map"),n=new tA(n+e,n,{nameMap:t.get("nameMap"),nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale")});n.zoomLimit=t.get("scaleLimit"),r.push(n),(t.coordinateSystem=n).model=t,n.resize=iA,n.resize(t,o)}),t.eachSeries(function(t){var e;"geo"===t.get("coordinateSystem")&&(e=t.get("geoIndex")||0,t.coordinateSystem=r[e])});var n={};return t.eachSeriesByType("map",function(t){var e;t.getHostGeoModel()||(e=t.getMapType(),n[e]=n[e]||[],n[e].push(t))}),E(n,function(t,e){var n=L(t,function(t){return t.get("nameMap")}),i=new tA(e,e,{nameMap:M(n),nameProperty:t[0].get("nameProperty"),aspectScale:t[0].get("aspectScale")});i.zoomLimit=Q.apply(null,L(t,function(t){return t.get("scaleLimit")})),r.push(i),i.resize=iA,i.resize(t[0],o),E(t,function(t){var n;t.coordinateSystem=i,n=i,E(t.get("geoCoord"),function(t,e){n.addGeoCoord(e,t)})})}),r},oA.prototype.getFilledRegions=function(t,e,n,i){for(var o=(t||[]).slice(),r=ct(),a=0;a<o.length;a++)r.set(o[a].name,o[a]);return E(n_(e,n,i).regions,function(t){t=t.name;r.get(t)||o.push({name:t})}),o},oA),sA=(u(lA,rA=yd),lA.prototype.init=function(t,e,n){var i=t_(t.map);i&&"geoJSON"===i.type&&("color"in(i=t.itemStyle=t.itemStyle||{})||(i.color="#eee")),this.mergeDefaultAndTheme(t,n),Ko(t,"label",["show"])},lA.prototype.optionUpdated=function(){var i=this,t=this.option;t.regions=aA.getFilledRegions(t.regions,t.map,t.nameMap,t.nameProperty);var o={};this._optionModelMap=O(t.regions||[],function(t,e){var n=e.name;return n&&(t.set(n,new ep(e,i,i.ecModel)),e.selected&&(o[n]=!0)),t},ct()),t.selectedMap||(t.selectedMap=o)},lA.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new ep(null,this,this.ecModel)},lA.prototype.getFormattedLabel=function(t,e){var n=this.getRegionModel(t),i="normal"===e?n.get(["label","formatter"]):n.get(["emphasis","label","formatter"]),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},lA.prototype.setZoom=function(t){this.option.zoom=t},lA.prototype.setCenter=function(t){this.option.center=t},lA.prototype.select=function(t){var e=this.option,n=e.selectedMode;n&&("multiple"!==n&&(e.selectedMap=null),(e.selectedMap||(e.selectedMap={}))[t]=!0)},lA.prototype.unSelect=function(t){var e=this.option.selectedMap;e&&(e[t]=!1)},lA.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},lA.prototype.isSelected=function(t){var e=this.option.selectedMap;return!(!e||!e[t])},lA.type="geo",lA.layoutMode="box",lA.defaultOption={zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},lA);function lA(){var t=null!==rA&&rA.apply(this,arguments)||this;return t.type=lA.type,t}function uA(t,e,n){var i,o=t.getZoom(),r=t.getCenter(),a=e.zoom,r=t.dataToPoint(r);return null!=e.dx&&null!=e.dy&&(r[0]-=e.dx,r[1]-=e.dy,t.setCenter(t.pointToData(r))),null!=a&&(n&&(i=n.min||0,n=n.max||1/0,a=Math.max(Math.min(o*a,n),i)/o),t.scaleX*=a,t.scaleY*=a,i=(e.originX-t.x)*(a-1),e=(e.originY-t.y)*(a-1),t.x-=i,t.y-=e,t.updateTransform(),t.setCenter(t.pointToData(r)),t.setZoom(a*o)),{center:t.getCenter(),zoom:t.getZoom()}}var hA,cA=(u(pA,hA=Iy),pA.prototype.init=function(t,e){this._api=e},pA.prototype.render=function(t,e,n,i){if(!(this._model=t).get("show"))return this._mapDraw&&this._mapDraw.remove(),void(this._mapDraw=null);this._mapDraw||(this._mapDraw=new LD(n));var o=this._mapDraw;o.draw(t,e,n,this,i),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,e,n)},pA.prototype._handleRegionClick=function(t){var e;_m(t.target,function(t){return null!=(e=il(t).eventData)},!0),e&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:e.name})},pA.prototype.updateSelectStatus=function(t,e,n){var i=this;this._mapDraw.group.traverse(function(t){var e=il(t).eventData;if(e)return i._model.isSelected(e.name)?n.enterSelect(t):n.leaveSelect(t),!0})},pA.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},pA.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},pA.type="geo",pA);function pA(){var t=null!==hA&&hA.apply(this,arguments)||this;return t.type=pA.type,t.focusBlurEnabled=!0,t}function dA(e){function t(r,t){t.update="geo:updateSelectStatus",e.registerAction(t,function(t,e){var i={},o=[];return e.eachComponent({mainType:"geo",query:t},function(e){e[r](t.name),E(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1});var n=[];E(i,function(t,e){i[e]&&n.push(e)}),o.push({geoIndex:e.componentIndex,name:n})}),{selected:i,allSelected:o,name:t.name}})}e.registerCoordinateSystem("geo",aA),e.registerComponentModel(sA),e.registerComponentView(cA),t("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),t("select",{type:"geoSelect",event:"geoselected"}),t("unSelect",{type:"geoUnSelect",event:"geounselected"}),e.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(i,t){var o=i.componentType||"series";t.eachComponent({mainType:o,query:i},function(t){var e,n=t.coordinateSystem;"geo"===n.type&&(e=uA(n,i,t.get("scaleLimit")),t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom),"series"===o&&E(t.seriesGroup,function(t){t.setCenter(e.center),t.setZoom(e.zoom)}))})})}function fA(t,e){var n=t.isExpand?t.children:[],i=t.parentNode.children,o=t.hierNode.i?i[t.hierNode.i-1]:null;n.length?(function(t){var e=t.children,n=e.length,i=0,o=0;for(;0<=--n;){var r=e[n];r.hierNode.prelim+=i,r.hierNode.modifier+=i,o+=r.hierNode.change,i+=r.hierNode.shift+o}}(t),n=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2,o?(t.hierNode.prelim=o.hierNode.prelim+e(t,o),t.hierNode.modifier=t.hierNode.prelim-n):t.hierNode.prelim=n):o&&(t.hierNode.prelim=o.hierNode.prelim+e(t,o)),t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var o=t,r=t,a=r.parentNode.children[0],s=e,l=o.hierNode.modifier,u=r.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=vA(s),r=_A(r),s&&r;){o=vA(o),a=_A(a),o.hierNode.ancestor=t;var p=s.hierNode.prelim+c-r.hierNode.prelim-u+i(s,r);0<p&&(function(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}(function(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=r.hierNode.modifier,l+=o.hierNode.modifier,h+=a.hierNode.modifier}s&&!vA(o)&&(o.hierNode.thread=s,o.hierNode.modifier+=c-l),r&&!_A(a)&&(a.hierNode.thread=r,a.hierNode.modifier+=u-h,n=t)}return n}(t,o,t.parentNode.hierNode.defaultAncestor||i[0],e)}function gA(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function yA(t){return arguments.length?t:xA}function mA(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function vA(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function _A(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function xA(t,e){return t.parentNode===e.parentNode?1:2}var bA,wA=function(){this.parentPoint=[],this.childPoints=[]},SA=(u(MA,bA=Ss),MA.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},MA.prototype.getDefaultShape=function(){return new wA},MA.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,o=e.parentPoint,r=n[0],a=n[i-1];if(1===i)return t.moveTo(o[0],o[1]),void t.lineTo(r[0],r[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,s=1-l,e=mo(e.forkPosition,1),u=[];u[l]=o[l],u[s]=o[s]+(a[s]-o[s])*e,t.moveTo(o[0],o[1]),t.lineTo(u[0],u[1]),t.moveTo(r[0],r[1]),u[l]=r[l],t.lineTo(u[0],u[1]),u[l]=a[l],t.lineTo(u[0],u[1]),t.lineTo(a[0],a[1]);for(var h=1;h<i-1;h++){var c=n[h];t.moveTo(c[0],c[1]),u[l]=c[l],t.lineTo(u[0],u[1])}},MA);function MA(t){return bA.call(this,t)||this}var IA,TA=(u(CA,IA=ky),CA.prototype.init=function(t,e){this._controller=new mD(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},CA.prototype.render=function(i,t,n){var o=i.getData(),e=i.layoutInfo,r=this._mainGroup;"radial"===i.get("layout")?(r.x=e.x+e.width/2,r.y=e.y+e.height/2):(r.x=e.x,r.y=e.y),this._updateViewCoordSys(i),this._updateController(i,t,n);var a=this._data;o.diff(a).add(function(t){DA(o,t)&&AA(o,t,null,r,i)}).update(function(t,e){var n=a.getItemGraphicEl(e);DA(o,t)?AA(o,t,n,r,i):n&&PA(a,e,n,r,i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&PA(a,t,e,r,i)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===i.get("expandAndCollapse")&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},CA.prototype._updateViewCoordSys=function(t){var e=t.getData(),n=[];e.each(function(t){t=e.getItemLayout(t);!t||isNaN(t.x)||isNaN(t.y)||n.push([+t.x,+t.y])});var i=[],o=[];Ra(n,i,o);var r=this._min,a=this._max;o[0]-i[0]==0&&(i[0]=r?r[0]:i[0]-1,o[0]=a?a[0]:o[0]+1),o[1]-i[1]==0&&(i[1]=r?r[1]:i[1]-1,o[1]=a?a[1]:o[1]+1);a=t.coordinateSystem=new jD;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(i[0],i[1],o[0]-i[0],o[1]-i[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY}),this._min=i,this._max=o},CA.prototype._updateController=function(o,t,r){var e=this,n=this._controller,i=this._controllerHost,a=this.group;n.setPointerChecker(function(t,e,n){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(e,n)&&!ID(t,r,o)}),n.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(t){wD(i,t.dx,t.dy),r.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){SD(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),e._updateNodeAndLinkScale(o),r.updateLabelLayout()})},CA.prototype._updateNodeAndLinkScale=function(t){var e=t.getData(),n=this._getNodeGlobalScale(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},CA.prototype._getNodeGlobalScale=function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,t=e.scaleX||1;return((e.getZoom()-1)*n+1)/t},CA.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},CA.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},CA.type="tree",CA);function CA(){var t=null!==IA&&IA.apply(this,arguments)||this;return t.type=CA.type,t._mainGroup=new io,t}function DA(t,e){e=t.getItemLayout(e);return e&&!isNaN(e.x)&&!isNaN(e.y)}function AA(n,t,i,e,o){var r=!i,a=n.tree.getNodeByDataIndex(t),s=a.getModel(),l=a.getVisual("style").fill,u=!1===a.isExpand&&0!==a.children.length?l:"#fff",h=n.tree.root,c=a.parentNode!==h&&a.parentNode||a,p=n.getItemGraphicEl(c.dataIndex),d=c.getLayout(),f=p?{x:p.__oldX,y:p.__oldY,rawX:p.__radialOldRawX,rawY:p.__radialOldRawY}:d,g=a.getLayout();r?((i=new MM(n,t,null,{symbolInnerColor:u,useNameLabel:!0})).x=f.x,i.y=f.y):i.updateData(n,t,null,{symbolInnerColor:u,useNameLabel:!0}),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=g.rawX,i.__radialRawY=g.rawY,e.add(i),n.setItemGraphicEl(t,i),i.__oldX=i.x,i.__oldY=i.y,Kh(i,{x:g.x,y:g.y},o);var y,m,l=i.getSymbolPath();"radial"===o.get("layout")&&(p=(c=h.children[0]).getLayout(),r=c.children.length,t=u=void 0,g.x===p.x&&!0===a.isExpand?(m=(c.children[0].getLayout().x+c.children[r-1].getLayout().x)/2,y=(c.children[0].getLayout().y+c.children[r-1].getLayout().y)/2,(u=Math.atan2(y-p.y,m-p.x))<0&&(u=2*Math.PI+u),(t=m<p.x)&&(u-=Math.PI)):((u=Math.atan2(g.y-p.y,g.x-p.x))<0&&(u=2*Math.PI+u),0===a.children.length||0!==a.children.length&&!1===a.isExpand?(t=g.x<p.x)&&(u-=Math.PI):(t=g.x>p.x)||(u-=Math.PI)),r=t?"left":"right",p=(m=(y=s.getModel("label")).get("rotate"))*(Math.PI/180),(t=l.getTextContent())&&(l.setTextConfig({position:y.get("position")||r,rotation:null==m?-u:p,origin:"center"}),t.setStyle("verticalAlign","middle")));s=s.get(["emphasis","focus"]),s="ancestor"===s?a.getAncestorsIndices():"descendant"===s?a.getDescendantIndices():null;s&&(il(i).focus=s),function(t,e,n,i,o,r,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&Kh(g=g||(i.__edge=new xh({shape:OA(h,c,p,o,o)})),{shape:OA(h,c,p,r,a)},t);else if("polyline"===u){if("orthogonal"!==h)throw new Error("The polyline edgeShape can only be used in orthogonal layout");if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,m=[],v=0;v<y.length;v++){var _=y[v].getLayout();m.push([_.x,_.y])}Kh(g=g||(i.__edge=new SA({shape:{parentPoint:[a.x,a.y],childPoints:[[a.x,a.y]],orient:c,forkPosition:d}})),{shape:{parentPoint:[a.x,a.y],childPoints:m}},t)}}g&&(g.useStyle(A({strokeNoScale:!0,fill:null},f)),Ql(g,l,"lineStyle"),Rl(g),s.add(g))}(o,a,h,i,f,d,g,e),i.__edge&&(i.onHoverStateChange=function(t){var e;"blur"!==t&&((e=a.parentNode&&n.getItemGraphicEl(a.parentNode.dataIndex))&&e.hoverState===ll||Ll(i.__edge,t))})}function kA(t,e,n,i,o){var r,a=LA(e.tree.root,t),s=a.source,l=a.sourceLayout,a=e.getItemGraphicEl(t.dataIndex);a&&(t=e.getItemGraphicEl(s.dataIndex).__edge,r=a.__edge||(!1===s.isExpand||1===s.children.length?t:void 0),e=i.get("edgeShape"),a=i.get("layout"),s=i.get("orient"),t=i.get(["lineStyle","curveness"]),r&&("curve"===e?Qh(r,{shape:OA(a,s,t,l,l),style:{opacity:0}},i,{cb:function(){n.remove(r)},removeOpt:o}):"polyline"===e&&"orthogonal"===i.get("layout")&&Qh(r,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},i,{cb:function(){n.remove(r)},removeOpt:o})))}function LA(t,e){for(var n,i=e.parentNode!==t&&e.parentNode||e;null==(n=i.getLayout());)i=i.parentNode!==t&&i.parentNode||i;return{source:i,sourceLayout:n}}function PA(e,t,n,i,o){var r=e.tree.getNodeByDataIndex(t),a=LA(e.tree.root,r).sourceLayout,s={duration:o.get("animationDurationUpdate"),easing:o.get("animationEasingUpdate")};Qh(n,{x:a.x+1,y:a.y+1},o,{cb:function(){i.remove(n),e.setItemGraphicEl(t,null)},removeOpt:s}),n.fadeOut(null,{fadeLabel:!0,animation:s}),r.children.forEach(function(t){kA(t,e,i,o,s)}),kA(r,e,i,o,s)}function OA(t,e,n,i,o){var r,a,s,l;if("radial"!==t)return u=i.x,h=i.y,c=o.x,p=o.y,"LR"!==e&&"RL"!==e||(r=u+(c-u)*n,a=h,s=c+(u-c)*n,l=p),"TB"!==e&&"BT"!==e||(r=u,a=h+(p-h)*n,s=c,l=p+(h-p)*n),{x1:u,y1:h,x2:c,y2:p,cpx1:r,cpy1:a,cpx2:s,cpy2:l};var u=i.rawX,h=i.rawY,c=o.rawX,p=o.rawY,o=mA(u,h),u=mA(u,h+(p-h)*n),n=mA(c,p+(h-p)*n),p=mA(c,p);return{x1:o.x||0,y1:o.y||0,x2:p.x||0,y2:p.y||0,cpx1:u.x||0,cpy1:u.y||0,cpx2:n.x||0,cpy2:n.y||0}}var RA=ur();function NA(n){var i=n.mainData,t=n.datas;t||(t={main:i},n.datasAttr={main:"data"}),n.datas=n.mainData=null,FA(i,t,n),E(t,function(e){E(i.TRANSFERABLE_METHODS,function(t){e.wrapMethod(t,V(EA,n))})}),i.wrapMethod("cloneShallow",V(BA,n)),E(i.CHANGABLE_METHODS,function(t){i.wrapMethod(t,V(zA,n))}),ot(t[i.dataType]===i)}function EA(t,e){var n;return RA(n=this).mainData===n?FA((n=P({},RA(this).datas))[this.dataType]=e,n,t):HA(e,this.dataType,RA(this).mainData,t),e}function zA(t,e){return t.struct&&t.struct.update(),e}function BA(n,i){return E(RA(i).datas,function(t,e){t!==i&&HA(t.cloneShallow(),e,i,n)}),i}function VA(t){var e=RA(this).mainData;return null==t||null==e?e:RA(e).datas[t]}function GA(){var e=RA(this).mainData;return null==e?[{data:e}]:L(z(RA(e).datas),function(t){return{type:t,data:RA(e).datas[t]}})}function FA(n,t,i){RA(n).datas={},E(t,function(t,e){HA(t,e,n,i)})}function HA(t,e,n,i){RA(n).datas[e]=t,RA(t).mainData=n,t.dataType=e,i.struct&&(t[i.structAttr]=i.struct,i.struct[i.datasAttr[e]]=t),t.getLinkedData=VA,t.getLinkedDataAll=GA}var WA=(UA.prototype.isRemoved=function(){return this.dataIndex<0},UA.prototype.eachNode=function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null);var i,o=(t=H(t=t||{})?{order:t}:t).order||"preorder",r=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var a=0;!i&&a<r.length;a++)r[a].eachNode(t,e,n);"postorder"===o&&e.call(n,this)},UA.prototype.updateDepthAndHeight=function(t){var e=0;this.depth=t;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(t+1),i.height>e&&(e=i.height)}this.height=e+1},UA.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].getNodeById(t);if(o)return o}},UA.prototype.contains=function(t){if(t===this)return!0;for(var e=0,n=this.children,i=n.length;e<i;e++){var o=n[e].contains(t);if(o)return o}},UA.prototype.getAncestors=function(t){for(var e=[],n=t?this:this.parentNode;n;)e.push(n),n=n.parentNode;return e.reverse(),e},UA.prototype.getAncestorsIndices=function(){for(var t=[],e=this;e;)t.push(e.dataIndex),e=e.parentNode;return t.reverse(),t},UA.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},UA.prototype.getValue=function(t){var e=this.hostTree.data;return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},UA.prototype.setLayout=function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},UA.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},UA.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},UA.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},UA.prototype.setVisual=function(t,e){0<=this.dataIndex&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},UA.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},UA.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},UA.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},UA.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e<t.length;++e)if(t[e]===this)return e;return-1}return-1},UA.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},UA.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},UA);function UA(t,e){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=t||"",this.hostTree=e}var YA=(XA.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},XA.prototype.getNodeByDataIndex=function(t){t=this.data.getRawIndex(t);return this._nodes[t]},XA.prototype.getNodeById=function(t){return this.root.getNodeById(t)},XA.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;n<i;n++)e[n].dataIndex=-1;for(n=0,i=t.count();n<i;n++)e[t.getRawIndex(n)].dataIndex=n},XA.prototype.clearLayouts=function(){this.data.clearItemLayouts()},XA.createTree=function(t,e,n){var s=new XA(e),l=[],u=1;!function t(e,n){var i=e.value;u=Math.max(u,G(i)?i.length:1);l.push(e);var o=new WA(nr(e.name,""),s);n?ZA(o,n):s.root=o;s._nodes.push(o);var r=e.children;if(r)for(var a=0;a<r.length;a++)t(r[a],o)}(t),s.root.updateDepthAndHeight(0);t=Qx(l,{coordDimensions:["value"],dimensionsCount:u}).dimensions,e=new $x(t,e);return e.initData(l),n&&n(e),NA({mainData:e,struct:s,structAttr:"tree"}),s.update(),s},XA);function XA(t){this.type="tree",this._nodes=[],this.hostModel=t}function ZA(t,e){var n=e.children;t.parentNode!==e&&(n.push(t),t.parentNode=e)}function jA(t,e,n){if(t&&0<=C(e,t.type)){e=n.getData().tree.root,n=t.targetNode;if((n="string"==typeof n?e.getNodeById(n):n)&&e.contains(n))return{node:n};t=t.targetNodeId;return null!=t&&(n=e.getNodeById(t))?{node:n}:void 0}}function qA(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function KA(t,e){return 0<=C(qA(t),e)}function $A(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var JA,QA=(u(tk,JA=yy),tk.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new ep(n,this,this.ecModel),o=YA.createTree(e,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=o.getNodeByDataIndex(e);return e&&e.children.length&&e.isExpand||(t.parentModel=i),t})});var r=0;o.eachNode("preorder",function(t){t.depth>r&&(r=t.depth)});var a=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:r;return o.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a}),o.data},tk.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},tk.prototype.setZoom=function(t){this.option.zoom=t},tk.prototype.setCenter=function(t){this.option.center=t},tk.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,o=i.root.children[0],r=i.getNodeByDataIndex(t),t=r.getValue(),a=r.name;r&&r!==o;)a=r.parentNode.name+"."+a,r=r.parentNode;return ty("nameValue",{name:a,value:t,noValue:isNaN(t)||null==t})},tk.prototype.getDataParams=function(t){var e=JA.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treeAncestors=$A(t,this),e},tk.type="series.tree",tk.layoutMode="box",tk.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},tk);function tk(){var t=null!==JA&&JA.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}function ek(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var r=o.length-1;0<=r;r--)i.push(o[r])}}function nk(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,r=0,a=null;a="radial"===i?(o=2*Math.PI,r=Math.min(n.height,n.width)/2,yA(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,r=n.height,yA());e=t.getData().tree.root,n=e.children[0];{var s,l,u,h,c,p,d,f,g;n&&(function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,n,i=[t];e=i.pop();)if(n=e.children,e.isExpand&&n.length)for(var o=n.length-1;0<=o;o--){var r=n[o];r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(r)}}(e),function(t,e,n){for(var i,o=[t],r=[];i=o.pop();)if(r.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;s<a.length;s++)o.push(a[s])}for(;i=r.pop();)e(i,n)}(n,fA,a),e.hierNode.modifier=-n.hierNode.prelim,ek(n,gA),ek(u=l=s=n,function(t){var e=t.getLayout().x;e<s.getLayout().x&&(s=t),e>l.getLayout().x&&(l=t),t.depth>u.depth&&(u=t)}),a=s===l?1:a(s,l)/2,h=a-s.getLayout().x,f=d=p=c=0,"radial"===i?(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),ek(n,function(t){d=(t.getLayout().x+h)*c,f=(t.depth-1)*p;var e=mA(d,f);t.setLayout({x:e.x,y:e.y,rawX:d,rawY:f},!0)})):"RL"===(g=t.getOrient())||"LR"===g?(p=r/(l.getLayout().x+a+h),c=o/(u.depth-1||1),ek(n,function(t){f=(t.getLayout().x+h)*p,d="LR"===g?(t.depth-1)*c:o-(t.depth-1)*c,t.setLayout({x:d,y:f},!0)})):"TB"!==g&&"BT"!==g||(c=o/(l.getLayout().x+a+h),p=r/(u.depth-1||1),ek(n,function(t){d=(t.getLayout().x+h)*c,f="TB"===g?(t.depth-1)*p:r-(t.depth-1)*p,t.setLayout({x:d,y:f},!0)})))}}(t,e)})}function ik(t){t.eachSeriesByType("tree",function(t){var n=t.getData();n.tree.eachNode(function(t){var e=t.getModel().getModel("itemStyle").getItemStyle();P(n.ensureUniqueItemVisual(t.dataIndex,"style"),e)})})}var ok=function(){},rk=["treemapZoomToNode","treemapRender","treemapMove"];function ak(t){for(var e=0;e<rk.length;e++)t.registerAction({type:rk[e],update:"updateView"},ok);t.registerAction({type:"treemapRootToNode",update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"treemap",query:o},function(t,e){var n=jA(o,["treemapZoomToNode","treemapRootToNode"],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=KA(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})})}function sk(i){var t=i.getData().tree,o={};t.eachNode(function(t){for(var e=t;e&&1<e.depth;)e=e.parentNode;var n=Yd(i.ecModel,e.name||e.dataIndex+"",o);t.setVisual("decal",n)})}var lk,uk=(u(hk,lk=yy),hk.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function e(t){var n=0;E(t.children,function(t){e(t);var t=t.value;G(t)&&(t=t[0]),n+=t});var i=t.value;G(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);G(t.value)?t.value[0]=i:t.value=i}(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},r=new ep({itemStyle:o},this,e),a=L((i=t.levels=function(t,e){var i,o,n=qo(e.get("color")),r=qo(e.get(["aria","decal","decals"]));if(!n)return;E(t=t||[],function(t){var e=new ep(t),n=e.get("color"),t=e.get("decal");(e.get(["itemStyle","color"])||n&&"none"!==n)&&(i=!0),(e.get(["itemStyle","decal"])||t&&"none"!==t)&&(o=!0)});e=t[0]||(t[0]={});i||(e.color=n.slice());!o&&r&&(e.decal=r.slice());return t}(i,e))||[],function(t){return new ep(t,r,e)},this),s=YA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=s.getNodeByDataIndex(e),e=e?a[e.depth]:null;return t.parentModel=e||r,t})});return s.data},hk.prototype.optionUpdated=function(){this.resetViewRoot()},hk.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t);return ty("nameValue",{name:i.getName(t),value:o})},hk.prototype.getDataParams=function(t){var e=lk.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treeAncestors=$A(t,this),e.treePathInfo=e.treeAncestors,e},hk.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},P(this.layoutInfo,t)},hk.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ct(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},hk.prototype.getViewRoot=function(){return this._viewRoot},hk.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},hk.prototype.enableAriaDecal=function(){sk(this)},hk.type="series.treemap",hk.layoutMode="box",hk.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},hk);function hk(){var t=null!==lk&&lk.apply(this,arguments)||this;return t.type=hk.type,t.preventUsingHoverLayer=!0,t}var ck=5,pk=(dk.prototype.render=function(t,e,n,i){var o,r,a=t.getModel("breadcrumb"),s=this.group;s.removeAll(),a.get("show")&&n&&(r=(o=a.getModel("itemStyle")).getModel("textStyle"),a={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,a,r),this._renderContent(t,a,o,r,i),ad(s,a.pos,a.box))},dk.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var o=nr(i.getModel().get("name"),""),r=n.getTextRect(o),r=Math.max(r.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},dk.prototype._renderContent=function(t,e,n,i,o){for(var r,a,s,l,u,h,c,p,d,f,g,y,m,v=0,_=e.emptyItemWidth,x=t.get(["breadcrumb","height"]),b=(r=e.pos,a=e.box,l=a.width,u=a.height,h=mo(r.left,l),c=mo(r.top,u),p=mo(r.right,l),a=mo(r.bottom,u),(isNaN(h)||isNaN(parseFloat(r.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(r.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(r.top)))&&(c=0),(isNaN(a)||isNaN(parseFloat(r.bottom)))&&(a=u),s=Wp(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(a-c-s[0]-s[2],0)}),w=e.totalWidth,S=e.renderList,M=S.length-1;0<=M;M--){var I=S[M],T=I.node,C=I.width,D=I.text;b.width<w&&(w-=C-_,C=_,D=null);I=new rh({shape:{points:(d=v,f=0,g=C,y=x,m=M===S.length-1,I=void 0,I=[[m?d:d-ck,f],[d+g,f],[d+g,f+y],[m?d:d-ck,f+y]],0===M||I.splice(2,0,[d+g+ck,f+y/2]),m||I.push([d,f+y/2]),I)},style:A(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xs({style:{text:D,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z2:1e4*pl,onclick:V(o,T)});I.disableLabelAnimation=!0,this.group.add(I),D=t,T=T,il(I).eventData={componentType:"series",componentSubType:"treemap",componentIndex:D.componentIndex,seriesIndex:D.seriesIndex,seriesName:D.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:T&&T.dataIndex,name:T&&T.name},treePathInfo:T&&$A(T,D)},v+=C+8}},dk.prototype.remove=function(){this.group.removeAll()},dk);function dk(t){this.group=new io,t.add(this.group)}var fk=(gk.prototype.add=function(t,e,n,i,o){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:o}),!0)},gk.prototype.finished=function(t){return this._finishedCallback=t,this},gk.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,o=this._storage.length;i<o;i++){var r=this._storage[i];r.el.animateTo(r.target,{duration:r.duration,delay:r.delay,easing:r.easing,setToFinal:!0,done:n,aborted:n})}return this},gk);function gk(){this._storage=[],this._elExistsMap={}}var yk,mk=io,vk=Fs,_k="label",xk="upperLabel",bk=10*pl,wk=2*pl,Sk=3*pl,Mk=Ar([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ik=function(t){t=Mk(t);return t.stroke=t.fill=t.lineWidth=null,t},Tk=ur(),Ck=(u(Dk,yk=ky),Dk.prototype.render=function(t,e,n,i){var o,r,a,s,l;C(e.findComponents({mainType:"series",subType:"treemap",query:i}),t)<0||(this.seriesModel=t,this.api=n,this.ecModel=e,o=jA(i,["treemapZoomToNode","treemapRootToNode"],t),r=i&&i.type,l=t.layoutInfo,a=!this._oldTree,s=this._storage,e="treemapRootToNode"===r&&o&&s?{rootNodeGroup:s.nodeGroup[o.node.getRawIndex()],direction:i.direction}:null,s=this._giveContainerGroup(l),i=t.get("animation"),l=this._doRender(s,t,e),!i||a||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?l.renderFinally():this._doAnimation(s,l,t,e),this._resetController(n),this._renderBreadcrumb(t,n,o))},Dk.prototype._giveContainerGroup=function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new mk,this._initEvents(e),this.group.add(e)),e.x=t.x,e.y=t.y,e},Dk.prototype._doRender=function(t,o,r){var e=o.getData().tree,n=this._oldTree,a=Ak(),s=Ak(),l=this._storage,u=[];function h(t,e,n,i){return function(u,a,s,l,h,e,c,t,n,i){if(!c)return;var p=c.getLayout(),o=u.getData(),d=c.getModel();if(o.setItemGraphicEl(c.dataIndex,null),!p||!p.isInView)return;var f=p.width,g=p.height,y=p.borderWidth,m=p.invisible,v=c.getRawIndex(),_=t&&t.getRawIndex(),r=c.viewChildren,x=p.upperHeight,b=r&&r.length,w=d.getModel("itemStyle"),S=d.getModel(["emphasis","itemStyle"]),M=d.getModel(["blur","itemStyle"]),I=d.getModel(["select","itemStyle"]),T=w.get("borderRadius")||0,C=L("nodeGroup",mk);if(!C)return;if(n.add(C),C.x=p.x||0,C.y=p.y||0,C.markRedraw(),Tk(C).nodeWidth=f,Tk(C).nodeHeight=g,p.isAboveViewRoot)return C;t=L("background",vk,i,wk);t&&function(t,e,n){var i=il(e);{var o,r,a,s,l;i.dataIndex=c.dataIndex,i.seriesIndex=u.seriesIndex,e.setShape({x:0,y:0,width:f,height:g,r:T}),m?D(e):(e.invisible=!1,o=c.getVisual("style"),r=o.stroke,(a=Ik(w)).fill=r,(s=Mk(S)).fill=S.get("borderColor"),(l=Mk(M)).fill=M.get("borderColor"),(i=Mk(I)).fill=I.get("borderColor"),n?(n=f-2*y,A(e,r,o.opacity,{x:y,y:0,width:n,height:x})):e.removeTextContent(),e.setStyle(a),e.ensureState("emphasis").style=s,e.ensureState("blur").style=l,e.ensureState("select").style=i,Rl(e))}t.add(e)}(C,t,b&&p.upperLabelHeight);r=d.get(["emphasis","focus"]),n=d.get(["emphasis","blurScope"]),r="ancestor"===r?c.getAncestorsIndices():"descendant"===r?c.getDescendantIndices():r;b?(eu(C)&&tu(C,!1),t&&(tu(t,!0),o.setItemGraphicEl(c.dataIndex,t),Kl(t,r,n))):((i=L("content",vk,i,Sk))&&function(t,e){var n=il(e);n.dataIndex=c.dataIndex,n.seriesIndex=u.seriesIndex;var i=Math.max(f-2*y,0),o=Math.max(g-2*y,0);{var r,a,s;e.culling=!0,e.setShape({x:y,y:y,width:i,height:o,r:T}),m?D(e):(e.invisible=!1,r=c.getVisual("style"),a=r.fill,(s=Ik(w)).fill=a,s.decal=r.decal,n=Mk(S),i=Mk(M),o=Mk(I),A(e,a,r.opacity,null),e.setStyle(s),e.ensureState("emphasis").style=n,e.ensureState("blur").style=i,e.ensureState("select").style=o,Rl(e))}t.add(e)}(C,i),t.disableMorphing=!0,t&&eu(t)&&tu(t,!1),tu(C,!0),o.setItemGraphicEl(c.dataIndex,C),Kl(C,r,n));return C;function D(t){t.invisible||e.push(t)}function A(n,t,e,i){var o=d.getModel(i?xk:_k),r=nr(d.get("name"),null),o=o.getShallow("show");Pc(n,Oc(d,i?xk:_k),{defaultText:o?r:null,inheritColor:t,defaultOpacity:e,labelFetcher:u,labelDataIndex:c.dataIndex});var a,s,l=n.getTextContent();l&&(a=l.style,s=it(a.padding||0),i&&(n.setTextConfig({layoutRect:i}),l.disableLabelLayout=!0),l.beforeUpdate=function(){var t=Math.max((i||n.shape).width-s[1]-s[3],0),e=Math.max((i||n.shape).height-s[0]-s[2],0);a.width===t&&a.height===e||l.setStyle({width:t,height:e})},a.truncateMinChar=2,a.lineOverflow="truncate",k(a,i,p),k((e=l.getState("emphasis"))?e.style:null,i,p))}function k(t,e,n){var i=t?t.text:null;!e&&n.isLeafRoot&&null!=i&&(n=u.get("drillDownIcon",!0),t.text=n?n+" "+i:i)}function L(t,e,n,i){var o=null!=_&&s[t][_],r=h[t];return o?(s[t][_]=null,function(t,e){t=t[v]={};e instanceof mk?(t.oldX=e.x,t.oldY=e.y):t.oldShape=P({},e.shape)}(r,o)):m||((o=new e)instanceof ta&&(o.z2=n*bk+i),function(t,e){var n=t[v]={},i=c.parentNode,o=e instanceof io;!i||l&&"drillDown"!==l.direction||(e=t=0,i=h.background[i.getRawIndex()],!l&&i&&i.oldShape&&(t=i.oldShape.width,e=i.oldShape.height),o?(n.oldX=0,n.oldY=e):n.oldShape={x:t,y:e,width:0,height:0});n.fadein=!o}(r,o)),a[t][v]=o}}(o,s,l,r,a,u,t,e,n,i)}!function i(o,r,a,s,l){s?E(r=o,function(t,e){t.isRemoved()||n(e,e)}):new Mx(r,o,t,t).add(n).update(n).remove(V(n,null)).execute();function t(t){return t.getId()}function n(t,e){var n=null!=t?o[t]:null,t=null!=e?r[e]:null,e=h(n,t,a,l);e&&i(n&&n.viewChildren||[],t&&t.viewChildren||[],e,s,l+1)}}(e.root?[e.root]:[],n&&n.root?[n.root]:[],t,e===n||!n,0);var i,c,p=(c=Ak(),(i=l)&&E(i,function(t,e){var n=c[e];E(t,function(t){t&&(n.push(t),Tk(t).willDelete=!0)})}),c);return this._oldTree=e,this._storage=s,{lastsForAnimation:a,willDeleteEls:p,renderFinally:function(){E(p,function(t){E(t,function(t){t.parent&&t.parent.remove(t)})}),E(u,function(t){t.invisible=!0,t.dirty()})}}},Dk.prototype._doAnimation=function(t,o,e,a){var n=e.get("animationDurationUpdate"),e=e.get("animationEasing"),s=(F(n)?0:n)||0,l=(F(e)?null:e)||"cubicOut",u=new fk;E(o.willDeleteEls,function(t,r){E(t,function(t,e){var n,i,o;t.invisible||(i=t.parent,n=Tk(i),(o=a&&"drillDown"===a.direction?i===a.rootNodeGroup?{shape:{x:0,y:0,width:n.nodeWidth,height:n.nodeHeight},style:{opacity:0}}:{style:{opacity:0}}:(o=i=0,n.willDelete||(i=n.nodeWidth/2,o=n.nodeHeight/2),"nodeGroup"===r?{x:i,y:o,style:{opacity:0}}:{shape:{x:i,y:o,width:0,height:0},style:{opacity:0}}))&&u.add(t,o,s,0,l))})}),E(this._storage,function(t,i){E(t,function(t,e){var n=o.lastsForAnimation[i][e],e={};n&&(t instanceof io?null!=n.oldX&&(e.x=t.x,e.y=t.y,t.x=n.oldX,t.y=n.oldY):(n.oldShape&&(e.shape=P({},t.shape),t.setShape(n.oldShape)),n.fadein?(t.setStyle("opacity",0),e.style={opacity:1}):1!==t.style.opacity&&(e.style={opacity:1})),u.add(t,e,s,0,l))})},this),this._state="animating",u.finished(B(function(){this._state="ready",o.renderFinally()},this)).start()},Dk.prototype._resetController=function(t){var e=this._controller;e||((e=this._controller=new mD(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",B(this._onPan,this)),e.on("zoom",B(this._onZoom,this)));var i=new Li(0,0,t.getWidth(),t.getHeight());e.setPointerChecker(function(t,e,n){return i.contain(e,n)})},Dk.prototype._clearController=function(){var t=this._controller;t&&(t.dispose(),t=null)},Dk.prototype._onPan=function(t){var e;"animating"!==this._state&&(3<Math.abs(t.dx)||3<Math.abs(t.dy))&&(!(e=this.seriesModel.getData().tree.root)||(e=e.getLayout())&&this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x+t.dx,y:e.y+t.dy,width:e.width,height:e.height}}))},Dk.prototype._onZoom=function(t){var e,n,i,o=t.originX,r=t.originY;"animating"!==this._state&&(!(i=this.seriesModel.getData().tree.root)||(n=i.getLayout())&&(e=new Li(n.x,n.y,n.width,n.height),ai(i=ni(),i,[-(o-=(n=this.seriesModel.layoutInfo).x),-(r-=n.y)]),li(i,i,[t.scale,t.scale]),ai(i,i,[o,r]),e.applyTransform(i),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:e.x,y:e.y,width:e.width,height:e.height}})))},Dk.prototype._initEvents=function(t){var i=this;t.on("click",function(t){var e,n;"ready"===i._state&&(!(n=i.seriesModel.get("nodeClick",!0))||(e=i.findTarget(t.offsetX,t.offsetY))&&((t=e.node).getLayout().isLeafRoot?i._rootToNode(e):"zoomToNode"===n?i._zoomToNode(e):"link"===n&&(t=(n=t.hostTree.data.getItemModel(t.dataIndex)).get("link",!0),n=n.get("target",!0)||"blank",t&&Qp(t,n))))},this)},Dk.prototype._renderBreadcrumb=function(e,t,n){var i=this;n=n||((n=null!=e.get("leafDepth",!0)?{node:e.getViewRoot()}:this.findTarget(t.getWidth()/2,t.getHeight()/2))||{node:e.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new pk(this.group))).render(e,t,n.node,function(t){"animating"!==i._state&&(KA(e.getViewRoot(),t)?i._rootToNode({node:t}):i._zoomToNode({node:t}))})},Dk.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=Ak(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},Dk.prototype.dispose=function(){this._clearController()},Dk.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},Dk.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},Dk.prototype.findTarget=function(i,o){var r;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},function(t){var e=this._storage.background[t.getRawIndex()];if(e){var n=e.transformCoordToLocal(i,o),e=e.shape;if(!(e.x<=n[0]&&n[0]<=e.x+e.width&&e.y<=n[1]&&n[1]<=e.y+e.height))return!1;r={node:t,offsetX:n[0],offsetY:n[1]}}},this),r},Dk.type="treemap",Dk);function Dk(){var t=null!==yk&&yk.apply(this,arguments)||this;return t.type=Dk.type,t._state="ready",t._storage=Ak(),t}function Ak(){return{nodeGroup:[],background:[],content:[]}}var kk=E,Lk=Y,Pk=-1,Ok=(Rk.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},Rk.prototype.getNormalizer=function(){return B(this._normalizeData,this)},Rk.listVisualTypes=function(){return z(Rk.visualHandlers)},Rk.isValidType=function(t){return Rk.visualHandlers.hasOwnProperty(t)},Rk.eachVisual=function(t,e,n){Y(t)?E(t,e,n):e.call(n,t)},Rk.mapVisual=function(t,n,i){var o,r=G(t)?[]:Y(t)?{}:(o=!0,null);return Rk.eachVisual(t,function(t,e){t=n.call(i,t,e);o?r=t:r[e]=t}),r},Rk.retrieveVisuals=function(n){var i,o={};return n&&kk(Rk.visualHandlers,function(t,e){n.hasOwnProperty(e)&&(o[e]=n[e],i=!0)}),i?o:null},Rk.prepareVisualTypes=function(t){if(G(t))t=t.slice();else{if(!Lk(t))return[];var n=[];kk(t,function(t,e){n.push(e)}),t=n}return t.sort(function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1}),t},Rk.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},Rk.findPieceIndex=function(n,t,e){for(var i,o=1/0,r=0,a=t.length;r<a;r++){var s=t[r].value;if(null!=s){if(s===n||"string"==typeof s&&s===n+"")return r;e&&h(s,r)}}for(r=0,a=t.length;r<a;r++){var l=t[r],u=l.interval,l=l.close;if(u){if(u[0]===-1/0){if(Yk(l[1],n,u[1]))return r}else if(u[1]===1/0){if(Yk(l[0],u[0],n))return r}else if(Yk(l[0],u[0],n)&&Yk(l[1],n,u[1]))return r;e&&h(u[0],r),e&&h(u[1],r)}}if(e)return n===1/0?t.length-1:n===-1/0?0:i;function h(t,e){t=Math.abs(t-n);t<o&&(o=t,i=e)}},Rk.visualHandlers={color:{applyVisual:Bk("color"),getColorMapper:function(){var o=this.option;return B("category"===o.mappingMethod?function(t,e){return e||(t=this._normalizeData(t)),Vk.call(this,t)}:function(t,e,n){var i=!!n;return n=sn(t=!e?this._normalizeData(t):t,o.parsedVisual,n),i?n:cn(n,"rgba")},this)},_normalizedToVisual:{linear:function(t){return cn(sn(t,this.option.parsedVisual),"rgba")},category:Vk,piecewise:function(t,e){e=Hk.call(this,e);return e=null==e?cn(sn(t,this.option.parsedVisual),"rgba"):e},fixed:Gk}},colorHue:Ek(function(t,e){return un(t,e)}),colorSaturation:Ek(function(t,e){return un(t,null,e)}),colorLightness:Ek(function(t,e){return un(t,null,null,e)}),colorAlpha:Ek(hn),decal:{applyVisual:Bk("decal"),_normalizedToVisual:{linear:null,category:Vk,piecewise:null,fixed:null}},opacity:{applyVisual:Bk("opacity"),_normalizedToVisual:Fk([0,1])},liftZ:{applyVisual:Bk("liftZ"),_normalizedToVisual:{linear:Gk,category:Gk,piecewise:Gk,fixed:Gk}},symbol:{applyVisual:function(t,e,n){n("symbol",this.mapValueToVisual(t))},_normalizedToVisual:{linear:zk,category:Vk,piecewise:function(t,e){e=Hk.call(this,e);return e=null==e?zk.call(this,t):e},fixed:Gk}},symbolSize:{applyVisual:Bk("symbolSize"),_normalizedToVisual:Fk([0,1])}},Rk);function Rk(t){var e=t.mappingMethod,n=t.type,t=this.option=S(t);this.type=n,this.mappingMethod=e,this._normalizeData=Uk[e];var i,n=Rk.visualHandlers[n];this.applyVisual=n.applyVisual,this.getColorMapper=n.getColorMapper,this._normalizedToVisual=n._normalizedToVisual[e],"piecewise"===e?(Nk(t),n=(i=t).pieceList,i.hasSpecialVisual=!1,E(n,function(t,e){t.originIndex=e,null!=t.visual&&(i.hasSpecialVisual=!0)})):"category"===e?t.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;{var o;kk(e,function(t,e){n[t]=e}),G(i)||(o=[],Y(i)?kk(i,function(t,e){e=n[e];o[null!=e?e:Pk]=t}):o[Pk]=i,i=Wk(t,o))}for(var r=e.length-1;0<=r;r--)null==i[r]&&(delete n[e[r]],e.pop())}(t):Nk(t,!0):(ot("linear"!==e||t.dataExtent),Nk(t))}function Nk(t,e){var n=t.visual,i=[];Y(n)?kk(n,function(t){i.push(t)}):null!=n&&i.push(n);e||1!==i.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(i[1]=i[0]),Wk(t,i)}function Ek(i){return{applyVisual:function(t,e,n){t=this.mapValueToVisual(t);n("color",i(e("color"),t))},_normalizedToVisual:Fk([0,1])}}function zk(t){var e=this.option.visual;return e[Math.round(yo(t,[0,1],[0,e.length-1],!0))]||{}}function Bk(i){return function(t,e,n){n(i,this.mapValueToVisual(t))}}function Vk(t){var e=this.option.visual;return e[this.option.loop&&t!==Pk?t%e.length:t]}function Gk(){return this.option.visual[0]}function Fk(n){return{linear:function(t){return yo(t,n,this.option.visual,!0)},category:Vk,piecewise:function(t,e){e=Hk.call(this,e);return e=null==e?yo(t,n,this.option.visual,!0):e},fixed:Gk}}function Hk(t){var e=this.option,n=e.pieceList;if(e.hasSpecialVisual){n=n[Ok.findPieceIndex(t,n)];if(n&&n.visual)return n.visual[this.type]}}function Wk(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=L(e,function(t){return nn(t)})),e}var Uk={linear:function(t){return yo(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,t=Ok.findPieceIndex(t,e,!0);if(null!=t)return yo(t,[0,e.length-1],[0,1],!0)},category:function(t){t=this.option.categories?this.option.categoryMap[t]:t;return null==t?Pk:t},fixed:gt};function Yk(t,e,n){return t?e<=n:e<n}var Xk="itemStyle",Zk=ur(),jk={seriesType:"treemap",reset:function(t){var e=t.getData().tree.root;e.isRemoved()||!function n(t,e,i,o){var r=t.getModel();var a=t.getLayout();var s=t.hostTree.data;if(!a||a.invisible||!a.isInView)return;var l=r.getModel(Xk);var u=qk(l,e,o);var h=s.ensureUniqueItemVisual(t.dataIndex,"style");e=l.get("borderColor");var s=l.get("borderColorSaturation");var c;null!=s&&(c=Kk(u),e=$k(s,c));h.stroke=e;var e=t.viewChildren;{var p;e&&e.length?(p=Qk(0,r,a,0,u,e),E(e,function(t,e){(t.depth>=i.length||t===i[t.depth])&&(e=eL(r,u,t,e,p,o),n(t,e,i,o))})):(c=Kk(u),h.fill=c)}}(e,{},t.getViewRoot().getAncestors(),t)}};function qk(n,i,t){var o=P({},i),r=t.designatedVisualItemStyle;return E(["color","colorAlpha","colorSaturation"],function(t){r[t]=i[t];var e=n.get(t);(r[t]=null)!=e&&(o[t]=e)}),o}function Kk(t){var e=Jk(t,"color");if(e){var n=Jk(t,"colorAlpha"),t=Jk(t,"colorSaturation");return t&&(e=un(e,null,null,t)),e=n?hn(e,n):e}}function $k(t,e){return null!=e?un(e,null,null,t):null}function Jk(t,e){e=t[e];if(null!=e&&"none"!==e)return e}function Qk(t,e,n,i,o,r){if(r&&r.length){var a=tL(e,"color")||null!=o.color&&"none"!==o.color&&(tL(e,"colorAlpha")||tL(e,"colorSaturation"));if(a){r=e.get("visualMin"),o=e.get("visualMax"),n=n.dataExtent.slice();null!=r&&r<n[0]&&(n[0]=r),null!=o&&o>n[1]&&(n[1]=o);e=e.get("colorMappingBy"),a={type:a.name,dataExtent:n,visual:a.range};"color"!==a.type||"index"!==e&&"id"!==e?a.mappingMethod="linear":(a.mappingMethod="category",a.loop=!0);a=new Ok(a);return Zk(a).drColorMappingBy=e,a}}}function tL(t,e){t=t.get(e);return G(t)&&t.length?{name:e,range:t}:null}function eL(t,e,n,i,o,r){var a,s=P({},e);return o&&(t="index"===(e="color"===(a=o.type)&&Zk(o).drColorMappingBy)?i:"id"===e?r.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),s[a]=o.mapValueToVisual(t)),s}var nL=Math.max,iL=Math.min,oL=Q,rL=E,aL=["itemStyle","borderWidth"],sL=["itemStyle","gapWidth"],lL=["upperLabel","show"],uL=["upperLabel","height"],hL={seriesType:"treemap",reset:function(t,e,n,i){var o,r=n.getWidth(),a=n.getHeight(),s=t.option,l=rd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),u=s.size||[],h=mo(oL(l.width,u[0]),r),c=mo(oL(l.height,u[1]),a),n=i&&i.type,u=jA(i,["treemapZoomToNode","treemapRootToNode"],t),i="treemapRender"===n||"treemapMove"===n?i.rootRect:null,p=t.getViewRoot(),d=qA(p);"treemapMove"!==n&&(c="treemapZoomToNode"===n?function(t,e,n,i,o){var r,a=(e||{}).node,s=[i,o];if(!a||a===n)return s;var n=i*o,l=n*t.option.zoomToNodeRatio;for(;r=a.parentNode;){for(var u=0,h=r.children,c=0,p=h.length;c<p;c++)u+=h[c].getValue();var d=a.getValue();if(0===d)return s;l*=u/d;var f=r.getModel(),d=f.get(aL),f=Math.max(d,fL(f));l+=4*d*d+(3*d+f)*Math.pow(l,.5),Mo<l&&(l=Mo),a=r}l<n&&(l=n);n=Math.pow(l/n,.5);return[i*n,o*n]}(t,u,p,h,c):i?[i.width,i.height]:[h,c],(f=s.sort)&&"asc"!==f&&"desc"!==f&&(f="desc"),f={squareRatio:s.squareRatio,sort:f,leafDepth:s.leafDepth},p.hostTree.clearLayouts(),o={x:0,y:0,width:c[0],height:c[1],area:c[0]*c[1]},p.setLayout(o),function t(e,n,i,o){var r;var a;if(e.isRemoved())return;var s=e.getLayout();r=s.width;a=s.height;var l=e.getModel();var u=l.get(aL);var h=l.get(sL)/2;var c=fL(l);var p=Math.max(u,c);var d=u-h;var s=p-h;e.setLayout({borderWidth:u,upperHeight:p,upperLabelHeight:c},!0);r=nL(r-2*d,0);a=nL(a-d-s,0);var c=r*a;var f=cL(e,l,c,n,i,o);if(!f.length)return;var g={x:d,y:s,width:r,height:a};var y=iL(r,a);var m=1/0;var v=[];v.area=0;for(var _=0,x=f.length;_<x;){var b=f[_];v.push(b),v.area+=b.getLayout().area;var b=pL(v,y,n.squareRatio);m=b<=m?(_++,b):(v.area-=v.pop().getLayout().area,dL(v,y,g,h,!1),y=iL(g.width,g.height),1/(v.length=v.area=0))}v.length&&dL(v,y,g,h,!0);i||null!=(l=l.get("childrenVisibleMin"))&&c<l&&(i=!0);for(var _=0,x=f.length;_<x;_++)t(f[_],n,i,o+1)}(p,f,!1,0),o=p.getLayout(),rL(d,function(t,e){e=(d[e+1]||p).getValue();t.setLayout(P({dataExtent:[e,e],borderWidth:0,upperHeight:0},o))}));var f=t.getData().tree.root;f.setLayout(function(t,e,n){if(e)return{x:e.x,y:e.y};var i={x:0,y:0};if(!n)return i;e=n.node,n=e.getLayout();if(!n)return i;var o=[n.width/2,n.height/2],r=e;for(;r;){var a=r.getLayout();o[0]+=a.x,o[1]+=a.y,r=r.parentNode}return{x:t.width/2-o[0],y:t.height/2-o[1]}}(l,i,u),!0),t.setLayoutInfo(l),function e(t,n,i,o,r){var a=t.getLayout();var s=i[r];var l=s&&s===t;if(s&&!l||r===i.length&&t!==o)return;t.setLayout({isInView:!0,invisible:!l&&!n.intersect(a),isAboveViewRoot:l},!0);var u=new Li(n.x-a.x,n.y-a.y,n.width,n.height);rL(t.viewChildren||[],function(t){e(t,u,i,o,r+1)})}(f,new Li(-l.x,-l.y,r,a),d,p,0)}};function cL(t,e,n,i,o,r){var a=t.children||[],s=i.sort;"asc"!==s&&"desc"!==s&&(s=null);var l,r=null!=i.leafDepth&&i.leafDepth<=r;if(o&&!r)return t.viewChildren=[];a=R(a,function(t){return!t.isRemoved()}),o=a,(l=s)&&o.sort(function(t,e){var n="asc"===l?t.getValue()-e.getValue():e.getValue()-t.getValue();return 0==n?"asc"===l?t.dataIndex-e.dataIndex:e.dataIndex-t.dataIndex:n});var u=function(t,e,n){for(var i=0,o=0,r=e.length;o<r;o++)i+=e[o].getValue();var a,s=t.get("visualDimension");e&&e.length?"value"===s&&n?(a=[e[e.length-1].getValue(),e[0].getValue()],"asc"===n&&a.reverse()):(a=[1/0,-1/0],rL(e,function(t){t=t.getValue(s);t<a[0]&&(a[0]=t),t>a[1]&&(a[1]=t)})):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,o){if(!i)return n;for(var r=t.get("visibleMin"),a=o.length,s=a,l=a-1;0<=l;l--){var u=o["asc"===i?a-l-1:l].getValue();u/n*e<r&&(s=l,n-=u)}return"asc"===i?o.splice(0,a-s):o.splice(s,a-s),n}(e,n,u.sum,s,a),0===u.sum)return t.viewChildren=[];for(var h=0,c=a.length;h<c;h++){var p=a[h].getValue()/u.sum*n;a[h].setLayout({area:p})}return r&&(a.length&&t.setLayout({isLeafRoot:!0},!0),a.length=0),t.viewChildren=a,t.setLayout({dataExtent:u.dataExtent},!0),a}function pL(t,e,n){for(var i,o=0,r=1/0,a=0,s=t.length;a<s;a++)(i=t[a].getLayout().area)&&(i<r&&(r=i),o<i&&(o=i));var l=t.area*t.area,n=e*e*n;return l?nL(n*o/l,l/(n*r)):1/0}function dL(t,e,n,i,o){var r=e===n.width?0:1,a=1-r,s=["x","y"],l=["width","height"],u=n[s[r]],h=e?t.area/e:0;(o||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;c<p;c++){var d=t[c],f={},g=h?d.getLayout().area/h:0,y=f[l[a]]=nL(h-2*i,0),m=n[s[r]]+n[l[r]]-u,m=c===p-1||m<g?m:g,g=f[l[r]]=nL(m-2*i,0);f[s[a]]=n[s[a]]+iL(i,y/2),f[s[r]]=u+iL(i,g/2),u+=m,d.setLayout(f,!0)}n[s[a]]+=h,n[l[a]]-=h}function fL(t){return t.get(lL)?t.get(uL):0}function gL(t){var r=t.findComponents({mainType:"legend"});r&&r.length&&t.eachSeriesByType("graph",function(t){var e=t.getCategoriesData(),i=t.getGraph().data,o=e.mapArray(e.getName);i.filterSelf(function(t){var e=i.getItemModel(t).getShallow("category");if(null!=e){"number"==typeof e&&(e=o[e]);for(var n=0;n<r.length;n++)if(!r[n].isSelected(e))return!1}return!0})})}function yL(t){var h={};t.eachSeriesByType("graph",function(s){var l=s.getCategoriesData(),r=s.getData(),u={};l.each(function(t){var e=l.getName(t);u["ec-"+e]=t;var n=l.getItemModel(t),i=n.getModel("itemStyle").getItemStyle();i.fill||(i.fill=s.getColorFromPalette(e,h)),l.setItemVisual(t,"style",i);for(var o=["symbol","symbolSize","symbolKeepAspect"],r=0;r<o.length;r++){var a=n.getShallow(o[r],!0);null!=a&&l.setItemVisual(t,o[r],a)}}),l.count()&&r.each(function(t){var e=r.getItemModel(t).getShallow("category");if(null!=e){"string"==typeof e&&(e=u["ec-"+e]);var n=l.getItemVisual(e,"style");P(r.ensureUniqueItemVisual(t,"style"),n);for(var i=["symbol","symbolSize","symbolKeepAspect"],o=0;o<i.length;o++)r.setItemVisual(t,i[o],l.getItemVisual(e,i[o]))}})})}function mL(t){return t=!(t instanceof Array)?[t,t]:t}function vL(t){t.eachSeriesByType("graph",function(t){var s=t.getGraph(),l=t.getEdgeData(),e=mL(t.get("edgeSymbol")),n=mL(t.get("edgeSymbolSize"));l.setVisual("fromSymbol",e&&e[0]),l.setVisual("toSymbol",e&&e[1]),l.setVisual("fromSymbolSize",n&&n[0]),l.setVisual("toSymbolSize",n&&n[1]),l.setVisual("style",t.getModel("lineStyle").getLineStyle()),l.each(function(t){var e=l.getItemModel(t),n=s.getEdgeByIndex(t),i=mL(e.getShallow("symbol",!0)),o=mL(e.getShallow("symbolSize",!0)),e=e.getModel("lineStyle").getLineStyle(),r=l.ensureUniqueItemVisual(t,"style");switch(P(r,e),r.stroke){case"source":var a=n.node1.getVisual("style");r.stroke=a&&a.fill;break;case"target":a=n.node2.getVisual("style");r.stroke=a&&a.fill}i[0]&&n.setVisual("fromSymbol",i[0]),i[1]&&n.setVisual("toSymbol",i[1]),o[0]&&n.setVisual("fromSymbolSize",o[0]),o[1]&&n.setVisual("toSymbolSize",o[1])})})}var _L="--\x3e",xL=function(t){return t.get("autoCurveness")||null},bL=function(t,e){var n=xL(t),i=20,o=[];if("number"==typeof n)i=n;else if(G(n))return void(t.__curvenessList=n);for(var r=(i=i<e?e:i)%2?i+2:i+3,o=[],a=0;a<r;a++)o.push((a%2?a+1:a)/10*(a%2?-1:1));t.__curvenessList=o},wL=function(t,e,n){t=[t.id,t.dataIndex].join("."),e=[e.id,e.dataIndex].join(".");return[n.uid,t,e].join(_L)},SL=function(t){t=t.split(_L);return[t[0],t[2],t[1]].join(_L)},ML=function(t,e){t=wL(t.node1,t.node2,e);return e.__edgeMap[t]},IL=function(t,e){return TL(wL(t.node1,t.node2,e),e)+TL(wL(t.node2,t.node1,e),e)},TL=function(t,e){e=e.__edgeMap;return e[t]?e[t].length:0};function CL(t,e,n,i){var o=xL(e),r=G(o);if(!o)return null;var a=ML(t,e);if(!a)return null;for(var s=-1,l=0;l<a.length;l++)if(a[l]===n){s=l;break}var u=IL(t,e);bL(e,u),t.lineStyle=t.lineStyle||{};var h=wL(t.node1,t.node2,e),t=e.__curvenessList,u=r||u%2?0:1;if(a.isForward)return t[u+s];h=SL(h),h=TL(h,e),e=t[s+h+u];return i?!r||o&&0===o[0]?(h+u)%2?e:-e:((h%2?0:1)+u)%2?e:-e:t[s+h+u]}function DL(t){var e=t.coordinateSystem;e&&"view"!==e.type||((e=t.getGraph()).eachNode(function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])}),AL(e,t))}function AL(t,r){t.eachEdge(function(t,e){var n=et(t.getModel().get(["lineStyle","curveness"]),-CL(t,r,e,!0),0),i=_t(t.node1.getLayout()),o=_t(t.node2.getLayout()),e=[i,o];+n&&e.push([(i[0]+o[0])/2-(i[1]-o[1])*n,(i[1]+o[1])/2-(o[0]-i[0])*n]),t.setLayout(e)})}function kL(t,e){t.eachSeriesByType("graph",function(t){var e=t.get("layout"),n=t.coordinateSystem;if(n&&"view"!==n.type){var i=t.getData(),o=[];E(n.dimensions,function(t){o=o.concat(i.mapDimensionsAll(t))});for(var r=0;r<i.count();r++){for(var a=[],s=!1,l=0;l<o.length;l++){var u=i.get(o[l],r);isNaN(u)||(s=!0),a.push(u)}s?i.setItemLayout(r,n.dataToPoint(a)):i.setItemLayout(r,[NaN,NaN])}AL(i.graph,t)}else e&&"none"!==e||DL(t)})}function LL(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=t.option.nodeScaleRatio,t=e.scaleX;return((e.getZoom()-1)*n+1)/t}function PL(t){t=t.getVisual("symbolSize");return+(t=t instanceof Array?(t[0]+t[1])/2:t)}var OL=Math.PI,RL=[];function NL(s,t){var e,n,l,u,i,o=s.coordinateSystem;o&&"view"!==o.type||(i=o.getBoundingRect(),n=(e=s.getData()).graph,l=i.width/2+i.x,u=i.height/2+i.y,o=Math.min(i.width,i.height)/2,i=e.count(),e.setLayout({cx:l,cy:u}),i&&(EL[t](s,n,e,o,l,u,i),n.eachEdge(function(t,e){var n,i=et(t.getModel().get(["lineStyle","curveness"]),CL(t,s,e),0),o=_t(t.node1.getLayout()),r=_t(t.node2.getLayout()),a=(o[0]+r[0])/2,e=(o[1]+r[1])/2;+i&&(n=[l*(i*=3)+a*(1-i),u*i+e*(1-i)]),t.setLayout([o,r,n])})))}var EL={value:function(t,e,n,i,o,r,a){var s=0,l=n.getSum("value"),u=2*Math.PI/(l||a);e.eachNode(function(t){var e=t.getValue("value"),e=u*(l?e:1)/2;s+=e,t.setLayout([i*Math.cos(s)+o,i*Math.sin(s)+r]),s+=e})},symbolSize:function(t,e,n,i,o,r,a){var s=0;RL.length=a;var l=LL(t);e.eachNode(function(t){var e=PL(t);(e=isNaN(e)?2:e)<0&&(e=0),e*=l;e=Math.asin(e/2/i);isNaN(e)&&(e=OL/2),RL[t.dataIndex]=e,s+=2*e});var u=(2*OL-s)/a/2,h=0;e.eachNode(function(t){var e=u+RL[t.dataIndex];h+=e,t.setLayout([i*Math.cos(h)+o,i*Math.sin(h)+r]),h+=e})}};function zL(t){t.eachSeriesByType("graph",function(t){"circular"===t.get("layout")&&NL(t,"symbolSize")})}var BL=wt;function VL(t){t.eachSeriesByType("graph",function(o){var h,c,p,i,r,t,e,a,s,l,n,u,d=o.coordinateSystem;d&&"view"!==d.type||("force"===o.get("layout")?(h=o.preservedPoints||{},c=o.getGraph(),p=c.data,n=c.edgeData,e=(u=o.getModel("force")).get("initLayout"),o.preservedPoints?p.each(function(t){var e=p.getId(t);p.setItemLayout(t,h[e]||[NaN,NaN])}):e&&"none"!==e?"circular"===e&&NL(o,"value"):DL(o),i=p.getDataExtent("value"),r=n.getDataExtent("value"),t=u.get("repulsion"),e=u.get("edgeLength"),a=G(t)?t:[t,t],s=[(s=G(e)?e:[e,e])[1],s[0]],l=p.mapArray("value",function(t,e){var n=p.getItemLayout(e),t=yo(t,i,a);return{w:t=isNaN(t)?(a[0]+a[1])/2:t,rep:t,fixed:p.getItemModel(e).get("fixed"),p:!n||isNaN(n[0])||isNaN(n[1])?null:n}}),n=n.mapArray("value",function(t,e){var n=c.getEdgeByIndex(e),i=yo(t,r,s);isNaN(i)&&(i=(s[0]+s[1])/2);t=n.getModel(),e=et(n.getModel().get(["lineStyle","curveness"]),-CL(n,o,e,!0),0);return{n1:l[n.node1.dataIndex],n2:l[n.node2.dataIndex],d:i,curveness:e,ignoreForceLayout:t.get("ignoreForceLayout")}}),d=d.getBoundingRect(),(u=function(t,e,n){for(var d=t,f=e,i=(e=n.rect).width,o=e.height,g=[e.x+i/2,e.y+o/2],y=null==n.gravity?.1:n.gravity,r=0;r<d.length;r++){var a=d[r];a.p||(a.p=mt(i*(Math.random()-.5)+g[0],o*(Math.random()-.5)+g[1])),a.pp=_t(a.p),a.edges=null}var m,v,s=null==n.friction?.6:n.friction,_=s;return{warmUp:function(){_=.8*s},setFixed:function(t){d[t].fixed=!0},setUnfixed:function(t){d[t].fixed=!1},beforeStep:function(t){m=t},afterStep:function(t){v=t},step:function(t){m&&m(d,f);for(var e=[],n=d.length,i=0;i<f.length;i++){var o=f[i];o.ignoreForceLayout||(s=o.n1,St(e,(r=o.n2).p,s.p),a=Mt(e)-o.d,o=r.w/(s.w+r.w),isNaN(o)&&(o=0),Ct(e,e),s.fixed||BL(s.p,s.p,e,o*a*_),r.fixed||BL(r.p,r.p,e,-(1-o)*a*_))}for(i=0;i<n;i++)(h=d[i]).fixed||(St(e,g,h.p),BL(h.p,h.p,e,y*_));for(i=0;i<n;i++)for(var r,a,s=d[i],l=i+1;l<n;l++){St(e,(r=d[l]).p,s.p),0===(a=Mt(e))&&(xt(e,Math.random()-.5,Math.random()-.5),a=1);var u=(s.rep+r.rep)/a/a;s.fixed||BL(s.pp,s.pp,e,u),r.fixed||BL(r.pp,r.pp,e,-u)}for(var h,c=[],i=0;i<n;i++)(h=d[i]).fixed||(St(c,h.p,h.pp),BL(h.p,h.p,c,_),vt(h.pp,h.p));var p=(_*=.992)<.01;v&&v(d,f,p),t&&t(p)}}}(l,n,{rect:d,gravity:u.get("gravity"),friction:u.get("friction")})).beforeStep(function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].fixed&&vt(t[n].p,c.getNodeByIndex(n).getLayout())}),u.afterStep(function(t,e,n){for(var i=0,o=t.length;i<o;i++)t[i].fixed||c.getNodeByIndex(i).setLayout(t[i].p),h[p.getId(i)]=t[i].p;for(i=0,o=e.length;i<o;i++){var r=e[i],a=c.getEdgeByIndex(i),s=r.n1.p,l=r.n2.p,u=a.getLayout();(u=u?u.slice():[])[0]=u[0]||[],u[1]=u[1]||[],vt(u[0],s),vt(u[1],l),+r.curveness&&(u[2]=[(s[0]+l[0])/2-(s[1]-l[1])*r.curveness,(s[1]+l[1])/2-(l[0]-s[0])*r.curveness]),a.setLayout(u)}}),o.forceLayout=u,o.preservedPoints=h,u.step()):o.forceLayout=null)})}function GL(t,u){var h=[];return t.eachSeriesByType("graph",function(t){var e,n,i,o,r,a,s,l=t.get("coordinateSystem");l&&"view"!==l||(n=[],r=[],Ra((e=t.getData()).mapArray(function(t){t=e.getItemModel(t);return[+t.get("x"),+t.get("y")]}),n,r),r[0]-n[0]==0&&(r[0]+=1,--n[0]),r[1]-n[1]==0&&(r[1]+=1,--n[1]),o=(r[0]-n[0])/(r[1]-n[1]),a=u,s=o,i=rd(P(t.getBoxLayoutParams(),{aspect:s}),{width:a.getWidth(),height:a.getHeight()}),isNaN(o)&&(n=[i.x,i.y],r=[i.x+i.width,i.y+i.height]),l=r[0]-n[0],s=r[1]-n[1],a=i.width,o=i.height,(r=t.coordinateSystem=new jD).zoomLimit=t.get("scaleLimit"),r.setBoundingRect(n[0],n[1],l,s),r.setViewRect(i.x,i.y,a,o),r.setCenter(t.get("center")),r.setZoom(t.get("zoom")),h.push(r))}),h}var FL,HL=fh.prototype,WL=xh.prototype,UL=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};u(YL,FL=UL);function YL(){return null!==FL&&FL.apply(this,arguments)||this}function XL(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var ZL,jL=(u(qL,ZL=Ss),qL.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},qL.prototype.getDefaultShape=function(){return new UL},qL.prototype.buildPath=function(t,e){(XL(e)?HL:WL).buildPath.call(this,t,e)},qL.prototype.pointAt=function(t){return(XL(this.shape)?HL:WL).pointAt.call(this,t)},qL.prototype.tangentAt=function(t){var e=this.shape,t=XL(e)?[e.x2-e.x1,e.y2-e.y1]:WL.tangentAt.call(this,t);return Ct(t,t)},qL);function qL(t){t=ZL.call(this,t)||this;return t.type="ec-line",t}var KL=["fromSymbol","toSymbol"];function $L(t){return"_"+t+"Type"}function JL(t,e,n){var i=e.getItemVisual(n,t);if(i&&"none"!==i){var o=e.getItemVisual(n,t+"Size"),r=e.getItemVisual(n,t+"Rotate"),a=e.getItemVisual(n,t+"Offset"),n=e.getItemVisual(n,t+"KeepAspect"),o=Dm(o),a=Am(a||0,o),n=Cm(i,-o[0]/2+a[0],-o[1]/2+a[1],o[0],o[1],null,n);return n.__specifiedRotation=null==r||isNaN(r)?void 0:+r*Math.PI/180||0,n.name=t,n}}function QL(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;e=e[2];e?(t.cpx1=e[0],t.cpy1=e[1]):(t.cpx1=NaN,t.cpy1=NaN)}var tP,eP=(u(nP,tP=io),nP.prototype._createLine=function(n,i,t){var e,o=n.hostModel,r=n.getItemLayout(i),r=(e=r,QL((r=new jL({name:"line",subPixelOptimize:!0})).shape,e),r);r.shape.percent=0,$h(r,{shape:{percent:1}},o,i),this.add(r),E(KL,function(t){var e=JL(t,n,i);this.add(e),this[$L(t)]=n.getItemVisual(i,t)},this),this._updateCommonStl(n,i,t)},nP.prototype.updateData=function(i,o,t){var e=i.hostModel,n=this.childOfName("line"),r=i.getItemLayout(o),a={shape:{}};QL(a.shape,r),Kh(n,a,e,o),E(KL,function(t){var e=i.getItemVisual(o,t),n=$L(t);this[n]!==e&&(this.remove(this.childOfName(t)),t=JL(t,i,o),this.add(t)),this[n]=e},this),this._updateCommonStl(i,o,t)},nP.prototype.getLinePath=function(){return this.childAt(0)},nP.prototype._updateCommonStl=function(n,t,e){var i=n.hostModel,r=this.childOfName("line"),o=e&&e.emphasisLineStyle,a=e&&e.blurLineStyle,s=e&&e.selectLineStyle,l=e&&e.labelStatesModels;e&&!n.hasItemOption||(o=(e=n.getItemModel(t)).getModel(["emphasis","lineStyle"]).getLineStyle(),a=e.getModel(["blur","lineStyle"]).getLineStyle(),s=e.getModel(["select","lineStyle"]).getLineStyle(),l=Oc(e));var u=n.getItemVisual(t,"style"),h=u.stroke;r.useStyle(u),r.style.fill=null,r.style.strokeNoScale=!0,r.ensureState("emphasis").style=o,r.ensureState("blur").style=a,r.ensureState("select").style=s,E(KL,function(t){var e=this.childOfName(t);if(e){e.setColor(h),e.style.opacity=u.opacity;for(var n=0;n<hl.length;n++){var i=hl[n],o=r.getState(i);o&&(o=o.style||{},i=(i=e.ensureState(i)).style||(i.style={}),null!=o.stroke&&(i[e.__isEmptyBrush?"stroke":"fill"]=o.stroke),null!=o.opacity&&(i.opacity=o.opacity))}e.markRedraw()}},this);s=i.getRawValue(t);Pc(this,l,{labelDataIndex:t,labelFetcher:{getFormattedLabel:function(t,e){return i.getFormattedLabel(t,e,n.dataType)}},inheritColor:h||"#000",defaultOpacity:u.opacity,defaultText:(null==s?n.getName(t):isFinite(s)?vo(s):s)+""});s=this.getTextContent();s&&(l=l.normal,s.__align=s.style.align,s.__verticalAlign=s.style.verticalAlign,s.__position=l.get("position")||"middle",G(l=l.get("distance"))||(l=[l,l]),s.__labelDistance=l),this.setTextConfig({position:null,local:!0,inside:!1}),ql(this)},nP.prototype.highlight=function(){zl(this)},nP.prototype.downplay=function(){Bl(this)},nP.prototype.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},nP.prototype.setLinePoints=function(t){var e=this.childOfName("line");QL(e.shape,t),e.dirty()},nP.prototype.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.getTextContent();if(t||e||n&&!n.ignore){for(var i=1,o=this.parent;o;)o.scaleX&&(i/=o.scaleX),o=o.parent;var r=this.childOfName("line");if(this.__dirty||r.__dirty){var a=r.shape.percent,s=r.pointAt(0),l=r.pointAt(a),u=St([],l,s);if(Ct(u,u),t&&(t.setPosition(s),v(t,0),t.scaleX=t.scaleY=i*a,t.markRedraw()),e&&(e.setPosition(l),v(e,1),e.scaleX=e.scaleY=i*a,e.markRedraw()),n&&!n.ignore){n.x=n.y=0;var h=void(n.originX=n.originY=0),c=void 0,e=n.__labelDistance,p=e[0]*i,d=e[1]*i,e=a/2,f=r.tangentAt(e),a=[f[1],-f[0]],g=r.pointAt(e);0<a[1]&&(a[0]=-a[0],a[1]=-a[1]);var y=f[0]<0?-1:1;"start"!==n.__position&&"end"!==n.__position&&(a=-Math.atan2(f[1],f[0]),l[0]<s[0]&&(a=Math.PI+a),n.rotation=a);var m=void 0;switch(n.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":m=-d,c="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":m=d,c="top";break;default:m=0,c="middle"}switch(n.__position){case"end":n.x=u[0]*p+l[0],n.y=u[1]*d+l[1],h=.8<u[0]?"left":u[0]<-.8?"right":"center",c=.8<u[1]?"top":u[1]<-.8?"bottom":"middle";break;case"start":n.x=-u[0]*p+s[0],n.y=-u[1]*d+s[1],h=.8<u[0]?"right":u[0]<-.8?"left":"center",c=.8<u[1]?"bottom":u[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":n.x=p*y+s[0],n.y=s[1]+m,h=f[0]<0?"right":"left",n.originX=-p*y,n.originY=-m;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":n.x=g[0],n.y=g[1]+m,h="center",n.originY=-m;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":n.x=-p*y+l[0],n.y=l[1]+m,h=0<=f[0]?"right":"left",n.originX=p*y,n.originY=-m}n.scaleX=n.scaleY=i,n.setStyle({verticalAlign:n.__verticalAlign||c,align:n.__align||h})}}}function v(t,e){var n,i=t.__specifiedRotation;null==i?(n=r.tangentAt(e),t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(n[1],n[0]))):t.attr("rotation",i)}},nP);function nP(t,e,n){var i=tP.call(this)||this;return i._createLine(t,e,n),i}var iP=(oP.prototype.isPersistent=function(){return!0},oP.prototype.updateData=function(n){var i=this,e=this.group,o=this._lineData;this._lineData=n,o||e.removeAll();var r=rP(n);n.diff(o).add(function(t){i._doAdd(n,t,r)}).update(function(t,e){i._doUpdate(o,n,e,t,r)}).remove(function(t){e.remove(o.getItemGraphicEl(t))}).execute()},oP.prototype.updateLayout=function(){var n=this._lineData;n&&n.eachItemGraphicEl(function(t,e){t.updateLayout(n,e)},this)},oP.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=rP(t),this._lineData=null,this.group.removeAll()},oP.prototype.incrementalUpdate=function(t,e){function n(t){var e;t.isGroup||(e=t).animators&&0<e.animators.length||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i,o=t.start;o<t.end;o++)sP(e.getItemLayout(o))&&((i=new this._LineCtor(e,o,this._seriesScope)).traverse(n),this.group.add(i),e.setItemGraphicEl(o,i))},oP.prototype.remove=function(){this.group.removeAll()},oP.prototype._doAdd=function(t,e,n){sP(t.getItemLayout(e))&&(n=new this._LineCtor(t,e,n),t.setItemGraphicEl(e,n),this.group.add(n))},oP.prototype._doUpdate=function(t,e,n,i,o){n=t.getItemGraphicEl(n);sP(e.getItemLayout(i))?(n?n.updateData(e,i,o):n=new this._LineCtor(e,i,o),e.setItemGraphicEl(i,n),this.group.add(n)):this.group.remove(n)},oP);function oP(t){this.group=new io,this._LineCtor=t||eP}function rP(t){t=t.hostModel;return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["emphasis","lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),labelStatesModels:Oc(t)}}function aP(t){return isNaN(t[0])||isNaN(t[1])}function sP(t){return!aP(t[0])&&!aP(t[1])}var lP=[],uP=[],hP=[],cP=ba,pP=Lt,dP=Math.abs;function fP(t,e,n){for(var i,o=t[0],r=t[1],a=t[2],s=1/0,l=n*n,u=.1,h=.1;h<=.9;h+=.1)lP[0]=cP(o[0],r[0],a[0],h),lP[1]=cP(o[1],r[1],a[1],h),(d=dP(pP(lP,e)-l))<s&&(s=d,i=h);for(var c=0;c<32;c++){var p=i+u;uP[0]=cP(o[0],r[0],a[0],i),uP[1]=cP(o[1],r[1],a[1],i),hP[0]=cP(o[0],r[0],a[0],p),hP[1]=cP(o[1],r[1],a[1],p);var d=pP(uP,e)-l;if(dP(d)<.01)break;p=pP(hP,e)-l;u/=2,d<0?0<=p?i+=u:i-=u:0<=p?i-=u:i+=u}return i}function gP(t,l){var u=[],h=Ma,c=[[],[],[]],p=[[],[]],d=[];l/=2,t.eachEdge(function(t,e){var n=t.getLayout(),i=t.getVisual("fromSymbol"),o=t.getVisual("toSymbol");n.__original||(n.__original=[_t(n[0]),_t(n[1])],n[2]&&n.__original.push(_t(n[2])));var r,a,s=n.__original;null!=n[2]?(vt(c[0],s[0]),vt(c[1],s[2]),vt(c[2],s[1]),i&&"none"!==i&&(a=PL(t.node1),r=fP(c,s[0],a*l),h(c[0][0],c[1][0],c[2][0],r,u),c[0][0]=u[3],c[1][0]=u[4],h(c[0][1],c[1][1],c[2][1],r,u),c[0][1]=u[3],c[1][1]=u[4]),o&&"none"!==o&&(a=PL(t.node2),r=fP(c,s[1],a*l),h(c[0][0],c[1][0],c[2][0],r,u),c[1][0]=u[1],c[2][0]=u[2],h(c[0][1],c[1][1],c[2][1],r,u),c[1][1]=u[1],c[2][1]=u[2]),vt(n[0],c[0]),vt(n[1],c[2]),vt(n[2],c[1])):(vt(p[0],s[0]),vt(p[1],s[1]),St(d,p[1],p[0]),Ct(d,d),i&&"none"!==i&&(a=PL(t.node1),wt(p[0],p[0],d,a*l)),o&&"none"!==o&&(a=PL(t.node2),wt(p[1],p[1],d,-a*l)),vt(n[0],p[0]),vt(n[1],p[1]))})}function yP(t){return"view"===t.type}var mP,vP=(u(_P,mP=ky),_P.prototype.init=function(t,e){var n=new kM,i=new iP,o=this.group;this._controller=new mD(e.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},_P.prototype.render=function(t,e,n){var r=this,i=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;yP(i)&&(i={x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},this._firstRender?s.attr(i):Kh(s,i,t)),gP(t.getGraph(),LL(t));var l=t.getData();o.updateData(l);o=t.getEdgeData();a.updateData(o),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var u=t.forceLayout,h=t.get(["force","layoutAnimation"]);u&&this._startForceLayoutIteration(u,h),l.graph.eachNode(function(t){var e=t.dataIndex,n=t.getGraphicEl(),i=t.getModel();n.off("drag").off("dragend");var o=i.get("draggable");o&&n.on("drag",function(){u&&(u.warmUp(),r._layouting||r._startForceLayoutIteration(u,h),u.setFixed(e),l.setItemLayout(e,[n.x,n.y]))}).on("dragend",function(){u&&u.setUnfixed(e)}),n.setDraggable(o&&!!u),"adjacency"===i.get(["emphasis","focus"])&&(il(n).focus=t.getAdjacentDataIndices())}),l.graph.eachEdge(function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(il(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})});var c="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),p=l.getLayout("cx"),d=l.getLayout("cy");l.eachItemGraphicEl(function(t,e){var n=l.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();c?(t=l.getItemLayout(e),(e=Math.atan2(t[1]-d,t[0]-p))<0&&(e=2*Math.PI+e),(t=t[0]<p)&&(e-=Math.PI),t=t?"left":"right",i.setTextConfig({rotation:-e,position:t,origin:"center"}),P((e=i.ensureState("emphasis")).textConfig||(e.textConfig={}),{position:t})):i.setTextConfig({rotation:n*=Math.PI/180})}),this._firstRender=!1},_P.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},_P.prototype._startForceLayoutIteration=function(t,n){var i=this;!function e(){t.step(function(t){i.updateLayout(i._model),(i._layouting=!t)&&(n?i._layoutTimeout=setTimeout(e,16):e())})}()},_P.prototype._updateController=function(o,t,r){var e=this,n=this._controller,i=this._controllerHost,a=this.group;n.setPointerChecker(function(t,e,n){var i=a.getBoundingRect();return i.applyTransform(a.transform),i.contain(e,n)&&!ID(t,r,o)}),yP(o.coordinateSystem)?(n.enable(o.get("roam")),i.zoomLimit=o.get("scaleLimit"),i.zoom=o.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",function(t){wD(i,t.dx,t.dy),r.dispatchAction({seriesId:o.id,type:"graphRoam",dx:t.dx,dy:t.dy})}).on("zoom",function(t){SD(i,t.scale,t.originX,t.originY),r.dispatchAction({seriesId:o.id,type:"graphRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),e._updateNodeAndLinkScale(),gP(o.getGraph(),LL(o)),e._lineDraw.updateLayout(),r.updateLabelLayout()})):n.disable()},_P.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=LL(t);e.eachItemGraphicEl(function(t,e){t.setSymbolScale(n)})},_P.prototype.updateLayout=function(t){gP(t.getGraph(),LL(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},_P.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},_P.type="graph",_P);function _P(){var t=null!==mP&&mP.apply(this,arguments)||this;return t.type=_P.type,t}function xP(t){return"_EC_"+t}var bP=(wP.prototype.isDirected=function(){return this._directed},wP.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[xP(t)]){e=new SP(t,e);return(e.hostGraph=this).nodes.push(e),n[xP(t)]=e}console.error("Graph nodes have duplicate name or id")},wP.prototype.getNodeByIndex=function(t){t=this.data.getRawIndex(t);return this.nodes[t]},wP.prototype.getNodeById=function(t){return this._nodesMap[xP(t)]},wP.prototype.addEdge=function(t,e,n){var i=this._nodesMap,o=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t instanceof SP||(t=i[xP(t)]),e instanceof SP||(e=i[xP(e)]),t&&e){i=t.id+"-"+e.id,n=new IP(t,e,n);return(n.hostGraph=this)._directed&&(t.outEdges.push(n),e.inEdges.push(n)),t.edges.push(n),t!==e&&e.edges.push(n),this.edges.push(n),o[i]=n}},wP.prototype.getEdgeByIndex=function(t){t=this.edgeData.getRawIndex(t);return this.edges[t]},wP.prototype.getEdge=function(t,e){t instanceof SP&&(t=t.id),e instanceof SP&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},wP.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&t.call(e,n[o],o)},wP.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,o=0;o<i;o++)0<=n[o].dataIndex&&0<=n[o].node1.dataIndex&&0<=n[o].node2.dataIndex&&t.call(e,n[o],o)},wP.prototype.breadthFirstTraverse=function(t,e,n,i){if(e=!(e instanceof SP)?this._nodesMap[xP(e)]:e){for(var o="out"===n?"outEdges":"in"===n?"inEdges":"edges",r=0;r<this.nodes.length;r++)this.nodes[r].__visited=!1;if(!t.call(i,e,null))for(var a=[e];a.length;)for(var s=a.shift(),l=s[o],r=0;r<l.length;r++){var u=l[r],u=u.node1===s?u.node2:u.node1;if(!u.__visited){if(t.call(i,u,s))return;a.push(u),u.__visited=!0}}}},wP.prototype.update=function(){for(var t=this.data,e=this.edgeData,n=this.nodes,i=this.edges,o=0,r=n.length;o<r;o++)n[o].dataIndex=-1;for(o=0,r=t.count();o<r;o++)n[t.getRawIndex(o)].dataIndex=o;e.filterSelf(function(t){t=i[e.getRawIndex(t)];return 0<=t.node1.dataIndex&&0<=t.node2.dataIndex});for(o=0,r=i.length;o<r;o++)i[o].dataIndex=-1;for(o=0,r=e.count();o<r;o++)i[e.getRawIndex(o)].dataIndex=o},wP.prototype.clone=function(){for(var t=new wP(this._directed),e=this.nodes,n=this.edges,i=0;i<e.length;i++)t.addNode(e[i].id,e[i].dataIndex);for(i=0;i<n.length;i++){var o=n[i];t.addEdge(o.node1.id,o.node2.id,o.dataIndex)}return t},wP);function wP(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}var SP=(MP.prototype.degree=function(){return this.edges.length},MP.prototype.inDegree=function(){return this.inEdges.length},MP.prototype.outDegree=function(){return this.outEdges.length},MP.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)},MP.prototype.getAdjacentDataIndices=function(){for(var t={edge:[],node:[]},e=0;e<this.edges.length;e++){var n=this.edges[e];n.dataIndex<0||(t.edge.push(n.dataIndex),t.node.push(n.node1.dataIndex,n.node2.dataIndex))}return t},MP);function MP(t,e){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=null==t?"":t,this.dataIndex=null==e?-1:e}var IP=(TP.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)},TP.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},TP);function TP(t,e,n){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=null==n?-1:n}function CP(n,i){return{getValue:function(t){var e=this[n][i];return e.getStore().get(e.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,e){0<=this.dataIndex&&this[n][i].setItemVisual(this.dataIndex,t,e)},getVisual:function(t){return this[n][i].getItemVisual(this.dataIndex,t)},setLayout:function(t,e){0<=this.dataIndex&&this[n][i].setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this[n][i].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][i].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][i].getRawIndex(this.dataIndex)}}}function DP(t,e,n,i,o){for(var r=new bP(i),a=0;a<t.length;a++)r.addNode(Q(t[a].id,t[a].name,a),a);for(var s=[],l=[],u=0,a=0;a<e.length;a++){var h=e[a],c=h.source,p=h.target;r.addEdge(c,p,u)&&(l.push(h),s.push(Q(nr(h.id,null),c+" > "+p)),u++)}var d,i=n.get("coordinateSystem");"cartesian2d"===i||"polar"===i?d=ab(t,n):(C(i=(i=sf.get(i))&&i.dimensions||[],"value")<0&&i.concat(["value"]),i=Qx(t,{coordDimensions:i,encodeDefine:n.getEncode()}).dimensions,(d=new $x(i,n)).initData(t));n=new $x(["value"],n);return n.initData(l,s),o&&o(d,n),NA({mainData:d,struct:r,structAttr:"graph",datas:{node:d,edge:n},datasAttr:{node:"data",edge:"edgeData"}}),r.update(),r}T(SP,CP("hostGraph","data")),T(IP,CP("hostGraph","edgeData"));var AP,kP=(u(LP,AP=yy),LP.prototype.init=function(t){AP.prototype.init.apply(this,arguments);var e=this;function n(){return e._categoriesData}this.legendVisualProvider=new mT(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},LP.prototype.mergeOption=function(t){AP.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},LP.prototype.mergeDefaultAndTheme=function(t){AP.prototype.mergeDefaultAndTheme.apply(this,arguments),Ko(t,"edgeLabel",["show"])},LP.prototype.getInitialData=function(t,e){var n=t.edges||t.links||[],i=t.data||t.nodes||[],r=this;if(i&&n){xL(t=this)&&(t.__curvenessList=[],t.__edgeMap={},bL(t));n=DP(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=r._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=ep.prototype.getModel;function i(t,e){e=n.call(this,t,e);return e.resolveParentPath=o,e}function o(t){if(!t||"label"!==t[0]&&"label"!==t[1])return t;var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}e.wrapMethod("getItemModel",function(t){return t.resolveParentPath=o,t.getModel=i,t})});return E(n.edges,function(t){var e,n,i;e=t.node1,n=t.node2,i=this,t=t.dataIndex,xL(i)&&(e=wL(e,n,i),i=(n=i.__edgeMap)[SL(e)],n[e]&&!i?n[e].isForward=!0:i&&n[e]&&(i.isForward=!0,n[e].isForward=!1),n[e]=n[e]||[],n[e].push(t))},this),n.data}},LP.prototype.getGraph=function(){return this.getData().graph},LP.prototype.getEdgeData=function(){return this.getGraph().edgeData},LP.prototype.getCategoriesData=function(){return this._categoriesData},LP.prototype.formatTooltip=function(t,e,n){if("edge"!==n)return cy({series:this,dataIndex:t,multipleSeries:e});var i=this.getData(),e=this.getDataParams(t,n),n=i.graph.getEdgeByIndex(t),t=i.getName(n.node1.dataIndex),i=i.getName(n.node2.dataIndex),n=[];return null!=t&&n.push(t),null!=i&&n.push(i),ty("nameValue",{name:n.join(" > "),value:e.value,noValue:null==e.value})},LP.prototype._updateCategoriesData=function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:P({value:0},t)}),e=new $x(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t)})},LP.prototype.setZoom=function(t){this.option.zoom=t},LP.prototype.setCenter=function(t){this.option.center=t},LP.prototype.isAnimationEnabled=function(){return AP.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},LP.type="series.graph",LP.dependencies=["grid","polar","geo","singleAxis","calendar"],LP.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},LP);function LP(){var t=null!==AP&&AP.apply(this,arguments)||this;return t.type=LP.type,t.hasSymbolVisual=!0,t}var PP={type:"graphRoam",event:"graphRoam",update:"none"};var OP,RP=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},NP=(u(EP,OP=Ss),EP.prototype.getDefaultShape=function(){return new RP},EP.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,o=e.r,r=e.width,a=e.angle,s=e.x-n(a)*r*(o/3<=r?1:2),l=e.y-i(a)*r*(o/3<=r?1:2),a=e.angle-Math.PI/2;t.moveTo(s,l),t.lineTo(e.x+n(a)*r,e.y+i(a)*r),t.lineTo(e.x+n(e.angle)*o,e.y+i(e.angle)*o),t.lineTo(e.x-n(a)*r,e.y-i(a)*r),t.lineTo(s,l)},EP);function EP(t){t=OP.call(this,t)||this;return t.type="pointer",t}function zP(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var BP,VP=2*Math.PI,GP=(u(FP,BP=ky),FP.prototype.render=function(t,e,n){this.group.removeAll();var i,o,r,a,s,l=t.get(["axisLine","lineStyle","color"]),s=(o=n,r=(i=t).get("center"),a=o.getWidth(),s=o.getHeight(),s=Math.min(a,s),{cx:mo(r[0],o.getWidth()),cy:mo(r[1],o.getHeight()),r:mo(i.get("radius"),s/2)});this._renderMain(t,e,n,l,s),this._data=t.getData()},FP.prototype.dispose=function(){},FP.prototype._renderMain=function(t,e,n,i,o){for(var r=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?TI:qu,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%VP||l===s?(l-s)%VP:VP,g=s,y=0;c&&y<i.length;y++){var m=new h({shape:{startAngle:g,endAngle:l=s+f*Math.min(Math.max(i[y][0],0),1),cx:o.cx,cy:o.cy,clockwise:a,r0:o.r-d,r:o.r},silent:!0});m.setStyle({fill:i[y][1]}),m.setStyle(p.getLineStyle(["color","width"])),r.add(m),g=l}function v(t){if(t<=0)return i[0][1];for(var e=0;e<i.length;e++)if(i[e][0]>=t&&(0===e?0:i[e-1][0])<t)return i[e][1];return i[e-1][1]}a||(u=s,s=l,l=u),this._renderTicks(t,e,n,v,o,s,l,a,d),this._renderTitleAndDetail(t,e,n,v,o),this._renderAnchor(t,o),this._renderPointer(t,e,n,v,o,s,l,a,d)},FP.prototype._renderTicks=function(t,e,n,i,o,r,a,s,l){for(var u,h,c,p=this.group,d=o.cx,f=o.cy,g=o.r,y=+t.get("min"),m=+t.get("max"),v=t.getModel("splitLine"),_=t.getModel("axisTick"),x=t.getModel("axisLabel"),b=t.get("splitNumber"),w=_.get("splitNumber"),S=mo(v.get("length"),g),M=mo(_.get("length"),g),I=r,T=(a-r)/b,C=T/w,D=v.getModel("lineStyle").getLineStyle(),A=_.getModel("lineStyle").getLineStyle(),k=v.get("distance"),L=0;L<=b;L++)if(O=Math.cos(I),R=Math.sin(I),v.get("show")&&(h=new fh({shape:{x1:O*(g-(c=k?k+l:l))+d,y1:R*(g-c)+f,x2:O*(g-S-c)+d,y2:R*(g-S-c)+f},style:D,silent:!0}),"auto"===D.stroke&&h.setStyle({stroke:i(L/b)}),p.add(h)),x.get("show")&&(c=x.get("distance")+k,u=zP(vo(L/b*(m-y)+y),x.get("formatter")),h=i(L/b),p.add(new Xs({style:Rc(x,{text:u,x:O*(g-S-c)+d,y:R*(g-S-c)+f,verticalAlign:R<-.8?"top":.8<R?"bottom":"middle",align:O<-.4?"left":.4<O?"right":"center"},{inheritColor:h}),silent:!0}))),_.get("show")&&L!==b){c=(c=_.get("distance"))?c+l:l;for(var P=0;P<=w;P++){var O=Math.cos(I),R=Math.sin(I),N=new fh({shape:{x1:O*(g-c)+d,y1:R*(g-c)+f,x2:O*(g-M-c)+d,y2:R*(g-M-c)+f},silent:!0,style:A});"auto"===A.stroke&&N.setStyle({stroke:i((L+P/w)/b)}),p.add(N),I+=C}I-=C}else I+=T},FP.prototype._renderPointer=function(s,t,e,l,u,a,n,h,c){var o=this.group,r=this._data,p=this._progressEls,d=[],f=s.get(["pointer","show"]),g=s.getModel("progress"),y=g.get("show"),m=s.getData(),v=m.mapDimension("value"),i=+s.get("min"),_=+s.get("max"),x=[i,_],b=[a,n];function w(t,e){var n=m.getItemModel(t).getModel("pointer"),i=mo(n.get("width"),u.r),o=mo(n.get("length"),u.r),r=s.get(["pointer","icon"]),a=n.get("offsetCenter"),t=mo(a[0],u.r),a=mo(a[1],u.r),n=n.get("keepAspect"),a=r?Cm(r,t-i/2,a-o,i,o,null,n):new NP({shape:{angle:-Math.PI/2,width:i,r:o,x:t,y:a}});return a.rotation=-(e+Math.PI/2),a.x=u.cx,a.y=u.cy,a}function S(t,e){var n=g.get("roundCap")?TI:qu,i=g.get("overlap"),o=i?g.get("width"):c/m.count(),r=i?u.r-o:u.r-(t+1)*o,o=i?u.r:u.r-t*o,o=new n({shape:{startAngle:a,endAngle:e,cx:u.cx,cy:u.cy,clockwise:h,r0:r,r:o}});return i&&(o.z2=_-m.get(v,t)%_),o}(y||f)&&(m.diff(r).add(function(t){var e,n;f&&($h(n=w(t,a),{rotation:-(yo(m.get(v,t),x,b,!0)+Math.PI/2)},s),o.add(n),m.setItemGraphicEl(t,n)),y&&(e=S(t,a),n=g.get("clip"),$h(e,{shape:{endAngle:yo(m.get(v,t),x,b,n)}},s),o.add(e),nl(s.seriesIndex,m.dataType,t,e),d[t]=e)}).update(function(t,e){var n,i;f&&((i=w(t,n=(i=r.getItemGraphicEl(e))?i.rotation:a)).rotation=n,Kh(i,{rotation:-(yo(m.get(v,t),x,b,!0)+Math.PI/2)},s),o.add(i),m.setItemGraphicEl(t,i)),y&&(e=S(t,(i=p[e])?i.shape.endAngle:a),i=g.get("clip"),Kh(e,{shape:{endAngle:yo(m.get(v,t),x,b,i)}},s),o.add(e),nl(s.seriesIndex,m.dataType,t,e),d[t]=e)}).execute(),m.each(function(t){var e,n,i,o,r=m.getItemModel(t),a=r.getModel("emphasis");f&&(o=m.getItemGraphicEl(t),n=(e=m.getItemVisual(t,"style")).fill,o instanceof Ps?(i=o.style,o.useStyle(P({image:i.image,x:i.x,y:i.y,width:i.width,height:i.height},e))):(o.useStyle(e),"pointer"!==o.type&&o.setColor(n)),o.setStyle(r.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===o.style.fill&&o.setStyle("fill",l(yo(m.get(v,t),x,[0,1],!0))),o.z2EmphasisLift=0,Ql(o,r),ql(o,a.get("focus"),a.get("blurScope"))),y&&((o=d[t]).useStyle(m.getItemVisual(t,"style")),o.setStyle(r.getModel(["progress","itemStyle"]).getItemStyle()),o.z2EmphasisLift=0,Ql(o,r),ql(o,a.get("focus"),a.get("blurScope")))}),this._progressEls=d)},FP.prototype._renderAnchor=function(t,e){var n,i,o,r=t.getModel("anchor");r.get("show")&&(n=r.get("size"),i=r.get("icon"),o=r.get("offsetCenter"),t=r.get("keepAspect"),(t=Cm(i,e.cx-n/2+mo(o[0],e.r),e.cy-n/2+mo(o[1],e.r),n,n,null,t)).z2=r.get("showAbove")?1:0,t.setStyle(r.getModel("itemStyle").getItemStyle()),this.group.add(t))},FP.prototype._renderTitleAndDetail=function(c,t,e,p,d){var n=this,f=c.getData(),g=f.mapDimension("value"),y=+c.get("min"),m=+c.get("max"),v=new io,_=[],x=[],b=c.isAnimationEnabled(),w=c.get(["pointer","showAbove"]);f.diff(this._data).add(function(t){_[t]=new Xs({silent:!0}),x[t]=new Xs({silent:!0})}).update(function(t,e){_[t]=n._titleEls[e],x[t]=n._detailEls[e]}).execute(),f.each(function(t){var e=f.getItemModel(t),a=f.get(g,t),n=new io,i=p(yo(a,[y,m],[0,1],!0)),o=e.getModel("title");o.get("show")&&(h=o.get("offsetCenter"),r=d.cx+mo(h[0],d.r),s=d.cy+mo(h[1],d.r),(l=_[t]).attr({z2:w?0:2,style:Rc(o,{x:r,y:s,text:f.getName(t),align:"center",verticalAlign:"middle"},{inheritColor:i})}),n.add(l));var r,s,l,u,h=e.getModel("detail");h.get("show")&&(o=h.get("offsetCenter"),r=d.cx+mo(o[0],d.r),s=d.cy+mo(o[1],d.r),e=mo(h.get("width"),d.r),o=mo(h.get("height"),d.r),i=c.get(["progress","show"])?f.getItemVisual(t,"style").fill:i,l=x[t],u=h.get("formatter"),l.attr({z2:w?0:2,style:Rc(h,{x:r,y:s,text:zP(a,u),width:isNaN(e)?null:e,height:isNaN(o)?null:o,align:"center",verticalAlign:"middle"},{inheritColor:i})}),Hc(l,{normal:h},a,function(t){return zP(t,u)}),b&&Wc(l,t,f,c,{getFormattedLabel:function(t,e,n,i,o,r){return zP(r?r.interpolatedValue:a,u)}}),n.add(l)),v.add(n)}),this.group.add(v),this._titleEls=_,this._detailEls=x},FP.type="gauge",FP);function FP(){var t=null!==BP&&BP.apply(this,arguments)||this;return t.type=FP.type,t}var HP,WP=(u(UP,HP=yy),UP.prototype.getInitialData=function(t,e){return yT(this,["value"])},UP.type="series.gauge",UP.defaultOption={zlevel:0,z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},UP);function UP(){var t=null!==HP&&HP.apply(this,arguments)||this;return t.type=UP.type,t.visualStyleAccessPath="itemStyle",t}var YP,XP=["itemStyle","opacity"],ZP=(u(jP,YP=rh),jP.prototype.updateData=function(t,e,n){var i=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),a=o.getModel("emphasis"),s=null==(s=o.get(XP))?1:s;n||nc(this),this.useStyle(t.getItemVisual(e,"style")),this.style.lineJoin="round",n?(this.setShape({points:r.points}),this.style.opacity=0,$h(this,{style:{opacity:s}},i,e)):Kh(this,{style:{opacity:s},shape:{points:r.points}},i,e),Ql(this,o),this._updateLabel(t,e),ql(this,a.get("focus"),a.get("blurScope"))},jP.prototype._updateLabel=function(t,e){var n=this.getTextGuideLine(),i=this.getTextContent(),o=t.hostModel,r=t.getItemModel(e),a=t.getItemLayout(e).label,s=t.getItemVisual(e,"style"),l=s.fill;Pc(i,Oc(r),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:s.opacity,defaultText:t.getName(e)},{normal:{align:a.textAlign,verticalAlign:a.verticalAlign}}),this.setTextConfig({local:!0,inside:!!a.inside,insideStroke:l,outsideFill:l});t=a.linePoints;n.setShape({points:t}),this.textGuideLineConfig={anchor:t?new bi(t[0][0],t[0][1]):null},Kh(i,{style:{x:a.x,y:a.y}},o,e),i.attr({rotation:a.rotation,originX:a.x,originY:a.y,z2:10}),qw(this,Kw(r),{stroke:l})},jP);function jP(t,e){var n=YP.call(this)||this,i=n,o=new uh,r=new Xs;return i.setTextContent(r),n.setTextGuideLine(o),n.updateData(t,e,!0),n}var qP,KP=(u($P,qP=ky),$P.prototype.render=function(e,t,n){var i=e.getData(),o=this._data,r=this.group;i.diff(o).add(function(t){var e=new ZP(i,t);i.setItemGraphicEl(t,e),r.add(e)}).update(function(t,e){e=o.getItemGraphicEl(e);e.updateData(i,t),r.add(e),i.setItemGraphicEl(t,e)}).remove(function(t){ec(o.getItemGraphicEl(t),e,t)}).execute(),this._data=i},$P.prototype.remove=function(){this.group.removeAll(),this._data=null},$P.prototype.dispose=function(){},$P.type="funnel",$P);function $P(){var t=null!==qP&&qP.apply(this,arguments)||this;return t.type=$P.type,t.ignoreLabelLineUpdate=!0,t}var JP,QP=(u(tO,JP=yy),tO.prototype.init=function(t){JP.prototype.init.apply(this,arguments),this.legendVisualProvider=new mT(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(t)},tO.prototype.getInitialData=function(t,e){return yT(this,{coordDimensions:["value"],encodeDefaulter:V(Od,this)})},tO.prototype._defaultLabelLine=function(t){Ko(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},tO.prototype.getDataParams=function(t){var e=this.getData(),n=JP.prototype.getDataParams.call(this,t),i=e.mapDimension("value"),o=e.getSum(i);return n.percent=o?+(e.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},tO.type="series.funnel",tO.defaultOption={zlevel:0,z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},tO);function tO(){var t=null!==JP&&JP.apply(this,arguments)||this;return t.type=tO.type,t}function eO(t,C){t.eachSeriesByType("funnel",function(t){var a=t.getData(),s=a.mapDimension("value"),e=t.get("sort"),n=(n=C,rd(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})),l=t.get("orient"),u=n.width,h=n.height,i=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,function(t){return t}),o=[],r="ascending"===e,a=0,s=t.count();a<s;a++)o[a]=a;return"function"==typeof e?o.sort(e):"none"!==e&&o.sort(function(t,e){return r?i[t]-i[e]:i[e]-i[t]}),o}(a,e),c=n.x,p=n.y,d="horizontal"===l?[mo(t.get("minSize"),h),mo(t.get("maxSize"),h)]:[mo(t.get("minSize"),u),mo(t.get("maxSize"),u)],n=a.getDataExtent(s),f=t.get("min"),g=t.get("max");null==f&&(f=Math.min(n[0],0)),null==g&&(g=n[1]);function o(t,e){if("horizontal"===l){var n=yo(a.get(s,t)||0,[f,g],d,!0),i=void 0;switch(y){case"top":i=p;break;case"center":i=p+(h-n)/2;break;case"bottom":i=p+(h-n)}return[[e,i],[e,i+n]]}var o,r=yo(a.get(s,t)||0,[f,g],d,!0);switch(y){case"left":o=c;break;case"center":o=c+(u-r)/2;break;case"right":o=c+u-r}return[[o,e],[o+r,e]]}var y=t.get("funnelAlign"),r=t.get("gap"),m=(("horizontal"===l?u:h)-r*(a.count()-1))/a.count();"ascending"===e&&(m=-m,r=-r,"horizontal"===l?c+=u:p+=h,i=i.reverse());for(var v,_,x=0;x<i.length;x++){var b,w,S,M=i[x],I=i[x+1],T=a.getItemModel(M);"horizontal"===l?(null==(b=T.get(["itemStyle","width"]))?b=m:(b=mo(b,u),"ascending"===e&&(b=-b)),w=o(M,c),S=o(I,c+b),c+=b+r):(null==(T=T.get(["itemStyle","height"]))?T=m:(T=mo(T,h),"ascending"===e&&(T=-T)),w=o(M,p),S=o(I,p+T),p+=T+r),a.setItemLayout(M,{points:w.concat(S.slice().reverse())})}_=(v=a).hostModel.get("orient"),v.each(function(t){var e,n,i,o,r=v.getItemModel(t),a=r.getModel("label").get("position"),s=r.getModel("labelLine"),l=v.getItemLayout(t),u=l.points,h="inner"===a||"inside"===a||"center"===a||"insideLeft"===a||"insideRight"===a,c=h?(e="insideLeft"===a?(n=(u[0][0]+u[3][0])/2+5,i=(u[0][1]+u[3][1])/2,"left"):"insideRight"===a?(n=(u[1][0]+u[2][0])/2-5,i=(u[1][1]+u[2][1])/2,"right"):(n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,i=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,"center"),[[n,i],[n,i]]):(c=t=r=o=void 0,s=s.get("length"),"vertical"===_&&-1<["top","bottom"].indexOf(a)&&(a="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),"horizontal"===_&&-1<["left","right"].indexOf(a)&&(a="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right.")),e="left"===a?(o=(u[3][0]+u[0][0])/2,r=(u[3][1]+u[0][1])/2,n=(t=o-s)-5,"right"):"right"===a?(o=(u[1][0]+u[2][0])/2,r=(u[1][1]+u[2][1])/2,n=(t=o+s)+5,"left"):"top"===a?(o=(u[3][0]+u[0][0])/2,i=(c=(r=(u[3][1]+u[0][1])/2)-s)-5,"center"):"bottom"===a?(o=(u[1][0]+u[2][0])/2,i=(c=(r=(u[1][1]+u[2][1])/2)+s)+5,"center"):"rightTop"===a?(o=("horizontal"===_?u[3]:u[1])[0],r=("horizontal"===_?u[3]:u[1])[1],"horizontal"===_?(i=(c=r-s)-5,"center"):(n=(t=o+s)+5,"top")):"rightBottom"===a?(o=u[2][0],r=u[2][1],"horizontal"===_?(i=(c=r+s)+5,"center"):(n=(t=o+s)+5,"bottom")):"leftTop"===a?(o=u[0][0],r=("horizontal"===_?u[0]:u[1])[1],"horizontal"===_?(i=(c=r-s)-5,"center"):(n=(t=o-s)-5,"right")):"leftBottom"===a?(o=("horizontal"===_?u[1]:u[3])[0],r=("horizontal"===_?u[1]:u[2])[1],"horizontal"===_?(i=(c=r+s)+5,"center"):(n=(t=o-s)-5,"right")):(o=(u[1][0]+u[2][0])/2,r=(u[1][1]+u[2][1])/2,"horizontal"===_?(i=(c=r+s)+5,"center"):(n=(t=o+s)+5,"left")),"horizontal"===_?n=t=o:i=c=r,[[o,r],[t,c]]);l.label={linePoints:c,x:n,y:i,verticalAlign:"middle",textAlign:e,inside:h}})})}var nO,iO=(u(oO,nO=ky),oO.prototype.init=function(){this.group.add(this._dataGroup)},oO.prototype.render=function(i,t,e,n){var o,r,a,s,l,u=this._dataGroup,h=i.getData(),c=this._data,p=i.coordinateSystem,d=p.dimensions,f=sO(i);h.diff(c).add(function(t){lO(aO(h,u,t,d,p),h,t,f)}).update(function(t,e){var n=c.getItemGraphicEl(e),e=rO(h,t,d,p);h.setItemGraphicEl(t,n),Kh(n,{shape:{points:e}},i,t),nc(n),lO(n,h,t,f)}).remove(function(t){t=c.getItemGraphicEl(t);u.remove(t)}).execute(),this._initialized||(this._initialized=!0,r=i,a=function(){setTimeout(function(){u.removeClipPath()})},s=(o=p).model,l=o.getRect(),o=new Fs({shape:{x:l.x,y:l.y,width:l.width,height:l.height}}),s="horizontal"===s.get("layout")?"width":"height",o.setShape(s,0),$h(o,{shape:{width:l.width,height:l.height}},r,a),o=o,u.setClipPath(o)),this._data=h},oO.prototype.incrementalPrepareRender=function(t,e,n){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},oO.prototype.incrementalRender=function(t,e,n){for(var i=e.getData(),o=e.coordinateSystem,r=o.dimensions,a=sO(e),s=t.start;s<t.end;s++){var l=aO(i,this._dataGroup,s,r,o);l.incremental=!0,lO(l,i,s,a)}},oO.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},oO.type="parallel",oO);function oO(){var t=null!==nO&&nO.apply(this,arguments)||this;return t.type=oO.type,t._dataGroup=new io,t._initialized=!1,t}function rO(t,e,n,i){for(var o,r=[],a=0;a<n.length;a++){var s=n[a],l=t.get(t.mapDimension(s),e);o=l,("category"===i.getAxis(s).type?null==o:null==o||isNaN(o))||r.push(i.dataToPoint(l,s))}return r}function aO(t,e,n,i,o){o=rO(t,n,i,o),o=new uh({shape:{points:o},z2:10});return e.add(o),t.setItemGraphicEl(n,o),o}function sO(t){t=t.get("smooth",!0);return{smooth:t=J(t=Ro(t=!0===t?.3:t))?0:t}}function lO(t,e,n,i){t.useStyle(e.getItemVisual(n,"style")),t.style.fill=null,t.setShape("smooth",i.smooth);e=e.getItemModel(n),n=e.getModel("emphasis");Ql(t,e,"lineStyle"),ql(t,n.get("focus"),n.get("blurScope"))}var uO,hO=(u(cO,uO=yy),cO.prototype.getInitialData=function(t,e){return ab(null,this,{useEncodeDefaulter:B(pO,null,this)})},cO.prototype.getRawIndicesByActiveState=function(n){var t=this.coordinateSystem,i=this.getData(),o=[];return t.eachActiveState(i,function(t,e){n===t&&o.push(i.getRawIndex(e))}),o},cO.type="series.parallel",cO.dependencies=["parallel"],cO.defaultOption={zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},cO);function cO(){var t=null!==uO&&uO.apply(this,arguments)||this;return t.type=cO.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}function pO(t){t=t.ecModel.getComponent("parallel",t.get("parallelIndex"));if(t){var n={};return E(t.dimensions,function(t){var e=+t.replace("dim","");n[t]=e}),n}}var dO=["lineStyle","opacity"],fO={seriesType:"parallel",reset:function(t,e){var n=t.coordinateSystem,o={normal:t.get(["lineStyle","opacity"]),active:t.get("activeOpacity"),inactive:t.get("inactiveOpacity")};return{progress:function(t,i){n.eachActiveState(i,function(t,e){var n=o[t];"normal"!==t||!i.hasItemOption||null!=(t=i.getItemModel(e).get(dO,!0))&&(n=t),i.ensureUniqueItemVisual(e,"style").opacity=n},t.start,t.end)}}}};function gO(t){var n;!function(t){if(t.parallel)return;var e=!1;E(t.series,function(t){t&&"parallel"===t.type&&(e=!0)}),e&&(t.parallel=[{}])}(t),E(qo((n=t).parallelAxis),function(t){var e;Y(t)&&(e=t.parallelIndex||0,(e=qo(n.parallel)[e])&&e.parallelAxisDefault&&b(t,e.parallelAxisDefault,!1))})}var yO,mO=(u(vO,yO=Iy),vO.prototype.render=function(t,e,n){this._model=t,this._api=n,this._handlers||(this._handlers={},E(_O,function(t,e){n.getZr().on(e,this._handlers[e]=B(t,this))},this)),Fy(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},vO.prototype.dispose=function(t,n){E(this._handlers,function(t,e){n.getZr().off(e,t)}),this._handlers=null},vO.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},vO.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(P({type:"parallelAxisExpand"},t))},vO.type="parallel",vO);function vO(){var t=null!==yO&&yO.apply(this,arguments)||this;return t.type=vO.type,t}var _O={mousedown:function(t){xO(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(xO(this,"click")&&e){var n=[t.offsetX,t.offsetY];if(5<Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2))return;t=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==t.behavior&&this._dispatchExpand({axisExpandWindow:t.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){var e,n;!this._mouseDownPoint&&xO(this,"mousemove")&&("jump"===(t=(n=(e=this._model).coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY])).behavior)&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===t?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===t?null:{duration:0}}))}};function xO(t,e){t=t._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var bO,wO=(u(SO,bO=yd),SO.prototype.init=function(){bO.prototype.init.apply(this,arguments),this.mergeOption({})},SO.prototype.mergeOption=function(t){var e=this.option;t&&b(e,t,!0),this._initDimensions()},SO.prototype.contains=function(t,e){t=t.get("parallelIndex");return null!=t&&e.getComponent("parallel",t)===this},SO.prototype.setAxisExpand=function(e){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(t){e.hasOwnProperty(t)&&(this.option[t]=e[t])},this)},SO.prototype._initDimensions=function(){var e=this.dimensions=[],n=this.parallelAxisIndex=[];E(R(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(t){return(t.get("parallelIndex")||0)===this.componentIndex},this),function(t){e.push("dim"+t.get("dim")),n.push(t.componentIndex)})},SO.type="parallel",SO.dependencies=["parallelAxis"],SO.layoutMode="box",SO.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},SO);function SO(){var t=null!==bO&&bO.apply(this,arguments)||this;return t.type=SO.type,t}var MO,IO=(u(TO,MO=vp),TO.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},TO);function TO(t,e,n,i,o){n=MO.call(this,t,e,n)||this;return n.type=i||"value",n.axisIndex=o,n}function CO(t,e,n,i,o,r){t=t||0;var a=n[1]-n[0];null!=o&&(o=AO(o,[0,a])),null!=r&&(r=Math.max(r,null!=o?o:0)),"all"===i&&(s=AO(s=Math.abs(e[1]-e[0]),[0,a]),o=r=AO(s,[o,r]),i=0),e[0]=AO(e[0],n),e[1]=AO(e[1],n);var s=DO(e,i);e[i]+=t;t=o||0,n=n.slice();return s.sign<0?n[0]+=t:n[1]-=t,e[i]=AO(e[i],n),n=DO(e,i),null!=o&&(n.sign!==s.sign||n.span<o)&&(e[1-i]=e[i]+s.sign*o),n=DO(e,i),null!=r&&n.span>r&&(e[1-i]=e[i]+n.sign*r),e}function DO(t,e){t=t[e]-t[1-e];return{span:Math.abs(t),sign:0<t||!(t<0)&&e?-1:1}}function AO(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var kO=E,LO=Math.min,PO=Math.max,OO=Math.floor,RO=Math.ceil,NO=vo,EO=Math.PI,zO=(BO.prototype._init=function(t,i,e){var n=t.dimensions,o=t.parallelAxisIndex;kO(n,function(t,e){var n=o[e],e=i.getComponent("parallelAxis",n),t=this._axesMap.set(t,new IO(t,hw(e),[0,0],e.get("type"),n)),n="category"===t.type;t.onBand=n&&e.get("boundaryGap"),t.inverse=e.get("inverse"),(e.axis=t).model=e,t.coordinateSystem=e.coordinateSystem=this},this)},BO.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},BO.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,o=e.pixelDimIndex,r=t[1-o],o=t[o];return n<=r&&r<=n+e.axisLength&&i<=o&&o<=i+e.layoutLength},BO.prototype.getModel=function(){return this._model},BO.prototype._updateAxesFromSeries=function(e,i){i.eachSeries(function(t){var n;e.contains(t,i)&&(n=t.getData(),kO(this.dimensions,function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,n.mapDimension(t)),uw(e.scale,e.model)},this))},this)},BO.prototype.resize=function(t,e){this._rect=rd(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},BO.prototype.getRect=function(){return this._rect},BO.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,n=["x","y"],i=["width","height"],o=t.get("layout"),r="horizontal"===o?0:1,a=e[i[r]],s=[0,a],l=this.dimensions.length,u=VO(t.get("axisExpandWidth"),s),h=VO(t.get("axisExpandCount")||0,[0,l]),c=t.get("axisExpandable")&&3<l&&h<l&&1<h&&0<u&&0<a,p=t.get("axisExpandWindow");p?(d=VO(p[1]-p[0],s),p[1]=p[0]+d):(d=VO(u*(h-1),s),(p=[u*(t.get("axisExpandCenter")||OO(l/2))-d/2])[1]=p[0]+d);t=(a-d)/(l-h);t<3&&(t=0);var d=[OO(NO(p[0]/u,1))+1,RO(NO(p[1]/u,1))-1],h=t/u*p[0];return{layout:o,pixelDimIndex:r,layoutBase:e[n[r]],layoutLength:a,axisBase:e[n[1-r]],axisLength:e[i[1-r]],axisExpandable:c,axisExpandWidth:u,axisCollapseWidth:t,axisExpandWindow:p,axisCount:l,winInnerIndices:d,axisExpandWindow0Pos:h}},BO.prototype._layoutAxes=function(){var r=this._rect,t=this._axesMap,e=this.dimensions,a=this._makeLayoutInfo(),s=a.layout;t.each(function(t){var e=[0,a.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])}),kO(e,function(t,e){var n=(a.axisExpandable?function(t,e){var n,i,o=e.layoutLength,r=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;t<l[0]?(n=t*s,i=s):t<=l[1]?(n=e.axisExpandWindow0Pos+t*r-e.axisExpandWindow[0],u=r,h=!0):(n=o-(a-1-t)*s,i=s);return{position:n,axisNameAvailableWidth:u,axisLabelShow:h,nameTruncateMaxWidth:i}}:function(t,e){e=e.layoutLength/(e.axisCount-1);return{position:e*t,axisNameAvailableWidth:e,axisLabelShow:!0}})(e,a),i={horizontal:{x:n.position,y:a.axisLength},vertical:{x:0,y:n.position}},o={horizontal:EO/2,vertical:0},e=[i[s].x+r.x,i[s].y+r.y],i=o[s],o=ni();si(o,o,i),ai(o,o,e),this._axesLayout[t]={position:e,rotation:i,transform:o,axisNameAvailableWidth:n.axisNameAvailableWidth,axisLabelShow:n.axisLabelShow,nameTruncateMaxWidth:n.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},BO.prototype.getAxis=function(t){return this._axesMap.get(t)},BO.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},BO.prototype.eachActiveState=function(e,t,n,i){null==n&&(n=0),null==i&&(i=e.count());var o=this._axesMap,r=this.dimensions,a=[],s=[];E(r,function(t){a.push(e.mapDimension(t)),s.push(o.get(t).model)});for(var l=this.hasAxisBrushed(),u=n;u<i;u++){var h=void 0;if(l){for(var h="active",c=e.getValues(a,u),p=0,d=r.length;p<d;p++)if("inactive"===s[p].getActiveState(c[p])){h="inactive";break}}else h="normal";t(h,u)}},BO.prototype.hasAxisBrushed=function(){for(var t=this.dimensions,e=this._axesMap,n=!1,i=0,o=t.length;i<o;i++)"normal"!==e.get(t[i]).model.getActiveState()&&(n=!0);return n},BO.prototype.axisCoordToPoint=function(t,e){return vc([t,0],this._axesLayout[e].transform)},BO.prototype.getAxisLayout=function(t){return S(this._axesLayout[t])},BO.prototype.getSlidedAxisExpandWindow=function(t){var e=this._makeLayoutInfo(),n=e.pixelDimIndex,i=e.axisExpandWindow.slice(),o=i[1]-i[0],r=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:i};var a,s=t[n]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",u=e.axisCollapseWidth,t=this._model.get("axisExpandSlideTriggerArea"),n=null!=t[0];return u?(n&&u&&s<o*t[0]?(l="jump",a=s-o*t[2]):n&&u&&s>o*(1-t[0])?(l="jump",a=s-o*(1-t[2])):0<=(a=s-o*t[1])&&(a=s-o*(1-t[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?CO(a,i,r,"all"):l="none"):(a=i[1]-i[0],(i=[PO(0,r[1]*s/a-a/2)])[1]=LO(r[1],i[0]+a),i[0]=i[1]-a),{axisExpandWindow:i,behavior:l}},BO);function BO(t,e,n){this.type="parallel",this._axesMap=ct(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}function VO(t,e){return LO(PO(t,e[0]),e[1])}var GO,FO={create:function(i,o){var r=[];return i.eachComponent("parallel",function(t,e){var n=new zO(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,r.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=t.getReferringComponents("parallel",dr).models[0],t.coordinateSystem=e.coordinateSystem)}),r}},HO=(u(WO,GO=yd),WO.prototype.getAreaSelectStyle=function(){return Ar([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},WO.prototype.setActiveIntervals=function(t){var e=this.activeIntervals=S(t);if(e)for(var n=e.length-1;0<=n;n--)_o(e[n])},WO.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=e.length;i<o;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"},WO);function WO(){var t=null!==GO&&GO.apply(this,arguments)||this;return t.type=WO.type,t.activeIntervals=[],t}T(HO,mw);var UO,YO=!0,XO=Math.min,ZO=Math.max,jO=Math.pow,qO=1e4,KO=6,$O=6,JO="globalPan",QO={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},tR={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},eR={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},nR=0,iR=(u(oR,UO=Gt),oR.prototype.enableBrush=function(t){return ot(this._mounted),this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},oR.prototype._doEnableBrush=function(t){var e,n,i,o=this._zr;this._enableGlobalPan||(e=o,n=JO,i=this._uid,gD(e)[n]=i),E(this._handlers,function(t,e){o.on(e,t)}),this._brushType=t.brushType,this._brushOption=b(S(eR),t,!0)},oR.prototype._doDisableBrush=function(){var t,e,n,i=this._zr;t=i,e=JO,n=this._uid,(t=gD(t))[e]===n&&(t[e]=null),E(this._handlers,function(t,e){i.off(e,t)}),this._brushType=this._brushOption=null},oR.prototype.setPanels=function(t){var e;return t&&t.length?(e=this._panels={},E(t,function(t){e[t.panelId]=S(t)})):this._panels=null,this},oR.prototype.mount=function(t){t=t||{},this._mounted=!0,this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=e.getLocalTransform(),this},oR.prototype.updateCovers=function(i){ot(this._mounted),i=L(i,function(t){return b(S(eR),t,!0)});var n="\0-brush-index-",o=this._covers,r=this._covers=[],a=this,s=this._creatingCover;return new Mx(o,i,function(t,e){return l(t.__brushOption,e)},l).add(t).update(t).remove(function(t){o[t]!==s&&a.group.remove(o[t])}).execute(),this;function l(t,e){return(null!=t.id?t.id:n+e)+"-"+t.brushType}function t(t,e){var n=i[t];null!=e&&o[e]===s?r[t]=o[e]:(n=r[t]=null!=e?(o[e].__brushOption=n,o[e]):aR(a,rR(a,n)),uR(a,n))}},oR.prototype.unmount=function(){if(this._mounted)return this.enableBrush(!1),dR(this),this._zr.remove(this.group),this._mounted=!1,this},oR.prototype.dispose=function(){this.unmount(),this.off()},oR);function oR(t){var e=UO.call(this)||this;return e._track=[],e._covers=[],e._handlers={},ot(t),e._zr=t,e.group=new io,e._uid="brushController_"+nR++,E(PR,function(t,e){this._handlers[e]=B(t,this)},e),e}function rR(t,e){var n=RR[e.brushType].createCover(t,e);return n.__brushOption=e,lR(n,e),t.group.add(n),n}function aR(t,e){var n=hR(e);return n.endCreating&&(n.endCreating(t,e),lR(e,e.__brushOption)),e}function sR(t,e){var n=e.__brushOption;hR(e).updateCoverShape(t,e,n.range,n)}function lR(t,e){var n=e.z;null==n&&(n=qO),t.traverse(function(t){t.z=n,t.z2=n})}function uR(t,e){hR(e).updateCommon(t,e),sR(t,e)}function hR(t){return RR[t.__brushOption.brushType]}function cR(t,e,n){var i,o=t._panels;if(!o)return YO;var r=t._transform;return E(o,function(t){t.isTargetByCursor(e,n,r)&&(i=t)}),i}function pR(t,e){t=t._panels;if(!t)return YO;e=e.__brushOption.panelId;return null!=e?t[e]:YO}function dR(e){var t=e._covers,n=t.length;return E(t,function(t){e.group.remove(t)},e),t.length=0,n}function fR(t,e){var n=L(t._covers,function(t){var e=t.__brushOption,t=S(e.range);return{brushType:e.brushType,panelId:e.panelId,range:t}});t.trigger("brush",{areas:n,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function gR(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function yR(e,n,t,i){var o=new io;return o.add(new Fs({name:"main",style:xR(t),silent:!0,draggable:!0,cursor:"move",drift:V(SR,e,n,o,["n","s","w","e"]),ondragend:V(fR,n,{isEnd:!0})})),E(i,function(t){o.add(new Fs({name:t.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:V(SR,e,n,o,t),ondragend:V(fR,n,{isEnd:!0})}))}),o}function mR(t,e,n,i){var o=i.brushStyle.lineWidth||0,r=ZO(o,$O),a=n[0][0],s=n[1][0],l=a-o/2,u=s-o/2,h=n[0][1],c=n[1][1],p=h-r+o/2,d=c-r+o/2,n=h-a,h=c-s,c=n+o,o=h+o;_R(t,e,"main",a,s,n,h),i.transformable&&(_R(t,e,"w",l,u,r,o),_R(t,e,"e",p,u,r,o),_R(t,e,"n",l,u,c,r),_R(t,e,"s",l,d,c,r),_R(t,e,"nw",l,u,r,r),_R(t,e,"ne",p,u,r,r),_R(t,e,"sw",l,d,r,r),_R(t,e,"se",p,d,r,r))}function vR(n,i){var t=i.__brushOption,o=t.transformable,e=i.childAt(0);e.useStyle(xR(t)),e.attr({silent:!o,cursor:o?"move":"default"}),E([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(t){var e=i.childOfName(t.join("")),t=1===t.length?wR(n,t[0]):function(t,e){e=[wR(t,e[0]),wR(t,e[1])];return"e"!==e[0]&&"w"!==e[0]||e.reverse(),e.join("")}(n,t);e&&e.attr({silent:!o,invisible:!o,cursor:o?tR[t]+"-resize":null})})}function _R(t,e,n,i,o,r,a){n=e.childOfName(n);n&&n.setShape((i=TR(t,e,[[i,o],[i+r,o+a]]),r=XO(i[0][0],i[1][0]),o=XO(i[0][1],i[1][1]),a=ZO(i[0][0],i[1][0]),i=ZO(i[0][1],i[1][1]),{x:r,y:o,width:a-r,height:i-o}))}function xR(t){return A({strokeNoScale:!0},t.brushStyle)}function bR(t,e,n,i){var o=[XO(t,n),XO(e,i)],i=[ZO(t,n),ZO(e,i)];return[[o[0],i[0]],[o[1],i[1]]]}function wR(t,e){return{left:"w",right:"e",top:"n",bottom:"s"}[_c({w:"left",e:"right",n:"top",s:"bottom"}[e],mc(t.group))]}function SR(t,e,n,i,o,r){var a=n.__brushOption,s=t.toRectRange(a.range),l=IR(e,o,r);E(i,function(t){t=QO[t];s[t[0]][t[1]]+=l[t[0]]}),a.range=t.fromRectRange(bR(s[0][0],s[1][0],s[0][1],s[1][1])),uR(e,n),fR(e,{isEnd:!1})}function MR(t,e,n,i){var o=e.__brushOption.range,r=IR(t,n,i);E(o,function(t){t[0]+=r[0],t[1]+=r[1]}),uR(t,e),fR(t,{isEnd:!1})}function IR(t,e,n){t=t.group,n=t.transformCoordToLocal(e,n),t=t.transformCoordToLocal(0,0);return[n[0]-t[0],n[1]-t[1]]}function TR(t,e,n){e=pR(t,e);return e&&e!==YO?e.clipPath(n,t._transform):S(n)}function CR(t,e,n){if(t._brushType&&!function(t,e,n){t=t._zr;return e<0||e>t.getWidth()||n<0||n>t.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,o=t._covers,r=cR(t,e,n);if(!t._dragging)for(var a=0;a<o.length;a++){var s=o[a].__brushOption;if(r&&(r===YO||s.panelId===r.panelId)&&RR[s.brushType].contain(o[a],n[0],n[1]))return}r&&i.setCursorStyle("crosshair")}}function DR(t){t=t.event;t.preventDefault&&t.preventDefault()}function AR(t,e,n){return t.childOfName("main").contain(e,n)}function kR(t,e,n,i){var o,r,a=t._creatingCover,s=t._creatingPanel,l=t._brushOption;return t._track.push(n.slice()),function(t){if((n=t._track).length){var e=n[n.length-1],t=n[0],n=e[0]-t[0],t=e[1]-t[1],t=jO(n*n+t*t,.5);return KO<t}}(t)||a?(s&&!a&&("single"===l.brushMode&&dR(t),(o=S(l)).brushType=LR(o.brushType,s),o.panelId=s===YO?null:s.panelId,a=t._creatingCover=rR(t,o),t._covers.push(a)),a&&(r=RR[LR(t._brushType,s)],a.__brushOption.range=r.getCreatingRange(TR(t,a,t._track)),i&&(aR(t,a),r.updateCommon(t,a)),sR(t,a),r={isEnd:i})):i&&"single"===l.brushMode&&l.removeOnClick&&cR(t,e,n)&&dR(t)&&(r={isEnd:i,removeOnClick:!0}),r}function LR(t,e){return"auto"===t?(ot(e&&e.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),e.defaultBrushType):t}var PR={mousedown:function(t){var e;this._dragging?OR(this,t):t.target&&t.target.draggable||(DR(t),e=this.group.transformCoordToLocal(t.offsetX,t.offsetY),this._creatingCover=null,(this._creatingPanel=cR(this,t,e))&&(this._dragging=!0,this._track=[e.slice()]))},mousemove:function(t){var e=t.offsetX,n=t.offsetY,n=this.group.transformCoordToLocal(e,n);CR(this,t,n),this._dragging&&(DR(t),(n=kR(this,t,n,!1))&&fR(this,n))},mouseup:function(t){OR(this,t)}};function OR(t,e){var n,i;t._dragging&&(DR(e),n=e.offsetX,i=e.offsetY,i=t.group.transformCoordToLocal(n,i),i=kR(t,e,i,!0),t._dragging=!1,t._track=[],t._creatingCover=null,i&&fR(t,i))}var RR={lineX:NR(0),lineY:NR(1),rect:{createCover:function(t,e){function n(t){return t}return yR({toRectRange:n,fromRectRange:n},t,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(t){t=gR(t);return bR(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(t,e,n,i){mR(t,e,n,i)},updateCommon:vR,contain:AR},polygon:{createCover:function(t,e){var n=new io;return n.add(new uh({name:"main",style:xR(e),silent:!0})),n},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new rh({name:"main",draggable:!0,drift:V(MR,t,e),ondragend:V(fR,t,{isEnd:!0})}))},updateCoverShape:function(t,e,n,i){e.childAt(0).setShape({points:TR(t,e,n)})},updateCommon:vR,contain:AR}};function NR(a){return{createCover:function(t,e){return yR({toRectRange:function(t){t=[t,[0,100]];return a&&t.reverse(),t},fromRectRange:function(t){return t[a]}},t,e,[[["w"],["e"]],[["n"],["s"]]][a])},getCreatingRange:function(t){t=gR(t);return[XO(t[0][a],t[1][a]),ZO(t[0][a],t[1][a])]},updateCoverShape:function(t,e,n,i){var o=pR(t,e),r=[n,o!==YO&&o.getLinearBrushOtherExtent?o.getLinearBrushOtherExtent(a):[0,[(r=t._zr).getWidth(),r.getHeight()][1-a]]];a&&r.reverse(),mR(t,e,r,i)},updateCommon:vR,contain:AR}}function ER(e){return e=VR(e),function(t){return wc(t,e)}}function zR(n,i){return n=VR(n),function(t){var e=null!=i?i:t,t=e?n.width:n.height,e=e?n.x:n.y;return[e,e+(t||0)]}}function BR(t,n,i){var o=VR(t);return function(t,e){return o.contain(e[0],e[1])&&!ID(t,n,i)}}function VR(t){return Li.create(t)}var GR,FR=["axisLine","axisTickLabel","axisName"],HR=(u(WR,GR=Iy),WR.prototype.init=function(t,e){GR.prototype.init.apply(this,arguments),(this._brushController=new iR(e.getZr())).on("brush",B(this._onBrush,this))},WR.prototype.render=function(t,e,n,i){var o,r,a,s;a=t,r=e,(s=i)&&"axisAreaSelect"===s.type&&r.findComponents({mainType:"parallelAxis",query:s})[0]===a||(this.axisModel=t,this.api=n,this.group.removeAll(),o=this._axisGroup,this._axisGroup=new io,this.group.add(this._axisGroup),t.get("show")&&(i=t,s=(r=e.getComponent("parallel",i.get("parallelIndex"))).coordinateSystem,e=(a=t.getAreaSelectStyle()).width,i=t.axis.dim,s=P({strokeContainThreshold:e},s.getAxisLayout(i)),i=new lC(t,s),E(FR,i.add,i),this._axisGroup.add(i.getGroup()),this._refreshBrushController(s,a,t,r,e,n),bc(o,this._axisGroup,t)))},WR.prototype._refreshBrushController=function(t,e,n,i,o,r){var a,s=n.axis.getExtent(),l=s[1]-s[0],u=Math.min(30,.1*Math.abs(l)),o=Li.create({x:s[0],y:-o/2,width:l,height:o});o.x-=u,o.width+=2*u,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:ER(o),isTargetByCursor:BR(o,r,i),getLinearBrushOtherExtent:zR(o,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers((a=(n=n).axis,L(n.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[a.dataToCoord(t[0],!0),a.dataToCoord(t[1],!0)]}})))},WR.prototype._onBrush=function(t){var e=t.areas,n=this.axisModel,i=n.axis,e=L(e,function(t){return[i.coordToData(t.range[0],!0),i.coordToData(t.range[1],!0)]});!n.option.realtime!==t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:e})},WR.prototype.dispose=function(){this._brushController.dispose()},WR.type="parallelAxis",WR);function WR(){var t=null!==GR&&GR.apply(this,arguments)||this;return t.type=WR.type,t}var UR={type:"axisAreaSelect",event:"axisAreaSelected"};var YR={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function XR(t){t.registerComponentView(mO),t.registerComponentModel(wO),t.registerCoordinateSystem("parallel",FO),t.registerPreprocessor(gO),t.registerComponentModel(HO),t.registerComponentView(HR),HT(t,"parallel",HO,YR),(t=t).registerAction(UR,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(t){t.axis.model.setActiveIntervals(e.intervals)})}),t.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(t){t.setAxisExpand(e)})})}var ZR,jR=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0},qR=(u(KR,ZR=Ss),KR.prototype.getDefaultShape=function(){return new jR},KR.prototype.buildPath=function(t,e){var n=e.extent;t.moveTo(e.x1,e.y1),t.bezierCurveTo(e.cpx1,e.cpy1,e.cpx2,e.cpy2,e.x2,e.y2),"vertical"===e.orient?(t.lineTo(e.x2+n,e.y2),t.bezierCurveTo(e.cpx2+n,e.cpy2,e.cpx1+n,e.cpy1,e.x1+n,e.y1)):(t.lineTo(e.x2,e.y2+n),t.bezierCurveTo(e.cpx2,e.cpy2+n,e.cpx1,e.cpy1+n,e.x1,e.y1+n)),t.closePath()},KR.prototype.highlight=function(){zl(this)},KR.prototype.downplay=function(){Bl(this)},KR);function KR(t){return ZR.call(this,t)||this}var $R,JR=(u(QR,$R=ky),QR.prototype.render=function(b,t,i){var e,n,o=this,r=b.getGraph(),w=this.group,a=b.layoutInfo,S=a.width,M=a.height,s=b.getData(),I=b.getData("edge"),T=b.get("orient");this._model=b,w.removeAll(),w.x=a.x,w.y=a.y,r.eachEdge(function(t){var e=new qR,n=il(e);n.dataIndex=t.dataIndex,n.seriesIndex=b.seriesIndex,n.dataType="edge";var i,o,r,a,s,l,u,h=t.getModel(),c=h.getModel("lineStyle"),p=c.get("curveness"),d=t.node1.getLayout(),f=t.node1.getModel(),g=f.get("localX"),y=f.get("localY"),m=t.node2.getLayout(),v=t.node2.getModel(),n=v.get("localX"),f=v.get("localY"),v=t.getLayout();switch(e.shape.extent=Math.max(1,v.dy),v="vertical"===(e.shape.orient=T)?(i=(null!=g?g*S:d.x)+v.sy,o=(null!=y?y*M:d.y)+d.dy,r=(null!=n?n*S:m.x)+v.ty,s=i,l=o*(1-p)+(a=null!=f?f*M:m.y)*p,u=r,o*p+a*(1-p)):(i=(null!=g?g*S:d.x)+d.dx,o=(null!=y?y*M:d.y)+v.sy,s=i*(1-p)+(r=null!=n?n*S:m.x)*p,l=o,u=i*p+r*(1-p),a=(null!=f?f*M:m.y)+v.ty),e.setShape({x1:i,y1:o,x2:r,y2:a,cpx1:s,cpy1:l,cpx2:u,cpy2:v}),e.useStyle(c.getItemStyle()),e.style.fill){case"source":e.style.fill=t.node1.getVisual("color"),e.style.decal=t.node1.getVisual("style").decal;break;case"target":e.style.fill=t.node2.getVisual("color"),e.style.decal=t.node2.getVisual("style").decal;break;case"gradient":var _=t.node1.getVisual("color"),x=t.node2.getVisual("color");"string"==typeof _&&"string"==typeof x&&(e.style.fill=new Ph(0,0,+("horizontal"===T),+("vertical"===T),[{color:_,offset:0},{color:x,offset:1}]))}c=h.getModel("emphasis");Ql(e,h,"lineStyle",function(t){return t.getItemStyle()}),w.add(e),I.setItemGraphicEl(t.dataIndex,e);h=c.get("focus");ql(e,"adjacency"===h?t.getAdjacentDataIndices():h,c.get("blurScope")),il(e).dataType="edge"}),r.eachNode(function(t){var e=t.getLayout(),n=t.getModel(),i=n.get("localX"),o=n.get("localY"),r=n.getModel("emphasis"),e=new Fs({shape:{x:null!=i?i*S:e.x,y:null!=o?o*M:e.y,width:e.dx,height:e.dy},style:n.getModel("itemStyle").getItemStyle(),z2:10});Pc(e,Oc(n),{labelFetcher:b,labelDataIndex:t.dataIndex,defaultText:t.id}),e.disableLabelAnimation=!0,e.setStyle("fill",t.getVisual("color")),e.setStyle("decal",t.getVisual("style").decal),Ql(e,n),w.add(e),s.setItemGraphicEl(t.dataIndex,e),il(e).dataType="node";n=r.get("focus");ql(e,"adjacency"===n?t.getAdjacentDataIndices():n,r.get("blurScope"))}),s.eachItemGraphicEl(function(t,n){s.getItemModel(n).get("draggable")&&(t.drift=function(t,e){o._focusAdjacencyDisabled=!0,this.shape.x+=t,this.shape.y+=e,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:b.id,dataIndex:s.getRawIndex(n),localX:this.shape.x/S,localY:this.shape.y/M})},t.ondragend=function(){o._focusAdjacencyDisabled=!1},t.draggable=!0,t.cursor="move")}),!this._data&&b.isAnimationEnabled()&&w.setClipPath((e=w.getBoundingRect(),n=b,a=function(){w.removeClipPath()},$h(r=new Fs({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}}),{shape:{width:e.width+20}},n,a),r)),this._data=b.getData()},QR.prototype.dispose=function(){},QR.type="sankey",QR);function QR(){var t=null!==$R&&$R.apply(this,arguments)||this;return t.type=QR.type,t._focusAdjacencyDisabled=!1,t}var tN,eN=(u(nN,tN=yy),nN.prototype.getInitialData=function(t,e){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var r=this.levelModels,a=0;a<o.length;a++){if(!(null!=o[a].depth&&0<=o[a].depth))throw new Error("levels[i].depth is mandatory and should be natural number");r[o[a].depth]=new ep(o[a],this,e)}if(i&&n)return DP(i,n,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,e=n.getData().getItemLayout(e);return e&&(e=e.depth,(e=n.levelModels[e])&&(t.parentModel=e)),t}),e.wrapMethod("getItemModel",function(t,e){var n=t.parentModel,e=n.getGraph().getEdgeByIndex(e).node1.getLayout();return e&&(e=e.depth,(e=n.levelModels[e])&&(t.parentModel=e)),t})}).data},nN.prototype.setNodePosition=function(t,e){t=(this.option.data||this.option.nodes)[t];t.localX=e[0],t.localY=e[1]},nN.prototype.getGraph=function(){return this.getData().graph},nN.prototype.getEdgeData=function(){return this.getGraph().edgeData},nN.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var o=this.getDataParams(t,n),r=o.data,o=o.value;return ty("nameValue",{name:r.source+" -- "+r.target,value:o,noValue:i(o)})}o=this.getGraph().getNodeByIndex(t).getLayout().value,n=this.getDataParams(t,n).data.name;return ty("nameValue",{name:null!=n?n+"":null,value:o,noValue:i(o)})},nN.prototype.optionUpdated=function(){},nN.prototype.getDataParams=function(t,e){var n=tN.prototype.getDataParams.call(this,t,e);return null==n.value&&"node"===e&&(t=this.getGraph().getNodeByIndex(t).getLayout().value,n.value=t),n},nN.type="series.sankey",nN.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},nN);function nN(){var t=null!==tN&&tN.apply(this,arguments)||this;return t.type=nN.type,t}function iN(t,u){t.eachSeriesByType("sankey",function(t){var e=t.get("nodeWidth"),n=t.get("nodeGap"),i=(l=u,rd(t.getBoxLayoutParams(),{width:l.getWidth(),height:l.getHeight()})),o=(t.layoutInfo=i).width,r=i.height,a=t.getGraph(),s=a.nodes,l=a.edges;E(s,function(t){var e=pN(t.outEdges,cN),n=pN(t.inEdges,cN),i=t.getValue()||0,i=Math.max(e,n,i);t.setLayout({value:i},!0)});i=0!==R(s,function(t){return 0===t.getLayout().value}).length?0:t.get("layoutIterations"),a=t.get("orient"),t=t.get("nodeAlign");n=n,i=i,function(t,e,n,i,o,r,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p<e.length;p++)s[p]=1;for(p=0;p<t.length;p++)l[p]=t[p].inEdges.length,0===l[p]&&u.push(t[p]);var d=-1;for(;u.length;){for(var f=0;f<u.length;f++){var g=u[f],y=g.hostGraph.data.getRawDataItem(g.dataIndex),m=null!=y.depth&&0<=y.depth;m&&y.depth>d&&(d=y.depth),g.setLayout({depth:m?y.depth:c},!0),"vertical"===r?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var v=0;v<g.outEdges.length;v++){var _=g.outEdges[v],x=e.indexOf(_);s[x]=0;x=_.node2,_=t.indexOf(x);0==--l[_]&&h.indexOf(x)<0&&h.push(x)}}++c,u=h,h=[]}for(p=0;p<s.length;p++)if(1===s[p])throw new Error("Sankey is a DAG, the original data has cycle!");var b=c-1<d?d:c-1;a&&"left"!==a&&function(t,e,n){if("right"===e){for(var i=[],o=t,r=0;o.length;){for(var a=0;a<o.length;a++){var s=o[a];s.setLayout({skNodeHeight:r},!0);for(var l=0;l<s.inEdges.length;l++){var u=s.inEdges[l];i.indexOf(u.node1)<0&&i.push(u.node1)}}o=i,i=[],++r}E(t,function(t){oN(t)||t.setLayout({depth:Math.max(0,n-t.getLayout().skNodeHeight)},!0)})}else"justify"===e&&function(t,e){E(t,function(t){oN(t)||t.outEdges.length||t.setLayout({depth:e},!0)})}(t,n)}(t,a,b);!function(t,n,i){E(t,function(t){var e=t.getLayout().depth*n;"vertical"===i?t.setLayout({y:e},!0):t.setLayout({x:e},!0)})}(t,"vertical"===r?(o-n)/b:(i-n)/b,r)}(s=s,l=l,e,o=o,r=r,a=a,t),function(t,e,n,i,o,r,a){var s=function(t,e){var n=[],i="vertical"===e?"y":"x",o=mr(t,function(t){return t.getLayout()[i]});return o.keys.sort(function(t,e){return t-e}),E(o.keys,function(t){n.push(o.buckets.get(t))}),n}(t,a);(function(t,e,i,o,r,a){var s=1/0;E(t,function(t){var e=t.length,n=0;E(t,function(t){n+=t.getLayout().value});e="vertical"===a?(o-(e-1)*r)/n:(i-(e-1)*r)/n;e<s&&(s=e)}),E(t,function(t){E(t,function(t,e){var n=t.getLayout().value*s;"vertical"===a?(t.setLayout({x:e},!0),t.setLayout({dx:n},!0)):(t.setLayout({y:e},!0),t.setLayout({dy:n},!0))})}),E(e,function(t){var e=+t.getValue()*s;t.setLayout({dy:e},!0)})})(s,e,n,i,o,a),rN(s,o,n,i,a);for(var l=1;0<r;r--)(function(t,i,o){E(t.slice().reverse(),function(t){E(t,function(t){var e,n;t.outEdges.length&&(n=pN(t.outEdges,aN,o)/pN(t.outEdges,cN),isNaN(n)&&(n=(e=t.outEdges.length)?pN(t.outEdges,sN,o)/e:0),"vertical"===o?(e=t.getLayout().x+(n-hN(t,o))*i,t.setLayout({x:e},!0)):(n=t.getLayout().y+(n-hN(t,o))*i,t.setLayout({y:n},!0)))})})})(s,l*=.99,a),rN(s,o,n,i,a),function(t,i,o){E(t,function(t){E(t,function(t){var e,n;t.inEdges.length&&(n=pN(t.inEdges,lN,o)/pN(t.inEdges,cN),isNaN(n)&&(n=(e=t.inEdges.length)?pN(t.inEdges,uN,o)/e:0),"vertical"===o?(e=t.getLayout().x+(n-hN(t,o))*i,t.setLayout({x:e},!0)):(n=t.getLayout().y+(n-hN(t,o))*i,t.setLayout({y:n},!0)))})})}(s,l,a),rN(s,o,n,i,a)}(s,l,r,o,n,i,a),function(t,e){var n="vertical"===e?"x":"y";E(t,function(t){t.outEdges.sort(function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]}),t.inEdges.sort(function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]})}),E(t,function(t){var e=0,n=0;E(t.outEdges,function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy}),E(t.inEdges,function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy})})}(s,a)})}function oN(t){t=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=t.depth&&0<=t.depth}function rN(t,l,u,h,c){var p="vertical"===c?"x":"y";E(t,function(t){var e,n;t.sort(function(t,e){return t.getLayout()[p]-e.getLayout()[p]});for(var i,o=0,r=t.length,a="vertical"===c?"dx":"dy",s=0;s<r;s++)0<(i=o-(n=t[s]).getLayout()[p])&&(e=n.getLayout()[p]+i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[p]+n.getLayout()[a]+l;if(0<(i=o-l-("vertical"===c?h:u))){e=n.getLayout()[p]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0);for(o=e,s=r-2;0<=s;--s)0<(i=(n=t[s]).getLayout()[p]+n.getLayout()[a]+l-o)&&(e=n.getLayout()[p]-i,"vertical"===c?n.setLayout({x:e},!0):n.setLayout({y:e},!0)),o=n.getLayout()[p]}})}function aN(t,e){return hN(t.node2,e)*t.getValue()}function sN(t,e){return hN(t.node2,e)}function lN(t,e){return hN(t.node1,e)*t.getValue()}function uN(t,e){return hN(t.node1,e)}function hN(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function cN(t){return t.getValue()}function pN(t,e,n){for(var i=0,o=t.length,r=-1;++r<o;){var a=+e(t[r],n);isNaN(a)||(i+=a)}return i}function dN(t){t.eachSeriesByType("sankey",function(i){var o,r,t=i.getGraph().nodes;t.length&&(o=1/0,r=-1/0,E(t,function(t){t=t.getLayout().value;t<o&&(o=t),r<t&&(r=t)}),E(t,function(t){var e=new Ok({type:"color",mappingMethod:"linear",dataExtent:[o,r],visual:i.get("color")}).mapValueToVisual(t.getLayout().value),n=t.getModel().get(["itemStyle","color"]);null!=n?(t.setVisual("color",n),t.setVisual("style",{fill:n})):(t.setVisual("color",e),t.setVisual("style",{fill:e}))}))})}fN.prototype.getInitialData=function(t,e){var n,i,o=e.getComponent("xAxis",this.get("xAxisIndex")),r=e.getComponent("yAxis",this.get("yAxisIndex")),a=o.get("type"),s=r.get("type");"category"===a?(t.layout="horizontal",n=o.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=r.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l,e=["x","y"],a="horizontal"===t.layout?0:1,s=this._baseAxisDim=e[a],e=e[1-a],o=[o,r],r=o[a].get("type"),o=o[1-a].get("type"),a=t.data;a&&i&&(l=[],E(a,function(t,e){var n;G(t)?(n=t.slice(),t.unshift(e)):G(t.value)?((n=P({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,l.push(n)}),t.data=l);t=this.defaultValueDimensions,o=[{name:s,type:kx(r),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:e,type:kx(o),dimsDef:t.slice()}];return yT(this,{coordDimensions:o,dimensionsCount:t.length+1,encodeDefaulter:V(Pd,o,this)})},fN.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},n=fN;function fN(){}var gN,yN=(u(mN,gN=yy),mN.type="series.boxplot",mN.dependencies=["xAxis","yAxis","grid"],mN.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},mN);function mN(){var t=null!==gN&&gN.apply(this,arguments)||this;return t.type=mN.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}T(yN,n,!0);var vN,_N=(u(xN,vN=ky),xN.prototype.render=function(t,e,n){var i=t.getData(),o=this.group,r=this._data;this._data||o.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(r).add(function(t){var e;i.hasValue(t)&&(e=IN(i.getItemLayout(t),i,t,a,!0),i.setItemGraphicEl(t,e),o.add(e))}).update(function(t,e){var n=r.getItemGraphicEl(e);i.hasValue(t)?(e=i.getItemLayout(t),n?(nc(n),TN(e,n,i,t)):n=IN(e,i,t,a),o.add(n),i.setItemGraphicEl(t,n)):o.remove(n)}).remove(function(t){t=r.getItemGraphicEl(t);t&&o.remove(t)}).execute(),this._data=i},xN.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(t){t&&e.remove(t)})},xN.type="boxplot",xN);function xN(){var t=null!==vN&&vN.apply(this,arguments)||this;return t.type=xN.type,t}var bN,wN=function(){},SN=(u(MN,bN=Ss),MN.prototype.getDefaultShape=function(){return new wN},MN.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();i<n.length;i++)t.moveTo(n[i][0],n[i][1]),i++,t.lineTo(n[i][0],n[i][1])},MN);function MN(t){t=bN.call(this,t)||this;return t.type="boxplotBoxPath",t}function IN(t,e,n,i,o){var r,a,s=t.ends,s=new SN({shape:{points:o?(r=i,a=t,L(s,function(t){return(t=t.slice())[r]=a.initBaseline,t})):s}});return TN(t,s,e,n,o),s}function TN(t,e,n,i,o){var r=n.hostModel;(0,Dc[o?"initProps":"updateProps"])(e,{shape:{points:t.ends}},r,i),e.useStyle(n.getItemVisual(i,"style")),e.style.strokeNoScale=!0,e.z2=100;i=n.getItemModel(i);Ql(e,i),ql(e,i.get(["emphasis","focus"]),i.get(["emphasis","blurScope"]))}function CN(t,e){}var DN=E;function AN(t){var i,o,t=(i=[],o=[],t.eachSeriesByType("boxplot",function(t){var e=t.getBaseAxis(),n=C(o,e);n<0&&(n=o.length,o[n]=e,i[n]={axis:e,seriesModels:[]}),i[n].seriesModels.push(t)}),i);DN(t,function(n){var t=n.seriesModels;t.length&&(function(t){var e,n=t.axis,i=t.seriesModels,o=i.length,r=t.boxWidthList=[],a=t.boxOffsetList=[],s=[];{var l;"category"===n.type?e=n.getBandWidth():(l=0,DN(i,function(t){l=Math.max(l,t.getData().count())}),u=n.getExtent(),Math.abs(u[1]-u[0]))}DN(i,function(t){t=t.get("boxWidth");G(t)||(t=[t,t]),s.push([mo(t[0],e)||0,mo(t[1],e)||0])});var u=.8*e-2,h=u/o*.3,c=(u-h*(o-1))/o,p=c/2-u/2;DN(i,function(t,e){a.push(p),p+=h+c,r.push(Math.min(Math.max(c,s[e][0]),s[e][1]))})}(n),DN(t,function(t,e){!function(t,o,e){var r=t.coordinateSystem,a=t.getData(),s=e/2,l="horizontal"===t.get("layout")?0:1,u=1-l,t=["x","y"],n=a.mapDimension(t[l]),i=a.mapDimensionsAll(t[u]);if(null==n||i.length<5)return;for(var h=0;h<a.count();h++){var c=a.get(n,h),p=m(c,i[2],h),d=m(c,i[0],h),f=m(c,i[1],h),g=m(c,i[3],h),y=m(c,i[4],h),c=[];v(c,f,!1),v(c,g,!0),c.push(d,f,y,g),_(c,d),_(c,y),_(c,p),a.setItemLayout(h,{initBaseline:p[u],ends:c})}function m(t,e,n){var i,e=a.get(e,n),n=[];return n[l]=t,n[u]=e,isNaN(t)||isNaN(e)?i=[NaN,NaN]:(i=r.dataToPoint(n))[l]+=o,i}function v(t,e,n){var i=e.slice(),e=e.slice();i[l]+=s,e[l]-=s,n?t.push(i,e):t.push(e,i)}function _(t,e){var n=e.slice(),e=e.slice();n[l]-=s,e[l]+=s,t.push(n,e)}}(t,n.boxOffsetList[e],n.boxWidthList[e])}))})}var kN={type:"echarts:boxplot",transform:function(t){var e=t.upstream;e.sourceFormat!==Sd&&Xo(Yo("source data is not applicable for this boxplot transform. Expect number[][]."));t=function(t,e){for(var n=[],i=[],o=(e=e||{}).boundIQR,r="none"===o||0===o,a=0;a<t.length;a++){var s=_o(t[a].slice()),l=Po(s,.25),u=Po(s,.5),h=Po(s,.75),c=s[0],p=s[s.length-1],d=(null==o?1.5:o)*(h-l),f=r?c:Math.max(c,l-d),g=r?p:Math.min(p,h+d),d=e.itemNameFormatter,y=F(d)?d({value:a}):H(d)?d.replace("{value}",a+""):a+"";n.push([y,f,l,u,h,g]);for(var m=0;m<s.length;m++){var v=s[m];(v<f||g<v)&&(v=[y,v],i.push(v))}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:t.boxData},{data:t.outliers}]}};var LN,PN=["color","borderColor"],ON=(u(RN,LN=ky),RN.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},RN.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},RN.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},RN.prototype._updateDrawMode=function(t){t=t.pipelineContext.large;null!=this._isLargeDraw&&t===this._isLargeDraw||(this._isLargeDraw=t,this._clear())},RN.prototype._renderNormal=function(i){var o=i.getData(),r=this._data,a=this.group,s=o.getLayout("isSimpleBox"),l=i.get("clip",!0),t=i.coordinateSystem,u=t.getArea&&t.getArea();this._data||a.removeAll(),o.diff(r).add(function(t){var e,n;o.hasValue(t)&&(e=o.getItemLayout(t),l&&GN(u,e)||($h(n=VN(e,0,!0),{shape:{points:e.ends}},i,t),FN(n,o,t,s),a.add(n),o.setItemGraphicEl(t,n)))}).update(function(t,e){var n=r.getItemGraphicEl(e);o.hasValue(t)?(e=o.getItemLayout(t),l&&GN(u,e)?a.remove(n):(n?(Kh(n,{shape:{points:e.ends}},i,t),nc(n)):n=VN(e),FN(n,o,t,s),a.add(n),o.setItemGraphicEl(t,n))):a.remove(n)}).remove(function(t){t=r.getItemGraphicEl(t);t&&a.remove(t)}).execute(),this._data=o},RN.prototype._renderLarge=function(t){this._clear(),XN(t,this.group);t=t.get("clip",!0)?QM(t.coordinateSystem,!1,t):null;t?this.group.setClipPath(t):this.group.removeClipPath()},RN.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),o=i.getLayout("isSimpleBox");null!=(n=t.next());){var r=VN(i.getItemLayout(n));FN(r,i,n,o),r.incremental=!0,this.group.add(r)}},RN.prototype._incrementalRenderLarge=function(t,e){XN(e,this.group,!0)},RN.prototype.remove=function(t){this._clear()},RN.prototype._clear=function(){this.group.removeAll(),this._data=null},RN.type="candlestick",RN);function RN(){var t=null!==LN&&LN.apply(this,arguments)||this;return t.type=RN.type,t}var NN,EN=function(){},zN=(u(BN,NN=Ss),BN.prototype.getDefaultShape=function(){return new EN},BN.prototype.buildPath=function(t,e){e=e.points;this.__simpleBox?(t.moveTo(e[4][0],e[4][1]),t.lineTo(e[6][0],e[6][1])):(t.moveTo(e[0][0],e[0][1]),t.lineTo(e[1][0],e[1][1]),t.lineTo(e[2][0],e[2][1]),t.lineTo(e[3][0],e[3][1]),t.closePath(),t.moveTo(e[4][0],e[4][1]),t.lineTo(e[5][0],e[5][1]),t.moveTo(e[6][0],e[6][1]),t.lineTo(e[7][0],e[7][1]))},BN);function BN(t){t=NN.call(this,t)||this;return t.type="normalCandlestickBox",t}function VN(t,e,n){var i,o=t.ends;return new zN({shape:{points:n?(i=t,L(o,function(t){return(t=t.slice())[1]=i.initBaseline,t})):o},z2:100})}function GN(t,e){for(var n=!0,i=0;i<e.ends.length;i++)if(t.contain(e.ends[i][0],e.ends[i][1])){n=!1;break}return n}function FN(t,e,n,i){var o=e.getItemModel(n);t.useStyle(e.getItemVisual(n,"style")),t.style.strokeNoScale=!0,t.__simpleBox=i,Ql(t,o)}var HN,WN=function(){},UN=(u(YN,HN=Ss),YN.prototype.getDefaultShape=function(){return new WN},YN.prototype.buildPath=function(t,e){for(var n,i=e.points,o=0;o<i.length;)this.__sign===i[o++]?(n=i[o++],t.moveTo(n,i[o++]),t.lineTo(n,i[o++])):o+=3},YN);function YN(t){t=HN.call(this,t)||this;return t.type="largeCandlestickBox",t}function XN(t,e,n){var i=t.getData().getLayout("largePoints"),o=new UN({shape:{points:i},__sign:1});e.add(o);i=new UN({shape:{points:i},__sign:-1});e.add(i),ZN(1,o,t),ZN(-1,i,t),n&&(o.incremental=!0,i.incremental=!0)}function ZN(t,e,n){t=n.get(["itemStyle",0<t?"borderColor":"borderColor0"])||n.get(["itemStyle",0<t?"color":"color0"]),n=n.getModel("itemStyle").getItemStyle(PN);e.useStyle(n),e.style.fill=null,e.style.stroke=t}var jN,qN=(u(KN,jN=yy),KN.prototype.getShadowDim=function(){return"open"},KN.prototype.brushSelector=function(t,e,n){t=e.getItemLayout(t);return t&&n.rect(t.brushRect)},KN.type="series.candlestick",KN.dependencies=["xAxis","yAxis","grid"],KN.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},KN);function KN(){var t=null!==jN&&jN.apply(this,arguments)||this;return t.type=KN.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}function $N(t){t&&G(t.series)&&E(t.series,function(t){Y(t)&&"k"===t.type&&(t.type="candlestick")})}T(qN,n,!0);var JN=["itemStyle","borderColor"],QN=["itemStyle","borderColor0"],tE=["itemStyle","color"],eE=["itemStyle","color0"],nE={seriesType:"candlestick",plan:Cy(),performRawSeries:!0,reset:function(t,e){if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var n,i;null!=(n=t.next());){var o=e.getItemModel(n),r=e.getItemLayout(n).sign,a=o.getItemStyle();a.fill=(i=r,o.get(0<i?tE:eE)),a.stroke=(r=r,o.get(0<r?JN:QN)||a.fill),P(e.ensureUniqueItemVisual(n,"style"),a)}}}}},iE="undefined"!=typeof Float32Array?Float32Array:Array,oE={seriesType:"candlestick",plan:Cy(),reset:function(t){var e,n,i,m=t.coordinateSystem,o=t.getData(),v=(r=o,n="category"===(n=(e=t).getBaseAxis()).type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/r.count()),i=mo(tt(e.get("barMaxWidth"),n),n),r=mo(tt(e.get("barMinWidth"),1),n),null!=(e=e.get("barWidth"))?mo(e,n):Math.max(Math.min(n/2,i),r)),r=["x","y"],_=o.getDimensionIndex(o.mapDimension(r[0])),r=L(o.mapDimensionsAll(r[1]),o.getDimensionIndex,o),x=r[0],b=r[1],w=r[2],S=r[3];if(o.setLayout({candleWidth:v,isSimpleBox:v<=1.3}),!(_<0||r.length<4))return{progress:t.pipelineContext.large?function(t,e){var n,i=new iE(4*t.count),o=0,r=[],a=[],s=e.getStore();for(;null!=(n=t.next());){var l=s.get(_,n),u=s.get(x,n),h=s.get(b,n),c=s.get(w,n),p=s.get(S,n);isNaN(l)||isNaN(c)||isNaN(p)?(i[o++]=NaN,o+=3):(i[o++]=rE(s,n,u,h,b),r[0]=l,r[1]=c,c=m.dataToPoint(r,null,a),i[o++]=c?c[0]:NaN,i[o++]=c?c[1]:NaN,r[1]=p,c=m.dataToPoint(r,null,a),i[o++]=c?c[1]:NaN)}e.setLayout("largePoints",i)}:function(t,e){var n,i=e.getStore();for(;null!=(n=t.next());){var o=i.get(_,n),r=i.get(x,n),a=i.get(b,n),s=i.get(w,n),l=i.get(S,n),u=Math.min(r,a),h=Math.max(r,a),c=f(u,o),p=f(h,o),d=f(s,o),u=f(l,o),h=[];g(h,p,0),g(h,c,1),h.push(y(u),y(p),y(d),y(c)),e.setItemLayout(n,{sign:rE(i,n,r,a,b),initBaseline:(a<r?p:c)[1],ends:h,brushRect:function(t,e,n){t=f(t,n),n=f(e,n);return t[0]-=v/2,n[0]-=v/2,{x:t[0],y:t[1],width:v,height:n[1]-t[1]}}(s,l,o)})}function f(t,e){var n=[];return n[0]=e,n[1]=t,isNaN(e)||isNaN(t)?[NaN,NaN]:m.dataToPoint(n)}function g(t,e,n){var i=e.slice(),e=e.slice();i[0]=yc(i[0]+v/2,1,!1),e[0]=yc(e[0]-v/2,1,!0),n?t.push(i,e):t.push(e,i)}function y(t){return t[0]=yc(t[0],1),t}}}}};function rE(t,e,n,i,o){i=!(i<n)&&(n<i||!(0<e)||t.get(o,e-1)<=i)?1:-1;return i}function aE(t,e){var n=e.rippleEffectColor||e.color;t.eachChild(function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})})}var sE,lE=(u(uE,sE=io),uE.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},uE.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),r=0;r<i;r++){var a=Cm(e,-1,-1,2,2,n);a.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var s=-r/i*t.period+t.effectOffset;a.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(s).start(),a.animateStyle(!0).when(t.period,{opacity:0}).delay(s).start(),o.add(a)}aE(o,t)},uE.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale","rippleNumber"],o=0;o<i.length;o++){var r=i[o];if(e[r]!==t[r])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}aE(n,t)},uE.prototype.highlight=function(){zl(this)},uE.prototype.downplay=function(){Bl(this)},uE.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},uE.prototype.updateData=function(t,e){var n=this,i=t.hostModel;this.childAt(0).updateData(t,e);var o=this.childAt(1),r=t.getItemModel(e),a=t.getItemVisual(e,"symbol"),s=Dm(t.getItemVisual(e,"symbolSize")),l=t.getItemVisual(e,"style"),u=l&&l.fill;o.setScale(s),o.traverse(function(t){t.setStyle("fill",u)});s=Am(t.getItemVisual(e,"symbolOffset"),s);s&&(o.x=s[0],o.y=s[1]);s=t.getItemVisual(e,"symbolRotate");o.rotation=(s||0)*Math.PI/180||0;var h={};h.showEffectOn=i.get("showEffectOn"),h.rippleScale=r.get(["rippleEffect","scale"]),h.brushType=r.get(["rippleEffect","brushType"]),h.period=1e3*r.get(["rippleEffect","period"]),h.effectOffset=e/t.count(),h.z=i.getShallow("z")||0,h.zlevel=i.getShallow("zlevel")||0,h.symbolType=a,h.color=u,h.rippleEffectColor=r.get(["rippleEffect","color"]),h.rippleNumber=r.get(["rippleEffect","number"]),this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===h.showEffectOn?(this._effectCfg?this.updateEffectAnimation(h):this.startEffectAnimation(h),this._effectCfg=h):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(t){"emphasis"===t?"render"!==h.showEffectOn&&n.startEffectAnimation(h):"normal"===t&&"render"!==h.showEffectOn&&n.stopEffectAnimation()}),this._effectCfg=h,ql(this)},uE.prototype.fadeOut=function(t){this.off("mouseover").off("mouseout"),t&&t()},uE);function uE(t,e){var n=sE.call(this)||this,i=new MM(t,e),o=new io;return n.add(i),n.add(o),n.updateData(t,e),n}var hE,cE=(u(pE,hE=ky),pE.prototype.init=function(){this._symbolDraw=new kM(lE)},pE.prototype.render=function(t,e,n){var i=t.getData(),o=this._symbolDraw;o.updateData(i,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},pE.prototype._getClipShape=function(t){var e=t.coordinateSystem,e=e&&e.getArea&&e.getArea();return t.get("clip",!0)?e:null},pE.prototype.updateTransform=function(t,e,n){var i=t.getData();this.group.dirty();n=gI("").reset(t,e,n);n.progress&&n.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout()},pE.prototype._updateGroupTransform=function(t){t=t.coordinateSystem;t&&t.getRoamTransform&&(this.group.transform=hi(t.getRoamTransform()),this.group.decomposeTransform())},pE.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0)},pE.type="effectScatter",pE);function pE(){var t=null!==hE&&hE.apply(this,arguments)||this;return t.type=pE.type,t}var dE,fE=(u(gE,dE=yy),gE.prototype.getInitialData=function(t,e){return ab(null,this,{useEncodeDefaulter:!0})},gE.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},gE.type="series.effectScatter",gE.dependencies=["grid","polar"],gE.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},gE);function gE(){var t=null!==dE&&dE.apply(this,arguments)||this;return t.type=gE.type,t.hasSymbolVisual=!0,t}var yE,mE=(u(vE,yE=io),vE.prototype.createLine=function(t,e,n){return new eP(t,e,n)},vE.prototype._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");G(i)||(i=[i,i]);var r=t.getItemVisual(e,"style"),a=n.get("color")||r&&r.stroke,r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=Cm(o,-.5,-.5,1,1,a)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",a),r.setStyle(n.getItemStyle(["color"])),r.scaleX=i[0],r.scaleY=i[1],r.setColor(a),this._symbolType=o,this._symbolScale=i,this._updateEffectAnimation(t,n,e))},vE.prototype._updateEffectAnimation=function(e,t,n){var i,o,r,a,s,l=this.childAt(1);l&&(i=this,o=e.getItemLayout(n),r=1e3*t.get("period"),a=t.get("loop"),s=t.get("constantSpeed"),t=Q(t.get("delay"),function(t){return t/e.count()*r/3}),l.ignore=!0,this._updateAnimationPoints(l,o),(r=0<s?this._getLineLength(l)/s*1e3:r)===this._period&&a===this._loop||(l.stopAnimation(),0<r&&(s=void 0,s="function"==typeof t?t(n):t,0<l.__t&&(s=-r*l.__t),l.__t=0,s=l.animate("",a).when(r,{__t:1}).delay(s).during(function(){i._updateSymbolPosition(l)}),a||s.done(function(){i.remove(l)}),s.start())),this._period=r,this._loop=a)},vE.prototype._getLineLength=function(t){return At(t.__p1,t.__cp1)+At(t.__cp1,t.__p2)},vE.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},vE.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},vE.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t,r=[t.x,t.y],a=r.slice(),s=ba,l=wa;r[0]=s(e[0],i[0],n[0],o),r[1]=s(e[1],i[1],n[1],o);s=l(e[0],i[0],n[0],o),n=l(e[1],i[1],n[1],o);t.rotation=-Math.atan2(n,s)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT<t.__t?(t.scaleY=1.05*At(a,r),1===o&&(r[0]=a[0]+(r[0]-a[0])/2,r[1]=a[1]+(r[1]-a[1])/2)):1===t.__lastT?t.scaleY=2*At(e,r):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=r[0],t.y=r[1]},vE.prototype.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var n=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,n,e)},vE);function vE(t,e,n){var i=yE.call(this)||this;return i.add(i.createLine(t,e,n)),i._updateEffectSymbol(t,e),i}var _E,xE=(u(bE,_E=io),bE.prototype._createPolyline=function(t,e,n){var i=t.getItemLayout(e),i=new uh({shape:{points:i}});this.add(i),this._updateCommonStl(t,e,n)},bE.prototype.updateData=function(t,e,n){var i=t.hostModel;Kh(this.childAt(0),{shape:{points:t.getItemLayout(e)}},i,e),this._updateCommonStl(t,e,n)},bE.prototype._updateCommonStl=function(t,e,n){var i=this.childAt(0),o=t.getItemModel(e),r=n&&n.emphasisLineStyle;n&&!t.hasItemOption||(r=o.getModel(["emphasis","lineStyle"]).getLineStyle()),i.useStyle(t.getItemVisual(e,"style")),i.style.fill=null,i.style.strokeNoScale=!0,i.ensureState("emphasis").style=r,ql(this)},bE.prototype.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},bE);function bE(t,e,n){var i=_E.call(this)||this;return i._createPolyline(t,e,n),i}var wE,SE=(u(ME,wE=mE),ME.prototype.createLine=function(t,e,n){return new xE(t,e,n)},ME.prototype._updateAnimationPoints=function(t,e){this._points=e;for(var n=[0],i=0,o=1;o<e.length;o++){var r=e[o-1],a=e[o];i+=At(r,a),n.push(i)}if(0!==i){for(o=0;o<n.length;o++)n[o]/=i;this._offsets=n,this._length=i}else this._length=0},ME.prototype._getLineLength=function(){return this._length},ME.prototype._updateSymbolPosition=function(t){var e=t.__t,n=this._points,i=this._offsets,o=n.length;if(i){var r=this._lastFrame;if(e<this._lastFramePercent){for(var a=Math.min(r+1,o-1);0<=a&&!(i[a]<=e);a--);a=Math.min(a,o-2)}else{for(a=r;a<o&&!(i[a]>e);a++);a=Math.min(a-1,o-2)}var s=(e-i[a])/(i[a+1]-i[a]),r=n[a],n=n[a+1];r&&n&&(t.x=r[0]*(1-s)+s*n[0],t.y=r[1]*(1-s)+s*n[1],s=n[0]-r[0],r=n[1]-r[1],t.rotation=-Math.atan2(r,s)-Math.PI/2,this._lastFrame=a,this._lastFramePercent=e,t.ignore=!1)}},ME);function ME(){var t=null!==wE&&wE.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}var IE,TE=function(){this.polyline=!1,this.curveness=0,this.segs=[]},CE=(u(DE,IE=Ss),DE.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},DE.prototype.getDefaultShape=function(){return new TE},DE.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o<n.length;){var r=n[o++];if(0<r){t.moveTo(n[o++],n[o++]);for(var a=1;a<r;a++)t.lineTo(n[o++],n[o++])}}else for(o=0;o<n.length;){var s,l=n[o++],u=n[o++],h=n[o++],c=n[o++];t.moveTo(l,u),0<i?(s=(l+h)/2-(u-c)*i,l=(u+c)/2-(h-l)*i,t.quadraticCurveTo(s,l,h,c)):t.lineTo(h,c)}},DE.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,o=n.curveness,r=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s<i.length;){var l=i[s++];if(0<l)for(var u=i[s++],h=i[s++],c=1;c<l;c++)if(rs(u,h,p=i[s++],d=i[s++],r,t,e))return a;a++}else for(a=0,s=0;s<i.length;){var u=i[s++],h=i[s++],p=i[s++],d=i[s++];if(0<o){if(as(u,h,(u+p)/2-(h-d)*o,(h+d)/2-(p-u)*o,p,d,r,t,e))return a}else if(rs(u,h,p,d,r,t,e))return a;a++}return-1},DE);function DE(t){return IE.call(this,t)||this}var AE=(kE.prototype.isPersistent=function(){return!this._incremental},kE.prototype.updateData=function(t){this.group.removeAll();var e=new CE({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},kE.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),5e5<t.count()?(this._incremental||(this._incremental=new Yh({silent:!0})),this.group.add(this._incremental)):this._incremental=null},kE.prototype.incrementalUpdate=function(t,e){var n=new CE;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},kE.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},kE.prototype._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var o,t=t.getVisual("style");t&&t.stroke&&e.setStyle("stroke",t.stroke),e.setStyle("fill",null),n||((o=il(e)).seriesIndex=i.seriesIndex,e.on("mousemove",function(t){o.dataIndex=null;t=e.findDataIndex(t.offsetX,t.offsetY);0<t&&(o.dataIndex=t+e.__startIndex)}))},kE.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},kE);function kE(){this.group=new io}var LE,PE={seriesType:"lines",plan:Cy(),reset:function(f){var g=f.coordinateSystem,y=f.get("polyline"),m=f.pipelineContext.large;return{progress:function(t,e){var n=[];if(m){var i=void 0,o=t.end-t.start;if(y){for(var r=0,a=t.start;a<t.end;a++)r+=f.getLineCoordsCount(a);i=new Float32Array(o+2*r)}else i=new Float32Array(4*o);for(var s=0,l=[],a=t.start;a<t.end;a++){var u=f.getLineCoords(a,n);y&&(i[s++]=u);for(var h=0;h<u;h++)l=g.dataToPoint(n[h],!1,l),i[s++]=l[0],i[s++]=l[1]}e.setLayout("linesPoints",i)}else for(a=t.start;a<t.end;a++){var c=e.getItemModel(a),u=f.getLineCoords(a,n),p=[];if(y)for(var d=0;d<u;d++)p.push(g.dataToPoint(n[d]));else{p[0]=g.dataToPoint(n[0]),p[1]=g.dataToPoint(n[1]);c=c.get(["lineStyle","curveness"]);+c&&(p[2]=[(p[0][0]+p[1][0])/2-(p[0][1]-p[1][1])*c,(p[0][1]+p[1][1])/2-(p[1][0]-p[0][0])*c])}e.setItemLayout(a,p)}}}}},OE=(u(RE,LE=ky),RE.prototype.render=function(e,t,n){var i,o=e.getData(),r=this._updateLineDraw(o,e),a=e.get("zlevel"),s=e.get(["effect","trailLength"]),l=n.getZr(),n="svg"===l.painter.getType();n||l.painter.getLayer(a).clear(!0),null==this._lastZlevel||n||l.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(e)&&s&&(i=!1,t.eachSeries(function(t){t!==e&&t.get("zlevel")===a&&(i=!0)}),i&&console.warn("Lines with trail effect should have an individual zlevel"),n||l.configLayer(a,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(s/10+.9,1),0)})),r.updateData(o);o=e.get("clip",!0)&&QM(e.coordinateSystem,!1,e);o?this.group.setClipPath(o):this.group.removeClipPath(),this._lastZlevel=a,this._finished=!0},RE.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},RE.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},RE.prototype.updateTransform=function(t,e,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};e=PE.reset(t,e,n);e.progress&&e.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},RE.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),o=!!e.get("polyline"),e=e.pipelineContext.large;return i&&e&&console.warn("Large lines not support effect"),n&&i===this._hasEffet&&o===this._isPolyline&&e===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=e?new AE:new iP(o?i?SE:xE:i?mE:eP),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=e),this.group.add(n.group),n},RE.prototype._showEffect=function(t){return!!t.get(["effect","show"])},RE.prototype._clearLayer=function(t){t=t.getZr();"svg"===t.painter.getType()||null==this._lastZlevel||t.painter.getLayer(this._lastZlevel).clear(!0)},RE.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},RE.prototype.dispose=function(t,e){this.remove(t,e)},RE.type="lines",RE);function RE(){var t=null!==LE&&LE.apply(this,arguments)||this;return t.type=RE.type,t}var NE="undefined"==typeof Uint32Array?Array:Uint32Array,EE="undefined"==typeof Float64Array?Array:Float64Array;function zE(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),t.data=L(e,function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),M([e,t[0],t[1]])}))}var BE,VE=(u(GE,BE=yy),GE.prototype.init=function(t){t.data=t.data||[],zE(t);var e=this._processFlatCoordsArray(t.data);this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count)),BE.prototype.init.apply(this,arguments)},GE.prototype.mergeOption=function(t){var e;zE(t),t.data&&(e=this._processFlatCoordsArray(t.data),this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset,e.flatCoords&&(t.data=new Float32Array(e.count))),BE.prototype.mergeOption.apply(this,arguments)},GE.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=pt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=pt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},GE.prototype._getCoordsFromItemModel=function(t){t=this.getData().getItemModel(t),t=t.option instanceof Array?t.option:t.getShallow("coords");if(1,!(t instanceof Array&&0<t.length&&t[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(t)+". Lines must have 2d coords array in data item.");return t},GE.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},GE.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],o=0;o<i;o++)e[o]=e[o]||[],e[o][0]=this._flatCoords[n+2*o],e[o][1]=this._flatCoords[n+2*o+1];return i}for(var r=this._getCoordsFromItemModel(t),o=0;o<r.length;o++)e[o]=e[o]||[],e[o][0]=r[o][0],e[o][1]=r[o][1];return r.length},GE.prototype._processFlatCoordsArray=function(t){var e=0;if(this._flatCoords&&(e=this._flatCoords.length),"number"!=typeof t[0])return{flatCoordsOffset:null,flatCoords:null,count:t.length};for(var n=t.length,i=new NE(n),o=new EE(n),r=0,a=0,s=0,l=0;l<n;){s++;var u=t[l++];i[a++]=r+e,i[a++]=u;for(var h=0;h<u;h++){var c=t[l++],p=t[l++];if(o[r++]=c,o[r++]=p,n<l)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(i.buffer,0,a),flatCoords:o,count:s}},GE.prototype.getInitialData=function(t,e){if(1,!sf.get(t.coordinateSystem))throw new Error("Unkown coordinate system "+t.coordinateSystem);var o=new $x(["value"],this);return o.hasItemOption=!1,o.initData(t.data,[],function(t,e,n,i){if(t instanceof Array)return NaN;o.hasItemOption=!0;t=t.value;return null!=t?t instanceof Array?t[i]:t:void 0}),o},GE.prototype.formatTooltip=function(t,e,n){var i=this.getData().getItemModel(t),o=i.get("name");if(o)return o;t=i.get("fromName"),o=i.get("toName"),i=[];return null!=t&&i.push(t),null!=o&&i.push(o),ty("nameValue",{name:i.join(" > ")})},GE.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},GE.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},GE.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},GE.type="series.lines",GE.dependencies=["grid","polar","geo","calendar"],GE.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},GE);function GE(){var t=null!==BE&&BE.apply(this,arguments)||this;return t.type=GE.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}function FE(t){return t=!(t instanceof Array)?[t,t]:t}var HE={seriesType:"lines",reset:function(t){var e=FE(t.get("symbol")),n=FE(t.get("symbolSize")),t=t.getData();return t.setVisual("fromSymbol",e&&e[0]),t.setVisual("toSymbol",e&&e[1]),t.setVisual("fromSymbolSize",n&&n[0]),t.setVisual("toSymbolSize",n&&n[1]),{dataEach:t.hasItemOption?function(t,e){var n=FE((i=t.getItemModel(e)).getShallow("symbol",!0)),i=FE(i.getShallow("symbolSize",!0));n[0]&&t.setItemVisual(e,"fromSymbol",n[0]),n[1]&&t.setItemVisual(e,"toSymbol",n[1]),i[0]&&t.setItemVisual(e,"fromSymbolSize",i[0]),i[1]&&t.setItemVisual(e,"toSymbolSize",i[1])}:null}}};var WE=(UE.prototype.update=function(t,e,n,i,o,r){var a=this._getBrush(),s=this._getGradient(o,"inRange"),l=this._getGradient(o,"outOfRange"),u=this.pointSize+this.blurSize,o=this.canvas,h=o.getContext("2d"),c=t.length;o.width=e,o.height=n;for(var p=0;p<c;++p){var d=t[p],f=d[0],g=d[1],y=i(d[2]);h.globalAlpha=y,h.drawImage(a,f-u,g-u)}if(!o.width||!o.height)return o;for(var n=h.getImageData(0,0,o.width,o.height),m=n.data,v=0,_=m.length,x=this.minOpacity,b=this.maxOpacity-x;v<_;){var w,y=m[v+3]/256,S=4*Math.floor(255*y);0<y?(w=r(y)?s:l,0<y&&(y=y*b+x),m[v++]=w[S],m[v++]=w[1+S],m[v++]=w[2+S],m[v++]=w[3+S]*y*256):v+=4}return h.putImageData(n,0,0),o},UE.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=D()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},UE.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,a=0;a<256;a++)t[e](a/255,!0,o),i[r++]=o[0],i[r++]=o[1],i[r++]=o[2],i[r++]=o[3];return i},UE);function UE(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=D();this.canvas=t}function YE(t){t=t.dimensions;return"lng"===t[0]&&"lat"===t[1]}var XE,ZE=(u(jE,XE=ky),jE.prototype.render=function(n,t,e){var i;if(t.eachComponent("visualMap",function(e){e.eachTargetSeries(function(t){t===n&&(i=e)})}),1,!i)throw new Error("Heatmap must use with visualMap");this.group.removeAll(),this._incrementalDisplayable=null;t=n.coordinateSystem;"cartesian2d"===t.type||"calendar"===t.type?this._renderOnCartesianAndCalendar(n,e,0,n.getData().count()):YE(t)&&this._renderOnGeo(t,n,i,e)},jE.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},jE.prototype.incrementalRender=function(t,e,n,i){var o=e.coordinateSystem;o&&(YE(o)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},jE.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,o){var r,a,s,l,u=t.coordinateSystem;if(tI(u,"cartesian2d")){var h=u.getAxis("x"),c=u.getAxis("y");if(1,"category"!==h.type||"category"!==c.type)throw new Error("Heatmap on cartesian must have two category axes");if(!h.onBand||!c.onBand)throw new Error("Heatmap on cartesian must have two axes with boundaryGap true");r=h.getBandWidth(),a=c.getBandWidth(),s=h.scale.getExtent(),l=c.scale.getExtent()}for(var p=this.group,d=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),m=Oc(t),v=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),x=tI(u,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],b=n;b<i;b++){var w=void 0,S=d.getItemVisual(b,"style");if(tI(u,"cartesian2d")){var M=d.get(x[0],b),I=d.get(x[1],b);if(isNaN(d.get(x[2],b))||M<s[0]||M>s[1]||I<l[0]||I>l[1])continue;I=u.dataToPoint([M,I]),w=new Fs({shape:{x:Math.floor(Math.round(I[0])-r/2),y:Math.floor(Math.round(I[1])-a/2),width:Math.ceil(r),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(x[1],b)))continue;w=new Fs({z2:1,shape:u.dataToRect([d.get(x[0],b)]).contentShape,style:S})}I=d.getItemModel(b);d.hasItemOption&&(f=(T=I.getModel("emphasis")).getModel("itemStyle").getItemStyle(),g=I.getModel(["blur","itemStyle"]).getItemStyle(),y=I.getModel(["select","itemStyle"]).getItemStyle(),v=T.get("focus"),_=T.get("blurScope"),m=Oc(I));var T=t.getRawValue(b),I="-";T&&null!=T[2]&&(I=T[2]+""),Pc(w,m,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:I}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,ql(w,v,_),(w.incremental=o)&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},jE.prototype._renderOnGeo=function(i,t,e,n){var o=e.targetVisuals.inRange,r=e.targetVisuals.outOfRange,a=t.getData(),s=this._hmLayer||this._hmLayer||new WE;s.blurSize=t.get("blurSize"),s.pointSize=t.get("pointSize"),s.minOpacity=t.get("minOpacity"),s.maxOpacity=t.get("maxOpacity");var l=i.getViewRect().clone(),u=i.getRoamTransform();l.applyTransform(u);var h,c,p,d,f,g,y,m=Math.max(l.x,0),v=Math.max(l.y,0),_=Math.min(l.width+l.x,n.getWidth()),t=Math.min(l.height+l.y,n.getHeight()),u=_-m,l=t-v,n=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],_=a.mapArray(n,function(t,e,n){e=i.dataToPoint([t,e]);return e[0]-=m,e[1]-=v,e.push(n),e}),t=e.getExtent(),e="visualMap.continuous"===e.type?(a=t,y=e.option.range,n=a[1]-a[0],y=[(y[0]-a[0])/n,(y[1]-a[0])/n],function(t){return t>=y[0]&&t<=y[1]}):(h=t,c=e.getPieceList(),p=e.option.selected,d=h[1]-h[0],f=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/d,(t.interval[1]-h[0])/d]}})).length,g=0,function(t){for(var e,n=g;n<f;n++)if((e=c[n].interval)[0]<=t&&t<=e[1]){g=n;break}if(n===f)for(n=g-1;0<=n;n--)if((e=c[n].interval)[0]<=t&&t<=e[1]){g=n;break}return 0<=n&&n<f&&p[n]});s.update(_,u,l,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:r.color.getColorMapper()},e);s=new Ps({style:{width:u,height:l,x:m,y:v,image:s.canvas},silent:!0});this.group.add(s)},jE.type="heatmap",jE);function jE(){var t=null!==XE&&XE.apply(this,arguments)||this;return t.type=jE.type,t}var qE,KE=(u($E,qE=yy),$E.prototype.getInitialData=function(t,e){return ab(null,this,{generateCoord:"value"})},$E.prototype.preventIncremental=function(){var t=sf.get(this.get("coordinateSystem"));if(t&&t.dimensions)return"lng"===t.dimensions[0]&&"lat"===t.dimensions[1]},$E.type="series.heatmap",$E.dependencies=["grid","geo","calendar"],$E.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},$E);function $E(){var t=null!==qE&&qE.apply(this,arguments)||this;return t.type=$E.type,t}var JE,QE=["itemStyle","borderWidth"],tz=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],ez=new Du,nz=(u(iz,JE=ky),iz.prototype.render=function(t,e,n){var o=this.group,r=t.getData(),a=this._data,i=t.coordinateSystem,s=i.getBaseAxis().isHorizontal(),l=i.master.getRect(),u={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:i,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:tz[+s],categoryDim:tz[1-+s]};return r.diff(a).add(function(t){var e,n;r.hasValue(t)&&(n=cz(r,t),e=oz(r,t,n,u),n=fz(r,u,e),r.setItemGraphicEl(t,n),o.add(n),_z(n,u,e))}).update(function(t,e){var n,i=a.getItemGraphicEl(e);r.hasValue(t)?(n=cz(r,t),e=oz(r,t,n,u),n=yz(r,e),i&&n!==i.__pictorialShapeStr&&(o.remove(i),r.setItemGraphicEl(t,null),i=null),i?function(t,e,n){var i=n.animationModel,o=n.dataIndex;Kh(t.__pictorialBundle,{x:n.bundlePosition[0],y:n.bundlePosition[1]},i,o),(n.symbolRepeat?sz:lz)(t,e,n,!0);uz(t,n,!0),hz(t,e,n,!0)}(i,u,e):i=fz(r,u,e,!0),r.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=e,o.add(i),_z(i,u,e)):o.remove(i)}).remove(function(t){var e=a.getItemGraphicEl(t);e&&gz(a,t,e.__pictorialSymbolMeta.animationModel,e)}).execute(),this._data=r,this.group},iz.prototype.remove=function(e,t){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(t){gz(i,il(t).dataIndex,e,t)}):n.removeAll()},iz.type="pictorialBar",iz);function iz(){var t=null!==JE&&JE.apply(this,arguments)||this;return t.type=iz.type,t}function oz(t,e,n,i){var o=t.getItemLayout(e),r=n.get("symbolRepeat"),a=n.get("symbolClip"),s=n.get("symbolPosition")||"start",l=(n.get("symbolRotate")||0)*Math.PI/180||0,u=n.get("symbolPatternSize")||2,h=n.isAnimationEnabled(),h={dataIndex:e,layout:o,itemModel:n,symbolType:t.getItemVisual(e,"symbol")||"circle",style:t.getItemVisual(e,"style"),symbolClip:a,symbolRepeat:r,symbolRepeatDirection:n.get("symbolRepeatDirection"),symbolPatternSize:u,rotation:l,animationModel:h?n:null,hoverScale:h&&n.get(["emphasis","scale"]),z2:n.getShallow("z",!0)||0};!function(t,e,n,i,o){var r=i.valueDim,a=t.get("symbolBoundingData"),s=i.coordSys.getOtherAxis(i.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-(n[r.wh]<=0);l=G(a)?((t=[rz(s,a[0])-l,rz(s,a[1])-l])[1]<t[0]&&t.reverse(),t[u]):null!=a?rz(s,a)-l:e?i.coordSysExtent[r.index][u]-l:n[r.wh];o.boundingLength=l,e&&(o.repeatCutLength=n[r.wh]);o.pxSign=0<l?1:l<0?-1:0}(n,r,o,i,h),function(t,e,n,i,o,r,a,s,l){var u=s.valueDim,h=s.categoryDim,n=Math.abs(n[h.wh]),e=t.getItemVisual(e,"symbolSize");e=G(e)?e.slice():null==e?["100%","100%"]:[e,e];e[h.index]=mo(e[h.index],n),e[u.index]=mo(e[u.index],i?n:Math.abs(o)),l.symbolSize=e,(l.symbolScale=[e[0]/a,e[1]/a])[u.index]*=(s.isHorizontal?-1:1)*r}(t,e,o,r,h.boundingLength,h.pxSign,u,i,h),function(t,e,n,i,o){t=t.get(QE)||0;t&&(ez.attr({scaleX:e[0],scaleY:e[1],rotation:n}),ez.updateTransform(),t/=ez.getLineScale(),t*=e[i.valueDim.index]);o.valueLineWidth=t}(n,h.symbolScale,l,i,h);u=h.symbolSize,l=Am(n.get("symbolOffset"),u);return function(t,e,n,i,o,r,a,s,l,u,h){var c=u.categoryDim,p=u.valueDim,d=h.pxSign,f=Math.max(e[p.index]+a,0),g=f;{var y,m,v;i&&(y=Math.abs(s),v=Q(t.get("symbolMargin"),"15%")+"",m=!1,v.lastIndexOf("!")===v.length-1&&(m=!0,v=v.slice(0,v.length-1)),_=mo(v,e[p.index]),a=Math.max(f+2*_,0),t=m?0:2*_,v=No(i),e=v?i:xz((y+t)/a),_=(y-e*f)/2/(m?e:Math.max(e-1,1)),a=f+2*_,t=m?0:2*_,v||"fixed"===i||(e=l?xz((Math.abs(l)+t)/a):0),g=e*a-t,h.repeatTimes=e,h.symbolMargin=_)}var _=d*(g/2),g=h.pathPosition=[];g[c.index]=n[c.wh]/2,g[p.index]="start"===r?_:"end"===r?s-_:s/2,o&&(g[0]+=o[0],g[1]+=o[1]);o=h.bundlePosition=[];o[c.index]=n[c.xy],o[p.index]=n[p.xy];o=h.barRectShape=P({},n);o[p.wh]=d*Math.max(Math.abs(n[p.wh]),Math.abs(g[p.index]+_)),o[c.wh]=n[c.wh];h=h.clipShape={};h[c.xy]=-n[c.xy],h[c.wh]=u.ecSize[c.wh],h[p.xy]=0,h[p.wh]=n[p.wh]}(n,u,o,r,l,s,h.valueLineWidth,h.boundingLength,h.repeatCutLength,i,h),h}function rz(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function az(t){var e=t.symbolPatternSize,e=Cm(t.symbolType,-e/2,-e/2,e,e);return e.attr({culling:!0}),"image"!==e.type&&e.setStyle({strokeNoScale:!0}),e}function sz(t,e,o,n){var i=t.__pictorialBundle,r=o.symbolSize,a=o.valueLineWidth,s=o.pathPosition,l=e.valueDim,u=o.repeatTimes||0,h=0,c=r[e.valueDim.index]+a+2*o.symbolMargin;for(mz(t,function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h<u?vz(t,null,f(h),o,n):vz(t,null,{scaleX:0,scaleY:0},o,n,function(){i.remove(t)}),h++});h<u;h++){var p=az(o);p.__pictorialAnimationIndex=h,p.__pictorialRepeatTimes=u,i.add(p);var d=f(h);vz(p,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},o,n)}function f(t){var e=s.slice(),n=o.pxSign,i=t;return("start"===o.symbolRepeatDirection?0<n:n<0)&&(i=u-1-t),e[l.index]=c*(i-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:o.symbolScale[0],scaleY:o.symbolScale[1],rotation:o.rotation}}}function lz(t,e,n,i){var o=t.__pictorialBundle,r=t.__pictorialMainPath;r?vz(r,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(r=t.__pictorialMainPath=az(n),o.add(r),vz(r,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function uz(t,e,n){var i=P({},e.barRectShape),o=t.__pictorialBarRect;o?vz(o,null,{shape:i},e,n):((o=t.__pictorialBarRect=new Fs({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(o))}function hz(t,e,n,i){var o,r,a,s;n.symbolClip&&(o=t.__pictorialClipPath,r=P({},n.clipShape),a=e.valueDim,s=n.animationModel,e=n.dataIndex,o?Kh(o,{shape:r},s,e):(r[a.wh]=0,o=new Fs({shape:r}),t.__pictorialBundle.setClipPath(o),t.__pictorialClipPath=o,(t={})[a.wh]=n.clipShape[a.wh],Dc[i?"updateProps":"initProps"](o,{shape:t},s,e)))}function cz(t,e){e=t.getItemModel(e);return e.getAnimationDelayParams=pz,e.isAnimationEnabled=dz,e}function pz(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function dz(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function fz(t,e,n,i){var o=new io,r=new io;return o.add(r),(o.__pictorialBundle=r).x=n.bundlePosition[0],r.y=n.bundlePosition[1],n.symbolRepeat?sz(o,e,n):lz(o,0,n),uz(o,n,i),hz(o,e,n,i),o.__pictorialShapeStr=yz(t,n),o.__pictorialSymbolMeta=n,o}function gz(t,e,n,i){var o=i.__pictorialBarRect;o&&o.removeTextContent();var r=[];mz(i,function(t){r.push(t)}),i.__pictorialMainPath&&r.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),E(r,function(t){Qh(t,{scaleX:0,scaleY:0},n,e,function(){i.parent&&i.parent.remove(i)})}),t.setItemGraphicEl(e,null)}function yz(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function mz(e,n,i){E(e.__pictorialBundle.children(),function(t){t!==e.__pictorialBarRect&&n.call(i,t)})}function vz(t,e,n,i,o,r){e&&t.attr(e),i.symbolClip&&!o?n&&t.attr(n):n&&Dc[o?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,r)}function _z(t,e,n){var i=n.dataIndex,o=n.itemModel,r=o.getModel("emphasis"),a=r.getModel("itemStyle").getItemStyle(),s=o.getModel(["blur","itemStyle"]).getItemStyle(),l=o.getModel(["select","itemStyle"]).getItemStyle(),u=o.getShallow("cursor"),h=r.get("focus"),c=r.get("blurScope"),p=r.get("scale");mz(t,function(t){t instanceof Ps?(e=t.style,t.useStyle(P({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))):t.useStyle(n.style);var e=t.ensureState("emphasis");e.style=a,p&&(e.scaleX=1.1*t.scaleX,e.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2});r=e.valueDim.posDesc[+(0<n.boundingLength)];Pc(t.__pictorialBarRect,Oc(o),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:bM(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:r}),ql(t,h,c)}function xz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var bz,wz=(u(Sz,bz=Zy),Sz.prototype.getInitialData=function(t){return t.stack=null,bz.prototype.getInitialData.apply(this,arguments)},Sz.type="series.pictorialBar",Sz.dependencies=["grid"],Sz.defaultOption=rp(Zy.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),Sz);function Sz(){var t=null!==bz&&bz.apply(this,arguments)||this;return t.type=Sz.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}var Mz,Iz=(u(Tz,Mz=ky),Tz.prototype.render=function(x,t,e){var b=x.getData(),w=this,S=this.group,M=x.getLayerSeries(),n=b.getLayout("layoutInfo"),i=n.rect,n=n.boundaryGap;function o(t){return t.name}S.x=0,S.y=i.y+n[0];var n=new Mx(this._layersSeries||[],M,o,o),I=[];function r(t,e,n){var i=w._layers;if("remove"!==t){for(var o,r=[],a=[],s=M[e].indices,l=0;l<s.length;l++){var u=b.getItemLayout(s[l]),h=u.x,c=u.y0,u=u.y;r.push(h,c),a.push(h,c+u),o=b.getItemVisual(s[l],"style")}var p,d,f,g,y=b.getItemLayout(s[0]),m=x.getModel("label").get("margin"),v=x.getModel("emphasis");"add"===t?(_=I[e]=new io,p=new qM({shape:{points:r,stackedOnPoints:a,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),_.add(p),S.add(_),x.isAnimationEnabled()&&p.setClipPath((d=p.getBoundingRect(),f=x,g=function(){p.removeClipPath()},$h(t=new Fs({shape:{x:d.x-10,y:d.y-10,width:0,height:d.height+20}}),{shape:{x:d.x-50,width:d.width+100,height:d.height+20}},f,g),t))):(_=i[n],p=_.childAt(0),S.add(_),I[e]=_,Kh(p,{shape:{points:r,stackedOnPoints:a}},x),nc(p)),Pc(p,Oc(x),{labelDataIndex:s[l-1],defaultText:b.getName(s[l-1]),inheritColor:o.fill},{normal:{verticalAlign:"middle"}}),p.setTextConfig({position:null,local:!0});var _=p.getTextContent();_&&(_.x=y.x-m,_.y=y.y0+y.y/2),p.useStyle(o),b.setItemGraphicEl(e,p),Ql(p,x),ql(p,v.get("focus"),v.get("blurScope"))}else S.remove(i[e])}n.add(B(r,this,"add")).update(B(r,this,"update")).remove(B(r,this,"remove")).execute(),this._layersSeries=M,this._layers=I},Tz.type="themeRiver",Tz);function Tz(){var t=null!==Mz&&Mz.apply(this,arguments)||this;return t.type=Tz.type,t._layers=[],t}var Cz,Dz=(u(Az,Cz=yy),Az.prototype.init=function(t){Cz.prototype.init.apply(this,arguments),this.legendVisualProvider=new mT(B(this.getData,this),B(this.getRawData,this))},Az.prototype.fixData=function(t){var e=t.length,n={},i=mr(t,function(t){return n.hasOwnProperty(t[0]+"")||(n[t[0]+""]=-1),t[2]}),o=[];i.buckets.each(function(t,e){o.push({name:e,dataList:t})});for(var r=o.length,a=0;a<r;++a){for(var s=o[a].name,l=0;l<o[a].dataList.length;++l){var u=o[a].dataList[l][0]+"";n[u]=a}for(u in n)n.hasOwnProperty(u)&&n[u]!==a&&(n[u]=a,t[e]=[u,0,s],e++)}return t},Az.prototype.getInitialData=function(t,e){for(var n=this.getReferringComponents("singleAxis",dr).models[0].get("type"),t=R(t.data,function(t){return void 0!==t[2]}),i=this.fixData(t||[]),o=[],r=this.nameMap=ct(),a=0,s=0;s<i.length;++s)o.push(i[s][2]),r.get(i[s][2])||(r.set(i[s][2],a),a++);n=Qx(i,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:kx(n)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,n=new $x(n,this);return n.initData(i),n},Az.prototype.getLayerSeries=function(){for(var n=this.getData(),t=n.count(),e=[],i=0;i<t;++i)e[i]=i;var o=n.mapDimension("single"),r=mr(e,function(t){return n.get("name",t)}),a=[];return r.buckets.each(function(t,e){t.sort(function(t,e){return n.get(o,t)-n.get(o,e)}),a.push({name:e,indices:t})}),a},Az.prototype.getAxisTooltipData=function(t,e,n){G(t)||(t=t?[t]:[]);for(var i,o=this.getData(),r=this.getLayerSeries(),a=[],s=r.length,l=0;l<s;++l){for(var u=Number.MAX_VALUE,h=-1,c=r[l].indices.length,p=0;p<c;++p){var d=o.get(t[0],r[l].indices[p]),f=Math.abs(d-e);f<=u&&(i=d,u=f,h=r[l].indices[p])}a.push(h)}return{dataIndices:a,nestestValue:i}},Az.prototype.formatTooltip=function(t,e,n){var i=this.getData();return ty("nameValue",{name:i.getName(t),value:i.get(i.mapDimension("value"),t)})},Az.type="series.themeRiver",Az.dependencies=["singleAxis"],Az.defaultOption={zlevel:0,z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},Az);function Az(){var t=null!==Cz&&Cz.apply(this,arguments)||this;return t.type=Az.type,t}function kz(t,e){t.eachSeriesByType("themeRiver",function(t){var e=t.getData(),n=t.coordinateSystem,i={},o=n.getRect();i.rect=o;var r=t.get("boundaryGap"),n=n.getAxis();i.boundaryGap=r,"horizontal"===n.orient?(r[0]=mo(r[0],o.height),r[1]=mo(r[1],o.height),Lz(e,t,o.height-r[0]-r[1])):(r[0]=mo(r[0],o.width),r[1]=mo(r[1],o.width),Lz(e,t,o.width-r[0]-r[1])),e.setLayout("layoutInfo",i)})}function Lz(n,t,e){if(n.count())for(var i,o=t.coordinateSystem,r=t.getLayerSeries(),a=n.mapDimension("single"),s=n.mapDimension("value"),l=L(r,function(t){return L(t.indices,function(t){var e=o.dataToPoint(n.get(a,t));return e[1]=n.get(s,t),e})}),t=function(t){for(var e=t.length,n=t[0].length,i=[],o=[],r=0,a=0;a<n;++a){for(var s=0,l=0;l<e;++l)s+=t[l][a][1];r<s&&(r=s),i.push(s)}for(var u=0;u<n;++u)o[u]=(r-i[u])/2;for(var h=r=0;h<n;++h){var c=i[h]+o[h];r<c&&(r=c)}return{y0:o,max:r}}(l),u=t.y0,h=e/t.max,c=r.length,p=r[0].indices.length,d=0;d<p;++d){i=u[d]*h,n.setItemLayout(r[0].indices[d],{layerIndex:0,x:l[0][d][0],y0:i,y:l[0][d][1]*h});for(var f=1;f<c;++f)i+=l[f-1][d][1]*h,n.setItemLayout(r[f].indices[d],{layerIndex:f,x:l[f][d][0],y0:i,y:l[f][d][1]*h})}}var Pz,Oz=(u(Rz,Pz=qu),Rz.prototype.updateData=function(t,e,n,i,o){(this.node=e).piece=this,n=n||this._seriesModel,i=i||this._ecModel;var r=this;il(r).dataIndex=e.dataIndex;var a=e.getModel(),s=a.getModel("emphasis"),l=e.getLayout(),u=P({},l);u.label=null;var h=e.getVisual("style");h.lineJoin="bevel";var c=e.getVisual("decal");c&&(h.decal=iv(c,o));o=uT(a.getModel("itemStyle"),u,!0);P(u,o),E(hl,function(t){var e=r.ensureState(t),t=a.getModel([t,"itemStyle"]);e.style=t.getItemStyle();t=uT(t,u);t&&(e.shape=t)}),t?(r.setShape(u),r.shape.r=l.r0,Kh(r,{shape:{r:l.r}},n,e.dataIndex)):(Kh(r,{shape:u},n),nc(r)),r.useStyle(h),this._updateLabel(n);h=a.getShallow("cursor");h&&r.attr("cursor",h),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;i=s.get("focus");ql(this,"ancestor"===i?e.getAncestorsIndices():"descendant"===i?e.getDescendantIndices():i,s.get("blurScope"))},Rz.prototype._updateLabel=function(a){var s=this,l=this.node.getModel(),n=l.getModel("label"),u=this.node.getLayout(),t=u.endAngle-u.startAngle,h=(u.startAngle+u.endAngle)/2,c=Math.cos(h),p=Math.sin(h),d=this,f=d.getTextContent(),g=this.node.dataIndex,e=n.get("minAngle")/180*Math.PI,e=n.get("show")&&!(null!=e&&Math.abs(t)<e);function y(t,e){t=t.get(e);return null==t?n.get(e):t}f.ignore=!e,E(cl,function(t){var e="normal"===t?l.getModel("label"):l.getModel([t,"label"]),n="normal"===t,i=n?f:f.ensureState(t),o=a.getFormattedLabel(g,t);n&&(o=o||s.node.name),i.style=Rc(e,{},null,"normal"!==t,!0),o&&(i.style.text=o);o=e.get("show");null==o||n||(i.ignore=!o);o=y(e,"position"),n=n?d:d.states[t],t=n.style.fill;n.textConfig={outsideFill:"inherit"===e.get("color")?t:null,inside:"outside"!==o};n=y(e,"distance")||0,t=y(e,"align");"outside"===o?(r=u.r+n,t=h>Math.PI/2?"right":"left"):t&&"center"!==t?"left"===t?(r=u.r0+n,h>Math.PI/2&&(t="right")):"right"===t&&(r=u.r-n,h>Math.PI/2&&(t="left")):(r=(u.r+u.r0)/2,t="center"),i.style.align=t,i.style.verticalAlign=y(e,"verticalAlign")||"middle",i.x=r*c+u.cx,i.y=r*p+u.cy;var r=y(e,"rotate"),e=0;"radial"===r?(e=-h)<-Math.PI/2&&(e+=Math.PI):"tangential"===r?(e=Math.PI/2-h)>Math.PI/2?e-=Math.PI:e<-Math.PI/2&&(e+=Math.PI):"number"==typeof r&&(e=r*Math.PI/180),i.rotation=e}),f.dirtyStyle()},Rz);function Rz(t,e,n,i){var o=Pz.call(this)||this;o.z2=2,o.textConfig={inside:!0},il(o).seriesIndex=e.seriesIndex;var r=new Xs({z2:4,silent:t.getModel().get(["label","silent"])});return o.setTextContent(r),o.updateData(!0,t,e,n,i),o}var Nz="sunburstRootToNode",Ez="sunburstHighlight",zz="sunburstUnhighlight";function Bz(t){t.registerAction({type:Nz,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=jA(o,[Nz],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=KA(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})}),t.registerAction({type:Ez,update:"none"},function(e,t,n){e=P({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},function(t){t=jA(e,[Ez],t);t&&(e.dataIndex=t.node.dataIndex)}),Uo("highlight","sunburstHighlight"),n.dispatchAction(P(e,{type:"highlight"}))}),t.registerAction({type:zz,update:"updateView"},function(t,e,n){t=P({},t),Uo("downplay","sunburstUnhighlight"),n.dispatchAction(P(t,{type:"downplay"}))})}var Vz,Gz=(u(Fz,Vz=ky),Fz.prototype.render=function(o,r,a,t){var e=this;this.seriesModel=o,this.api=a,this.ecModel=r;var s=o.getData(),l=s.tree.root,n=o.getViewRoot(),u=this.group,h=o.get("renderLabelForZeroData"),i=[];n.eachNode(function(t){i.push(t)});var c,p,d=this._oldChildren||[];!function(n,i){if(0===n.length&&0===i.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){h||!t||t.getValue()||(t=null);t!==l&&e!==l&&(e&&e.piece?t?(e.piece.updateData(!1,t,o,r,a),s.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(u.remove(t.piece),t.piece=null)}(e):t&&(e=new Oz(t,o,r,a),u.add(e),s.setItemGraphicEl(t.dataIndex,e)))}(null==t?null:n[t],null==e?null:i[e])}new Mx(i,n,t,t).add(e).update(e).remove(V(e,null)).execute()}(i,d),c=l,0<(p=n).depth?(e.virtualPiece?e.virtualPiece.updateData(!1,c,o,r,a):(e.virtualPiece=new Oz(c,o,r,a),u.add(e.virtualPiece)),p.piece.off("click"),e.virtualPiece.on("click",function(t){e._rootToNode(p.parentNode)})):e.virtualPiece&&(u.remove(e.virtualPiece),e.virtualPiece=null),this._initEvents(),this._oldChildren=i},Fz.prototype._initEvents=function(){var o=this;this.group.off("click"),this.group.on("click",function(n){var i=!1;o.seriesModel.getViewRoot().eachNode(function(t){var e;!i&&t.piece&&t.piece===n.target&&("rootToNode"===(e=t.getModel().get("nodeClick"))?o._rootToNode(t):"link"!==e||(t=(e=t.getModel()).get("link"))&&Qp(t,e.get("target",!0)||"_blank"),i=!0)})})},Fz.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Nz,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},Fz.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){e=t[0]-n.cx,t=t[1]-n.cy,t=Math.sqrt(e*e+t*t);return t<=n.r&&t>=n.r0}},Fz.type="sunburst",Fz);function Fz(){var t=null!==Vz&&Vz.apply(this,arguments)||this;return t.type=Fz.type,t}var Hz,Wz=(u(Uz,Hz=yy),Uz.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};!function e(t){var n=0;E(t.children,function(t){e(t);var t=t.value;G(t)&&(t=t[0]),n+=t});var i=t.value;G(i)&&(i=i[0]);null!=i&&!isNaN(i)||(i=n);i<0&&(i=0);G(t.value)?t.value[0]=i:t.value=i}(n);var i=this._levelModels=L(t.levels||[],function(t){return new ep(t,this,e)},this),o=YA.createTree(n,this,function(t){t.wrapMethod("getItemModel",function(t,e){e=o.getNodeByDataIndex(e),e=i[e.depth];return e&&(t.parentModel=e),t})});return o.data},Uz.prototype.optionUpdated=function(){this.resetViewRoot()},Uz.prototype.getDataParams=function(t){var e=Hz.prototype.getDataParams.apply(this,arguments),t=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=$A(t,this),e},Uz.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},Uz.prototype.getViewRoot=function(){return this._viewRoot},Uz.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},Uz.prototype.enableAriaDecal=function(){sk(this)},Uz.type="series.sunburst",Uz.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},Uz);function Uz(){var t=null!==Hz&&Hz.apply(this,arguments)||this;return t.type=Uz.type,t.ignoreStyleOnData=!0,t}var Yz=Math.PI/180;function Xz(t,e,a){e.eachSeriesByType(t,function(c){var t=c.get("center"),e=c.get("radius");G(e)||(e=[0,e]),G(t)||(t=[t,t]);var n=a.getWidth(),i=a.getHeight(),p=Math.min(n,i),d=mo(t[0],n),f=mo(t[1],i),g=mo(e[0],p/2),o=mo(e[1],p/2),n=-c.get("startAngle")*Yz,y=c.get("minAngle")*Yz,m=c.getData().tree.root,t=c.getViewRoot(),v=t.depth,i=c.get("sort");null!=i&&!function e(t,n){var i=t.children||[];t.children=Zz(i,n);i.length&&E(t.children,function(t){e(t,n)})}(t,i);var r=0;E(t.children,function(t){isNaN(t.getValue())||r++});var _=t.getValue(),x=Math.PI/(_||r)*2,b=0<t.depth,e=t.height-(b?-1:1),w=(o-g)/(e||1),S=c.get("clockwise"),M=c.get("stillShowZeroSum"),I=S?1:-1,i=function e(t,n){if(t){var i,o,r,a,s,l,u,h=n;return t!==m&&(a=t.getValue(),h=n+I*(i=(i=0===_&&M?x:a*x)<y?y:i),s=t.depth-v-(b?-1:1),o=g+w*s,r=g+w*(1+s),(l=c.getLevelModel(t))&&(a=l.get("r0",!0),s=l.get("r",!0),null!=(l=l.get("radius",!0))&&(a=l[0],s=l[1]),null!=a&&(o=mo(a,p/2)),null!=s&&(r=mo(s,p/2))),t.setLayout({angle:i,startAngle:n,endAngle:h,clockwise:S,cx:d,cy:f,r0:o,r:r})),t.children&&t.children.length&&(u=0,E(t.children,function(t){u+=e(t,n+u)})),h-n}};b&&(o=g+w,e=2*Math.PI,m.setLayout({angle:e,startAngle:n,endAngle:n+e,clockwise:S,cx:d,cy:f,r0:g,r:o})),i(t,n)})}function Zz(e,n){if("function"==typeof n){var t=L(e,function(t,e){var n=t.getValue();return{params:{depth:t.depth,height:t.height,dataIndex:t.dataIndex,getValue:function(){return n}},index:e}});return t.sort(function(t,e){return n(t.params,e.params)}),L(t,function(t){return e[t.index]})}var i="asc"===n;return e.sort(function(t,e){var n=(t.getValue()-e.getValue())*(i?1:-1);return 0==n?(t.dataIndex-e.dataIndex)*(i?-1:1):n})}function jz(t){var r={};t.eachSeriesByType("sunburst",function(n){var i=n.getData(),o=i.tree;o.eachNode(function(t){var e=t.getModel().getModel("itemStyle").getItemStyle();e.fill||(e.fill=function(t,e,n){for(var i=t;i&&1<i.depth;)i=i.parentNode;return e=e.getColorFromPalette(i.name||i.dataIndex+"",r),e=1<t.depth&&"string"==typeof e?rn(e,(t.depth-1)/(n-1)*.5):e}(t,n,o.root.height)),P(i.ensureUniqueItemVisual(t.dataIndex,"style"),e)})})}var qz,Kz={x:1,y:1,scaleX:1,scaleY:1,originX:1,originY:1,rotation:1},$z={color:"fill",borderColor:"stroke"},Jz={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Qz=ur(),tB=(u(eB,qz=yy),eB.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},eB.prototype.getInitialData=function(t,e){return ab(null,this)},eB.prototype.getDataParams=function(t,e,n){e=qz.prototype.getDataParams.call(this,t,e);return n&&(e.info=Qz(n).info),e},eB.type="series.custom",eB.dependencies=["grid","polar","geo","singleAxis","calendar"],eB.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},eB);function eB(){var t=null!==qz&&qz.apply(this,arguments)||this;return t.type=eB.type,t}function nB(i,o){return o=o||[0,0],L(["x","y"],function(t,e){var n=this.getAxis(t),t=o[e],e=i[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(t-e)-n.dataToCoord(t+e))},this)}function iB(r,a){return a=a||[0,0],L([0,1],function(t){var e=a[t],n=r[t]/2,i=[],o=[];return i[t]=e-n,o[t]=e+n,i[1-t]=o[1-t]=a[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function oB(t,e){var n=this.getAxis(),e=e instanceof Array?e[0]:e,t=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(e-t)-n.dataToCoord(e+t))}function rB(o,r){return r=r||[0,0],L(["Radius","Angle"],function(t,e){var n=this["get"+t+"Axis"](),i=r[e],e=o[e]/2,e="category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-e)-n.dataToCoord(i+e));return e="Angle"===t?e*Math.PI/180:e},this)}var aB={};function sB(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||ft(t,"text")))}function lB(t,e,n){var i,o,r,a=t;return"text"===e?i=a:(i={},ft(a,"text")&&(i.text=a.text),ft(a,"rich")&&(i.rich=a.rich),ft(a,"textFill")&&(i.fill=a.textFill),ft(a,"textStroke")&&(i.stroke=a.textStroke),ft(a,"fontFamily")&&(i.fontFamily=a.fontFamily),ft(a,"fontSize")&&(i.fontSize=a.fontSize),ft(a,"fontStyle")&&(i.fontStyle=a.fontStyle),ft(a,"fontWeight")&&(i.fontWeight=a.fontWeight),o={type:"text",style:i,silent:!0},r={},e=ft(a,"textPosition"),n?r.position=e?a.textPosition:"inside":e&&(r.position=a.textPosition),ft(a,"textPosition")&&(r.position=a.textPosition),ft(a,"textOffset")&&(r.offset=a.textOffset),ft(a,"textRotation")&&(r.rotation=a.textRotation),ft(a,"textDistance")&&(r.distance=a.textDistance)),uB(i,t),E(i.rich,function(t){uB(t,t)}),{textConfig:r,textContent:o}}function uB(t,e){e&&(e.font=e.textFont||e.font,ft(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),ft(e,"textAlign")&&(t.align=e.textAlign),ft(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),ft(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),ft(e,"textWidth")&&(t.width=e.textWidth),ft(e,"textHeight")&&(t.height=e.textHeight),ft(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),ft(e,"textPadding")&&(t.padding=e.textPadding),ft(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),ft(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),ft(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),ft(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),ft(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),ft(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),ft(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function hB(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var o=0<=i.textPosition.indexOf("inside"),r=t.fill||"#000";cB(i,e);var a=null==i.textFill;return o?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),i.textStroke||(i.textStroke=r),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,E(e.rich,function(t){cB(t,t)}),i}function cB(t,e){e&&(ft(e,"fill")&&(t.textFill=e.fill),ft(e,"stroke")&&(t.textStroke=e.fill),ft(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),ft(e,"font")&&(t.font=e.font),ft(e,"fontStyle")&&(t.fontStyle=e.fontStyle),ft(e,"fontWeight")&&(t.fontWeight=e.fontWeight),ft(e,"fontSize")&&(t.fontSize=e.fontSize),ft(e,"fontFamily")&&(t.fontFamily=e.fontFamily),ft(e,"align")&&(t.textAlign=e.align),ft(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),ft(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),ft(e,"width")&&(t.textWidth=e.width),ft(e,"height")&&(t.textHeight=e.height),ft(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),ft(e,"padding")&&(t.textPadding=e.padding),ft(e,"borderColor")&&(t.textBorderColor=e.borderColor),ft(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),ft(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),ft(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),ft(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),ft(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),ft(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),ft(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),ft(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),ft(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),ft(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}function pB(t,e){var n=t+"^_^"+e;aB[n]||(console.warn('[ECharts] DEPRECATED: "'+t+'" has been deprecated. '+e),aB[n]=!0)}var dB={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]};function fB(t,e,n){t=t[n],n=dB[n];t&&(e[n[0]]=t[0],e[n[1]]=t[1])}function gB(t,e,n){null!=t[n]&&(e[n]=t[n])}function yB(t,e,n){n&&(t[e]=n[e])}function mB(t,e,n,i,o){var r=n[t];if(r){var a,s,l=e[t],u=r.enterFrom;if(o&&u)for(var h=h||(i[t]={}),c=z(u),p=0;p<c.length;p++)h[m=c[p]]=u[m];if(!o&&l)if(r.transition){h=h||(i[t]={});for(var d=qo(r.transition),p=0;p<d.length;p++){var f=l[m=d[p]];xB(m,r[m],f),h[m]=f}}else if(0<=C(n.transition,t)){h=h||(i[t]={});for(var g=z(l),p=0;p<g.length;p++){f=l[m=g[p]];a=r[m],s=f,(k(a)?a!==s:null!=a&&isFinite(a))&&(h[m]=f)}}var y=r.leaveTo;if(y)for(var m,e=_B(e),v=e[t]||(e[t]={}),_=z(y),p=0;p<_.length;p++)v[m=_[p]]=y[m]}}function vB(t,e,n){var i=e[t];if(i)for(var o=n[t]={},r=z(i),a=0;a<r.length;a++){var s=r[a];o[s]=wn(i[s])}}function _B(t){t=Qz(t);return t.leaveToProps||(t.leaveToProps={})}var xB=function(t,e,n){k(e)?ot(e!==n,"Prop `"+t+"` must use different Array object each time for transition."):ot(null!=e&&isFinite(e),"Prop `"+t+"` must refer to a finite number or ArrayLike for transition.")},bB=function(t,e){ot(ft(Kz,t),"Prop `"+t+"` is not a permitted in `"+e+"`. Only `"+z(Kz).join("`, `")+"` are permitted.")},wB=z(Kz).join(", "),SB="emphasis",MB="normal",jc="blur",n="select",IB=[MB,SB,jc,n],TB={normal:["itemStyle"],emphasis:[SB,"itemStyle"],blur:[jc,"itemStyle"],select:[n,"itemStyle"]},CB={normal:["label"],emphasis:[SB,"label"],blur:[jc,"label"],select:[n,"label"]},DB="e\0\0",AB={normal:{},emphasis:{},blur:{},select:{}},kB={cartesian2d:function(e){var t=e.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:B(nB,e)}}},geo:function(e){var t=e.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:e.getZoom()},api:{coord:function(t){return e.dataToPoint(t)},size:B(iB,e)}}},singleAxis:function(e){var t=e.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(t){return e.dataToPoint(t)},size:B(oB,e)}}},polar:function(i){var o=i.getRadiusAxis(),r=i.getAngleAxis(),t=o.getExtent();return t[0]>t[1]&&t.reverse(),{coordSys:{type:"polar",cx:i.cx,cy:i.cy,r:t[1],r0:t[0]},api:{coord:function(t){var e,n=o.dataToRadius(t[0]),t=r.dataToAngle(t[1]);return(e=i.coordToPoint([n,t])).push(n,t*Math.PI/180),e},size:B(rB,i)}}},calendar:function(n){var t=n.getRect(),e=n.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return n.dataToPoint(t,e)}}}}};function LB(t){return t instanceof Ss}function PB(t){return t instanceof ta}var OB,RB=(u(NB,OB=ky),NB.prototype.render=function(n,t,i,o){var r=this._data,a=n.getData(),s=this.group,l=UB(n,a,t,i);r||s.removeAll(),a.diff(r).add(function(t){YB(i,null,t,l(t,o),n,s,a)}).remove(function(t){tV(r.getItemGraphicEl(t),n,s)}).update(function(t,e){e=r.getItemGraphicEl(e);YB(i,e,t,l(t,o),n,s,a)}).execute();t=n.get("clip",!0)?QM(n.coordinateSystem,!1,n):null;t?s.setClipPath(t):s.removeClipPath(),this._data=a},NB.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},NB.prototype.incrementalRender=function(t,e,n,i,o){var r=e.getData(),a=UB(e,r,n,i);function s(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var l=t.start;l<t.end;l++){var u=YB(null,null,l,a(l,o),e,this.group,r);u&&u.traverse(s)}},NB.prototype.filterForExposedEvent=function(t,e,n,i){var o=e.element;if(null==o||n.name===o)return!0;for(;(n=n.__hostTarget||n.parent)&&n!==this.group;)if(n.name===o)return!0;return!1},NB.type="custom",NB);function NB(){var t=null!==OB&&OB.apply(this,arguments)||this;return t.type=NB.type,t}function EB(t){var e=t.type;if("path"===e){var n=t.shape,i=null!=n.width&&null!=n.height?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,o=eV(n),n=cc(o,null,i,n.layout||"center");Qz(n).customPathData=o}else if("image"===e)n=new Ps({}),Qz(n).customImagePath=t.style.image;else if("text"===e)n=new Xs({});else if("group"===e)n=new io;else{if("compoundPath"===e)throw new Error('"compoundPath" is not supported yet.');o=hc(e);o||Xo('graphic type "'+e+'" can not be found.'),n=new o}return Qz(n).customGraphicType=e,n.name=t.name,n.z2EmphasisLift=1,n.z2SelectLift=1,n}function zB(t,e,n,i,o,r,a,s){o=o&&o.normal.cfg;o&&e.setTextConfig(o);o=i&&i.style;o&&("text"===e.type&&(ft(u=o,"textFill")&&(u.fill=u.textFill),ft(u,"textStroke")&&(u.stroke=u.textStroke)),l=void 0,h=LB(e)?o.decal:null,t&&h&&(h.dirty=!0,l=iv(h,t)),o.__decalPattern=l),Qz(e).userDuring=i.during;var l,u={},h={};mB("shape",e,i,u,a),vB("shape",i,h),function(t,e,n,i){var o=e.enterFrom;if(i&&o)for(var r=z(o),a=0;a<r.length;a++){var s=r[a];bB(s,"el.enterFrom"),n[s]=o[s]}if(!i)if(e.transition)for(var l,u=qo(e.transition),a=0;a<u.length;a++)"style"!==(s=u[a])&&"shape"!==s&&"extra"!==s&&(l=t[s],bB(s,"el.transition"),xB(s,e[s],l),n[s]=l);else yB(n,"x",t),yB(n,"y",t);var h=e.leaveTo;if(h)for(var c=_B(t),p=z(h),a=0;a<p.length;a++){s=p[a];bB(s,"el.leaveTo"),c[s]=h[s]}}(e,i,u,a),fB(t=i,l=h,"position"),fB(t,l,"scale"),fB(t,l,"origin"),gB(t,l,"x"),gB(t,l,"y"),gB(t,l,"scaleX"),gB(t,l,"scaleY"),gB(t,l,"originX"),gB(t,l,"originY"),gB(t,l,"rotation"),mB("extra",e,i,u,a),vB("extra",i,h),function(t,e,n,i,o){if(n){var r=t.style,a=n.enterFrom;if(o&&a)for(var s=z(a),l=l||(i.style={}),u=0;u<s.length;u++)l[g=s[u]]=a[g];if(!o&&r)if(n.transition){var h=qo(n.transition);l=l||(i.style={});for(u=0;u<h.length;u++){var c=r[g=h[u]];l[g]=c}}else if(t.getAnimationStyleProps&&0<=C(e.transition,"style")){var e=t.getAnimationStyleProps(),p=e?e.style:null;if(p){l=l||(i.style={});for(var d=z(n),u=0;u<d.length;u++)p[g=d[u]]&&(c=r[g],l[g]=c)}}var f=n.leaveTo;if(f)for(var g,y=z(f),t=_B(t),m=t.style||(t.style={}),u=0;u<y.length;u++)m[g=y[u]]=f[g]}}(e,i,o,u,a),h.style=o,function(t,e){var n=t.isGroup?null:t,i=e.style;if(n&&i){n.useStyle(i);var o=i.__decalPattern;o&&(n.style.decal=o);for(var r=n.animators,a=0;a<r.length;a++){var s=r[a];"style"===s.targetName&&s.changeTarget(n.style)}}e&&(e.style=null,e&&t.attr(e),e.style=i)}(e,h),function(t,e,n,i,o){{var r;i&&(r=Qz(t).userDuring,r=r?B(FB,{el:t,userDuring:r}):null,(o?$h:Kh)(t,i,n,{dataIndex:e,isFrom:!0,during:r}))}}(e,n,r,u,a),function(t,e,n){ft(e,"silent")&&(t.silent=e.silent),ft(e,"ignore")&&(t.ignore=e.ignore),!PB(t)||ft(e,"invisible")&&(t.invisible=e.invisible);LB(t)&&ft(e,"autoBatch")&&(t.autoBatch=e.autoBatch);n||ft(e,"info")&&(Qz(t).info=e.info)}(e,i,s),o?e.dirty():e.markRedraw()}var BB={},VB={setTransform:function(t,e){return ot(ft(Kz,t),"Only "+wB+" available in `setTransform`."),BB.el[t]=e,this},getTransform:function(t){return ot(ft(Kz,t),"Only "+wB+" available in `getTransform`."),BB.el[t]},setShape:function(t,e){return GB(t),(BB.el.shape||(BB.el.shape={}))[t]=e,BB.isShapeDirty=!0,this},getShape:function(t){GB(t);var e=BB.el.shape;if(e)return e[t]},setStyle:function(t,e){GB(t);var n=BB.el.style;return n&&(J(e)&&Fo("style."+t+" must not be assigned with NaN."),n[t]=e,BB.isStyleDirty=!0),this},getStyle:function(t){GB(t);var e=BB.el.style;if(e)return e[t]},setExtra:function(t,e){return GB(t),(BB.el.extra||(BB.el.extra={}))[t]=e,this},getExtra:function(t){GB(t);var e=BB.el.extra;if(e)return e[t]}};function GB(t){if(1,"transition"===t||"enterFrom"===t||"leaveTo"===t)throw new Error('key must not be "'+t+'"')}function FB(){var t,e=this.el;e&&(Qz(e).userDuring===(t=this.userDuring)?(BB.el=e,BB.isShapeDirty=!1,BB.isStyleDirty=!1,t(VB),BB.isShapeDirty&&e.dirtyShape&&e.dirtyShape(),BB.isStyleDirty&&e.dirtyStyle&&e.dirtyStyle()):this.el=this.userDuring=null)}function HB(t,e,n,i,o){var r=e.isGroup?null:e,e=o&&o[t].cfg;r&&(o=r.ensureState(t),!1===i?(t=r.getState(t))&&(t.style=null):o.style=i||null,e&&(o.textConfig=e),Rl(r))}function WB(t,e,n){if(!t.isGroup){var i=t,t=n.currentZ,n=n.currentZLevel;i.z=t,i.zlevel=n;n=e.z2;null!=n&&(i.z2=n||0);for(var o,r,a,s,l=0;l<IB.length;l++)o=i,r=e,a=IB[l],s=void 0,null!=(r=(r=(s=a===MB)?r:qB(r,a))?r.z2:null)&&((s?o:o.ensureState(a)).z2=r||0)}}function UB(a,s,e,t){var n=a.get("renderItem"),i=a.coordinateSystem,o={};i&&(ot(n,"series.render is required."),ot(i.prepareCustoms||kB[i.type],"This coordSys does not support custom series."),o=i.prepareCustoms?i.prepareCustoms(i):kB[i.type](i));for(var r,l,u,h,c=A({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=u),s.getStore().get(s.getDimensionIndex(t||0),e)},style:function(t,e){pB("api.style","Please write literal style directly instead.");null==e&&(e=u);var n=s.getItemVisual(e,"style"),i=n&&n.fill,o=n&&n.opacity,r=x(e,MB).getItemStyle();null!=i&&(r.fill=i),null!=o&&(r.opacity=o);n={inheritColor:H(i)?i:"#000"},o=b(e,MB),i=Rc(o,null,n,!1,!0);i.text=o.getShallow("show")?tt(a.getFormattedLabel(e,MB),bM(s,e)):null;n=Nc(o,n,!1);return S(t,r),r=hB(r,i,n),t&&w(r,t),r.legacy=!0,r},ordinalRawValue:function(t,e){null==e&&(e=u),t=t||0;var n=s.getDimensionInfo(t);if(!n){t=s.getDimensionIndex(t);return 0<=t?s.getStore().get(t,e):void 0}e=s.get(n.name,e),n=n&&n.ordinalMeta;return n?n.categories[e]:e},styleEmphasis:function(t,e){pB("api.styleEmphasis","Please write literal style directly instead.");var n=x(e=null==e?u:e,SB).getItemStyle(),i=b(e,SB),o=Rc(i,null,null,!0,!0);o.text=i.getShallow("show")?et(a.getFormattedLabel(e,SB),a.getFormattedLabel(e,MB),bM(s,e)):null;i=Nc(i,null,!0);return S(t,n),n=hB(n,o,i),t&&w(n,t),n.legacy=!0,n},visual:function(t,e){if(null==e&&(e=u),ft($z,t)){var n=s.getItemVisual(e,"style");return n?n[$z[t]]:null}if(ft(Jz,t))return s.getItemVisual(e,t)},barLayout:function(t){if("cartesian2d"===i.type)return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;o<t.count;o++)e.push(A({bandWidth:i,axisKey:"axis0",stackId:Cb+o},t));for(var r=Ob(e),a=[],o=0;o<t.count;o++){var s=r.axis0[Cb+o];s.offsetCenter=s.offset+s.width/2,a.push(s)}return a}}(A({axis:i.getBaseAxis()},t))},currentSeriesIndices:function(){return e.getCurrentSeriesIndices()},font:function(t){return Gc(t,e)}},o.api||{}),p={context:{},seriesId:a.id,seriesName:a.name,seriesIndex:a.seriesIndex,coordSys:o.coordSys,dataInsideLength:s.count(),encode:(r=a.getData(),l={},E(r.dimensions,function(t){var e,n=r.getDimensionInfo(t);n.isExtraCoord||(e=n.coordDim,(l[e]=l[e]||[])[n.coordDimIndex]=r.getDimensionIndex(t))}),l)},d={},f={},g={},y={},m=0;m<IB.length;m++){var v=IB[m];g[v]=a.getModel(TB[v]),y[v]=a.getModel(CB[v])}function _(t){return t===u?h=h||s.getItemModel(t):s.getItemModel(t)}function x(t,e){return s.hasItemOption?t===u?d[e]||(d[e]=_(t).getModel(TB[e])):_(t).getModel(TB[e]):g[e]}function b(t,e){return s.hasItemOption?t===u?f[e]||(f[e]=_(t).getModel(CB[e])):_(t).getModel(CB[e]):y[e]}return function(t,e){return u=t,h=null,d={},f={},n&&n(A({dataIndexInside:t,dataIndex:s.getRawIndex(t),actionType:e?e.type:null},p),c)};function w(t,e){for(var n in e)ft(e,n)&&(t[n]=e[n])}function S(t,e){t&&(t.textFill&&(e.textFill=t.textFill),t.textPosition&&(e.textPosition=t.textPosition))}}function YB(t,e,n,i,o,r,a){if(i){o=XB(t,e,n,i,o,r);return o&&a.setItemGraphicEl(n,o),o&&ql(o,i.focus,i.blurScope),o}r.remove(e)}function XB(t,e,n,i,o,r){ot(i,"should not have an null/undefined element setting");var a=-1,s=e;e&&ZB(e,i,o)&&(a=C(r.childrenRef(),e),e=null);var l,u,h,c,p=!e,d=e;d?d.clearStates():(d=EB(i),s&&(c=s,(h=d).copyTransform(c),PB(h)&&PB(c)&&(h.setStyle(c.style),h.z=c.z,h.z2=c.z2,h.zlevel=c.zlevel,h.invisible=c.invisible,h.ignore=c.ignore,LB(h)&&LB(c)&&h.setShape(c.shape)))),!1===i.morph?d.disableMorphing=!0:d.disableMorphing&&(d.disableMorphing=!1),AB.normal.cfg=AB.normal.conOpt=AB.emphasis.cfg=AB.emphasis.conOpt=AB.blur.cfg=AB.blur.conOpt=AB.select.cfg=AB.select.conOpt=null,AB.isLegacy=!1,function(t,e,n,i,o,r){if(t.isGroup)return;jB(n,null,r),jB(n,SB,r);var a=r.normal.conOpt,s=r.emphasis.conOpt,l=r.blur.conOpt,n=r.select.conOpt;if(null!=a||null!=s||null!=n||null!=l){var u=t.getTextContent();if(!1===a)u&&t.removeTextContent();else{a=r.normal.conOpt=a||{type:"text"},u?u.clearStates():(u=EB(a),t.setTextContent(u)),zB(null,u,e,a,null,i,o,!0);for(var o=a&&a.style,h=0;h<IB.length;h++){var c,p=IB[h];p!==MB&&(c=r[p].conOpt,HB(p,u,0,KB(a,c,p),null))}o?u.dirty():u.markRedraw()}}}(d,n,i,o,p,AB),l=d,u=n,e=o,s=p,!1===(c=(h=i).clipPath)?l&&l.getClipPath()&&l.removeClipPath():c&&((h=(h=l.getClipPath())&&ZB(h,c,e)?null:h)||(ot(LB(h=EB(c)),"Only any type of `path` can be used in `clipPath`, rather than "+h.type+"."),l.setClipPath(h)),zB(null,h,u,c,null,e,s,!1)),zB(t,d,n,i,AB,o,p,!1);for(var f=0;f<IB.length;f++){var g=IB[f];g!==MB&&HB(g,d,0,KB(i,qB(i,g),g),AB)}return WB(d,i,o),"group"===i.type&&function(t,e,n,i,o){var r=i.children,a=r?r.length:0,s=i.$mergeChildren,i="byName"===s||i.diffChildrenByName,s=!1===s;if(!a&&!i&&!s)return;if(i)return function(t){new Mx(t.oldChildren,t.newChildren,$B,$B,t).add(JB).update(JB).remove(QB).execute()}({api:t,oldChildren:e.children()||[],newChildren:r||[],dataIndex:n,seriesModel:o,group:e});s&&e.removeAll();for(var l=0;l<a;l++)r[l]&&XB(t,e.childAt(l),n,r[l],o,e);for(var u=e.childCount()-1;l<=u;u--)tV(e.childAt(u),o,e)}(t,d,n,i,o),0<=a?r.replaceAt(d,a):r.add(d),d}function ZB(t,e,n){var i=Qz(t),o=e.type,t=e.shape,e=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==i.customGraphicType||"path"===o&&((n=t)&&(ft(n,"pathData")||ft(n,"d")))&&eV(t)!==i.customPathData||"image"===o&&ft(e,"image")&&e.image!==i.customImagePath}function jB(t,e,n){var i,o=e?qB(t,e):t,r=e?KB(t,o,SB):t.style,a=t.type,o=o?o.textConfig:null,t=t.textContent,t=t?e?qB(t,e):t:null;r&&(n.isLegacy||sB(r,a,!!o,!!t))&&(n.isLegacy=!0,i=lB(r,a,!e),!o&&i.textConfig&&(o=i.textConfig),!t&&i.textContent&&(t=i.textContent)),!e&&t&&((i=t).type||(i.type="text"),ot("text"===i.type,'textContent.type must be "text"'));n=e?n[e]:n.normal;n.cfg=o,n.conOpt=t}function qB(t,e){return e?t?t[e]:null:t}function KB(t,e,n){e=e&&e.style;return e=null==e&&n===SB&&t?t.styleEmphasis:e}function $B(t,e){t=t&&t.name;return null!=t?t:DB+e}function JB(t,e){var n=this.context,t=null!=t?n.newChildren[t]:null,e=null!=e?n.oldChildren[e]:null;XB(n.api,e,n.dataIndex,t,n.seriesModel,n.group)}function QB(t){var e=this.context;tV(e.oldChildren[t],e.seriesModel,e.group)}function tV(t,e,n){var i;t&&((i=Qz(t).leaveToProps)?Kh(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t))}function eV(t){return t&&(t.pathData||t.d)}var nV=ur(),iV=S,oV=B,Zy=(rV.prototype.render=function(t,e,n,i){var o=e.get("value"),r=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==o||this._lastStatus!==r){this._lastValue=o,this._lastStatus=r;var a=this._group,i=this._handle;if(!r||"hide"===r)return a&&a.hide(),void(i&&i.hide());a&&a.show(),i&&i.show();r={};this.makeElOption(r,o,t,e,n);i=r.graphicKey;i!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=i;i=this._moveAnimation=this.determineAnimation(t,e);a?(i=V(aV,e,i),this.updatePointerEl(a,r,i),this.updateLabelEl(a,r,i,e)):(a=this._group=new io,this.createPointerEl(a,r,t,e),this.createLabelEl(a,r,t,e),n.getZr().add(a)),uV(a,e,!0),this._renderHandle(o)}},rV.prototype.remove=function(t){this.clear(t)},rV.prototype.dispose=function(t){this.clear(t)},rV.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,o="category"===i.type,e=e.get("snap");if(!e&&!o)return!1;if("auto"!==n&&null!=n)return!0===n;n=this.animationThreshold;if(o&&i.getBandWidth()>n)return!0;if(e){t=mC(t).seriesDataCount,i=i.getExtent();return Math.abs(i[0]-i[1])/t>n}return!1},rV.prototype.makeElOption=function(t,e,n,i,o){},rV.prototype.createPointerEl=function(t,e,n,i){var o=e.pointer;o&&(e=nV(t).pointerEl=new Dc[o.type](iV(e.pointer)),t.add(e))},rV.prototype.createLabelEl=function(t,e,n,i){e.label&&(e=nV(t).labelEl=new Xs(iV(e.label)),t.add(e),sV(e,i))},rV.prototype.updatePointerEl=function(t,e,n){t=nV(t).pointerEl;t&&e.pointer&&(t.setStyle(e.pointer.style),n(t,{shape:e.pointer.shape}))},rV.prototype.updateLabelEl=function(t,e,n,i){t=nV(t).labelEl;t&&(t.setStyle(e.label.style),n(t,{x:e.label.x,y:e.label.y}),sV(t,i))},rV.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,r=n.getModel("handle"),a=n.get("status");if(!r.get("show")||!a||"hide"===a)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=Mc(r.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ie(t.event)},onmousedown:oV(this._onHandleDragMove,this,0,0),drift:oV(this._onHandleDragMove,this),ondragend:oV(this._onHandleDragEnd,this)}),i.add(o)),uV(o,n,!1),o.setStyle(r.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));n=r.get("size");G(n)||(n=[n,n]),o.scaleX=n[0]/2,o.scaleY=n[1]/2,Fy(this,"_doDispatchAxisPointer",r.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},rV.prototype._moveHandleToValue=function(t,e){aV(this._axisPointerModel,!e&&this._moveAnimation,this._handle,lV(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},rV.prototype._onHandleDragMove=function(t,e){var n=this._handle;n&&(this._dragging=!0,e=this.updateHandleTransform(lV(n),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=e,n.stopAnimation(),n.attr(lV(e)),nV(n).lastProp=null,this._doDispatchAxisPointer())},rV.prototype._doDispatchAxisPointer=function(){var t,e;this._handle&&(t=this._payloadInfo,e=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]}))},rV.prototype._onHandleDragEnd=function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},rV.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,t=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),t&&e.remove(t),this._group=null,this._handle=null,this._payloadInfo=null)},rV.prototype.doClear=function(){},rV.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},rV);function rV(){this._dragging=!1,this.animationThreshold=15}function aV(t,e,n,i){!function n(i,t){{if(Y(i)&&Y(t)){var o=!0;return E(t,function(t,e){o=o&&n(i[e],t)}),!!o}return i===t}}(nV(n).lastProp,i)&&(nV(n).lastProp=i,e?Kh(n,i,t):(n.stopAnimation(),n.attr(i)))}function sV(t,e){t[e.get(["label","show"])?"show":"hide"]()}function lV(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function uV(t,e,n){var i=e.get("z"),o=e.get("zlevel");t&&t.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=o&&(t.zlevel=o),t.silent=n)})}function hV(t){var e,n=t.get("type"),t=t.getModel(n+"Style");return"line"===n?(e=t.getLineStyle()).fill=null:"shadow"===n&&((e=t.getAreaStyle()).stroke=null),e}function cV(t,e,n,i,o){var r=pV(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=Wp(a.get("padding")||0),l=a.getFont(),u=Gi(r,l),h=o.position,c=u.width+s[1]+s[3],n=u.height+s[0]+s[2],u=o.align;"right"===u&&(h[0]-=c),"center"===u&&(h[0]-=c/2);u=o.verticalAlign;"bottom"===u&&(h[1]-=n),"middle"===u&&(h[1]-=n/2),o=h,u=c,c=n,i=(n=i).getWidth(),n=n.getHeight(),o[0]=Math.min(o[0]+u,i)-u,o[1]=Math.min(o[1]+c,n)-c,o[0]=Math.max(o[0],0),o[1]=Math.max(o[1],0);o=a.get("backgroundColor");o&&"auto"!==o||(o=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:Rc(a,{text:r,font:l,fill:a.getTextColor(),padding:s,backgroundColor:o}),z2:10}}function pV(t,e,n,i,o){t=e.scale.parse(t);var r,a=e.scale.getLabel({value:t},{precision:o.precision}),o=o.formatter;return o&&(r={value:pw(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]},E(i,function(t){var e=n.getSeriesByIndex(t.seriesIndex),t=t.dataIndexInside,t=e&&e.getDataParams(t);t&&r.seriesData.push(t)}),H(o)?a=o.replace("{value}",a):F(o)&&(a=o(r))),a}function dV(t,e,n){var i=ni();return si(i,i,n.rotation),ai(i,i,n.position),vc([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function fV(t,e,n,i,o,r){var a=lC.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=o.get(["label","margin"]),cV(e,i,o,r,{position:dV(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function gV(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function yV(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function mV(t,e,n,i,o,r){return{cx:t,cy:e,r0:n,r:i,startAngle:o,endAngle:r,clockwise:!0}}var vV,_V=(u(xV,vV=Zy),xV.prototype.makeElOption=function(t,e,n,i,o){var r,a=n.axis,s=a.grid,l=i.get("type"),u=bV(s,a).getOtherAxis(a).getGlobalExtent(),h=a.toGlobalCoord(a.dataToCoord(e,!0));l&&"none"!==l&&(r=hV(i),(u=wV[l](a,h,u)).style=r,t.graphicKey=u.type,t.pointer=u),fV(e,t,QT(s.model,n),n,i,o)},xV.prototype.getHandleTransform=function(t,e,n){var i=QT(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=dV(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},xV.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.grid,a=o.getGlobalExtent(!0),n=bV(r,o).getOtherAxis(o).getGlobalExtent(),r="x"===o.dim?0:1,o=[t.x,t.y];o[r]+=e[r],o[r]=Math.min(a[1],o[r]),o[r]=Math.max(a[0],o[r]);n=(n[1]+n[0])/2,n=[n,n];n[r]=o[r];return{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:n,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][r]}},xV);function xV(){return null!==vV&&vV.apply(this,arguments)||this}function bV(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var wV={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:gV([e,n[0]],[e,n[1]],SV(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:yV([e-i/2,n[0]],[i,o],SV(t))}}};function SV(t){return"x"===t.dim?0:1}var MV,IV=(u(TV,MV=yd),TV.type="axisPointer",TV.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},TV);function TV(){var t=null!==MV&&MV.apply(this,arguments)||this;return t.type=TV.type,t}var CV=ur(),DV=E;function AV(t,e,n){var i;w.node||(i=e.getZr(),CV(i).records||(CV(i).records={}),function(a,s){if(CV(a).initialized)return;function t(t,r){a.on(t,function(e){var i,o,n=(i=s,{dispatchAction:function t(e){var n=o[e.type];n?n.push(e):(e.dispatchAction=t,i.dispatchAction(e))},pendings:o={showTip:[],hideTip:[]}});DV(CV(a).records,function(t){t&&r(t,e,n.dispatchAction)}),function(t,e){var n,i=t.showTip.length,o=t.hideTip.length;i?n=t.showTip[i-1]:o&&(n=t.hideTip[o-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(n.pendings,s)})}CV(a).initialized=!0,t("click",V(LV,"click")),t("mousemove",V(LV,"mousemove")),t("globalout",kV)}(i,e),(CV(i).records[t]||(CV(i).records[t]={})).handler=n)}function kV(t,e,n){t.handler("leave",null,n)}function LV(t,e,n,i){e.handler(t,n,i)}function PV(t,e){w.node||(e=e.getZr(),(CV(e).records||{})[t]&&(CV(e).records[t]=null))}var OV,RV=(u(NV,OV=Iy),NV.prototype.render=function(t,e,n){var e=e.getComponent("tooltip"),i=t.get("triggerOn")||e&&e.get("triggerOn")||"mousemove|click";AV("axisPointer",n,function(t,e,n){"none"!==i&&("leave"===t||0<=i.indexOf(t))&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})})},NV.prototype.remove=function(t,e){PV("axisPointer",e)},NV.prototype.dispose=function(t,e){PV("axisPointer",e)},NV.type="axisPointer",NV);function NV(){var t=null!==OV&&OV.apply(this,arguments)||this;return t.type=NV.type,t}function EV(t,e){var n=[],i=t.seriesIndex;if(null==i||!(a=e.getSeriesByIndex(i)))return{point:[]};var o=a.getData(),r=lr(o,t);if(null==r||r<0||G(r))return{point:[]};var a,s=o.getItemGraphicEl(r),e=a.coordinateSystem;return a.getTooltipPosition?n=a.getTooltipPosition(r)||[]:e&&e.dataToPoint?n=t.isStacked?(i=e.getBaseAxis(),a=e.getOtherAxis(i).dim,t=i.dim,i="x"===a||"radius"===a?1:0,a=o.mapDimension(t),(t=[])[i]=o.get(a,r),t[1-i]=o.get(o.getCalculationInfo("stackResultDimension"),r),e.dataToPoint(t)||[]):e.dataToPoint(o.getValues(L(e.dimensions,function(t){return o.mapDimension(t)}),r))||[]:s&&((r=s.getBoundingRect().clone()).applyTransform(s.transform),n=[r.x+r.width/2,r.y+r.height/2]),{point:n,el:s}}var zV=ur();function BV(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){WV(r)&&(r=EV({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=WV(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||WV(r),p={},d={},o={list:[],map:{}},f={showPointer:V(GV,d),showTooltip:V(FV,o)};E(s.coordSysMap,function(t,e){var o=l||t.containPoint(r);E(s.coordSysAxesInfo[e],function(t,e){var n=t.axis,i=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);c||!o||u&&!i||null!=(i=null==(i=i&&i.value)&&!l?n.pointToData(r):i)&&VV(t,i,f,!1,p)})});var g,y,m={};return E(h,function(n,t){var i=n.linkGroup;i&&!d[t]&&E(i.axesInfo,function(t,e){e=d[e];t!==n&&e&&(e=e.value,i.mapper&&(e=n.axis.scale.parse(i.mapper(e,HV(t),HV(n)))),m[n.key]=e)})}),E(m,function(t,e){VV(h[e],t,f,!0,p)}),g=d,i=h,y=p.axesInfo=[],E(i,function(t,e){var n=t.axisPointerModel.option,e=g[e];e?(t.useHandle||(n.status="show"),n.value=e.value,n.seriesDataIndices=(e.payloadBatch||[]).slice()):t.useHandle||(n.status="hide"),"show"===n.status&&y.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:n.value})}),function(t,e,n,i){if(WV(e)||!t.list.length)return i({type:"hideTip"});var o=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:o.dataIndexInside,dataIndex:o.dataIndex,seriesIndex:o.seriesIndex,dataByCoordSys:t.list})}(o,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=zV(n)[i]||{},r=zV(n)[i]={};E(t,function(t,e){t=t.axisPointerModel.option;"show"===t.status&&E(t.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var a=[],s=[];E(o,function(t,e){r[e]||s.push(t)}),E(r,function(t,e){o[e]||a.push(t)}),s.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:s}),a.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:a})}(h,n),p}}function VV(t,e,n,i,o){var r,a,s,l,u,h,c,p,d,f,g=t.axis;!g.scale.isBlank()&&g.containData(e)&&(t.involveSeries?(f=(r=(a=e,s=(d=t).axis,l=s.dim,u=a,h=[],c=Number.MAX_VALUE,p=-1,E(d.seriesModels,function(e,t){var n=e.getData().mapDimensionsAll(l);if(e.getAxisTooltipData)var i=e.getAxisTooltipData(n,a,s),o=i.dataIndices,r=i.nestestValue;else{if(!(o=e.getData().indicesOfNearest(n[0],a,"category"===s.type?.5:null)).length)return;r=e.getData().get(n[0],o[0])}null!=r&&isFinite(r)&&(i=a-r,(n=Math.abs(i))<=c&&((n<c||0<=i&&p<0)&&(c=n,p=i,u=r,h.length=0),E(o,function(t){h.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}),{payloadBatch:h,snapToValue:u})).snapToValue,(d=r.payloadBatch)[0]&&null==o.seriesIndex&&P(o,d[0]),!i&&t.snap&&g.containData(f)&&null!=f&&(e=f),n.showPointer(t,e,d),n.showTooltip(t,r,f)):n.showPointer(t,e))}function GV(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function FV(t,e,n,i){var o,r=n.payloadBatch,a=e.axis,s=a.model,l=e.axisPointerModel;e.triggerTooltip&&r.length&&(n=_C(o=e.coordSys.model),(e=t.map[n])||(e=t.map[n]={coordSysId:o.id,coordSysIndex:o.componentIndex,coordSysType:o.type,coordSysMainType:o.mainType,dataByAxis:[]},t.list.push(e)),e.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:i,valueLabelOpt:{precision:l.get(["label","precision"]),formatter:l.get(["label","formatter"])},seriesDataIndices:r.slice()}))}function HV(t){var e=t.axis.model,n={},t=n.axisDim=t.axis.dim;return n.axisIndex=n[t+"AxisIndex"]=e.componentIndex,n.axisName=n[t+"AxisName"]=e.name,n.axisId=n[t+"AxisId"]=e.id,n}function WV(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function UV(t){wC.registerAxisPointerClass("CartesianAxisPointer",_V),t.registerComponentModel(IV),t.registerComponentView(RV),t.registerPreprocessor(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!G(e)&&(t.axisPointer.link=[e]))}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=gC(t,e)}),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},BV)}var YV,XV=(u(ZV,YV=Zy),ZV.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis;"angle"===r.dim&&(this.animationThreshold=Math.PI/18);var a,s=r.polar,l=s.getOtherAxis(r).getExtent(),u=r.dataToCoord(e),h=i.get("type");h&&"none"!==h&&(a=hV(i),(c=qV[h](r,s,u,l)).style=a,t.graphicKey=c.type,t.pointer=c);var c=i.get(["label","margin"]);cV(t,n,i,o,function(t,e,n,i){var o=e.axis,r=o.dataToCoord(t),a=n.getAngleAxis().getExtent()[0];a=a/180*Math.PI;var s,t=n.getRadiusAxis().getExtent();{var l,u;u="radius"===o.dim?(si(l=ni(),l,a),ai(l,l,[n.cx,n.cy]),s=vc([r,-i],l),l=e.getModel("axisLabel").get("rotate")||0,a=lC.innerTextLayout(a,l*Math.PI/180,-1),l=a.textAlign,a.textVerticalAlign):(t=t[1],s=n.coordToPoint([t+i,r]),r=n.cx,u=n.cy,l=Math.abs(s[0]-r)/t<.3?"center":s[0]>r?"left":"right",Math.abs(s[1]-u)/t<.3?"middle":s[1]>u?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,s,c))},ZV);function ZV(){return null!==YV&&YV.apply(this,arguments)||this}var jV,qV={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:gV(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:mV(e.cx,e.cy,i[0],i[1],(-n-o/2)*r,(o/2-n)*r)}:{type:"Sector",shape:mV(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}},KV=(u($V,jV=yd),$V.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,function(t){t.getCoordSysModel()===this&&(e=t)},this),e},$V.type="polar",$V.dependencies=["radiusAxis","angleAxis"],$V.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},$V);function $V(){var t=null!==jV&&jV.apply(this,arguments)||this;return t.type=$V.type,t}var JV,jc=(u(QV,JV=yd),QV.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",dr).models[0]},QV.type="polarAxis",QV);function QV(){return null!==JV&&JV.apply(this,arguments)||this}T(jc,mw);var tG,eG=(u(nG,tG=jc),nG.type="angleAxis",nG);function nG(){var t=null!==tG&&tG.apply(this,arguments)||this;return t.type=nG.type,t}var iG,oG=(u(rG,iG=jc),rG.type="radiusAxis",rG);function rG(){var t=null!==iG&&iG.apply(this,arguments)||this;return t.type=rG.type,t}var aG,sG=(u(lG,aG=vp),lG.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},lG);function lG(t,e){return aG.call(this,"radius",t,e)||this}sG.prototype.dataToRadius=vp.prototype.dataToCoord,sG.prototype.radiusToData=vp.prototype.coordToData;var uG,hG=ur(),cG=(u(pG,uG=vp),pG.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},pG.prototype.calculateCategoryInterval=function(){var t=this.getLabelModel(),e=this.scale,n=e.getExtent(),i=e.count();if(n[1]-n[0]<1)return 0;var o=n[0],e=this.dataToCoord(o+1)-this.dataToCoord(o),n=Math.abs(e),e=Gi(null==o?"":o+"",t.getFont(),"center","top"),o=Math.max(e.height,7)/n;isNaN(o)&&(o=1/0);t=Math.max(0,Math.floor(o)),e=hG(this.model),n=e.lastAutoInterval,o=e.lastTickCount;return null!=n&&null!=o&&Math.abs(n-t)<=1&&Math.abs(o-i)<=1&&t<n?t=n:(e.lastTickCount=i,e.lastAutoInterval=t),t},pG);function pG(t,e){return uG.call(this,"angle",t,e||[0,360])||this}cG.prototype.dataToAngle=vp.prototype.dataToCoord,cG.prototype.angleToData=vp.prototype.coordToData;var dG=["radius","angle"],fG=(gG.prototype.containPoint=function(t){t=this.pointToCoord(t);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},gG.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},gG.prototype.getAxis=function(t){return this["_"+t+"Axis"]},gG.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},gG.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},gG.prototype.getAngleAxis=function(){return this._angleAxis},gG.prototype.getRadiusAxis=function(){return this._radiusAxis},gG.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},gG.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},gG.prototype.getTooltipAxes=function(t){t=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},gG.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},gG.prototype.pointToData=function(t,e){t=this.pointToCoord(t);return[this._radiusAxis.radiusToData(t[0],e),this._angleAxis.angleToData(t[1],e)]},gG.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),t=i.getExtent(),o=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);i.inverse?o=r-360:r=o+360;i=Math.sqrt(e*e+n*n);e/=i,n/=i;for(var a=Math.atan2(-n,e)/Math.PI*180,s=a<o?1:-1;a<o||r<a;)a+=360*s;return[i,a]},gG.prototype.coordToPoint=function(t){var e=t[0],t=t[1]/180*Math.PI;return[Math.cos(t)*e+this.cx,-Math.sin(t)*e+this.cy]},gG.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,t=e-this.cy,e=n*n+t*t,n=this.r,t=this.r0;return e<=n*n&&t*t<=e}}},gG.prototype.convertToPixel=function(t,e,n){return yG(e)===this?this.dataToPoint(n):null},gG.prototype.convertFromPixel=function(t,e,n){return yG(e)===this?this.pointToData(n):null},gG);function gG(t){this.dimensions=dG,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new sG,this._angleAxis=new cG,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}function yG(t){var e=t.seriesModel,t=t.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function mG(t,e){var n,i=this,o=i.getAngleAxis(),r=i.getRadiusAxis();o.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries(function(t){var e;t.coordinateSystem===i&&(E(yw(e=t.getData(),"radius"),function(t){r.scale.unionExtentFromData(e,t)}),E(yw(e,"angle"),function(t){o.scale.unionExtentFromData(e,t)}))}),uw(o.scale,o.model),uw(r.scale,r.model),"category"!==o.type||o.onBand||(n=o.getExtent(),t=360/o.scale.count(),o.inverse?n[1]+=t:n[1]-=t,o.setExtent(n[0],n[1]))}function vG(t,e){var n;t.type=e.get("type"),t.scale=hw(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType&&(t.inverse=t.inverse!==e.get("clockwise"),n=e.get("startAngle"),t.setExtent(n,n+(t.inverse?-360:360))),(e.axis=t).model=e}var _G={dimensions:dG,create:function(t,s){var l=[];return t.eachComponent("polar",function(t,e){var n=new fG(e+"");n.update=mG;var i=n.getRadiusAxis(),o=n.getAngleAxis(),r=t.findAxisModel("radiusAxis"),a=t.findAxisModel("angleAxis");vG(i,r),vG(o,a),e=n,i=s,o=(r=t).get("center"),a=i.getWidth(),i=i.getHeight(),e.cx=mo(o[0],a),e.cy=mo(o[1],i),e=e.getRadiusAxis(),i=Math.min(a,i)/2,null==(r=r.get("radius"))?r=[0,"100%"]:G(r)||(r=[0,r]),i=[mo(r[0],i),mo(r[1],i)],e.inverse?e.setExtent(i[1],i[0]):e.setExtent(i[0],i[1]),l.push(n),(t.coordinateSystem=n).model=t}),t.eachSeries(function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",dr).models[0];if(1,!e)throw new Error('Polar "'+Q(t.get("polarIndex"),t.get("polarId"),0)+'" not found');t.coordinateSystem=e.coordinateSystem}}),l}},xG=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function bG(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),n=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:n[0],y2:n[1]}}function wG(t){return t.getRadiusAxis().inverse?0:1}function SG(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var MG,IG=(u(TG,MG=wC),TG.prototype.render=function(e,t){var n,i,o,r,a,s;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),r=n.getTicksCoords(),a=n.getMinorTicksCoords(),SG(s=L(n.getViewLabels(),function(t){t=S(t);var e=n.scale,e="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(e),t})),SG(r),E(xG,function(t){!e.get([t,"show"])||n.scale.isBlank()&&"axisLine"!==t||DG[t](this.group,e,i,r,a,o,s)},this))},TG.type="angleAxis",TG);function TG(){var t=null!==MG&&MG.apply(this,arguments)||this;return t.type=TG.type,t.axisPointerClass="PolarAxisPointer",t}var CG,DG={axisLine:function(t,e,n,i,o,r){var a=e.getModel(["axisLine","lineStyle"]),s=wG(n),e=s?0:1,a=0===r[e]?new Du({shape:{cx:n.cx,cy:n.cy,r:r[s]},style:a.getLineStyle(),z2:1,silent:!0}):new Qu({shape:{cx:n.cx,cy:n.cy,r:r[s],r0:r[e]},style:a.getLineStyle(),z2:1,silent:!0});a.style.fill=null,t.add(a)},axisTick:function(t,e,n,i,o,r){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=r[wG(n)],i=L(i,function(t){return new fh({shape:bG(n,[l,l+s],t.coord)})});t.add(fc(i,{style:A(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=r[wG(n)],h=[],c=0;c<o.length;c++)for(var p=0;p<o[c].length;p++)h.push(new fh({shape:bG(n,[u,u+l],o[c][p].coord)}));t.add(fc(h,{style:A(s.getModel("lineStyle").getLineStyle(),A(a.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(l,u,h,t,e,c,n){var p=u.getCategories(!0),d=u.getModel("axisLabel"),f=d.get("margin"),g=u.get("triggerEvent");E(n,function(t,e){var n=d,i=t.tickValue,o=c[wG(h)],r=h.coordToPoint([o+f,t.coord]),a=h.cx,s=h.cy,a=Math.abs(r[0]-a)/o<.3?"center":r[0]>a?"left":"right",s=Math.abs(r[1]-s)/o<.3?"middle":r[1]>s?"top":"bottom";p&&p[i]&&(Y(i=p[i])&&i.textStyle&&(n=new ep(i.textStyle,d,d.ecModel)));a=new Xs({silent:lC.isLabelSilent(u),style:Rc(n,{x:r[0],y:r[1],fill:n.getTextColor()||u.get(["axisLine","lineStyle","color"]),text:t.formattedLabel,align:a,verticalAlign:s})});l.add(a),g&&((s=lC.makeAxisEventDataBase(u)).targetType="axisLabel",s.value=t.rawLabel,il(a).eventData=s)},this)},splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;h<i.length;h++){var c=s++%l.length;u[c]=u[c]||[],u[c].push(new fh({shape:bG(n,r,i[h].coord)}))}for(h=0;h<u.length;h++)t.add(fc(u[h],{style:A({stroke:l[h%l.length]},a.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(t,e,n,i,o,r){if(o.length){for(var a=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<o.length;l++)for(var u=0;u<o[l].length;u++)s.push(new fh({shape:bG(n,r,o[l][u].coord)}));t.add(fc(s,{style:a.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(t,e,n,i,o,r){if(i.length){for(var a=e.getModel("splitArea").getModel("areaStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=Math.PI/180,c=-i[0].coord*h,p=Math.min(r[0],r[1]),d=Math.max(r[0],r[1]),f=e.get("clockwise"),g=1,y=i.length;g<=y;g++){var m=(g===y?i[0]:i[g]).coord,v=s++%l.length;u[v]=u[v]||[],u[v].push(new qu({shape:{cx:n.cx,cy:n.cy,r0:p,r:d,startAngle:c,endAngle:-m*h,clockwise:f},silent:!0})),c=-m*h}for(g=0;g<u.length;g++)t.add(fc(u[g],{style:A({fill:l[g%l.length]},a.getAreaStyle()),silent:!0}))}}},AG=["axisLine","axisTickLabel","axisName"],kG=["splitLine","splitArea","minorSplitLine"],LG=(u(PG,CG=wC),PG.prototype.render=function(e,t){var n,i,o,r,a,s,l,u,h,c,p;this.group.removeAll(),e.get("show")&&(n=this._axisGroup,i=this._axisGroup=new io,this.group.add(i),o=e.axis,h=(r=o.polar).getAngleAxis(),a=o.getTicksCoords(),s=o.getMinorTicksCoords(),l=h.getExtent()[0],u=o.getExtent(),p=e,c=l,p={position:[(h=r).cx,h.cy],rotation:c/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:p.getModel("axisLabel").get("rotate"),z2:1},p=new lC(e,p),E(AG,p.add,p),i.add(p.getGroup()),bc(n,i,e),E(kG,function(t){e.get([t,"show"])&&!o.scale.isBlank()&&OG[t](this.group,e,r,l,u,a,s)},this))},PG.type="radiusAxis",PG);function PG(){var t=null!==CG&&CG.apply(this,arguments)||this;return t.type=PG.type,t.axisPointerClass="PolarAxisPointer",t}var OG={splitLine:function(t,e,n,i,o,r){for(var a=e.getModel("splitLine").getModel("lineStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=0;h<r.length;h++){var c=s++%l.length;u[c]=u[c]||[],u[c].push(new Du({shape:{cx:n.cx,cy:n.cy,r:r[h].coord}}))}for(h=0;h<u.length;h++)t.add(fc(u[h],{style:A({stroke:l[h%l.length],fill:null},a.getLineStyle()),silent:!0}))},minorSplitLine:function(t,e,n,i,o,r,a){if(a.length){for(var e=e.getModel("minorSplitLine").getModel("lineStyle"),s=[],l=0;l<a.length;l++)for(var u=0;u<a[l].length;u++)s.push(new Du({shape:{cx:n.cx,cy:n.cy,r:a[l][u].coord}}));t.add(fc(s,{style:A({fill:null},e.getLineStyle()),silent:!0}))}},splitArea:function(t,e,n,i,o,r){if(r.length){for(var a=e.getModel("splitArea").getModel("areaStyle"),s=0,l=(l=a.get("color"))instanceof Array?l:[l],u=[],h=r[0].coord,c=1;c<r.length;c++){var p=s++%l.length;u[p]=u[p]||[],u[p].push(new qu({shape:{cx:n.cx,cy:n.cy,r0:h,r:r[c].coord,startAngle:0,endAngle:2*Math.PI},silent:!0})),h=r[c].coord}for(c=0;c<u.length;c++)t.add(fc(u[c],{style:A({fill:l[c%l.length]},a.getAreaStyle()),silent:!0}))}}};function RG(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function NG(t,e){return e.dim+t.model.componentIndex}function EG(t,e,n){var k={},L=function(t){var l={};E(t,function(t,e){var n=t.getData(),i=t.coordinateSystem,o=i.getBaseAxis(),r=NG(i,o),a=o.getExtent(),s="category"===o.type?o.getBandWidth():Math.abs(a[1]-a[0])/n.count(),i=l[r]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},o=i.stacks;l[r]=i;a=RG(t);o[a]||i.autoWidthCount++,o[a]=o[a]||{width:0,maxWidth:0};n=mo(t.get("barWidth"),s),r=mo(t.get("barMaxWidth"),s),s=t.get("barGap"),t=t.get("barCategoryGap");n&&!o[a].width&&(n=Math.min(i.remainedWidth,n),o[a].width=n,i.remainedWidth-=n),r&&(o[a].maxWidth=r),null!=s&&(i.gap=s),null!=t&&(i.categoryGap=t)});var c={};return E(l,function(t,n){c[n]={};var e=t.stacks,i=t.bandWidth,i=mo(t.categoryGap,i),o=mo(t.gap,1),r=t.remainedWidth,a=t.autoWidthCount,s=(r-i)/(a+(a-1)*o),s=Math.max(s,0);E(e,function(t,e){var n=t.maxWidth;n&&n<s&&(n=Math.min(n,r),t.width&&(n=Math.min(n,t.width)),r-=n,t.width=n,a--)}),s=(r-i)/(a+(a-1)*o),s=Math.max(s,0);var l,u=0;E(e,function(t,e){t.width||(t.width=s),u+=(l=t).width*(1+o)}),l&&(u-=l.width*o);var h=-u/2;E(e,function(t,e){c[n][e]=c[n][e]||{offset:h,width:t.width},h+=t.width*(1+o)})}),c}(R(e.getSeriesByType(t),function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type}));e.eachSeriesByType(t,function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),o=NG(n,i),r=RG(t),o=L[o][r],a=o.offset,s=o.width,l=n.getOtherAxis(i),u=t.coordinateSystem.cx,h=t.coordinateSystem.cy,c=t.get("barMinHeight")||0,p=t.get("barMinAngle")||0;k[r]=k[r]||[];for(var d=e.mapDimension(l.dim),f=e.mapDimension(i.dim),g=ob(e,d),y="radius"!==i.dim||!t.get("roundCap",!0),m=l.dataToCoord(0),v=0,_=e.count();v<_;v++){var x=e.get(d,v),b=e.get(f,v),w=0<=x?"p":"n",S=m;g&&(k[r][b]||(k[r][b]={p:m,n:m}),S=k[r][b][w]);var M,I,T=void 0,C=void 0,D=void 0,A=void 0;"radius"===l.dim?(M=l.dataToCoord(x)-m,I=i.dataToCoord(b),C=(T=S)+(M=Math.abs(M)<c?(M<0?-1:1)*c:M),A=(D=I-a)-s,g&&(k[r][b][w]=C)):(x=l.dataToCoord(x,y)-m,C=(T=i.dataToCoord(b)+a)+s,A=(D=S)+(x=Math.abs(x)<p?(x<0?-1:1)*p:x),g&&(k[r][b][w]=A)),e.setItemLayout(v,{cx:u,cy:h,r0:T,r:C,startAngle:-D*Math.PI/180,endAngle:-A*Math.PI/180,clockwise:A<=D})}}})}var zG,BG={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},VG={splitNumber:5},GG=(u(FG,zG=Iy),FG.type="polar",FG);function FG(){var t=null!==zG&&zG.apply(this,arguments)||this;return t.type=FG.type,t}function HG(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,o={},r=i.position,a=i.orient,i=n.getRect(),n=[i.x,i.x+i.width,i.y,i.y+i.height],i={horizontal:{top:n[2],bottom:n[3]},vertical:{left:n[0],right:n[1]}};o.position=["vertical"===a?i.vertical[r]:n[0],"horizontal"===a?i.horizontal[r]:n[3]];o.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,right:1,left:-1}[r],t.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(e.labelInside,t.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);e=e.rotate;return null==e&&(e=t.get(["axisLabel","rotate"])),o.labelRotation="top"===r?-e:e,o.z2=1,o}var WG,UG=["axisLine","axisTickLabel","axisName"],YG=["splitArea","splitLine"],XG=(u(ZG,WG=wC),ZG.prototype.render=function(e,t,n,i){var o=this.group;o.removeAll();var r=this._axisGroup;this._axisGroup=new io;var a=HG(e),a=new lC(e,a);E(UG,a.add,a),o.add(this._axisGroup),o.add(a.getGroup()),E(YG,function(t){e.get([t,"show"])&&qG[t](this,this.group,this._axisGroup,e)},this),bc(r,this._axisGroup,e),WG.prototype.render.call(this,e,t,n,i)},ZG.prototype.remove=function(){TC(this)},ZG.type="singleAxis",ZG);function ZG(){var t=null!==WG&&WG.apply(this,arguments)||this;return t.type=ZG.type,t.axisPointerClass="SingleAxisPointer",t}var jG,qG={splitLine:function(t,e,n,i){var o=i.axis;if(!o.scale.isBlank()){for(var r=i.getModel("splitLine"),a=r.getModel("lineStyle"),s=(s=a.get("color"))instanceof Array?s:[s],l=i.coordinateSystem.getRect(),u=o.isHorizontal(),h=[],c=0,p=o.getTicksCoords({tickModel:r}),d=[],f=[],g=0;g<p.length;++g){var y=o.toGlobalCoord(p[g].coord);u?(d[0]=y,d[1]=l.y,f[0]=y,f[1]=l.y+l.height):(d[0]=l.x,d[1]=y,f[0]=l.x+l.width,f[1]=y);y=c++%s.length;h[y]=h[y]||[],h[y].push(new fh({subPixelOptimize:!0,shape:{x1:d[0],y1:d[1],x2:f[0],y2:f[1]},silent:!0}))}for(var m=a.getLineStyle(["color"]),g=0;g<h.length;++g)e.add(fc(h[g],{style:A({stroke:s[g%s.length]},m),silent:!0}))}},splitArea:function(t,e,n,i){IC(t,n,i,i)}},KG=(u($G,jG=yd),$G.prototype.getCoordSysModel=function(){return this},$G.type="singleAxis",$G.layoutMode="box",$G.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},$G);function $G(){var t=null!==jG&&jG.apply(this,arguments)||this;return t.type=$G.type,t}T(KG,mw.prototype);var JG,QG=(u(tF,JG=vp),tF.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},tF.prototype.pointToData=function(t,e){return this.coordinateSystem.pointToData(t)[0]},tF);function tF(t,e,n,i,o){n=JG.call(this,t,e,n)||this;return n.type=i||"value",n.position=o||"bottom",n}var eF=["single"],nF=(iF.prototype._init=function(t,e,n){var i=this.dimension,o=new QG(i,hw(t),[0,0],t.get("type"),t.get("position")),i="category"===o.type;o.onBand=i&&t.get("boundaryGap"),o.inverse=t.get("inverse"),o.orient=t.get("orient"),(t.axis=o).model=t,(o.coordinateSystem=this)._axis=o},iF.prototype.update=function(t,e){t.eachSeries(function(t){var e;t.coordinateSystem===this&&(E((e=t.getData()).mapDimensionsAll(this.dimension),function(t){this._axis.scale.unionExtentFromData(e,t)},this),uw(this._axis.scale,this._axis.model))},this)},iF.prototype.resize=function(t,e){this._rect=rd({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},iF.prototype.getRect=function(){return this._rect},iF.prototype._adjustAxis=function(){var t=this._rect,e=this._axis,n=e.isHorizontal(),i=n?[0,t.width]:[0,t.height],o=e.reverse?1:0;e.setExtent(i[o],i[1-o]),this._updateAxisTransform(e,n?t.x:t.y)},iF.prototype._updateAxisTransform=function(t,e){var n=t.getExtent(),i=n[0]+n[1],n=t.isHorizontal();t.toGlobalCoord=n?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord=n?function(t){return t-e}:function(t){return i-t+e}},iF.prototype.getAxis=function(){return this._axis},iF.prototype.getBaseAxis=function(){return this._axis},iF.prototype.getAxes=function(){return[this._axis]},iF.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},iF.prototype.containPoint=function(t){var e=this.getRect(),n=this.getAxis();return"horizontal"===n.orient?n.contain(n.toLocalCoord(t[0]))&&t[1]>=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},iF.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},iF.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],o="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[o]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-o]=0==o?n.y+n.height/2:n.x+n.width/2,i},iF.prototype.convertToPixel=function(t,e,n){return oF(e)===this?this.dataToPoint(n):null},iF.prototype.convertFromPixel=function(t,e,n){return oF(e)===this?this.pointToData(n):null},iF);function iF(t,e,n){this.type="single",this.dimension="single",this.dimensions=eF,this.axisPointerEnabled=!0,this.model=t,this._init(t,e,n)}function oF(t){var e=t.seriesModel,t=t.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}var rF,aF={create:function(i,o){var r=[];return i.eachComponent("singleAxis",function(t,e){var n=new nF(t,i,o);n.name="single_"+e,n.resize(t,o),t.coordinateSystem=n,r.push(n)}),i.eachSeries(function(t){var e;"singleAxis"===t.get("coordinateSystem")&&(e=t.getReferringComponents("singleAxis",dr).models[0],t.coordinateSystem=e&&e.coordinateSystem)}),r},dimensions:eF},sF=["x","y"],lF=["width","height"],uF=(u(hF,rF=Zy),hF.prototype.makeElOption=function(t,e,n,i,o){var r=n.axis,a=r.coordinateSystem,s=dF(a,1-pF(r)),l=a.dataToPoint(e)[0],u=i.get("type");u&&"none"!==u&&(a=hV(i),(s=cF[u](r,l,s)).style=a,t.graphicKey=s.type,t.pointer=s),fV(e,t,HG(n),n,i,o)},hF.prototype.getHandleTransform=function(t,e,n){var i=HG(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);t=dV(e.axis,t,i);return{x:t[0],y:t[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},hF.prototype.updateHandleTransform=function(t,e,n,i){var o=n.axis,r=o.coordinateSystem,a=pF(o),n=dF(r,a),o=[t.x,t.y];o[a]+=e[a],o[a]=Math.min(n[1],o[a]),o[a]=Math.max(n[0],o[a]);r=dF(r,1-a),r=(r[1]+r[0])/2,r=[r,r];return r[a]=o[a],{x:o[0],y:o[1],rotation:t.rotation,cursorPoint:r,tooltipOption:{verticalAlign:"middle"}}},hF);function hF(){return null!==rF&&rF.apply(this,arguments)||this}var cF={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:gV([e,n[0]],[e,n[1]],pF(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:yV([e-i/2,n[0]],[i,o],pF(t))}}};function pF(t){return t.isHorizontal()?0:1}function dF(t,e){t=t.getRect();return[t[sF[e]],t[sF[e]]+t[lF[e]]]}var fF,gF=(u(yF,fF=Iy),yF.type="single",yF);function yF(){var t=null!==fF&&fF.apply(this,arguments)||this;return t.type=yF.type,t}var mF,vF=(u(_F,mF=yd),_F.prototype.init=function(t,e,n){var i=ud(t);mF.prototype.init.apply(this,arguments),xF(t,i)},_F.prototype.mergeOption=function(t){mF.prototype.mergeOption.apply(this,arguments),xF(this.option,t)},_F.prototype.getCellSize=function(){return this.option.cellSize},_F.type="calendar",_F.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},_F);function _F(){var t=null!==mF&&mF.apply(this,arguments)||this;return t.type=_F.type,t}function xF(t,i){var e=t.cellSize,o=G(e)?e:t.cellSize=[e,e];1===o.length&&(o[1]=o[0]);e=L([0,1],function(t){var e,n;return(null!=(e=i)[nd[n=t][0]]||null!=e[nd[n][1]]&&null!=e[nd[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});ld(t,i,{type:"box",ignoreSize:e})}var bF,wF=(u(SF,bF=Iy),SF.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,r=o.getRangeInfo(),o=o.getOrient(),e=e.getLocaleModel();this._renderDayRect(t,r,i),this._renderLines(t,r,o,i),this._renderYearText(t,r,o,i),this._renderMonthText(t,e,o,i),this._renderWeekText(t,e,r,o,i)},SF.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),r=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,l=new Fs({shape:{x:l[0],y:l[1],width:r,height:a},cursor:"default",style:o});n.add(l)}},SF.prototype._renderLines=function(e,t,n,i){var o=this,r=e.coordinateSystem,a=e.getModel(["splitLine","lineStyle"]).getLineStyle(),s=e.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){p(u.formatedDate);var c=(u=0===h?r.getDateInfo(t.start.y+"-"+t.start.m):u).date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function p(t){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);t=o._getLinePointsOfOneWeek(e,t,n);o._tlpoints.push(t[0]),o._blpoints.push(t[t.length-1]),s&&o._drawSplitline(t,a,i)}p(r.getNextNDay(t.end.time,1).formatedDate),s&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,l,n),a,i),s&&this._drawSplitline(o._getEdgesPoints(o._blpoints,l,n),a,i)},SF.prototype._getEdgesPoints=function(t,e,n){t=[t[0].slice(),t[t.length-1].slice()],n="horizontal"===n?0:1;return t[0][n]=t[0][n]-e/2,t[1][n]=t[1][n]+e/2,t},SF.prototype._drawSplitline=function(t,e,n){e=new uh({z2:20,shape:{points:t},style:e});n.add(e)},SF.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,o=i.getDateInfo(e),r=[],a=0;a<7;a++){var s=i.getNextNDay(o.time,a),l=i.dataToRect([s.time],!1);r[2*s.day]=l.tl,r[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return r},SF.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,E(e,function(t,e){n=n.replace("{"+e+"}",i?Xp(t):t)}),n):"function"==typeof t?t(e):e.nameMap;var n,i},SF.prototype._yearTextPositionControl=function(t,e,n,i,o){var r=e[0],a=e[1],e=["center","bottom"];"bottom"===i?(a+=o,e=["center","top"]):"left"===i?r-=o:"right"===i?(r+=o,e=["center","top"]):a-=o;o=0;return{rotation:o="left"===i||"right"===i?Math.PI/2:o,x:r,y:a,style:{align:e[0],verticalAlign:e[1]}}},SF.prototype._renderYearText=function(t,e,n,i){var o,r,a,s,l,u=t.getModel("yearLabel");u.get("show")&&(o=u.get("margin"),r=(r=u.get("position"))||("horizontal"!==n?"top":"left"),a=((s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+s[1][0])/2,l=(s[0][1]+s[1][1])/2,s={top:[a,s[t="horizontal"===n?0:1][1]],bottom:[a,s[1-t][1]],left:[s[1-t][0],l],right:[s[t][0],l]},t=e.start.y,+e.end.y>+e.start.y&&(t=t+"-"+e.end.y),l=u.get("formatter"),t={start:e.start.y,end:e.end.y,nameMap:t},t=this._formatterLabel(l,t),(t=new Xs({z2:30,style:Rc(u,{text:t})})).attr(this._yearTextPositionControl(t,s[r],n,r,o)),i.add(t))},SF.prototype._monthTextPositionControl=function(t,e,n,i,o){var r="left",a="top",s=t[0],t=t[1];return"horizontal"===n?(t+=o,e&&(r="center"),"start"===i&&(a="bottom")):(s+=o,e&&(a="middle"),"start"===i&&(r="right")),{x:s,y:t,align:r,verticalAlign:a}},SF.prototype._renderMonthText=function(t,e,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var r=o.get("nameMap"),a=o.get("margin"),s=o.get("position"),t=o.get("align"),l=[this._tlpoints,this._blpoints];r&&!H(r)||(r=(e=r?dp(r)||e:e).get(["time","monthAbbr"])||[]);for(var u="start"===s?0:1,h="horizontal"===n?0:1,a="start"===s?-a:a,c="center"===t,p=0;p<l[u].length-1;p++){var d=l[u][p].slice(),f=this._firstDayOfMonth[p];c&&(y=this._firstDayPoints[p],d[h]=(y[h]+l[0][p+1][h])/2);var g=o.get("formatter"),y=r[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:y},y=this._formatterLabel(g,y),d=new Xs({z2:30,style:P(Rc(o,{text:y}),this._monthTextPositionControl(d,c,n,s,a))});i.add(d)}}},SF.prototype._weekTextPositionControl=function(t,e,n,i,o){var r="center",a="middle",s=t[0],t=t[1],n="start"===n;return"horizontal"===e?(s=s+i+(n?1:-1)*o[0]/2,r=n?"right":"left"):(t=t+i+(n?1:-1)*o[1]/2,a=n?"bottom":"top"),{x:s,y:t,align:r,verticalAlign:a}},SF.prototype._renderWeekText=function(t,e,n,i,o){var r=t.getModel("dayLabel");if(r.get("show")){var a=t.coordinateSystem,s=r.get("position"),l=r.get("nameMap"),u=r.get("margin"),h=a.getFirstDayOfWeek();l&&!H(l)||(l=(e=l?dp(l)||e:e).get(["time","dayOfWeekShort"])||L(e.get(["time","dayOfWeekAbbr"]),function(t){return t[0]}));var c=a.getNextNDay(n.end.time,7-n.lweek).time,p=[a.getCellWidth(),a.getCellHeight()],u=mo(u,Math.min(p[1],p[0]));"start"===s&&(c=a.getNextNDay(n.start.time,-(7+n.fweek)).time,u=-u);for(var d=0;d<7;d++){var f=a.getNextNDay(c,d),g=a.dataToRect([f.time],!1).center,f=Math.abs((d+h)%7),g=new Xs({z2:30,style:P(Rc(r,{text:l[f]}),this._weekTextPositionControl(g,i,s,u,p))});o.add(g)}}},SF.type="calendar",SF);function SF(){var t=null!==bF&&bF.apply(this,arguments)||this;return t.type=SF.type,t}var MF=(IF.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},IF.prototype.getRangeInfo=function(){return this._rangeInfo},IF.prototype.getModel=function(){return this._model},IF.prototype.getRect=function(){return this._rect},IF.prototype.getCellWidth=function(){return this._sw},IF.prototype.getCellHeight=function(){return this._sh},IF.prototype.getOrient=function(){return this._orient},IF.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},IF.prototype.getDateInfo=function(t){var e=(t=Do(t)).getFullYear(),n=t.getMonth()+1,i=n<10?"0"+n:""+n,o=t.getDate(),n=o<10?"0"+o:""+o,o=t.getDay();return{y:e+"",m:i,d:n,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},IF.prototype.getNextNDay=function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},IF.prototype.update=function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],o=this._model.getCellSize().slice(),r=this._model.getBoxLayoutParams(),a="horizontal"===this._orient?[n,7]:[7,n];E([0,1],function(t){l(o,t)&&(r[i[t]]=o[t]*a[t])});var e={width:e.getWidth(),height:e.getHeight()},s=this._rect=rd(r,e);function l(t,e){return null!=t[e]&&"auto"!==t[e]}E([0,1],function(t){l(o,t)||(o[t]=s[i[t]]/a[t])}),this._sw=o[0],this._sh=o[1]},IF.prototype.dataToPoint=function(t,e){G(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,t=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.time<i.end.time+864e5))return[NaN,NaN];n=n.day,t=this._getRangeInfo([i.start.time,t]).nthWeek;return"vertical"===this._orient?[this._rect.x+n*this._sw+this._sw/2,this._rect.y+t*this._sh+this._sh/2]:[this._rect.x+t*this._sw+this._sw/2,this._rect.y+n*this._sh+this._sh/2]},IF.prototype.pointToData=function(t){t=this.pointToDate(t);return t&&t.time},IF.prototype.dataToRect=function(t,e){e=this.dataToPoint(t,e);return{contentShape:{x:e[0]-(this._sw-this._lineWidth)/2,y:e[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:e,tl:[e[0]-this._sw/2,e[1]-this._sh/2],tr:[e[0]+this._sw/2,e[1]-this._sh/2],br:[e[0]+this._sw/2,e[1]+this._sh/2],bl:[e[0]-this._sw/2,e[1]+this._sh/2]}},IF.prototype.pointToDate=function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,n=Math.floor((t[1]-this._rect.y)/this._sh)+1,t=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(n,e-1,t):this._getDateByWeeksAndDay(e,n-1,t)},IF.prototype.convertToPixel=function(t,e,n){e=TF(e);return e===this?e.dataToPoint(n):null},IF.prototype.convertFromPixel=function(t,e,n){e=TF(e);return e===this?e.pointToData(n):null},IF.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},IF.prototype._initRangeOption=function(){var t,e,n,i,o=this._model.get("range");if(G(o)&&1===o.length&&(o=o[0]),G(o)?i=o:(t=o.toString(),/^\d{4}$/.test(t)&&(i=[t+"-01-01",t+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(t)&&((n=(e=this.getDateInfo(t)).date).setMonth(n.getMonth()+1),n=this.getNextNDay(n,-1),i=[e.formatedDate,n.formatedDate]),/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(t)&&(i=[t,t])),!i)return x("Invalid date range."),o;o=this._getRangeInfo(i);return o.start.time>o.end.time&&i.reverse(),i},IF.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/864e5)-Math.floor(n[0].time/864e5)+1,o=new Date(n[0].time),r=o.getDate(),a=n[1].date.getDate();o.setDate(r+i-1);var s=o.getDate();if(s!==a)for(var l=0<o.getTime()-n[1].time?1:-1;(s=o.getDate())!==a&&0<(o.getTime()-n[1].time)*l;)i-=l,o.setDate(s-l);t=Math.floor((i+n[0].day+6)/7),r=e?1-t:t-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:t,nthWeek:r,fweek:n[0].day,lweek:n[1].day}},IF.prototype._getDateByWeeksAndDay=function(t,e,n){n=this._getRangeInfo(n);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.lweek)return null;t=7*(t-1)-n.fweek+e,e=new Date(n.start.time);return e.setDate(+n.start.d+t),this.getDateInfo(e)},IF.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new IF(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},IF.dimensions=["time","value"],IF);function IF(t,e,n){this.type="calendar",this.dimensions=IF.dimensions,this.getDimensionsInfo=IF.getDimensionsInfo,this._model=t}function TF(t){var e=t.calendarModel,t=t.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem:null}function CF(t){var e=t.graphic;G(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}var DF,AF=ur(),kF={path:null,compoundPath:null,group:io,image:Ps,text:Xs},LF=(u(PF,DF=yd),PF.prototype.mergeOption=function(t,e){var n=this.option.elements;this.option.elements=null,DF.prototype.mergeOption.call(this,t,e),this.option.elements=n},PF.prototype.optionUpdated=function(t,e){var n=this.option,t=(e?n:t).elements,i=n.elements=e?[]:n.elements,n=[];this._flatten(t,n,null);var n=Qo(i,n,"normalMerge"),o=this._elOptionsToUpdate=[];E(n,function(t,e){var n=t.newOption;ot(Y(n)||t.existing,"Empty graphic option definition"),n&&(o.push(n),function(t,e){var n=t.existing;e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId&&((t=e.parentOption)?e.parentId=t.id:n&&(e.parentId=n.parentId));e.parentOption=null}(t,n),function(t,e,n){var i=P({},n),o=t[e],r=n.$action||"merge";{var a;"merge"===r?o?(ot(!(a=n.type)||o.type===a,'Please set $action: "replace" to change `type`'),b(o,i,!0),ld(o,i,{ignoreSize:!0}),hd(n,o)):t[e]=i:"replace"===r?t[e]=i:"remove"===r&&o&&(t[e]=null)}}(i,e,n),function(t,e){if(!t)return;t.hv=e.hv=[BF(e,["left","right"]),BF(e,["top","bottom"])],"group"===t.type&&(e=e,null==(t=t).width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(i[e],n))},this);for(var r=i.length-1;0<=r;r--)null==i[r]?i.splice(r,1):delete i[r].$action},PF.prototype._flatten=function(t,n,i){E(t,function(t){var e;t&&(i&&(t.parentOption=i),n.push(t),e=t.children,"group"===t.type&&e&&this._flatten(e,n,t),delete t.children)},this)},PF.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},PF.type="graphic",PF.defaultOption={elements:[]},PF);function PF(){var t=null!==DF&&DF.apply(this,arguments)||this;return t.type=PF.type,t.preventAutoZ=!0,t}var OF,RF=(u(NF,OF=Iy),NF.prototype.init=function(){this._elMap=ct()},NF.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},NF.prototype._updateElements=function(h){var c,p,t=h.useElOptionsToUpdate();t&&(c=this._elMap,p=this.group,E(t,function(t){var e=nr(t.id,null),n=null!=e?c.get(e):null,i=nr(t.parentId,null),o=null!=i?c.get(i):p,r=t.type,a=t.style;"text"===r&&a&&t.hv&&t.hv[1]&&(a.textVerticalAlign=a.textBaseline=a.verticalAlign=a.align=null);var s=t.textContent,i=t.textConfig;a&&sB(a,r,!!i,!!s)&&(u=lB(a,r,!0),!i&&u.textConfig&&(i=t.textConfig=u.textConfig),!s&&u.textContent&&(s=u.textContent));var l,i=(l=P({},l=t),E(["id","parentId","$action","hv","bounding","textContent"].concat(ed),function(t){delete l[t]}),l);n&&ot(o===n.parent,"Changing parent is not supported.");var u=t.$action||"merge";"merge"===u?n?n.attr(i):EF(e,o,i,c):"replace"===u?(zF(n,c),EF(e,o,i,c)):"remove"===u&&zF(n,c);n=c.get(e);n&&s&&("merge"===u?(e=n.getTextContent())?e.attr(s):n.setTextContent(new Xs(s)):"replace"===u&&n.setTextContent(new Xs(s))),n&&((s=AF(n)).__ecGraphicWidthOption=t.width,s.__ecGraphicHeightOption=t.height,function(t,e,n){var i=il(t).eventData;t.silent||t.ignore||i||(i=il(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(n,h,t),Cc({el:n,componentModel:h,itemName:n.name,itemTooltipOption:t.tooltip}))}))},NF.prototype._relocate=function(t,e){for(var n,i,o=t.option.elements,r=this.group,a=this._elMap,s=e.getWidth(),l=e.getHeight(),u=0;u<o.length;u++)(p=null!=(c=nr((h=o[u]).id,null))?a.get(c):null)&&p.isGroup&&(n=(d=p.parent)===r,i=AF(p),f=AF(d),i.__ecGraphicWidth=mo(i.__ecGraphicWidthOption,n?s:f.__ecGraphicWidth)||0,i.__ecGraphicHeight=mo(i.__ecGraphicHeightOption,n?l:f.__ecGraphicHeight)||0);for(var h,c,p,d,f,u=o.length-1;0<=u;u--)(p=null!=(c=nr((h=o[u]).id,null))?a.get(c):null)&&(d=p.parent,f=AF(d),ad(p,h,d===r?{width:s,height:l}:{width:f.__ecGraphicWidth,height:f.__ecGraphicHeight},null,{hv:h.hv,boundingMode:h.bounding}))},NF.prototype._clear=function(){var e=this._elMap;e.each(function(t){zF(t,e)}),this._elMap=ct()},NF.prototype.dispose=function(){this._clear()},NF.type="graphic",NF);function NF(){var t=null!==OF&&OF.apply(this,arguments)||this;return t.type=NF.type,t}function EF(t,e,n,i){var o=n.type;ot(o,"graphic type MUST be set");o=ft(kF,o)?kF[o]:hc(o);ot(o,"graphic type can not be found");n=new o(n);e.add(n),i.set(t,n),AF(n).__ecGraphicId=t}function zF(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse(function(t){zF(t,e)}),e.removeKey(AF(t).__ecGraphicId),n.remove(t))}function BF(e,t){var n;return E(t,function(t){null!=e[t]&&"auto"!==e[t]&&(n=!0)}),n}var VF=["x","y","radius","angle","single"],GF=["cartesian2d","polar","singleAxis"];function FF(t){return ot(t),t+"Axis"}function HF(t,e){var i,o=ct(),n=[],r=ct();for(t.eachComponent({mainType:"dataZoom",query:e},function(t){r.get(t.uid)||s(t)});i=!1,t.eachComponent("dataZoom",a),i;);function a(t){var n;!r.get(t.uid)&&(n=!1,t.eachTargetAxis(function(t,e){t=o.get(t);t&&t[e]&&(n=!0)}),n)&&(s(t),i=!0)}function s(t){r.set(t.uid,!0),n.push(t),t.eachTargetAxis(function(t,e){(o.get(t)||o.set(t,[]))[e]=!0})}return n}function WF(t){var o=t.ecModel,r={infoList:[],infoMap:ct()};return t.eachTargetAxis(function(t,e){var n,i=o.getComponent(FF(t),e);!i||(n=i.getCoordSysModel())&&(t=n.uid,(e=r.infoMap.get(t))||(e={model:n,axisModels:[]},r.infoList.push(e),r.infoMap.set(t,e)),e.axisModels.push(i))}),r}var UF=(YF.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},YF);function YF(){this.indexList=[],this.indexMap=[]}var XF,n=(u(ZF,XF=yd),ZF.prototype.init=function(t,e,n){var i=jF(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},ZF.prototype.mergeOption=function(t){var e=jF(t);b(this.option,t,!0),b(this.settledOption,e,!0),this._doInit(e)},ZF.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;E([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=i[t[0]]=null)},this),this._resetTarget()},ZF.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ct();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each(function(t){t.indexList.length&&(this._noTarget=!1)},this)},ZF.prototype._fillSpecifiedTargetAxis=function(i){var o=!1;return E(VF,function(t){var e,n=this.getReferringComponents(FF(t),fr);n.specified&&(o=!0,e=new UF,E(n.models,function(t){e.add(t.componentIndex)}),i.set(t,e))},this),o},ZF.prototype._fillAutoTargetAxisByOrient=function(r,e){var t,i=this.ecModel,a=!0;function n(t,e){var n,i,o=t[0];o&&((n=new UF).add(o.componentIndex),r.set(e,n),a=!1,"x"!==e&&"y"!==e||(i=o.getReferringComponents("grid",dr).models[0])&&E(t,function(t){o.componentIndex!==t.componentIndex&&i===t.getReferringComponents("grid",dr).models[0]&&n.add(t.componentIndex)}))}a&&(t="vertical"===e?"y":"x",n(i.findComponents({mainType:t+"Axis"}),t)),a&&n(i.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single"),a&&E(VF,function(t){var e,n;!a||(e=i.findComponents({mainType:FF(t),filter:function(t){return"category"===t.get("type",!0)}}))[0]&&((n=new UF).add(e[0].componentIndex),r.set(t,n),a=!1)},this)},ZF.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(t){e=e||t},this),"y"===e?"vertical":"horizontal"},ZF.prototype._setDefaultThrottle=function(t){t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle&&(t=this.ecModel.option,this.option.throttle=t.animation&&0<t.animationDurationUpdate?100:20)},ZF.prototype._updateRangeUse=function(i){var o=this._rangePropMode,r=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],function(t,e){var n=null!=i[t[0]],t=null!=i[t[1]];n&&!t?o[e]="percent":!n&&t?o[e]="value":r?o[e]=r[e]:n&&(o[e]="percent")})},ZF.prototype.noTarget=function(){return this._noTarget},ZF.prototype.getFirstTargetAxisModel=function(){var n;return this.eachTargetAxis(function(t,e){null==n&&(n=this.ecModel.getComponent(FF(t),e))},this),n},ZF.prototype.eachTargetAxis=function(n,i){this._targetAxisInfoMap.each(function(t,e){E(t.indexList,function(t){n.call(i,e,t)})})},ZF.prototype.getAxisProxy=function(t,e){e=this.getAxisModel(t,e);if(e)return e.__dzAxisProxy},ZF.prototype.getAxisModel=function(t,e){ot(t&&null!=e);var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(FF(t),e)},ZF.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;E([["start","startValue"],["end","endValue"]],function(t){null==e[t[0]]&&null==e[t[1]]||(n[t[0]]=i[t[0]]=e[t[0]],n[t[1]]=i[t[1]]=e[t[1]])},this),this._updateRangeUse(e)},ZF.prototype.setCalculatedRange=function(e){var n=this.option;E(["start","startValue","end","endValue"],function(t){n[t]=e[t]})},ZF.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},ZF.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();e=this.findRepresentativeAxisProxy();return e?e.getDataValueWindow():void 0},ZF.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i<n.length;i++)for(var o=n[i],r=this._targetAxisInfoMap.get(o),a=0;a<r.indexList.length;a++){var s=this.getAxisProxy(o,r.indexList[a]);if(s.hostedBy(this))return s;e=e||s}return e},ZF.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},ZF.prototype.getOrient=function(){return ot(this._orient),this._orient},ZF.type="dataZoom",ZF.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],ZF.defaultOption={zlevel:0,z:4,filterMode:"filter",start:0,end:100},ZF);function ZF(){var t=null!==XF&&XF.apply(this,arguments)||this;return t.type=ZF.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}function jF(e){var n={};return E(["start","end","startValue","endValue","throttle"],function(t){e.hasOwnProperty(t)&&(n[t]=e[t])}),n}var qF,KF=(u($F,qF=n),$F.type="dataZoom.select",$F);function $F(){var t=null!==qF&&qF.apply(this,arguments)||this;return t.type=$F.type,t}var JF,jc=(u(QF,JF=Iy),QF.prototype.render=function(t,e,n,i){this.dataZoomModel=t,this.ecModel=e,this.api=n},QF.type="dataZoom",QF);function QF(){var t=null!==JF&&JF.apply(this,arguments)||this;return t.type=QF.type,t}var tH,eH=(u(nH,tH=jc),nH.type="dataZoom.select",nH);function nH(){var t=null!==tH&&tH.apply(this,arguments)||this;return t.type=nH.type,t}var iH=E,oH=_o,rH=(aH.prototype.hostedBy=function(t){return this._dataZoomModel===t},aH.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},aH.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},aH.prototype.getTargetSeriesModels=function(){var n=[];return this.ecModel.eachSeries(function(t){var e;e=(e=t).get("coordinateSystem"),0<=C(GF,e)&&(e=FF(this._dimName),(e=t.getReferringComponents(e,dr).models[0])&&this._axisIndex===e.componentIndex&&n.push(t))},this),n},aH.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},aH.prototype.getMinMaxSpan=function(){return S(this._minMaxSpan)},aH.prototype.calculateDataWindow=function(i){var o,r=this._dataExtent,s=this.getAxisModel().axis.scale,a=this._dataZoomModel.getRangePropMode(),l=[0,100],u=[],h=[];iH(["start","end"],function(t,e){var n=i[t],t=i[t+"Value"];"percent"===a[e]?(null==n&&(n=l[e]),t=s.parse(yo(n,l,r))):(o=!0,n=yo(t=null==t?r[e]:s.parse(t),r,l)),h[e]=t,u[e]=n}),oH(h),oH(u);var c=this._minMaxSpan;function t(t,e,n,i,o){var r=o?"Span":"ValueSpan";CO(0,t,n,"all",c["min"+r],c["max"+r]);for(var a=0;a<2;a++)e[a]=yo(t[a],n,i,!0),o&&(e[a]=s.parse(e[a]))}return o?t(h,u,r,l,!1):t(u,h,l,r,!0),{valueWindow:h,percentWindow:u}},aH.prototype.reset=function(t){var e;t===this._dataZoomModel&&(e=this.getTargetSeriesModels(),this._dataExtent=function(t,i,e){var o=[1/0,-1/0];iH(e,function(t){var e,n;e=o,n=t.getData(),t=i,n&&E(yw(n,t),function(t){t=n.getApproximateExtent(t);t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])})});t=t.getAxisModel(),t=aw(t.axis.scale,t,o).calculate();return[t.min,t.max]}(this,this._dimName,e),this._updateMinMaxSpan(),t=this.calculateDataWindow(t.settledOption),this._valueWindow=t.valueWindow,this._percentWindow=t.percentWindow,this._setAxisModel())},aH.prototype.filterData=function(t,e){var o,n,r,c;t===this._dataZoomModel&&(o=this._dimName,n=this.getTargetSeriesModels(),r=t.get("filterMode"),c=this._valueWindow,"none"!==r&&iH(n,function(n){var l,u,i=n.getData(),h=i.mapDimensionsAll(o);h.length&&("weakFilter"===r?(l=i.getStore(),u=L(h,function(t){return i.getDimensionIndex(t)},i),i.filterSelf(function(t){for(var e,n,i,o=0;o<h.length;o++){var r=l.get(u[o],t),a=!isNaN(r),s=r<c[0],r=r>c[1];if(a&&!s&&!r)return!0;a&&(i=!0),s&&(e=!0),r&&(n=!0)}return i&&e&&n})):iH(h,function(t){var e;"empty"===r?n.setData(i=i.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,i.selectRange(e))}),iH(h,function(t){i.setApproximateExtent(c,t)}))}))},aH.prototype._updateMinMaxSpan=function(){var i=this._minMaxSpan={},o=this._dataZoomModel,r=this._dataExtent;iH(["min","max"],function(t){var e=o.get(t+"Span"),n=o.get(t+"ValueSpan");null!=(n=null!=n?this.getAxisModel().axis.scale.parse(n):n)?e=yo(r[0]+n,r,[0,100],!0):null!=e&&(n=yo(e,[0,100],r,!0)-r[0]),i[t+"Span"]=e,i[t+"ValueSpan"]=n},this)},aH.prototype._setAxisModel=function(){var t,e=this.getAxisModel(),n=this._percentWindow,i=this._valueWindow;n&&(t=wo(i,[0,500]),t=Math.min(t,20),e=e.axis.scale.rawExtentInfo,0!==n[0]&&e.setDeterminedMinMax("min",+i[0].toFixed(t)),100!==n[1]&&e.setDeterminedMinMax("max",+i[1].toFixed(t)),e.freeze())},aH);function aH(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}var sH={getTargetSeries:function(r){function t(o){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(t,e){var n=r.getComponent(FF(t),e);o(t,e,n,i)})})}t(function(t,e,n,i){n.__dzAxisProxy=null});var o=[];t(function(t,e,n,i){n.__dzAxisProxy||(n.__dzAxisProxy=new rH(t,e,i,r),o.push(n.__dzAxisProxy))});var e=ct();return E(o,function(t){E(t.getTargetSeriesModels(),function(t){e.set(t.uid,t)})}),e},overallReset:function(t,i){t.eachComponent("dataZoom",function(n){n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).reset(n)}),n.eachTargetAxis(function(t,e){n.getAxisProxy(t,e).filterData(n,i)})}),t.eachComponent("dataZoom",function(t){var e,n=t.findRepresentativeAxisProxy();n&&(e=n.getDataPercentWindow(),n=n.getDataValueWindow(),t.setCalculatedRange({start:e[0],end:e[1],startValue:n[0],endValue:n[1]}))})}};var lH=!1;function uH(t){lH||(lH=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,sH),t.registerAction("dataZoom",function(e,t){E(HF(t,e),function(t){t.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})}),t.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function hH(t){t.registerComponentModel(KF),t.registerComponentView(eH),uH(t)}function cH(){}var pH={};function dH(t,e){pH[t]=e}function fH(t){return pH[t]}var gH,yH=(u(mH,gH=yd),mH.prototype.optionUpdated=function(){gH.prototype.optionUpdated.apply(this,arguments);var n=this.ecModel;E(this.option.feature,function(t,e){e=fH(e);e&&(e.getDefaultOption&&(e.defaultOption=e.getDefaultOption(n)),b(t,e.defaultOption))})},mH.type="toolbox",mH.layoutMode={type:"box",ignoreSize:!0},mH.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},mH);function mH(){var t=null!==gH&&gH.apply(this,arguments)||this;return t.type=mH.type,t}function vH(t,e){var n=Wp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Fs({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var _H,xH=(u(bH,_H=Iy),bH.prototype.render=function(h,c,p,a){var d,s,l,u,t,e,n,i,o,r,f=this.group;function g(t,e){var n,i=u[t],o=u[e],t=s[i],e=new ep(t,h,h.ecModel);if(a&&null!=a.newTitle&&a.featureName===i&&(t.title=a.newTitle),i&&!o){if(0===i.indexOf("my"))n={onclick:e.option.onclick,featureName:i};else{var r=fH(i);if(!r)return;n=new r}l[i]=n}else if(!(n=l[o]))return;n.uid=op("toolbox-feature"),n.model=e,n.ecModel=c,n.api=p;r=n instanceof cH;i||!o?!e.get("show")||r&&n.unusable?r&&n.remove&&n.remove(c,p):(function(o,r,t){var e,a,s=o.getModel("iconStyle"),l=o.getModel(["emphasis","iconStyle"]),n=r instanceof cH&&r.getIcons?r.getIcons():o.get("icon"),i=o.get("title")||{};"string"==typeof n?(e={})[t]=n:e=n;"string"==typeof i?(a={})[t]=i:a=i;var u=o.iconPaths={};E(e,function(t,e){var n=Mc(t,{},{x:-d/2,y:-d/2,width:d,height:d});n.setStyle(s.getItemStyle()),n.ensureState("emphasis").style=l.getItemStyle();var i=new Xs({style:{text:a[e],align:l.get("textAlign"),borderRadius:l.get("textBorderRadius"),padding:l.get("textPadding"),fill:null},ignore:!0});n.setTextContent(i),Cc({el:n,componentModel:h,itemName:e,formatterParamsExtra:{title:a[e]}}),n.__title=a[e],n.on("mouseover",function(){var t=l.getItemStyle(),e="vertical"===h.get("orient")?null==h.get("right")?"right":"left":null==h.get("bottom")?"bottom":"top";i.setStyle({fill:l.get("textFill")||t.fill||t.stroke||"#000",backgroundColor:l.get("textBackgroundColor")}),n.setTextConfig({position:l.get("textPosition")||e}),i.ignore=!h.get("showTitle"),zl(this)}).on("mouseout",function(){"emphasis"!==o.get(["iconStatus",e])&&Bl(this),i.hide()}),("emphasis"===o.get(["iconStatus",e])?zl:Bl)(n),f.add(n),n.on("click",B(r.onclick,r,c,p,e)),u[e]=n})}(e,n,i),e.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?zl:Bl)(i[t])},n instanceof cH&&n.render&&n.render(e,c,p,a)):r&&n.dispose&&n.dispose(c,p)}f.removeAll(),h.get("show")&&(d=+h.get("itemSize"),s=h.get("feature")||{},l=this._features||(this._features={}),u=[],E(s,function(t,e){u.push(e)}),new Mx(this._featureNames||[],u).add(g).update(g).remove(V(g,null)).execute(),this._featureNames=u,t=f,n=p,i=(e=h).getBoxLayoutParams(),o=e.get("padding"),r={width:n.getWidth(),height:n.getHeight()},n=rd(i,r,o),od(e.get("orient"),t,e.get("itemGap"),n.width,n.height),ad(t,i,r,o),f.add(vH(f.getBoundingRect(),h)),f.eachChild(function(t){var e=t.__title,n=t.ensureState("emphasis"),i=n.textConfig||(n.textConfig={}),o=t.getTextContent(),r=o&&o.states.emphasis;r&&!F(r)&&e&&(n=r.style||(r.style={}),o=Gi(e,Xs.makeFont(n)),r=t.x+f.x,e=!1,t.y+f.y+d+o.height>p.getHeight()&&(i.position="top",e=!0),e=e?-5-o.height:d+8,r+o.width/2>p.getWidth()?(i.position=["100%",e],n.align="right"):r-o.width/2<0&&(i.position=[0,e],n.align="left"))}))},bH.prototype.updateView=function(t,e,n,i){E(this._features,function(t){t instanceof cH&&t.updateView&&t.updateView(t.model,e,n,i)})},bH.prototype.remove=function(e,n){E(this._features,function(t){t instanceof cH&&t.remove&&t.remove(e,n)}),this.group.removeAll()},bH.prototype.dispose=function(e,n){E(this._features,function(t){t instanceof cH&&t.dispose&&t.dispose(e,n)})},bH.type="toolbox",bH);function bH(){return null!==_H&&_H.apply(this,arguments)||this}var wH,SH=(u(MH,wH=cH),MH.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),r=o?"svg":n.get("type",!0)||"png",a=e.getConnectedDataURL({type:r,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!w.browser.newEdge&&(w.browser.ie||w.browser.edge))if(window.navigator.msSaveOrOpenBlob||o){var e=a.split(","),t=-1<e[0].indexOf("base64"),s=o?decodeURIComponent(e[1]):e[1];t&&(s=window.atob(s));o=i+"."+r;if(window.navigator.msSaveOrOpenBlob){for(var l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,o)}else{e=document.createElement("iframe");document.body.appendChild(e);t=e.contentWindow,h=t.document;h.open("image/svg+xml","replace"),h.write(s),h.close(),t.focus(),h.execCommand("SaveAs",!0,o),document.body.removeChild(e)}}else{var c=n.get("lang"),n='<body style="margin:0;"><img src="'+a+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>',c=window.open();c.document.write(n),c.document.title=i}else{c=document.createElement("a");c.download=i+"."+r,c.target="_blank",c.href=a;a=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(a)}},MH.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},MH);function MH(){return null!==wH&&wH.apply(this,arguments)||this}SH.prototype.unusable=!w.canvasSupported;var IH,TH="__ec_magicType_stack__",CH=[["line","bar"],["stack"]],DH=(u(AH,IH=cH),AH.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n},AH.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},AH.prototype.onclick=function(t,e,a){var s,n,l=this.model,i=l.get(["seriesIndex",a]);kH[a]&&(s={series:[]},E(CH,function(t){0<=C(t,a)&&E(t,function(t){l.setIconStatus(t,"normal")})}),l.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:null==i?null:{seriesIndex:i}},function(t){var e=t.subType,n=t.id,n=kH[a](e,n,t,l);n&&(A(n,t.option),s.series.push(n));n=t.coordinateSystem;if(n&&"cartesian2d"===n.type&&("line"===a||"bar"===a)){n=n.getAxesByScale("ordinal")[0];if(n){var i=n.dim+"Axis",o=t.getReferringComponents(i,dr).models[0].componentIndex;s[i]=s[i]||[];for(var r=0;r<=o;r++)s[i][o]=s[i][o]||{};s[i][o].boundaryGap="bar"===a}}}),"stack"===(i=a)&&(n=b({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title),"emphasis"!==l.get(["iconStatus",a])&&(i="tiled")),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:s,newTitle:n,featureName:"magicType"}))},AH);function AH(){return null!==IH&&IH.apply(this,arguments)||this}var kH={line:function(t,e,n,i){if("bar"===t)return b({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return b({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){n=n.get("stack")===TH;if("line"===t||"bar"===t)return i.setIconStatus("stack",n?"normal":"emphasis"),b({id:e,stack:n?"":TH},i.get(["option","stack"])||{},!0)}};hx({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)});var LH=new Array(60).join("-"),PH="\t";function OH(t){var o,r,a,h,t=(o={},r=[],a=[],t.eachRawSeries(function(t){var e,n,i=t.coordinateSystem;i&&("cartesian2d"===i.type||"polar"===i.type)&&"category"===(e=i.getBaseAxis()).type?(n=e.dim+"_"+e.index,o[n]||(o[n]={categoryAxis:e,valueAxis:i.getOtherAxis(e),series:[]},a.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t)):r.push(t)}),{seriesGroupByCategoryAxis:o,other:r,meta:a});return{value:R([(h=[],E(t.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(L(t.series,function(t){return t.name})),r=[n.model.getCategories()];E(t.series,function(t){var e=t.getRawData();r.push(t.getRawData().mapArray(e.mapDimension(i),function(t){return t}))});for(var a=[o.join(PH)],s=0;s<r[0].length;s++){for(var l=[],u=0;u<r.length;u++)l.push(r[u][s]);a.push(l.join(PH))}h.push(a.join("\n"))}),h.join("\n\n"+LH+"\n\n")),L(t.other,function(t){var i=t.getRawData(),o=[t.name],r=[];return i.each(i.dimensions,function(){for(var t=arguments.length,e=arguments[t-1],e=i.getName(e),n=0;n<t-1;n++)r[n]=arguments[n];o.push((e?e+PH:"")+r.join(PH))}),o.join("\n")}).join("\n\n"+LH+"\n\n")],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join("\n\n"+LH+"\n\n"),meta:t.meta}}function RH(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var NH=new RegExp("["+PH+"]+","g");function EH(t,o){var t=t.split(new RegExp("\n*"+LH+"\n*","g")),r={series:[]};return E(t,function(t,e){var n,i;0<=(i=t).slice(0,i.indexOf("\n")).indexOf(PH)?(n=function(t){for(var e=t.split(/\n+/g),n=[],i=L(RH(e.shift()).split(NH),function(t){return{name:t,data:[]}}),o=0;o<e.length;o++){var r=RH(e[o]).split(NH);n.push(r.shift());for(var a=0;a<r.length;a++)i[a]&&(i[a].data[o]=r[a])}return{series:i,categories:n}}(t),e=(i=o[e]).axisDim+"Axis",i&&(r[e]=r[e]||[],r[e][i.axisIndex]={data:n.categories},r.series=r.series.concat(n.series))):(n=function(t){for(var e=t.split(/\n+/g),t=RH(e.shift()),n=[],i=0;i<e.length;i++){var o=RH(e[i]);if(o){for(var r,a=o.split(NH),s=void 0,o=!1,s=isNaN(a[0])?(o=!0,r=a[0],a=a.slice(1),n[i]={name:r,value:[]},n[i].value):n[i]=[],l=0;l<a.length;l++)s.push(+a[l]);1===s.length&&(o?n[i].value=s[0]:n[i]=s[0])}}return{name:t,data:n}}(t),r.series.push(n))}),r}var zH,BH=(u(VH,zH=cH),VH.prototype.onclick=function(t,e){var n=e.getDom(),i=this.model;this._dom&&n.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",o.style.backgroundColor=i.get("backgroundColor")||"#fff";var r=document.createElement("h4"),a=i.get("lang")||[];r.innerHTML=a[0]||i.get("title"),r.style.cssText="margin: 10px 20px;",r.style.color=i.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var u=i.get("optionToContent"),h=i.get("contentToOption"),c=OH(t);"function"==typeof u?"string"==typeof(f=u(e.getOption()))?s.innerHTML=f:j(f)&&s.appendChild(f):(s.appendChild(l),l.readOnly=i.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=i.get("textColor"),l.style.borderColor=i.get("textareaBorderColor"),l.style.backgroundColor=i.get("textareaColor"),l.value=c.value);var p=c.meta,d=document.createElement("div");d.style.cssText="position:absolute;bottom:0;left:0;right:0;";var t="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",f=document.createElement("div"),c=document.createElement("div");t+=";background-color:"+i.get("buttonColor"),t+=";color:"+i.get("buttonTextColor");var g=this;function y(){n.removeChild(o),g._dom=null}ne(f,"click",y),ne(c,"click",function(){if(null==h&&null!=u||null!=h&&null==u)return console.warn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),void y();var t;try{t="function"==typeof h?h(s,e.getOption()):EH(l.value,p)}catch(t){throw y(),new Error("Data view format error "+t)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),y()}),f.innerHTML=a[1],c.innerHTML=a[2],c.style.cssText=t,f.style.cssText=t,i.get("readOnly")||d.appendChild(c),d.appendChild(f),o.appendChild(r),o.appendChild(s),o.appendChild(d),s.style.height=n.clientHeight-80+"px",n.appendChild(o),this._dom=o},VH.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},VH.prototype.dispose=function(t,e){this.remove(t,e)},VH.getDefaultOption=function(t){return{show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"}},VH);function VH(){return null!==zH&&zH.apply(this,arguments)||this}hx({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(t,o){var r=[];E(t.newOption.series,function(t){var e,i,n=o.getSeriesByName(t.name)[0];n?(e=n.get("data"),r.push({name:t.name,data:(n=t.data,i=e,L(n,function(t,e){var n=i&&i[e];if(!Y(n)||G(n))return t;Y(t)&&!G(t)||(t={value:t});e=null!=n.name&&null==t.name;return t=A(t,n),e&&delete t.name,t}))})):r.push(P({type:"scatter"},t))}),o.mergeOption(A({series:r},t.newOption))});var GH=E,FH=ur();function HH(t){t=FH(t);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var WH,UH=(u(YH,WH=cH),YH.prototype.onclick=function(t,e){FH(t).snapshots=null,e.dispatchAction({type:"restore",from:this.uid})},YH.getDefaultOption=function(t){return{show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])}},YH);function YH(){return null!==WH&&WH.apply(this,arguments)||this}hx({type:"restore",event:"restore",update:"prepareAndUpdate"},function(t,e){e.resetOption("recreate")});var XH=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],ZH=(jH.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(t,e,n){(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,e=tW[t.brushType](0,n,e),t.__rangeOffset={offset:nW[t.brushType](e.values,t.range,[1,1]),xyMinMax:e.xyMinMax})}),t},jH.prototype.matchOutputRanges=function(t,i,o){E(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&E(t.coordSyses,function(t){var e=tW[n.brushType](1,t,n.range,!0);o(n,e.values,t,i)})},this)},jH.prototype.setInputRanges=function(t,i){E(t,function(t){var e,n=this.findTargetInfo(t,i);ot(!n||!0===n||t.coordRange,"coordRange must be specified when coord index specified."),ot(!n||!0!==n||t.range,"range must be specified in global brush."),t.range=t.range||[],n&&!0!==n&&(t.panelId=n.panelId,e=tW[t.brushType](0,n.coordSys,t.coordRange),n=t.__rangeOffset,t.range=n?nW[t.brushType](e.values,n.offset,function(t,e){t=oW(t),e=oW(e),e=[t[0]/e[0],t[1]/e[1]];return isNaN(e[0])&&(e[0]=1),isNaN(e[1])&&(e[1]=1),e}(e.xyMinMax,n.xyMinMax)):e.values)},this)},jH.prototype.makePanelOpts=function(n,i){return L(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i?i(t):null,clipPath:ER(e),isTargetByCursor:BR(e,n,t.coordSysModel),getLinearBrushOtherExtent:zR(e)}})},jH.prototype.controlSeries=function(t,e,n){n=this.findTargetInfo(t,n);return!0===n||n&&0<=C(n.coordSyses,e.coordinateSystem)},jH.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=KH(e,t),o=0;o<n.length;o++){var r=n[o],a=t.panelId;if(a){if(r.panelId===a)return r}else for(var s=0;s<JH.length;s++)if(JH[s](i,r))return r}return!0},jH);function jH(t,e,n){var i=this;this._targetInfoList=[];var o=KH(e,t);E($H,function(t,e){n&&n.include&&!(0<=C(n.include,e))||t(o,i._targetInfoList)})}function qH(t){return t[0]>t[1]&&t.reverse(),t}function KH(t,e){return cr(t,e,{includeMainTypes:XH})}var $H={grid:function(t,i){var o=t.xAxisModels,r=t.yAxisModels,t=t.gridModels,e=ct(),a={},s={};(o||r||t)&&(E(o,function(t){t=t.axis.grid.model;e.set(t.id,t),a[t.id]=!0}),E(r,function(t){t=t.axis.grid.model;e.set(t.id,t),s[t.id]=!0}),E(t,function(t){e.set(t.id,t),a[t.id]=!0,s[t.id]=!0}),e.each(function(t){var e=t.coordinateSystem,n=[];E(e.getCartesians(),function(t,e){(0<=C(o,t.getAxis("x").model)||0<=C(r,t.getAxis("y").model))&&n.push(t)}),i.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:n[0],coordSyses:n,getPanelRect:QH.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})}))},geo:function(t,n){E(t.geoModels,function(t){var e=t.coordinateSystem;n.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:e,coordSyses:[e],getPanelRect:QH.geo})})}},JH=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,t=t.gridModel;return(t=!(t=!t&&n?n.axis.grid.model:t)&&i?i.axis.grid.model:t)&&t===e.gridModel},function(t,e){t=t.geoModel;return t&&t===e.geoModel}],QH={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(mc(t)),e}},tW={lineX:V(eW,0),lineY:V(eW,1),rect:function(t,e,n,i){var o=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),i=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),i=[qH([o[0],i[0]]),qH([o[1],i[1]])];return{values:i,xyMinMax:i}},polygon:function(e,n,t,i){var o=[[1/0,-1/0],[1/0,-1/0]];return{values:L(t,function(t){t=e?n.pointToData(t,i):n.dataToPoint(t,i);return o[0][0]=Math.min(o[0][0],t[0]),o[1][0]=Math.min(o[1][0],t[1]),o[0][1]=Math.max(o[0][1],t[0]),o[1][1]=Math.max(o[1][1],t[1]),t}),xyMinMax:o}}};function eW(t,e,n,i){ot("cartesian2d"===n.type,"lineX/lineY brush is available only in cartesian2d.");var o=n.getAxis(["x","y"][t]),r=qH(L([0,1],function(t){return e?o.coordToData(o.toLocalCoord(i[t]),!0):o.toGlobalCoord(o.dataToCoord(i[t]))})),n=[];return n[t]=r,n[1-t]=[NaN,NaN],{values:r,xyMinMax:n}}var nW={lineX:V(iW,0),lineY:V(iW,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,n,i){return L(t,function(t,e){return[t[0]-i[0]*n[e][0],t[1]-i[1]*n[e][1]]})}};function iW(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function oW(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var rW,aW=E,sW=jo+"toolbox-dataZoom_",lW=(u(uW,rW=cH),uW.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new iR(n.getZr()),this._brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,o){var r=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(r="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=r,t.setIconStatus("zoom",r?"emphasis":"normal");o=new ZH(dW(t),e,{include:["grid"]}).makePanelOpts(o,function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"});n._brushController.setPanels(o).enableBrush(!(!r||!o.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),e=e,t.setIconStatus("back",1<function(t){return HH(t).length}(e)?"emphasis":"normal")},uW.prototype.onclick=function(t,e,n){pW[n].call(this)},uW.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},uW.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},uW.prototype._onBrush=function(t){var s,l,o,r,e=t.areas;function i(t,e,n){var i,o,r,a=e.getAxis(t),e=a.model,t=(i=t,o=e,l.eachComponent({mainType:"dataZoom",subType:"select"},function(t){t.getAxisModel(i,o.componentIndex)&&(r=t)}),r),e=t.findRepresentativeAxisProxy(e).getMinMaxSpan();null==e.minValueSpan&&null==e.maxValueSpan||(n=CO(0,n.slice(),a.scale.getExtent(),0,e.minValueSpan,e.maxValueSpan)),t&&(s[t.id]={dataZoomId:t.id,startValue:n[0],endValue:n[1]})}t.isEnd&&e.length&&(s={},l=this.ecModel,this._brushController.updateCovers([]),new ZH(dW(this.model),l,{include:["grid"]}).matchOutputRanges(e,l,function(t,e,n){"cartesian2d"===n.type&&("rect"===(t=t.brushType)?(i("x",n,e[0]),i("y",n,e[1])):i({lineX:"x",lineY:"y"}[t],n,e))}),e=s,r=HH(o=l),GH(e,function(t,e){for(var n,i=r.length-1;0<=i;i--)if(r[i][e])break;i<0&&((n=o.queryComponents({mainType:"dataZoom",subType:"select",id:e})[0])&&(n=n.getPercentRange(),r[0][e]={dataZoomId:e,start:n[0],end:n[1]}))}),r.push(e),this._dispatchZoomAction(s))},uW.prototype._dispatchZoomAction=function(t){var n=[];aW(t,function(t,e){n.push(S(t))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},uW.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},uW);function uW(){return null!==rW&&rW.apply(this,arguments)||this}var hW,cW,pW={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var i=HH(t),t=i[i.length-1];1<i.length&&i.pop();var o={};return GH(t,function(t,e){for(var n=i.length-1;0<=n;n--)if(t=i[n][e]){o[e]=t;break}}),o}(this.ecModel))}};function dW(t){t={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==t.xAxisIndex&&null==t.xAxisId&&(t.xAxisIndex="all"),null==t.yAxisIndex&&null==t.yAxisId&&(t.yAxisIndex="all"),t}hW="dataZoom",cW=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),o=[],t=cr(t,dW(i));return aW(t.xAxisModels,function(t){return r(t,"xAxis","xAxisIndex")}),aW(t.yAxisModels,function(t){return r(t,"yAxis","yAxisIndex")}),o}function r(t,e,n){t=t.componentIndex,e={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:sW+e+t};e[n]=t,o.push(e)}},ot(null==zd.get(hW)&&cW),zd.set(hW,cW);var fW,gW=(u(yW,fW=yd),yW.type="tooltip",yW.dependencies=["axisPointer"],yW.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},yW);function yW(){var t=null!==fW&&fW.apply(this,arguments)||this;return t.type=yW.type,t}function mW(t){var e=t.get("confine");return null!=e?e:"richText"===t.get("renderMode")}function vW(t){if(w.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n<i;n++)if(t[n]in e)return t[n]}var _W=vW(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function xW(t,e){if(!t)return e;e=Hp(e,!0);var n=t.indexOf(e);return(t=-1===n?e:"-"+t.slice(0,n)+"-"+e).toLowerCase()}var bW=xW(vW(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),wW=xW(_W,"transform"),SW="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(w.transform3dSupported?"will-change:transform;":"");function MW(t,e,n){var i=t.toFixed(0)+"px",t=e.toFixed(0)+"px";if(!w.transformSupported)return n?"top:"+t+";left:"+i+";":[["top",t],["left",i]];e=w.transform3dSupported,e="translate"+(e?"3d":"")+"("+i+","+t+(e?",0":"")+")";return n?"top:0;left:0;"+wW+":"+e+";":[["top",0],["left",0],[_W,e]]}function IW(i,t,e){var o=[],n=i.get("transitionDuration"),r=i.get("backgroundColor"),a=i.get("shadowBlur"),s=i.get("shadowColor"),l=i.get("shadowOffsetX"),u=i.get("shadowOffsetY"),h=i.getModel("textStyle"),c=ly(i,"html"),a=l+"px "+u+"px "+a+"px "+s;return o.push("box-shadow:"+a),t&&n&&o.push((n="opacity"+(t=" "+(s=n)/2+"s "+(a="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+t,e||(t=" "+s+"s "+a,n+=w.transformSupported?","+wW+t:",left"+t+",top"+t),bW+":"+n)),r&&(w.canvasSupported?o.push("background-color:"+r):(o.push("background-color:#"+an(r)),o.push("filter:alpha(opacity=70)"))),E(["width","color","radius"],function(t){var e="border-"+t,n=Hp(e),n=i.get(n);null!=n&&o.push(e+":"+n+("color"===t?"":"px"))}),o.push(function(n){var i=[],t=n.get("fontSize");(r=n.getTextColor())&&i.push("color:"+r),i.push("font:"+n.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px");var e=n.get("textShadowColor"),o=n.get("textShadowBlur")||0,r=n.get("textShadowOffsetX")||0,t=n.get("textShadowOffsetY")||0;return e&&o&&i.push("text-shadow:"+r+"px "+t+"px "+o+"px "+e),E(["decoration","align"],function(t){var e=n.get(t);e&&i.push("text-"+t+":"+e)}),i.join(";")}(h)),null!=c&&o.push("padding:"+Wp(c).join("px ")+"px"),o.join(";")+";"}function TW(t,e,n,i,o){var r,a,s=e&&e.painter;n?(a=s&&s.getViewportRoot())&&(r=t,n=a,a=document.body,Zt(Xt,n,i,o,!0)&&Zt(r,a,Xt[0],Xt[1])):(t[0]=i,t[1]=o,(s=s&&s.getViewportRootOffset())&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)),t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var CW=(DW.prototype.update=function(t){var e,n,i=this._container,e=(n="position",(e=(e=i).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(e))?n?e[n]:e:null),i=i.style;"absolute"!==i.position&&"absolute"!==e&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},DW.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,o=this._styleCoord;n.innerHTML?i.cssText=SW+IW(t,!this._firstShow,this._longHide)+MW(o[0],o[1],!0)+"border-color:"+Jp(e)+";"+(t.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},DW.prototype.setContent=function(t,e,n,i,o){var r=this.el;if(null!=t){var a="";if(H(o)&&"item"===n.get("trigger")&&!mW(n)&&(a=function(t,e,n){if(!H(n)||"inside"===n)return"";var i=t.get("backgroundColor"),o=t.get("borderWidth");e=Jp(e);var r=s="left"===(s=n)?"right":"right"===s?"left":"top"===s?"bottom":"top",a=Math.max(1.5*Math.round(o),6),t="",n=wW+":";-1<C(["left","right"],r)?(t+="top:50%",n+="translateY(-50%) rotate("+(l="left"==r?-225:-45)+"deg)"):(t+="left:50%",n+="translateX(-50%) rotate("+(l="top"==r?225:45)+"deg)");var s=l*Math.PI/180,l=a+o,s=l*Math.abs(Math.cos(s))+l*Math.abs(Math.sin(s)),e=e+" solid "+o+"px;";return'<div style="'+["position:absolute;width:"+a+"px;height:"+a+"px;",(t+=";"+r+":-"+Math.round(100*((s-Math.SQRT2*o)/2+Math.SQRT2*o-(s-l)/2))/100+"px")+";"+n+";","border-bottom:"+e,"border-right:"+e,"background-color:"+i+";"].join("")+'"></div>'}(n,i,o)),H(t))r.innerHTML=t+a;else if(t){r.innerHTML="",G(t)||(t=[t]);for(var s=0;s<t.length;s++)j(t[s])&&t[s].parentNode!==r&&r.appendChild(t[s]);a&&r.childNodes.length&&((o=document.createElement("div")).innerHTML=a,r.appendChild(o))}}else r.innerHTML=""},DW.prototype.setEnterable=function(t){this._enterable=t},DW.prototype.getSize=function(){var t=this.el;return[t.offsetWidth,t.offsetHeight]},DW.prototype.moveTo=function(t,e){var n,i=this._styleCoord;TW(i,this._zr,this._appendToBody,t,e),null!=i[0]&&null!=i[1]&&(n=this.el.style,E(MW(i[0],i[1]),function(t){n[t[0]]=t[1]}))},DW.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},DW.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",w.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},DW.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(B(this.hide,this),t)):this.hide())},DW.prototype.isShow=function(){return this._show},DW.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)},DW);function DW(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,w.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var o=this._zr=e.getZr(),n=this._appendToBody=n&&n.appendToBody;TW(this._styleCoord,o,n,e.getWidth()/2,e.getHeight()/2),(n?document.body:t).appendChild(i),this._container=t;var r=this;i.onmouseenter=function(){r._enterable&&(clearTimeout(r._hideTimeout),r._show=!0),r._inContent=!0},i.onmousemove=function(t){var e;t=t||window.event,r._enterable||(e=o.handler,ee(o.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t))},i.onmouseleave=function(){r._inContent=!1,r._enterable&&r._show&&r.hideLater(r._hideDelay)}}var AW=(kW.prototype.update=function(t){t.get("alwaysShowContent")&&this._moveIfResized()},kW.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},kW.prototype.setContent=function(t,e,n,i,o){Y(t)&&Xo("Passing DOM nodes as content is not supported in richText tooltip!"),this.el&&this._zr.remove(this.el);var r=n.getModel("textStyle");this.el=new Xs({style:{rich:e.richTextStyles,text:t,lineHeight:22,backgroundColor:n.get("backgroundColor"),borderRadius:n.get("borderRadius"),borderWidth:1,borderColor:i,shadowColor:n.get("shadowColor"),shadowBlur:n.get("shadowBlur"),shadowOffsetX:n.get("shadowOffsetX"),shadowOffsetY:n.get("shadowOffsetY"),textShadowColor:r.get("textShadowColor"),textShadowBlur:r.get("textShadowBlur")||0,textShadowOffsetX:r.get("textShadowOffsetX")||0,textShadowOffsetY:r.get("textShadowOffsetY")||0,fill:n.get(["textStyle","color"]),padding:ly(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),this._zr.add(this.el);var a=this;this.el.on("mouseover",function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0}),this.el.on("mouseout",function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1})},kW.prototype.setEnterable=function(t){this._enterable=t},kW.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),t=PW(t.style);return[e.width+t.left+t.right,e.height+t.top+t.bottom]},kW.prototype.moveTo=function(t,e){var n,i,o=this.el;o&&(OW(n=this._styleCoord,this._zr,t,e),t=n[0],e=n[1],n=LW((i=o.style).borderWidth||0),i=PW(i),o.x=t+n+i.left,o.y=e+n+i.top,o.markRedraw())},kW.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},kW.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},kW.prototype.hideLater=function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(B(this.hide,this),t)):this.hide())},kW.prototype.isShow=function(){return this._show},kW.prototype.dispose=function(){this._zr.remove(this.el)},kW);function kW(t){this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._zr=t.getZr(),OW(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}function LW(t){return Math.max(0,t)}function PW(t){var e=LW(t.shadowBlur||0),n=LW(t.shadowOffsetX||0),t=LW(t.shadowOffsetY||0);return{left:LW(e-n),right:LW(e+n),top:LW(e-t),bottom:LW(e+t)}}function OW(t,e,n,i){t[0]=n,t[1]=i,t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var RW,NW=B,EW=E,zW=mo,BW=new Fs({shape:{x:-1,y:-1,width:2,height:2}}),VW=(u(GW,RW=Iy),GW.prototype.init=function(t,e){var n;w.node||(t=(n=t.getComponent("tooltip")).get("renderMode"),this._renderMode="auto"===(t=t)?w.domSupported?"html":"richText":t||"html",this._tooltipContent="richText"===this._renderMode?new AW(e):new CW(e.getDom(),e,{appendToBody:n.get("appendToBody",!0)}))},GW.prototype.render=function(t,e,n){w.node||(this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=n,this._alwaysShowContent=t.get("alwaysShowContent"),(n=this._tooltipContent).update(t),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._updatePosition="html"===this._renderMode?Gy(NW(this._doUpdatePosition,this),50):this._doUpdatePosition)},GW.prototype._initGlobalListener=function(){var i=this._tooltipModel.get("triggerOn");AV("itemTooltip",this._api,NW(function(t,e,n){"none"!==i&&(0<=i.indexOf(t)?this._tryShow(e,n):"leave"===t&&this._hide(n))},this))},GW.prototype._keepShow=function(){var t,e=this._tooltipModel,n=this._ecModel,i=this._api;null!=this._lastX&&null!=this._lastY&&"none"!==e.get("triggerOn")&&(t=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){i.isDisposed()||t.manuallyShowTip(e,n,i,{x:t._lastX,y:t._lastY,dataByCoordSys:t._lastDataByCoordSys})}))},GW.prototype.manuallyShowTip=function(t,e,n,i){var o,r,a,s;i.from===this.uid||w.node||(o=HW(i,n),this._ticket="",s=i.dataByCoordSys,(a=function(n,t,e){var i=pr(n).queryOptionMap,o=i.keys()[0];if(!o||"series"===o)return;var r,i=gr(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(!i)return;if(e.getViewOfComponentModel(i).group.traverse(function(t){var e=il(t).tooltipConfig;if(e&&e.name===n.name)return r=t,!0}),r)return{componentMainType:o,componentIndex:i.componentIndex,el:r}}(i,e,n))?((r=a.el.getBoundingRect().clone()).applyTransform(a.el.transform),this._tryShow({offsetX:r.x+r.width/2,offsetY:r.y+r.height/2,target:a.el,position:i.position,positionDefault:"bottom"},o)):i.tooltip&&null!=i.x&&null!=i.y?((a=BW).x=i.x,a.y=i.y,a.update(),il(a).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:a},o)):s?this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o):null!=i.seriesIndex?this._manuallyAxisShowTip(t,e,n,i)||(t=(s=EV(i,e)).point[0],e=s.point[1],null!=t&&null!=e&&this._tryShow({offsetX:t,offsetY:e,target:s.el,position:i.position,positionDefault:"bottom"},o)):null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o)))},GW.prototype.manuallyHideTip=function(t,e,n,i){var o=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(HW(i,n))},GW.prototype._manuallyAxisShowTip=function(t,e,n,i){var o=i.seriesIndex,r=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=o&&null!=r&&null!=a){e=e.getSeriesByIndex(o);if(e)if("axis"===FW([e.getData().getItemModel(r),e,(e.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:r,position:i.position}),!0}},GW.prototype._tryShow=function(t,e){var n,i,o,r=t.target;this._tooltipModel&&(this._lastX=t.offsetX,this._lastY=t.offsetY,(n=t.dataByCoordSys)&&n.length?this._showAxisTooltip(n,t):r?(_m(r,function(t){return null!=il(t).dataIndex?(i=t,1):null!=il(t).tooltipConfig&&(o=t,1)},!(this._lastDataByCoordSys=null)),i?this._showSeriesItemTooltip(t,i,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)):(this._lastDataByCoordSys=null,this._hide(e)))},GW.prototype._showOrMove=function(t,e){t=t.get("showDelay");e=B(e,this),clearTimeout(this._showTimout),0<t?this._showTimout=setTimeout(e,t):e()},GW.prototype._showAxisTooltip=function(t,e){var l=this._ecModel,n=this._tooltipModel,i=[e.offsetX,e.offsetY],o=FW([e.tooltipOption],n),u=this._renderMode,h=[],c=ty("section",{blocks:[],noHeader:!0}),p=[],d=new uy;EW(t,function(t){EW(t.dataByAxis,function(i){var o,r,a=l.getComponent(i.axisDim+"Axis",i.axisIndex),s=i.value;a&&null!=s&&(o=pV(s,a.axis,l,i.seriesDataIndices,i.valueLabelOpt),r=ty("section",{header:o,noHeader:!rt(o),sortBlocks:!0,blocks:[]}),c.blocks.push(r),E(i.seriesDataIndices,function(t){var e=l.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,t=e.getDataParams(n);t.dataIndex<0||(t.axisDim=i.axisDim,t.axisIndex=i.axisIndex,t.axisType=i.axisType,t.axisId=i.axisId,t.axisValue=pw(a.axis,{value:s}),t.axisValueLabel=o,t.marker=d.makeTooltipMarker("item",Jp(t.color),u),(n=eg(e.formatTooltip(n,!0,null))).markupFragment&&r.blocks.push(n.markupFragment),n.markupText&&p.push(n.markupText),h.push(t))}))})}),c.blocks.reverse(),p.reverse();var r=e.position,e=o.get("order"),e=iy(c,d,u,e,l.get("useUTC"),o.get("textStyle"));e&&p.unshift(e);var e="richText"===u?"\n\n":"<br/>",a=p.join(e);this._showOrMove(o,function(){this._updateContentNotChangedOnAxis(t,h)?this._updatePosition(o,r,i[0],i[1],this._tooltipContent,h):this._showTooltipContent(o,a,h,Math.random()+"",i[0],i[1],r,null,d)})},GW.prototype._showSeriesItemTooltip=function(t,e,n){var i,o,r,a,s=this._ecModel,l=il(e),u=l.seriesIndex,h=s.getSeriesByIndex(u),c=l.dataModel||h,p=l.dataIndex,d=l.dataType,f=c.getData(d),e=this._renderMode,l=t.positionDefault,g=FW([f.getItemModel(p),c,h&&(h.coordinateSystem||{}).model],this._tooltipModel,l?{position:l}:null),l=g.get("trigger");null!=l&&"item"!==l||(i=c.getDataParams(p,d),o=new uy,i.marker=o.makeTooltipMarker("item",Jp(i.color),e),l=eg(c.formatTooltip(p,!1,d)),d=g.get("order"),r=l.markupFragment?iy(l.markupFragment,o,e,d,s.get("useUTC"),g.get("textStyle")):l.markupText,a="item_"+c.name+"_"+p,this._showOrMove(g,function(){this._showTooltipContent(g,r,i,a,t.offsetX,t.offsetY,t.position,t.target,o)}),n({type:"showTip",dataIndexInside:p,dataIndex:f.getRawIndex(p),seriesIndex:u,from:this.uid}))},GW.prototype._showComponentItemTooltip=function(e,n,t){var i=il(n),o=i.tooltipConfig.option||{},r=[o=H(o)?{content:o,formatter:o}:o],i=this._ecModel.getComponent(i.componentMainType,i.componentIndex);i&&r.push(i),r.push({formatter:o.content});var o=e.positionDefault,a=FW(r,this._tooltipModel,o?{position:o}:null),s=a.get("content"),l=Math.random()+"",u=new uy;this._showOrMove(a,function(){var t=S(a.get("formatterParams")||{});this._showTooltipContent(a,s,t,l,e.offsetX,e.offsetY,e.position,n,u)}),t({type:"showTip",from:this.uid})},GW.prototype._showTooltipContent=function(n,t,i,e,o,r,a,s,l){var u,h,c,p,d;this._ticket="",n.get("showContent")&&n.get("show")&&(u=this._tooltipContent,h=n.get("formatter"),a=a||n.get("position"),p=t,c=this._getNearestPoint([o,r],i,n.get("trigger"),n.get("borderColor")).color,h&&(p=H(h)?(d=n.ecModel.get("useUTC"),p=h,Kp(p=(t=G(i)?i[0]:i)&&t.axisType&&0<=t.axisType.indexOf("time")?Ip(t.axisValue,p,d):p,i,!0)):F(h)?(d=NW(function(t,e){t===this._ticket&&(u.setContent(e,l,n,c,a),this._updatePosition(n,a,o,r,u,i,s))},this),this._ticket=e,h(i,e,d)):h),u.setContent(p,l,n,c,a),u.show(n,c),this._updatePosition(n,a,o,r,u,i,s))},GW.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||G(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:G(e)?void 0:{color:i||e.color||e.borderColor}},GW.prototype._doUpdatePosition=function(t,e,n,i,o,r,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u,h=o.getSize(),c=t.get("align"),p=t.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),G(e=F(e)?e([n,i],r,o.el,d,{viewSize:[s,l],contentSize:h.slice()}):e)?(n=zW(e[0],s),i=zW(e[1],l)):Y(e)?((r=e).width=h[0],r.height=h[1],n=(r=rd(r,{width:s,height:l})).x,i=r.y,p=c=null):i=(n=(u=H(e)&&a?function(t,e,n,i){var o=n[0],r=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-o/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-o/2,l=e.y-r-a;break;case"bottom":s=e.x+u/2-o/2,l=e.y+h+a;break;case"left":s=e.x-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+a,l=e.y+h/2-r/2}return[s,l]}(e,d,h,t.get("borderWidth")):function(t,e,n,i,o,r,a){var s=n.getSize(),n=s[0],s=s[1];null!=r&&(i<t+n+r+2?t-=n+r:t+=r);null!=a&&(o<e+s+a?e-=s+a:e+=a);return[t,e]}(n,i,o,s,l,c?null:20,p?null:20))[0],u[1]),c&&(n-=WW(c)?h[0]/2:"right"===c?h[0]:0),p&&(i-=WW(p)?h[1]/2:"bottom"===p?h[1]:0),mW(t)&&(n=(u=(c=n,p=i,h=s,t=l,s=(l=(s=o).getSize())[0],l=l[1],c=Math.min(c+s,h)-s,p=Math.min(p+l,t)-l,c=Math.max(c,0),p=Math.max(p,0),[c,p]))[0],i=u[1]),o.moveTo(n,i)},GW.prototype._updateContentNotChangedOnAxis=function(n,r){var t=this._lastDataByCoordSys,a=this._cbParamsList,s=!!t&&t.length===n.length;return s&&EW(t,function(t,e){var t=t.dataByAxis||[],o=(n[e]||{}).dataByAxis||[];(s=s&&t.length===o.length)&&EW(t,function(t,e){var n=o[e]||{},e=t.seriesDataIndices||[],i=n.seriesDataIndices||[];(s=s&&t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&e.length===i.length)&&EW(e,function(t,e){e=i[e];s=s&&t.seriesIndex===e.seriesIndex&&t.dataIndex===e.dataIndex}),a&&E(t.seriesDataIndices,function(t){var e=t.seriesIndex,t=r[e],e=a[e];t&&e&&e.data!==t.data&&(s=!1)})})}),this._lastDataByCoordSys=n,this._cbParamsList=r,!!s},GW.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},GW.prototype.dispose=function(t,e){w.node||(this._tooltipContent.dispose(),PV("itemTooltip",e))},GW.type="tooltip",GW);function GW(){var t=null!==RW&&RW.apply(this,arguments)||this;return t.type=GW.type,t}function FW(t,e,n){for(var i=e.ecModel,o=n?(o=new ep(n,i,i),new ep(e.option,o,i)):e,r=t.length-1;0<=r;r--){var a=t[r];(a=a&&(H(a=a instanceof ep?a.get("tooltip",!0):a)?{formatter:a}:a))&&(o=new ep(a,o,i))}return o}function HW(t,e){return t.dispatchAction||B(e.dispatchAction,e)}function WW(t){return"center"===t||"middle"===t}var UW=["rect","polygon","keep","clear"];function YW(t,e){var n,i,o,r=qo(t?t.brush:[]);r.length&&(n=[],E(r,function(t){t=t.hasOwnProperty("toolbox")?t.toolbox:[];t instanceof Array&&(n=n.concat(t))}),(r=G(r=t&&t.toolbox)?r[0]:r)||(r={feature:{}},t.toolbox=[r]),(r=(r=(r=r.feature||(r.feature={})).brush||(r.brush={})).type||(r.type=[])).push.apply(r,n),o={},E(i=r,function(t){o[t]=1}),i.length=0,E(o,function(t,e){i.push(e)}),e&&!r.length&&r.push.apply(r,UW))}var XW=E;function ZW(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return 1}function jW(e,t,o){var r={};return XW(t,function(n){var i=r[n]=(t.prototype.__hidden=t.prototype,new t);function t(){}XW(e[n],function(t,e){Ok.isValidType(e)&&(t={type:e,visual:t},o&&o(t,n),i[e]=new Ok(t),"opacity"===e&&((t=S(t)).type="colorAlpha",i.__hidden.__alphaForOpacity=new Ok(t)))})}),r}function qW(e,n,t){var i;E(t,function(t){n.hasOwnProperty(t)&&ZW(n[t])&&(i=!0)}),i&&E(t,function(t){n.hasOwnProperty(t)&&ZW(n[t])?e[t]=S(n[t]):delete e[t]})}var KW={lineX:$W(0),lineY:$W(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&Av(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var o=t.x,r=t.y,a=t.width,s=t.height,n=i[0];return!!(Av(i,o,r)||Av(i,o+a,r)||Av(i,o,r+s)||Av(i,o+a,r+s)||Li.create(t).contain(n[0],n[1])||Ic(o,r,o+a,r,i)||Ic(o,r,o,r+s,i)||Ic(o+a,r,o+a,r+s,i)||Ic(o,r+s,o+a,r+s,i))||void 0}}};function $W(i){var o=["x","y"],r=["width","height"];return{point:function(t,e,n){if(t){n=n.range;return JW(t[i],n)}},rect:function(t,e,n){if(t){n=n.range,t=[t[o[i]],t[o[i]]+t[r[i]]];return t[1]<t[0]&&t.reverse(),JW(t[0],n)||JW(t[1],n)||JW(n[0],t)||JW(n[1],t)}}}}function JW(t,e){return e[0]<=t&&t<=e[1]}var QW=["inBrush","outOfBrush"],tU="__ecBrushSelect",eU="__ecInBrushSelectEvent";function nU(e){e.eachComponent({mainType:"brush"},function(t){(t.brushTargetManager=new ZH(t.option,e)).setInputRanges(t.areas,e)})}function iU(l,t,e){var o,r,u=[];l.eachComponent({mainType:"brush"},function(t){e&&"takeGlobalCursor"===e.type&&t.setBrushOption("brush"===e.key?e.brushOption:{brushType:!1})}),nU(l),l.eachComponent({mainType:"brush"},function(a,t){var y={brushId:a.id,brushIndex:t,brushName:a.name,areas:S(a.areas),selected:[]};u.push(y);var e=a.option,n=e.brushLink,i=[],m=[],v=[],_=!1;t||(o=e.throttleType,r=e.throttleDelay);var s=L(a.areas,function(t){var e,n,i,o=aU[t.brushType],t=A({boundingRect:o?o(t):void 0},t);return t.selectors=(n=(e=t).brushType,i={point:function(t){return KW[n].point(t,i,e)},rect:function(t){return KW[n].rect(t,i,e)}}),t}),x=jW(a.option,QW,function(t){t.mappingMethod="fixed"});function b(t){return"all"===n||i[t]}function w(t){return!!t.length}G(n)&&E(n,function(t){i[t]=1}),l.eachSeries(function(t,e){var n,i,o,r=v[e]=[];"parallel"===t.subType?(i=e,o=(n=t).coordinateSystem,_=_||o.hasAxisBrushed(),b(i)&&o.eachActiveState(n.getData(),function(t,e){"active"===t&&(m[e]=1)})):function(e,t,n){if(!e.brushSelector||function(t,e){t=t.option.seriesIndex;return null!=t&&"all"!==t&&(G(t)?C(t,e)<0:e!==t)}(a,t))return;{var i;E(s,function(t){a.brushTargetManager.controlSeries(t,e,l)&&n.push(t),_=_||w(n)}),b(t)&&w(n)&&(i=e.getData()).each(function(t){rU(e,n,i,t)&&(m[t]=1)})}}(t,e,r)}),l.eachSeries(function(e,t){var n={seriesId:e.id,seriesIndex:t,seriesName:e.name,dataIndex:[]};y.selected.push(n);var s,l,u,h,c,p,d,i=v[t],o=e.getData(),r=b(t)?function(t){return m[t]?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return rU(e,i,o,t)?(n.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};function f(t){return fm(l,p,t)}function g(t,e){ym(l,p,t,e)}function a(t,e){p=null==c?t:e;e=l.getRawDataItem(p);if(!e||!1!==e.visualMap)for(var e=u.call(h,t),n=s[e],i=d[e],o=0,r=i.length;o<r;o++){var a=i[o];n[a]&&n[a].applyVisual(t,f,g)}}(b(t)?_:w(i))&&(s=x,l=o,u=r,d={},E(QW,function(t){var e=Ok.prepareVisualTypes(s[t]);d[t]=e}),null==c?l.each(a):l.each([c],a))})}),function(t,e,n,i,o){if(!o)return;o=t.getZr();if(o[eU])return;o[tU]||(o[tU]=oU);Fy(o,tU,n,e)(t,i)}(t,o,r,u,e)}function oU(t,e){var n;t.isDisposed()||((n=t.getZr())[eU]=!0,t.dispatchAction({type:"brushSelect",batch:e}),n[eU]=!1)}function rU(t,e,n,i){for(var o=0,r=e.length;o<r;o++){var a=e[o];if(t.brushSelector(i,n,a.selectors,a))return 1}}var aU={rect:function(t){return sU(t.range)},polygon:function(t){for(var e=t.range,n=0,i=e.length;n<i;n++){var o=o||[[1/0,-1/0],[1/0,-1/0]],r=e[n];r[0]<o[0][0]&&(o[0][0]=r[0]),r[0]>o[0][1]&&(o[0][1]=r[0]),r[1]<o[1][0]&&(o[1][0]=r[1]),r[1]>o[1][1]&&(o[1][1]=r[1])}return o&&sU(o)}};function sU(t){return new Li(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var lU,uU=(u(hU,lU=Iy),hU.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new iR(e.getZr())).on("brush",B(this._onBrush,this)).mount()},hU.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},hU.prototype.updateTransform=function(t,e,n,i){nU(e),this._updateController(t,e,n,i)},hU.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},hU.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},hU.prototype._updateController=function(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},hU.prototype.dispose=function(){this._brushController.dispose()},hU.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);t.isEnd&&!t.removeOnClick||this.api.dispatchAction({type:"brush",brushId:e,areas:S(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:S(n),$from:e})},hU.type="brush",hU);function hU(){var t=null!==lU&&lU.apply(this,arguments)||this;return t.type=hU.type,t}var cU,pU=(u(dU,cU=yd),dU.prototype.optionUpdated=function(t,e){var n=this.option;e||qW(n,t,["inBrush","outOfBrush"]);t=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},t.hasOwnProperty("liftZ")||(t.liftZ=5)},dU.prototype.setAreas=function(t){ot(G(t)),E(t,function(t){ot(t.brushType,"Illegal areas")}),t&&(this.areas=L(t,function(t){return fU(this.option,t)},this))},dU.prototype.setBrushOption=function(t){this.brushOption=fU(this.option,t),this.brushType=this.brushOption.brushType},dU.type="brush",dU.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],dU.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},dU);function dU(){var t=null!==cU&&cU.apply(this,arguments)||this;return t.type=dU.type,t.areas=[],t.brushOption={},t}function fU(t,e){return b({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ep(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var gU,yU=["rect","polygon","lineX","lineY","keep","clear"],mU=(u(vU,gU=cH),vU.prototype.render=function(e,t,n){var i,o,r;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",r=r||!!t.areas.length}),this._brushType=i,this._brushMode=o,E(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?r:t===i)?"emphasis":"normal")})},vU.prototype.updateView=function(t,e,n){this.render(t,e,n)},vU.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},vU.prototype.onclick=function(t,e,n){var i=this._brushType,o=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===o?"single":"multiple":o}})},vU.getDefaultOption=function(t){return{show:!0,type:yU.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},vU);function vU(){return null!==gU&&gU.apply(this,arguments)||this}var _U,xU=(u(bU,_U=yd),bU.type="title",bU.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},bU);function bU(){var t=null!==_U&&_U.apply(this,arguments)||this;return t.type=bU.type,t.layoutMode={type:"box",ignoreSize:!0},t}var wU,SU=(u(MU,wU=Iy),MU.prototype.render=function(t,e,n){var i,o,r,a,s,l,u,h,c;this.group.removeAll(),t.get("show")&&(i=this.group,u=t.getModel("textStyle"),a=t.getModel("subtextStyle"),o=t.get("textAlign"),c=tt(t.get("textBaseline"),t.get("textVerticalAlign")),h=(r=new Xs({style:Rc(u,{text:t.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),u=t.get("subtext"),a=new Xs({style:Rc(a,{text:u,fill:a.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),s=t.get("link"),l=t.get("sublink"),h=t.get("triggerEvent",!0),r.silent=!s&&!h,a.silent=!l&&!h,s&&r.on("click",function(){Qp(s,"_"+t.get("target"))}),l&&a.on("click",function(){Qp(l,"_"+t.get("subtarget"))}),il(r).eventData=il(a).eventData=h?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(r),u&&i.add(a),h=i.getBoundingRect(),(u=t.getBoxLayoutParams()).width=h.width,u.height=h.height,n=rd(u,{width:n.getWidth(),height:n.getHeight()},t.get("padding")),o||("right"===(o="middle"===(o=t.get("left")||t.get("right"))?"center":o)?n.x+=n.width:"center"===o&&(n.x+=n.width/2)),c||("bottom"===(c="center"===(c=t.get("top")||t.get("bottom"))?"middle":c)?n.y+=n.height:"middle"===c&&(n.y+=n.height/2),c=c||"top"),i.x=n.x,i.y=n.y,i.markRedraw(),c={align:o,verticalAlign:c},r.setStyle(c),a.setStyle(c),h=i.getBoundingRect(),c=n.margin,(n=t.getItemStyle(["color","opacity"])).fill=t.get("backgroundColor"),n=new Fs({shape:{x:h.x-c[3],y:h.y-c[0],width:h.width+c[1]+c[3],height:h.height+c[0]+c[2],r:t.get("borderRadius")},style:n,subPixelOptimize:!0,silent:!0}),i.add(n))},MU.type="title",MU);function MU(){var t=null!==wU&&wU.apply(this,arguments)||this;return t.type=MU.type,t}var IU,Zy=(u(TU,IU=yd),TU.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},TU.prototype.mergeOption=function(t){IU.prototype.mergeOption.apply(this,arguments),this._initData()},TU.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t=e<=t?e-1:t)<0&&(t=0),this.option.currentIndex=t},TU.prototype.getCurrentIndex=function(){return this.option.currentIndex},TU.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},TU.prototype.setPlayState=function(t){this.option.autoPlay=!!t},TU.prototype.getPlayState=function(){return!!this.option.autoPlay},TU.prototype._initData=function(){var o,t=this.option,e=t.data||[],t=t.axisType,r=this._names=[];"category"===t?(o=[],E(e,function(t,e){var n,i=nr(Jo(t),"");Y(t)?(n=S(t)).value=e:n=e,o.push(n),r.push(i)})):o=e;t={category:"ordinal",time:"time",value:"number"}[t]||"number";(this._data=new $x([{name:"value",type:t}],this)).initData(o,r)},TU.prototype.getData=function(){return this._data},TU.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},TU.type="timeline",TU.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},TU);function TU(){var t=null!==IU&&IU.apply(this,arguments)||this;return t.type=TU.type,t.layoutMode="box",t}var CU,DU=(u(AU,CU=Zy),AU.type="timeline.slider",AU.defaultOption=rp(Zy.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),AU);function AU(){var t=null!==CU&&CU.apply(this,arguments)||this;return t.type=AU.type,t}T(DU,Jn.prototype);var kU,Zy=(u(LU,kU=Iy),LU.type="timeline",LU);function LU(){var t=null!==kU&&kU.apply(this,arguments)||this;return t.type=LU.type,t}var PU,OU=(u(RU,PU=vp),RU.prototype.getLabelModel=function(){return this.model.getModel("label")},RU.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},RU);function RU(t,e,n,i){n=PU.call(this,t,e,n)||this;return n.type=i||"value",n}var NU,EU=Math.PI,zU=ur(),BU=(u(VU,NU=Zy),VU.prototype.init=function(t,e){this.api=e},VU.prototype.render=function(e,t,n){var i,o,r;this.model=e,this.api=n,this.ecModel=t,this.group.removeAll(),e.get("show",!0)&&(i=this._layout(e,n),o=this._createGroup("_mainGroup"),n=this._createGroup("_labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return ty("nameValue",{noName:!0,value:r.scale.getLabel({value:t})})},E(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,n,r,e),this._position(i,e)),this._doPlayStop(),this._updateTicksStatus()},VU.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},VU.prototype.dispose=function(){this._clearTimer()},VU.prototype._layout=function(t,e){var n,i,o,r=t.get(["label","position"]),a=t.get("orient"),s=(_=e,rd((x=t).getBoxLayoutParams(),{width:_.getWidth(),height:_.getHeight()},x.get("padding"))),l=null==r||"auto"===r?"horizontal"===a?s.y+s.height/2<e.getHeight()/2?"-":"+":s.x+s.width/2<e.getWidth()/2?"+":"-":H(r)?{horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][r]:r,u={horizontal:"center",vertical:0<=l||"+"===l?"left":"right"},h={horizontal:0<=l||"+"===l?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:EU/2},p="vertical"===a?s.height:s.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,m=g+y,v=(v=t.get(["label","rotate"])||0)*EU/180,_=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),e=f&&d.get("showPrevBtn",!0),r=f&&d.get("showNextBtn",!0),f=0,d=p;"left"===_||"bottom"===_?(x&&(n=[0,0],f+=m),e&&(i=[f,0],f+=m)):(x&&(n=[d-g,0],d-=m),e&&(i=[0,0],f+=m)),r&&(o=[d-g,0],d-=m);d=[f,d];return t.get("inverse")&&d.reverse(),{viewRect:s,mainLength:p,orient:a,rotation:c[a],labelRotation:v,labelPosOpt:l,labelAlign:t.get(["label","align"])||u[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[a],playPosition:n,prevBtnPosition:i,nextBtnPosition:o,axisExtent:d,controlSize:g,controlGap:y}},VU.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;"vertical"===t.orient&&(ai(u=ni(),u,[-(s=o.x),-(l=o.y+o.height)]),si(u,u,-EU/2),ai(u,u,[s,l]),(o=o.clone()).applyTransform(u));var r=p(o),a=p(n.getBoundingRect()),s=p(i.getBoundingRect()),l=[n.x,n.y],u=[i.x,i.y];u[0]=l[0]=r[0][0];var h,o=t.labelPosOpt;function c(t){t.originX=r[0][0]-t.x,t.originY=r[1][0]-t.y}function p(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function d(t,e,n,i,o){t[i]+=n[i][o]-e[i][o]}null==o||H(o)?(d(l,a,r,1,h="+"===o?0:1),d(u,s,r,1,1-h)):(d(l,a,r,1,h=0<=o?0:1),u[1]=l[1]+o),n.setPosition(l),i.setPosition(u),n.rotation=i.rotation=t.rotation,c(n),c(i)},VU.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),o=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new bb({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Fb({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ib}}(e,i);o.getTicks=function(){return n.mapArray(["value"],function(t){return{value:t}})};var r=n.getDataExtent("value");o.setExtent(r[0],r[1]),o.niceTicks();i=new OU("value",o,t.axisExtent,i);return i.model=e,i},VU.prototype._createGroup=function(t){t=this[t]=new io;return this.group.add(t),t},VU.prototype._renderAxisLine=function(t,e,n,i){var o=n.getExtent();i.get(["lineStyle","show"])&&(n=new fh({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:P({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}),e.add(n),i=this._progressLine=new fh({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:A({lineCap:"round",lineWidth:n.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1}),e.add(i))},VU.prototype._renderAxisTick=function(t,a,s,l){var u=this,h=l.getData(),e=s.scale.getTicks();this._tickSymbols=[],E(e,function(t){var e=s.dataToCoord(t.value),n=h.getItemModel(t.value),i=n.getModel("itemStyle"),o=n.getModel(["emphasis","itemStyle"]),r=n.getModel(["progress","itemStyle"]),e={x:e,y:0,onclick:B(u._changeTimeline,u,t.value)},e=GU(n,i,a,e);e.ensureState("emphasis").style=o.getItemStyle(),e.ensureState("progress").style=r.getItemStyle(),ql(e);r=il(e);n.get("tooltip")?(r.dataIndex=t.value,r.dataModel=l):r.dataIndex=r.dataModel=null,u._tickSymbols.push(e)})},VU.prototype._renderAxisLabel=function(a,s,l,t){var u,h=this;l.getLabelModel().get("show")&&(u=t.getData(),t=l.getViewLabels(),this._tickLabels=[],E(t,function(t){var e=t.tickValue,n=u.getItemModel(e),i=n.getModel("label"),o=n.getModel(["emphasis","label"]),r=n.getModel(["progress","label"]),n=l.dataToCoord(t.tickValue),t=new Xs({x:n,y:0,rotation:a.labelRotation-a.rotation,onclick:B(h._changeTimeline,h,e),silent:!1,style:Rc(i,{text:t.formattedLabel,align:a.labelAlign,verticalAlign:a.labelBaseline})});t.ensureState("emphasis").style=Rc(o),t.ensureState("progress").style=Rc(r),s.add(t),ql(t),zU(t).dataIndex=e,h._tickLabels.push(t)}))},VU.prototype._renderControl=function(t,r,e,a){var s=t.controlSize,l=t.rotation,u=a.getModel("controlStyle").getItemStyle(),h=a.getModel(["emphasis","controlStyle"]).getItemStyle(),n=a.getPlayState(),i=a.get("inverse",!0);function o(t,e,n,i){var o;t&&(o=Ui(tt(a.get(["controlStyle",e+"BtnSize"]),s),s),(n=function(t,e,n,i){var o=i.style,n=Mc(t.get(["controlStyle",e]),i||{},new Li(n[0],n[1],n[2],n[3]));o&&n.setStyle(o);return n}(a,e+"Icon",[0,-o/2,o,o],{x:t[0],y:t[1],originX:s/2,originY:0,rotation:i?-l:0,rectHover:!0,style:u,onclick:n})).ensureState("emphasis").style=h,r.add(n),ql(n))}o(t.nextBtnPosition,"next",B(this._changeTimeline,this,i?"-":"+")),o(t.prevBtnPosition,"prev",B(this._changeTimeline,this,i?"+":"-")),o(t.playPosition,n?"stop":"play",B(this._handlePlayClick,this,!n),!0)},VU.prototype._renderCurrentPointer=function(t,e,n,i){var o=i.getData(),r=i.getCurrentIndex(),a=o.getItemModel(r).getModel("checkpointStyle"),s=this,o={onCreate:function(t){t.draggable=!0,t.drift=B(s._handlePointerDrag,s),t.ondragend=B(s._handlePointerDragend,s),FU(t,s._progressLine,r,n,i,!0)},onUpdate:function(t){FU(t,s._progressLine,r,n,i)}};this._currentPointer=GU(a,a,this._mainGroup,{},this._currentPointer,o)},VU.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},VU.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},VU.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},VU.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],t=_o(this._axis.getExtent().slice());(n=n>t[1]?t[1]:n)<t[0]&&(n=t[0]),this._currentPointer.x=n,this._currentPointer.markRedraw(),this._progressLine.shape.x2=n,this._progressLine.dirty();t=this._findNearestTick(n),n=this.model;(e||t!==n.getCurrentIndex()&&n.get("realtime"))&&this._changeTimeline(t)},VU.prototype._doPlayStop=function(){var e=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var t=e.model;e._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},VU.prototype._toAxisCoord=function(t){return vc(t,this._mainGroup.getLocalTransform(),!0)},VU.prototype._findNearestTick=function(n){var i,t=this.model.getData(),o=1/0,r=this._axis;return t.each(["value"],function(t,e){t=r.dataToCoord(t),t=Math.abs(t-n);t<o&&(o=t,i=e)}),i},VU.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},VU.prototype._changeTimeline=function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},VU.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),e=this._tickSymbols,n=this._tickLabels;if(e)for(var i=0;i<e.length;i++)e&&e[i]&&e[i].toggleState("progress",i<t);if(n)for(i=0;i<n.length;i++)n&&n[i]&&n[i].toggleState("progress",zU(n[i]).dataIndex<=t)},VU.type="timeline.slider",VU);function VU(){var t=null!==NU&&NU.apply(this,arguments)||this;return t.type=VU.type,t}function GU(t,e,n,i,o,r){var a=e.get("color");o?(o.setColor(a),n.add(o),r&&r.onUpdate(o)):((o=Cm(t.get("symbol"),-1,-1,2,2,a)).setStyle("strokeNoScale",!0),n.add(o),r&&r.onCreate(o));e=e.getItemStyle(["color"]);o.setStyle(e),i=b({rectHover:!0,z2:100},i,!0);e=Dm(t.get("symbolSize"));i.scaleX=e[0]/2,i.scaleY=e[1]/2;e=Am(t.get("symbolOffset"),e);e&&(i.x=(i.x||0)+e[0],i.y=(i.y||0)+e[1]);t=t.get("symbolRotate");return i.rotation=(t||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function FU(t,e,n,i,o,r){var a;t.dragging||(a=o.getModel("checkpointStyle"),n=i.dataToCoord(o.getData().get("value",n)),r||!a.get("animation",!0)?(t.attr({x:n,y:0}),e&&e.attr({shape:{x2:n}})):(a={duration:a.get("animationDuration",!0),easing:a.get("animationEasing",!0)},t.stopAnimation(null,!0),t.animateTo({x:n,y:0},a),e&&e.animateTo({shape:{x2:n}},a)))}function HU(t){t=t&&t.timeline;E(t=!G(t)?t?[t]:[]:t,function(t){t&&function(t){var e=t.type,n={number:"value",time:"time"};n[e]&&(t.axisType=n[e],delete t.type);WU(t),UU(t,"controlPosition")&&(UU(e=t.controlStyle||(t.controlStyle={}),"position")||(e.position=t.controlPosition),"none"!==e.position||UU(e,"show")||(e.show=!1,delete e.position),delete t.controlPosition);E(t.data||[],function(t){Y(t)&&!G(t)&&(!UU(t,"value")&&UU(t,"name")&&(t.value=t.name),WU(t))})}(t)})}function WU(t){var e=t.itemStyle||(t.itemStyle={}),e=e.emphasis||(e.emphasis={}),t=t.label||t.label||{},n=t.normal||(t.normal={}),i={normal:1,emphasis:1};E(t,function(t,e){i[e]||UU(n,e)||(n[e]=t)}),e.label&&!UU(t,"emphasis")&&(t.emphasis=e.label,delete e.label)}function UU(t,e){return t.hasOwnProperty(e)}function YU(t,e){if(t)for(var n=G(t)?t:[t],i=0;i<n.length;i++)if(n[i]&&n[i][e])return 1}function XU(t){Ko(t,"label",["show"])}var ZU,jU=ur(),qU=(u(KU,ZU=yd),KU.prototype.init=function(t,e,n){if(1,"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this._mergeOption(t,n,!1,!0)},KU.prototype.isAnimationEnabled=function(){if(w.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},KU.prototype.mergeOption=function(t,e){this._mergeOption(t,e,!1,!1)},KU.prototype._mergeOption=function(t,i,e,o){var r=this.mainType;e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=jU(t)[r];e&&e.data?(n?n._mergeOption(e,i,!0):(o&&XU(e),E(e.data,function(t){t instanceof Array?(XU(t[0]),XU(t[1])):XU(t)}),P(n=this.createMarkerModelFromSeries(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),jU(t)[r]=n):jU(t)[r]=null},this)},KU.prototype.formatTooltip=function(t,e,n){var i=this.getData(),o=this.getRawValue(t),t=i.getName(t);return ty("section",{header:this.name,blocks:[ty("nameValue",{name:t,value:o,noName:!t,noValue:null==o})]})},KU.prototype.getData=function(){return this._data},KU.prototype.setData=function(t){this._data=t},KU.getMarkerModelFromSeries=function(t,e){return jU(t)[e]},KU.type="marker",KU.dependencies=["series","grid","polar","geo"],KU);function KU(){var t=null!==ZU&&ZU.apply(this,arguments)||this;return t.type=KU.type,t.createdBySelf=!1,t}T(qU,Jn.prototype);var $U,JU=(u(QU,$U=qU),QU.prototype.createMarkerModelFromSeries=function(t,e,n){return new QU(t,e,n)},QU.type="markPoint",QU.defaultOption={zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},QU);function QU(){var t=null!==$U&&$U.apply(this,arguments)||this;return t.type=QU.type,t}function tY(t,e,n,i,o,r){var a=[],s=ob(e,i)?e.getCalculationInfo("stackResultDimension"):i,t=aY(e,s,t),t=e.indicesOfNearest(s,t)[0];a[o]=e.get(n,t),a[r]=e.get(s,t);s=e.get(i,t),t=xo(e.get(i,t));return 0<=(t=Math.min(t,20))&&(a[r]=+a[r].toFixed(t)),[a,s]}var eY={min:V(tY,"min"),max:V(tY,"max"),average:V(tY,"average"),median:V(tY,"median")};function nY(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&(r=e,isNaN(parseFloat(r.x))||isNaN(parseFloat(r.y)))&&!G(e.coord)&&i){var o=i.dimensions,r=iY(e,n,i,t);if((e=S(e)).type&&eY[e.type]&&r.baseAxis&&r.valueAxis){i=C(o,r.baseAxis.dim),t=C(o,r.valueAxis.dim),t=eY[e.type](n,r.baseDataDim,r.valueDataDim,i,t);e.coord=t[0],e.value=t[1]}else{for(var a=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],s=0;s<2;s++)eY[a[s]]&&(a[s]=aY(n,n.mapDimension(o[s]),a[s]));e.coord=a}}return e}function iY(t,e,n,i){var o={};return null!=t.valueIndex||null!=t.valueDim?(o.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,o.valueAxis=n.getAxis(function(t,e){e=t.getData().getDimensionInfo(e);return e&&e.coordDim}(i,o.valueDataDim)),o.baseAxis=n.getOtherAxis(o.valueAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim)):(o.baseAxis=i.getBaseAxis(),o.valueAxis=n.getOtherAxis(o.baseAxis),o.baseDataDim=e.mapDimension(o.baseAxis.dim),o.valueDataDim=e.mapDimension(o.valueAxis.dim)),o}function oY(t,e){return!(t&&t.containData&&e.coord&&(n=e,isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y))))||t.containData(e.coord);var n}function rY(t,o){return t?function(t,e,n,i){return fg(i<2?t.coord&&t.coord[i]:t.value,o[i])}:function(t,e,n,i){return fg(t.value,o[i])}}function aY(t,e,n){if("average"!==n)return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0];var i=0,o=0;return t.each(e,function(t,e){isNaN(t)||(i+=t,o++)}),i/o}var sY,lY=ur(),Jn=(u(uY,sY=Iy),uY.prototype.init=function(){this.markerGroupMap=ct()},uY.prototype.render=function(t,n,i){var o=this,e=this.markerGroupMap;e.each(function(t){lY(t).keep=!1}),n.eachSeries(function(t){var e=qU.getMarkerModelFromSeries(t,o.type);e&&o.renderSeries(t,e,n,i)}),e.each(function(t){lY(t).keep||o.group.remove(t.group)})},uY.prototype.markKeep=function(t){lY(t).keep=!0},uY.prototype.blurSeries=function(t){var e=this;E(t,function(t){t=qU.getMarkerModelFromSeries(t,e.type);t&&t.getData().eachItemGraphicEl(function(t){t&&Vl(t)})})},uY.type="marker",uY);function uY(){var t=null!==sY&&sY.apply(this,arguments)||this;return t.type=uY.type,t}function hY(a,s,l){var u=s.coordinateSystem;a.each(function(t){var e,n,i=a.getItemModel(t),o=mo(i.get("x"),l.getWidth()),r=mo(i.get("y"),l.getHeight());isNaN(o)||isNaN(r)?s.getMarkerPosition?n=s.getMarkerPosition(a.getValues(a.dimensions,t)):u&&(e=a.get(u.dimensions[0],t),i=a.get(u.dimensions[1],t),n=u.dataToPoint([e,i])):n=[o,r],isNaN(o)||(n[0]=o),isNaN(r)||(n[1]=r),a.setItemLayout(t,n)})}var cY,pY=(u(dY,cY=Jn),dY.prototype.updateTransform=function(t,e,n){e.eachSeries(function(t){var e=qU.getMarkerModelFromSeries(t,"markPoint");e&&(hY(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())},this)},dY.prototype.renderSeries=function(t,u,e,n){var i=t.coordinateSystem,o=t.id,h=t.getData(),r=this.markerGroupMap,o=r.get(o)||r.set(o,new kM),c=function(t,e,n){o=t?L(t&&t.dimensions,function(t){return P(P({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new $x(o,n),n=L(n.get("data"),V(nY,e));t&&(n=R(n,V(oY,t)));var o=rY(!!t,o);return i.initData(n,null,o),i}(i,t,u);u.setData(c),hY(u.getData(),t,n),c.each(function(t){var e,n=c.getItemModel(t),i=n.getShallow("symbol"),o=n.getShallow("symbolSize"),r=n.getShallow("symbolRotate"),a=n.getShallow("symbolOffset"),s=n.getShallow("symbolKeepAspect");(F(i)||F(o)||F(r)||F(a))&&(e=u.getRawValue(t),l=u.getDataParams(t),F(i)&&(i=i(e,l)),F(o)&&(o=o(e,l)),F(r)&&(r=r(e,l)),F(a)&&(a=a(e,l)));var l=n.getModel("itemStyle").getItemStyle(),n=gm(h,"color");l.fill||(l.fill=n),c.setItemVisual(t,{symbol:i,symbolSize:o,symbolRotate:r,symbolOffset:a,symbolKeepAspect:s,style:l})}),o.updateData(c),this.group.add(o.group),c.eachItemGraphicEl(function(t){t.traverse(function(t){il(t).dataModel=u})}),this.markKeep(o),o.group.silent=u.get("silent")||t.get("silent")},dY.type="markPoint",dY);function dY(){var t=null!==cY&&cY.apply(this,arguments)||this;return t.type=dY.type,t}var fY,gY=(u(yY,fY=qU),yY.prototype.createMarkerModelFromSeries=function(t,e,n){return new yY(t,e,n)},yY.type="markLine",yY.defaultOption={zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},yY);function yY(){var t=null!==fY&&fY.apply(this,arguments)||this;return t.type=yY.type,t}function mY(t,e,n,i){var o,r,a,s=t.getData(),l=[nY(t,(l=G(i)?i:"min"===(o=i.type)||"max"===o||"average"===o||"median"===o||null!=i.xAxis||null!=i.yAxis?(l=r=void 0,l=null!=i.yAxis||null!=i.xAxis?(r=e.getAxis(null!=i.yAxis?"y":"x"),Q(i.yAxis,i.xAxis)):(r=(a=iY(i,s,e,t)).valueAxis,aY(s,rb(s,a.valueDataDim),o)),s=1-(e="x"===r.dim?0:1),a={coord:[]},(r=S(i)).type=null,r.coord=[],r.coord[s]=-1/0,a.coord[s]=1/0,0<=(n=n.get("precision"))&&"number"==typeof l&&(l=+l.toFixed(Math.min(n,20))),r.coord[e]=a.coord[e]=l,[r,a,{type:o,valueIndex:i.valueIndex,value:l}]):(x("Invalid markLine data."),[]))[0]),nY(t,l[1]),P({},l[2])];return l[2].type=l[2].type||null,b(l[2],l[0]),b(l[2],l[1]),l}var vY=ur();function _Y(t){return!isNaN(t)&&!isFinite(t)}function xY(t,e,n,i){var o=1-t,r=i.dimensions[t];return _Y(e[o])&&_Y(n[o])&&e[t]===n[t]&&i.getAxis(r).containData(e[t])}function bY(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(xY(1,n,i,t)||xY(0,n,i,t)))return!0}return oY(t,e[0])&&oY(t,e[1])}function wY(t,e,n,i,o){var r,a,s,l,u=i.coordinateSystem,h=t.getItemModel(e),c=mo(h.get("x"),o.getWidth()),o=mo(h.get("y"),o.getHeight());isNaN(c)||isNaN(o)?(r=i.getMarkerPosition?i.getMarkerPosition(t.getValues(t.dimensions,e)):(l=u.dimensions,a=t.get(l[0],e),s=t.get(l[1],e),u.dataToPoint([a,s])),tI(u,"cartesian2d")&&(a=u.getAxis("x"),s=u.getAxis("y"),l=u.dimensions,_Y(t.get(l[0],e))?r[0]=a.toGlobalCoord(a.getExtent()[n?0:1]):_Y(t.get(l[1],e))&&(r[1]=s.toGlobalCoord(s.getExtent()[n?0:1]))),isNaN(c)||(r[0]=c),isNaN(o)||(r[1]=o)):r=[c,o],t.setItemLayout(e,r)}var SY,MY=(u(IY,SY=Jn),IY.prototype.updateTransform=function(t,e,r){e.eachSeries(function(e){var n,i,o,t=qU.getMarkerModelFromSeries(e,"markLine");t&&(n=t.getData(),i=vY(t).from,o=vY(t).to,i.each(function(t){wY(i,t,!0,e,r),wY(o,t,!1,e,r)}),n.each(function(t){n.setItemLayout(t,[i.getItemLayout(t),o.getItemLayout(t)])}),this.markerGroupMap.get(e.id).updateLayout())},this)},IY.prototype.renderSeries=function(r,n,t,a){var e=r.coordinateSystem,i=r.id,s=r.getData(),o=this.markerGroupMap,i=o.get(i)||o.set(i,new iP);this.group.add(i.group);var e=function(t,e,n){a=t?L(t&&t.dimensions,function(t){return P(P({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})}):[{name:"value",type:"float"}];var i=new $x(a,n),o=new $x(a,n),r=new $x([],n),n=L(n.get("data"),V(mY,e,t,n));t&&(n=R(n,V(bY,t)));var a=rY(!!t,a);return i.initData(L(n,function(t){return t[0]}),null,a),o.initData(L(n,function(t){return t[1]}),null,a),r.initData(L(n,function(t){return t[2]})),r.hasItemOption=!0,{from:i,to:o,line:r}}(e,r,n),l=e.from,u=e.to,h=e.line;vY(n).from=l,vY(n).to=u,n.setData(h);var c=n.get("symbol"),p=n.get("symbolSize"),d=n.get("symbolRotate"),f=n.get("symbolOffset");function g(t,e,n){var i=t.getItemModel(e);wY(t,e,n,r,a);var o=i.getModel("itemStyle").getItemStyle();null==o.fill&&(o.fill=gm(s,"color")),t.setItemVisual(e,{symbolKeepAspect:i.get("symbolKeepAspect"),symbolOffset:tt(i.get("symbolOffset",!0),f[n?0:1]),symbolRotate:tt(i.get("symbolRotate",!0),d[n?0:1]),symbolSize:tt(i.get("symbolSize"),p[n?0:1]),symbol:tt(i.get("symbol",!0),c[n?0:1]),style:o})}G(c)||(c=[c,c]),G(p)||(p=[p,p]),G(d)||(d=[d,d]),G(f)||(f=[f,f]),e.from.each(function(t){g(l,t,!0),g(u,t,!1)}),h.each(function(t){var e=h.getItemModel(t).getModel("lineStyle").getLineStyle();h.setItemLayout(t,[l.getItemLayout(t),u.getItemLayout(t)]),null==e.stroke&&(e.stroke=l.getItemVisual(t,"style").fill),h.setItemVisual(t,{fromSymbolKeepAspect:l.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:l.getItemVisual(t,"symbolOffset"),fromSymbolRotate:l.getItemVisual(t,"symbolRotate"),fromSymbolSize:l.getItemVisual(t,"symbolSize"),fromSymbol:l.getItemVisual(t,"symbol"),toSymbolKeepAspect:u.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:u.getItemVisual(t,"symbolOffset"),toSymbolRotate:u.getItemVisual(t,"symbolRotate"),toSymbolSize:u.getItemVisual(t,"symbolSize"),toSymbol:u.getItemVisual(t,"symbol"),style:e})}),i.updateData(h),e.line.eachItemGraphicEl(function(t,e){t.traverse(function(t){il(t).dataModel=n})}),this.markKeep(i),i.group.silent=n.get("silent")||r.get("silent")},IY.type="markLine",IY);function IY(){var t=null!==SY&&SY.apply(this,arguments)||this;return t.type=IY.type,t}var TY,CY=(u(DY,TY=qU),DY.prototype.createMarkerModelFromSeries=function(t,e,n){return new DY(t,e,n)},DY.type="markArea",DY.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},DY);function DY(){var t=null!==TY&&TY.apply(this,arguments)||this;return t.type=DY.type,t}function AY(t,e,n,i){var o=nY(t,i[0]),r=nY(t,i[1]),t=o.coord,i=r.coord;return t[0]=Q(t[0],-1/0),t[1]=Q(t[1],-1/0),i[0]=Q(i[0],1/0),i[1]=Q(i[1],1/0),(i=M([{},o,r])).coord=[o.coord,r.coord],i.x0=o.x,i.y0=o.y,i.x1=r.x,i.y1=r.y,i}var kY=ur();function LY(t){return!isNaN(t)&&!isFinite(t)}function PY(t,e,n){t=1-t;return LY(e[t])&&LY(n[t])}function OY(t,e){var n=e.coord[0],i=e.coord[1];return!!(tI(t,"cartesian2d")&&n&&i&&(PY(1,n,i)||PY(0,n,i)))||(oY(t,{coord:n,x:e.x0,y:e.y0})||oY(t,{coord:i,x:e.x1,y:e.y1}))}function RY(t,e,n,i,o){var r,a,s,l,u=i.coordinateSystem,h=t.getItemModel(e),c=mo(h.get(n[0]),o.getWidth()),o=mo(h.get(n[1]),o.getHeight());return isNaN(c)||isNaN(o)?(l=i.getMarkerPosition?i.getMarkerPosition(t.getValues(n,e)):(r=[a=t.get(n[0],e),s=t.get(n[1],e)],u.clampData&&u.clampData(r,r),u.dataToPoint(r,!0)),tI(u,"cartesian2d")&&(r=u.getAxis("x"),u=u.getAxis("y"),a=t.get(n[0],e),s=t.get(n[1],e),LY(a)?l[0]=r.toGlobalCoord(r.getExtent()["x0"===n[0]?0:1]):LY(s)&&(l[1]=u.toGlobalCoord(u.getExtent()["y0"===n[1]?0:1]))),isNaN(c)||(l[0]=c),isNaN(o)||(l[1]=o)):l=[c,o],l}var NY,EY=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],zY=(u(BY,NY=Jn),BY.prototype.updateTransform=function(t,e,o){e.eachSeries(function(n){var i,t=qU.getMarkerModelFromSeries(n,"markArea");t&&(i=t.getData()).each(function(e){var t=L(EY,function(t){return RY(i,e,t,n,o)});i.setItemLayout(e,t),i.getItemGraphicEl(e).setShape("points",t)})},this)},BY.prototype.renderSeries=function(a,o,t,s){var l=a.coordinateSystem,e=a.id,u=a.getData(),n=this.markerGroupMap,i=n.get(e)||n.set(e,{group:new io});this.group.add(i.group),this.markKeep(i);var h=function(t,n,e){var i,o;{var r;i=t?(r=L(t&&t.dimensions,function(t){var e=n.getData();return P(P({},e.getDimensionInfo(e.mapDimension(t))||{}),{name:t,ordinalMeta:null})}),o=L(["x0","y0","x1","y1"],function(t,e){return{name:t,type:r[e%2].type}}),new $x(o,e)):new $x(o=[{name:"value",type:"float"}],e)}e=L(e.get("data"),V(AY,n,t,e));t&&(e=R(e,V(OY,t)));t=t?function(t,e,n,i){return fg(t.coord[Math.floor(i/2)][i%2],o[i])}:function(t,e,n,i){return fg(t.value,o[i])};return i.initData(e,null,t),i.hasItemOption=!0,i}(l,a,o);o.setData(h),h.each(function(e){var t=L(EY,function(t){return RY(h,e,t,a,s)}),n=l.getAxis("x").scale,i=l.getAxis("y").scale,o=n.getExtent(),r=i.getExtent(),n=[n.parse(h.get("x0",e)),n.parse(h.get("x1",e))],i=[i.parse(h.get("y0",e)),i.parse(h.get("y1",e))];_o(n),_o(i);i=!!(o[0]>n[1]||o[1]<n[0]||r[0]>i[1]||r[1]<i[0]);h.setItemLayout(e,{points:t,allClipped:i});t=h.getItemModel(e).getModel("itemStyle").getItemStyle(),i=gm(u,"color");t.fill||(t.fill=i,"string"==typeof t.fill&&(t.fill=hn(t.fill,.4))),t.stroke||(t.stroke=i),h.setItemVisual(e,"style",t)}),h.diff(kY(i).data).add(function(t){var e=h.getItemLayout(t);e.allClipped||(e=new rh({shape:{points:e.points}}),h.setItemGraphicEl(t,e),i.group.add(e))}).update(function(t,e){var n=kY(i).data.getItemGraphicEl(e),e=h.getItemLayout(t);e.allClipped?n&&i.group.remove(n):(n?Kh(n,{shape:{points:e.points}},o,t):n=new rh({shape:{points:e.points}}),h.setItemGraphicEl(t,n),i.group.add(n))}).remove(function(t){t=kY(i).data.getItemGraphicEl(t);i.group.remove(t)}).execute(),h.eachItemGraphicEl(function(t,e){var n=h.getItemModel(e),i=h.getItemVisual(e,"style");t.useStyle(h.getItemVisual(e,"style")),Pc(t,Oc(n),{labelFetcher:o,labelDataIndex:e,defaultText:h.getName(e)||"",inheritColor:"string"==typeof i.fill?hn(i.fill,1):"#000"}),Ql(t,n),ql(t),il(t).dataModel=o}),kY(i).data=h,i.group.silent=o.get("silent")||a.get("silent")},BY.type="markArea",BY);function BY(){var t=null!==NY&&NY.apply(this,arguments)||this;return t.type=BY.type,t}var VY,GY=(u(FY,VY=yd),FY.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},FY.prototype.mergeOption=function(t,e){VY.prototype.mergeOption.call(this,t,e),this._updateSelector(t)},FY.prototype._updateSelector=function(t){var n=t.selector,i=this.ecModel;G(n=!0===n?t.selector=["all","inverse"]:n)&&E(n,function(t,e){H(t)&&(t={type:t}),n[e]=b(t,(e=i,"all"===(t=t.type)?{type:"all",title:e.getLocaleModel().get(["legend","selector","all"])}:"inverse"===t?{type:"inverse",title:e.getLocaleModel().get(["legend","selector","inverse"])}:void 0))})},FY.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n<t.length;n++){var i=t[n].get("name");if(this.isSelected(i)){this.select(i),e=!0;break}}e||this.select(t[0].get("name"))}},FY.prototype._updateData=function(i){var o=[],r=[];i.eachRawSeries(function(t){var e,n=t.name;r.push(n),t.legendVisualProvider?(n=t.legendVisualProvider.getAllNames(),i.isSeriesFiltered(t)||(r=r.concat(n)),n.length?o=o.concat(n):e=!0):e=!0,e&&rr(t)&&o.push(t.name)}),this._availableNames=r;var t=L(this.get("data")||o,function(t){return new ep(t="string"==typeof t||"number"==typeof t?{name:t}:t,this,this.ecModel)},this);this._data=t},FY.prototype.getData=function(){return this._data},FY.prototype.select=function(t){var e=this.option.selected;"single"===this.get("selectedMode")&&E(this._data,function(t){e[t.get("name")]=!1}),e[t]=!0},FY.prototype.unSelect=function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},FY.prototype.toggleSelected=function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},FY.prototype.allSelect=function(){var t=this._data,e=this.option.selected;E(t,function(t){e[t.get("name",!0)]=!0})},FY.prototype.inverseSelect=function(){var t=this._data,e=this.option.selected;E(t,function(t){t=t.get("name",!0);e.hasOwnProperty(t)||(e[t]=!0),e[t]=!e[t]})},FY.prototype.isSelected=function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&0<=C(this._availableNames,t)},FY.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},FY.type="legend.plain",FY.dependencies=["series"],FY.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},FY);function FY(){var t=null!==VY&&VY.apply(this,arguments)||this;return t.type=FY.type,t.layoutMode={type:"box",ignoreSize:!0},t}var HY,WY=V,UY=E,YY=io,XY=(u(ZY,HY=Iy),ZY.prototype.init=function(){this.group.add(this._contentGroup=new YY),this.group.add(this._selectorGroup=new YY),this._isFirstRender=!0},ZY.prototype.getContentGroup=function(){return this._contentGroup},ZY.prototype.getSelectorGroup=function(){return this._selectorGroup},ZY.prototype.render=function(t,e,n){var i,o,r,a,s,l=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),t.get("show",!0)&&(i=t.get("align"),s=t.get("orient"),i&&"auto"!==i||(i="right"===t.get("left")&&"vertical"===s?"right":"left"),o=t.get("selector",!0),a=t.get("selectorPosition",!0),!o||a&&"auto"!==a||(a="horizontal"===s?"end":"start"),this.renderInner(i,t,e,n,o,s,a),n=rd(r=t.getBoxLayoutParams(),e={width:n.getWidth(),height:n.getHeight()},s=t.get("padding")),s=rd(A({width:(a=this.layoutInner(t,i,n,l,o,a)).width,height:a.height},r),e,s),this.group.x=s.x-a.x,this.group.y=s.y-a.y,this.group.markRedraw(),this.group.add(this._backgroundEl=vH(a,t)))},ZY.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},ZY.prototype.renderInner=function(s,l,u,h,t,e,n){var c=this.getContentGroup(),p=ct(),d=l.get("selectedMode"),f=[];u.eachRawSeries(function(t){t.get("legendHoverLink")||f.push(t.id)}),UY(l.getData(),function(o,r){var a=o.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var t=new YY;return t.newline=!0,void c.add(t)}var e,n,i=u.getSeriesByName(a)[0];p.get(a)||(i?(e=(n=i.getData()).getVisual("legendLineStyle")||{},t=n.getVisual("legendIcon"),n=n.getVisual("style"),this._createItem(i,a,r,o,l,s,e,n,t,d).on("click",WY(jY,a,null,h,f)).on("mouseover",WY(KY,i.name,null,h,f)).on("mouseout",WY($Y,i.name,null,h,f)),p.set(a,!0)):u.eachRawSeries(function(t){var e,n,i;p.get(a)||!t.legendVisualProvider||(n=t.legendVisualProvider).containName(a)&&(i=n.indexOfName(a),e=n.getItemVisual(i,"style"),n=n.getItemVisual(i,"legendIcon"),(i=nn(e.fill))&&0===i[3]&&(i[3]=.2,e.fill=cn(i,"rgba")),this._createItem(t,a,r,o,l,s,{},e,n,d).on("click",WY(jY,null,a,h,f)).on("mouseover",WY(KY,null,a,h,f)).on("mouseout",WY($Y,null,a,h,f)),p.set(a,!0))},this),p.get(a)||console.warn(a+" series not exists. Legend data should be same with series name or data name."))},this),t&&this._createSelector(t,l,h,e,n)},ZY.prototype._createSelector=function(t,i,o,e,n){var r=this.getSelectorGroup();UY(t,function(t){var e=t.type,n=new Xs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){o.dispatchAction({type:"all"===e?"legendAllSelect":"legendInverseSelect"})}});r.add(n),Pc(n,{normal:i.getModel("selectorLabel"),emphasis:i.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),ql(n)})},ZY.prototype._createItem=function(t,e,n,i,o,r,a,s,l,u){var h=t.visualDrawType,c=o.get("itemWidth"),p=o.get("itemHeight"),d=o.isSelected(e),f=i.get("symbolRotate"),g=i.get("symbolKeepAspect"),y=i.get("icon"),a=function(t,e,n,i,o,r){function a(n,i){"auto"===n.lineWidth&&(n.lineWidth=0<i.lineWidth?2:0),UY(n,function(t,e){"inherit"===n[e]&&(n[e]=i[e])})}var s=e.getModel("itemStyle").getItemStyle(),l=0===t.lastIndexOf("empty",0)?"fill":"stroke";s.decal=i.decal,"inherit"===s.fill&&(s.fill=i[o]);"inherit"===s.stroke&&(s.stroke=i[l]);"inherit"===s.opacity&&(s.opacity=("fill"===o?i:n).opacity);a(s,i);t=e.getModel("lineStyle"),o=t.getLineStyle();a(o,n),"auto"===s.fill&&(s.fill=i.fill),"auto"===s.stroke&&(s.stroke=i.fill),"auto"===o.stroke&&(o.stroke=i.fill),r||(r=e.get("inactiveBorderWidth"),l=s[l],s.lineWidth="auto"===r?0<i.lineWidth&&l?2:0:s.lineWidth,s.fill=e.get("inactiveColor"),s.stroke=e.get("inactiveBorderColor"),o.stroke=t.get("inactiveColor"),o.lineWidth=t.get("inactiveWidth"));return{itemStyle:s,lineStyle:o}}(l=y||l||"roundRect",i,a,s,h,d),s=new YY,h=i.getModel("textStyle");"function"!=typeof t.getLegendIcon||y&&"inherit"!==y?(y="inherit"===y&&t.getData().getVisual("symbol")?"inherit"===f?t.getData().getVisual("symbolRotate"):f:0,s.add(function(t){var e=t.icon||"roundRect",n=Cm(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),-1<e.indexOf("empty")&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:c,itemHeight:p,icon:l,iconRotate:y,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:g}))):s.add(t.getLegendIcon({itemWidth:c,itemHeight:p,icon:l,iconRotate:f,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:g}));a="left"===r?c+5:-5,g=r,c=o.get("formatter"),r=e;"string"==typeof c&&c?r=c.replace("{name}",null!=e?e:""):"function"==typeof c&&(r=c(e));c=i.get("inactiveColor");s.add(new Xs({style:Rc(h,{text:r,x:a,y:p/2,fill:d?h.getTextColor():c,align:g,verticalAlign:"middle"})}));g=new Fs({shape:s.getBoundingRect(),invisible:!0}),i=i.getModel("tooltip");return i.get("show")&&Cc({el:g,componentModel:o,itemName:e,itemTooltipOption:i.option}),s.add(g),s.eachChild(function(t){t.silent=!0}),g.silent=!u,this.getContentGroup().add(s),ql(s),s.__legendDataIndex=n,s},ZY.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getContentGroup(),s=this.getSelectorGroup();od(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),o){od("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,n=0===d?"width":"height",o=0===d?"height":"width",t=0===d?"y":"x";"end"===r?c[d]+=l[n]+p:u[d]+=h[n]+p,c[1-d]+=l[o]/2-h[o]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];s={x:0,y:0};return s[n]=l[n]+p+h[n],s[o]=Math.max(l[o],h[o]),s[t]=Math.min(0,h[t]+c[1-d]),s}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},ZY.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},ZY.type="legend.plain",ZY);function ZY(){var t=null!==HY&&HY.apply(this,arguments)||this;return t.type=ZY.type,t.newlineDisabled=!1,t}function jY(t,e,n,i){$Y(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),KY(t,e,n,i)}function qY(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,o=n.length;i<o&&!(e=n[i].states.emphasis);)i++;return e&&e.hoverLayer}function KY(t,e,n,i){qY(n)||n.dispatchAction({type:"highlight",seriesName:t,name:e,excludeSeriesId:i})}function $Y(t,e,n,i){qY(n)||n.dispatchAction({type:"downplay",seriesName:t,name:e,excludeSeriesId:i})}function JY(t){var n=t.findComponents({mainType:"legend"});n&&n.length&&t.filterSeries(function(t){for(var e=0;e<n.length;e++)if(!n[e].isSelected(t.name))return!1;return!0})}function QY(t,e,n){var i,o={},r="toggleSelected"===t;return n.eachComponent("legend",function(n){r&&null!=i?n[i?"select":"unSelect"](e.name):"allSelect"===t||"inverseSelect"===t?n[t]():(n[t](e.name),i=n.isSelected(e.name)),E(n.getData(),function(t){var e=t.get("name");"\n"!==e&&""!==e&&(t=n.isSelected(e),o.hasOwnProperty(e)?o[e]=o[e]&&t:o[e]=t)})}),"allSelect"===t||"inverseSelect"===t?{selected:o}:{name:e.name,selected:o}}function tX(t){t.registerComponentModel(GY),t.registerComponentView(XY),t.registerProcessor(t.PRIORITY.PROCESSOR.SERIES_FILTER,JY),t.registerSubTypeDefaulter("legend",function(){return"plain"}),(t=t).registerAction("legendToggleSelect","legendselectchanged",V(QY,"toggleSelected")),t.registerAction("legendAllSelect","legendselectall",V(QY,"allSelect")),t.registerAction("legendInverseSelect","legendinverseselect",V(QY,"inverseSelect")),t.registerAction("legendSelect","legendselected",V(QY,"select")),t.registerAction("legendUnSelect","legendunselected",V(QY,"unSelect"))}var eX,nX=(u(iX,eX=GY),iX.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},iX.prototype.init=function(t,e,n){var i=ud(t);eX.prototype.init.call(this,t,e,n),oX(this,t,i)},iX.prototype.mergeOption=function(t,e){eX.prototype.mergeOption.call(this,t,e),oX(this,this.option,t)},iX.type="legend.scroll",iX.defaultOption=rp(GY.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),iX);function iX(){var t=null!==eX&&eX.apply(this,arguments)||this;return t.type=iX.type,t}function oX(t,e,n){var i=[1,1];i[t.getOrient().index]=0,ld(e,n,{type:"box",ignoreSize:!!i})}var rX,aX=io,sX=["width","height"],lX=["x","y"],uX=(u(hX,rX=XY),hX.prototype.init=function(){rX.prototype.init.call(this),this.group.add(this._containerGroup=new aX),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new aX)},hX.prototype.resetInner=function(){rX.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},hX.prototype.renderInner=function(t,i,e,o,n,r,a){var s=this;rX.prototype.renderInner.call(this,t,i,e,o,n,r,a);var l=this._controllerGroup,a=i.get("pageIconSize",!0),u=G(a)?a:[a,a];h("pagePrev",0);a=i.getModel("pageTextStyle");function h(t,e){var n=t+"DataIndex",n=Mc(i.get("pageIcons",!0)[i.getOrient().name][e],{onclick:B(s._pageGo,s,n,i,o)},{x:-u[0]/2,y:-u[1]/2,width:u[0],height:u[1]});n.name=t,l.add(n)}l.add(new Xs({name:"pageText",style:{text:"xx/xx",fill:a.getTextColor(),font:a.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),h("pageNext",1)},hX.prototype.layoutInner=function(t,e,n,i,o,r){var a=this.getSelectorGroup(),s=t.getOrient().index,l=sX[s],u=lX[s],h=sX[1-s],c=lX[1-s];o&&od("horizontal",a,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),d=a.getBoundingRect(),f=[-d.x,-d.y],g=S(n);o&&(g[l]=n[l]-d[l]-p);g=this._layoutContentAndController(t,i,g,s,l,h,c,u);return o&&("end"===r?f[s]+=g[l]+p:(r=d[l]+p,f[s]-=r,g[u]-=r),g[l]+=d[l]+p,f[1-s]+=g[c]+g[h]/2-d[h]/2,g[h]=Math.max(g[h],d[h]),g[c]=Math.min(g[c],d[c]+f[1-s]),a.x=f[0],a.y=f[1],a.markRedraw()),g},hX.prototype._layoutContentAndController=function(t,e,n,i,o,r,a,s){var l=this.getContentGroup(),u=this._containerGroup,h=this._controllerGroup;od(t.get("orient"),l,t.get("itemGap"),i?n.width:null,i?null:n.height),od("horizontal",h,t.get("pageButtonItemGap",!0));var c=l.getBoundingRect(),p=h.getBoundingRect(),d=this._showController=c[o]>n[o],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],e=[-p.x,-p.y],s=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?e[i]+=n[o]-p[o]:g[i]+=p[o]+s),e[1-i]+=c[r]/2-p[r]/2,l.setPosition(f),u.setPosition(g),h.setPosition(e);g={x:0,y:0};g[o]=(d?n:c)[o],g[r]=Math.max(c[r],p[r]),g[a]=Math.min(0,p[a]+e[1-i]),u.__rectSize=n[o],d?((i={x:0,y:0})[o]=Math.max(n[o]-p[o]-s,0),i[r]=g[r],u.setClipPath(new Fs({shape:i})),u.__rectSize=i[o]):h.eachChild(function(t){t.attr({invisible:!0,silent:!0})});h=this._getPageInfo(t);return null!=h.pageIndex&&Kh(l,{x:h.contentPosition[0],y:h.contentPosition[1]},d?t:null),this._updatePageInfoView(t,h),g},hX.prototype._pageGo=function(t,e,n){t=this._getPageInfo(e)[t];null!=t&&n.dispatchAction({type:"legendScroll",scrollDataIndex:t,legendId:e.id})},hX.prototype._updatePageInfoView=function(n,i){var o=this._controllerGroup;E(["pagePrev","pageNext"],function(t){var e=null!=i[t+"DataIndex"],t=o.childOfName(t);t&&(t.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),t.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),r=i.pageIndex,a=null!=r?r+1:0,r=i.pageCount;t&&e&&t.setStyle("text",H(e)?e.replace("{current}",null==a?"":a+"").replace("{total}",null==r?"":r+""):e({current:a,total:r}))},hX.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,r=sX[o],a=lX[o],s=this._findTargetItemIndex(e),l=n.children(),t=l[s],u=l.length,e=u?1:0,h={contentPosition:[n.x,n.y],pageCount:e,pageIndex:e-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!t)return h;t=g(t);h.contentPosition[o]=-t.s;for(var c=s+1,p=t,d=t,f=null;c<=u;++c)(!(f=g(l[c]))&&d.e>p.s+i||f&&!y(f,p.s))&&(p=d.i>p.i?d:f)&&(null==h.pageNextDataIndex&&(h.pageNextDataIndex=p.i),++h.pageCount),d=f;for(c=s-1,p=t,d=t,f=null;-1<=c;--c)(f=g(l[c]))&&y(d,f.s)||!(p.i<d.i)||(d=p,null==h.pagePrevDataIndex&&(h.pagePrevDataIndex=p.i),++h.pageCount,++h.pageIndex),p=f;return h;function g(t){if(t){var e=t.getBoundingRect(),n=e[a]+t[a];return{s:n,e:n+e[r],i:t.__legendDataIndex}}}function y(t,e){return t.e>=e&&t.s<=e+i}},hX.prototype._findTargetItemIndex=function(n){return this._showController?(this.getContentGroup().eachChild(function(t,e){t=t.__legendDataIndex;null==o&&null!=t&&(o=e),t===n&&(i=e)}),null!=i?i:o):0;var i,o},hX.type="legend.scroll",hX);function hX(){var t=null!==rX&&rX.apply(this,arguments)||this;return t.type=hX.type,t.newlineDisabled=!0,t._currentIndex=0,t}function cX(t){xx(tX),t.registerComponentModel(nX),t.registerComponentView(uX),t.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(n)})})}var pX,dX=(u(fX,pX=n),fX.type="dataZoom.inside",fX.defaultOption=rp(n.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),fX);function fX(){var t=null!==pX&&pX.apply(this,arguments)||this;return t.type=fX.type,t}var gX=ur();function yX(t,e){e&&(t.removeKey(e.model.uid),(e=e.controller)&&e.dispose())}function mX(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function vX(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function _X(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,function(t,a){var e=gX(a),l=e.coordSysRecordMap||(e.coordSysRecordMap=ct());l.each(function(t){t.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(o){E(WF(o).infoList,function(t){var e,r,n,i=t.model.uid,e=l.get(i)||l.set(i,(e=a,i=t.model,r={model:i,containsPoint:V(vX,i),dispatchAction:V(mX,e),dataZoomInfoMap:null,controller:null},n=r.controller=new mD(e.getZr()),E(["pan","zoom","scrollMove"],function(o){n.on(o,function(n){var i=[];r.dataZoomInfoMap.each(function(t){var e;n.isAvailableBehavior(t.model.option)&&(e=(e=(t.getRange||{})[o])&&e(t.dzReferCoordSysInfo,r.model.mainType,r.controller,n),!t.model.get("disabled",!0)&&e&&i.push({dataZoomId:t.model.id,start:e[0],end:e[1]}))}),i.length&&r.dispatchAction(i)})}),r));(e.dataZoomInfoMap||(e.dataZoomInfoMap=ct())).set(o.uid,{dzReferCoordSysInfo:t,model:o,getRange:null})})}),l.each(function(t){var e,n,i,o,r,a=t.controller,s=t.dataZoomInfoMap;!s||null!=(n=s.keys()[0])&&(e=s.get(n)),e?(o={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0,s.each(function(t){var e=t.model,t=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");o["type_"+i]<o["type_"+t]&&(i=t),r=r&&e.get("preventDefaultMouseMove",!0)}),s={controlType:i,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}},a.enable(s.controlType,s.opt),a.setPointerChecker(t.containsPoint),Fy(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")):yX(l,t)})})}var xX,bX=(u(wX,xX=jc),wX.prototype.render=function(t,e,n){var i,o;xX.prototype.render.apply(this,arguments),t.noTarget()?this._clear():(this.range=t.getPercentRange(),n=n,i=t,o={pan:B(SX.pan,this),zoom:B(SX.zoom,this),scrollMove:B(SX.scrollMove,this)},gX(n).coordSysRecordMap.each(function(t){t=t.dataZoomInfoMap.get(i.uid);t&&(t.getRange=o)}))},wX.prototype.dispose=function(){this._clear(),xX.prototype.dispose.apply(this,arguments)},wX.prototype._clear=function(){!function(t,e){for(var n=gX(t).coordSysRecordMap,i=n.keys(),o=0;o<i.length;o++){var r=i[o],a=n.get(r),s=a.dataZoomInfoMap;s&&(r=e.uid,s.get(r)&&(s.removeKey(r),s.keys().length||yX(n,a)))}}(this.api,this.dataZoomModel),this.range=null},wX.type="dataZoom.inside",wX);function wX(){var t=null!==xX&&xX.apply(this,arguments)||this;return t.type="dataZoom.inside",t}var SX={zoom:function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a){t=IX[e](null,[i.originX,i.originY],a,n,t),t=(0<t.signal?t.pixelStart+t.pixelLength-t.pixel:t.pixel-t.pixelStart)/t.pixelLength*(r[1]-r[0])+r[0],i=Math.max(1/i.scale,0);r[0]=(r[0]-t)*i+t,r[1]=(r[1]-t)*i+t;t=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return CO(0,r,[0,100],0,t.minSpan,t.maxSpan),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}},pan:MX(function(t,e,n,i,o,r){n=IX[i]([r.oldX,r.oldY],[r.newX,r.newY],e,o,n);return n.signal*(t[1]-t[0])*n.pixel/n.pixelLength}),scrollMove:MX(function(t,e,n,i,o,r){return IX[i]([0,0],[r.scrollDelta,r.scrollDelta],e,o,n).signal*(t[1]-t[0])*r.scrollDelta})};function MX(s){return function(t,e,n,i){var o=this.range,r=o.slice(),a=t.axisModels[0];if(a)return CO(s(r,a,t,e,n,i),r,[0,100],"all"),this.range=r,o[0]!==r[0]||o[1]!==r[1]?r:void 0}}var IX={grid:function(t,e,n,i,o){var r=n.axis,n={},o=o.model.coordinateSystem.getRect();return t=t||[0,0],"x"===r.dim?(n.pixel=e[0]-t[0],n.pixelLength=o.width,n.pixelStart=o.x,n.signal=r.inverse?1:-1):(n.pixel=e[1]-t[1],n.pixelLength=o.height,n.pixelStart=o.y,n.signal=r.inverse?-1:1),n},polar:function(t,e,n,i,o){var r,a=n.axis,s={},l=(r=o.model.coordinateSystem).getRadiusAxis().getExtent(),o=r.getAngleAxis().getExtent();return t=t?r.pointToCoord(t):[0,0],e=r.pointToCoord(e),"radiusAxis"===n.mainType?(s.pixel=e[0]-t[0],s.pixelLength=l[1]-l[0],s.pixelStart=l[0],s.signal=a.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=o[1]-o[0],s.pixelStart=o[0],s.signal=a.inverse?-1:1),s},singleAxis:function(t,e,n,i,o){var r=n.axis,n=o.model.coordinateSystem.getRect(),o={};return t=t||[0,0],"horizontal"===r.orient?(o.pixel=e[0]-t[0],o.pixelLength=n.width,o.pixelStart=n.x,o.signal=r.inverse?1:-1):(o.pixel=e[1]-t[1],o.pixelLength=n.height,o.pixelStart=n.y,o.signal=r.inverse?-1:1),o}};function TX(t){uH(t),t.registerComponentModel(dX),t.registerComponentView(bX),_X(t)}var CX,DX=(u(AX,CX=n),AX.type="dataZoom.slider",AX.layoutMode="box",AX.defaultOption=rp(n.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),AX);function AX(){var t=null!==CX&&CX.apply(this,arguments)||this;return t.type=AX.type,t}var kX,LX=Fs,PX="horizontal",OX="vertical",RX=["line","bar","candlestick","scatter"],NX={easing:"cubicOut",duration:100,delay:0},EX=(u(zX,kX=jc),zX.prototype.init=function(t,e){this.api=e,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},zX.prototype.render=function(t,e,n,i){if(kX.prototype.render.apply(this,arguments),Fy(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),!1!==t.get("show")){if(t.noTarget())return this._clear(),void this.group.removeAll();i&&"dataZoom"===i.type&&i.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},zX.prototype.dispose=function(){this._clear(),kX.prototype.dispose.apply(this,arguments)},zX.prototype._clear=function(){var t,e;(n=(t=this)[e="_dispatchZoomAction"])&&n[zy]&&(t[e]=n[zy]);var n=this.api.getZr();n.off("mousemove",this._onBrush),n.off("mouseup",this._onBrushEnd)},zX.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new io;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},zX.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),e={width:e.getWidth(),height:e.getHeight()},o=this._orient===PX?{right:e.width-i.x-i.width,top:e.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},r=ud(t.option);E(["right","top","width","height"],function(t){"ph"===r[t]&&(r[t]=o[t])});e=rd(r,e);this._location={x:e.x,y:e.y},this._size=[e.width,e.height],this._orient===OX&&this._size.reverse()},zX.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),r=this._displayables.sliderGroup,i=(this._dataShadowInfo||{}).otherAxisInverse;r.attr(n!==PX||o?n===PX&&o?{scaleY:i?1:-1,scaleX:-1}:n!==OX||o?{scaleY:i?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:i?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:i?1:-1,scaleX:1});r=t.getBoundingRect([r]);t.x=e.x-r.x,t.y=e.y-r.y,t.markRedraw()},zX.prototype._getViewExtent=function(){return[0,this._size[0]]},zX.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new LX({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));t=new LX({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:B(this._onClickPanel,this)}),e=this.api.getZr();i?(t.on("mousedown",this._onBrushStart,this),t.cursor="crosshair",e.on("mousemove",this._onBrush),e.on("mouseup",this._onBrushEnd)):(e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)),n.add(t)},zX.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),n=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=n){var o,t=.3*((r=i.getDataExtent(n))[1]-r[0]),r=[r[0]-t,r[1]+t],a=[0,e[1]],t=[0,e[0]],s=[[e[0],0],[0,0]],l=[],u=t[1]/(i.count()-1),h=0,c=Math.round(i.count()/e[0]);i.each([n],function(t,e){var n;0<c&&e%c?h+=u:(t=(n=null==t||isNaN(t)||""===t)?0:yo(t,r,a,!0),n&&!o&&e?(s.push([s[s.length-1][0],0]),l.push([l[l.length-1][0],0])):!n&&o&&(s.push([h,0]),l.push([h,0])),s.push([h,t]),l.push([h,t]),h+=u,o=n)});for(var p,d,f,g=this.dataZoomModel,y=0;y<3;y++){var m=(p=1===y,d=f=d=void 0,d=g.getModel(p?"selectedDataBackground":"dataBackground"),f=new io,p=new rh({shape:{points:s},segmentIgnoreThreshold:1,style:d.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),d=new uh({shape:{points:l},segmentIgnoreThreshold:1,style:d.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19}),f.add(p),f.add(d),f);this._displayables.sliderGroup.add(m),this._displayables.dataShadowSegs.push(m)}}}},zX.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,s=t.get("showDataShadow");if(!1!==s){var l,u=this.ecModel;return t.eachTargetAxis(function(r,a){E(t.getAxisProxy(r,a).getTargetSeriesModels(),function(t){var e,n,i,o;l||!0!==s&&C(RX,t.get("type"))<0||(e=u.getComponent(FF(r),a).axis,n={x:"y",y:"x",radius:"angle",angle:"radius"}[r],o=t.coordinateSystem,null!=n&&o.getOtherAxis&&(i=o.getOtherAxis(e).inverse),n=t.getData().mapDimension(n),l={thisAxis:e,series:t,thisDim:r,otherDim:n,otherAxisInverse:i})},this)},this),l}},zX.prototype._renderHandle=function(){var o=this.group,t=this._displayables,r=t.handles=[null,null],a=t.handleLabels=[null,null],s=this._displayables.sliderGroup,e=this._size,l=this.dataZoomModel,n=this.api,i=l.get("borderRadius")||0,u=l.get("brushSelect"),h=t.filler=new LX({silent:u,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});s.add(h),s.add(new LX({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:e[0],height:e[1],r:i},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),E([0,1],function(t){var e=l.get("handleIcon");!Mm[e]&&e.indexOf("path://")<0&&e.indexOf("image://")<0&&(e="path://"+e,Wo("handleIcon now needs 'path://' prefix when using a path string"));var n=Cm(e,-1,0,2,2,null,!0);n.attr({cursor:BX(this._orient),draggable:!0,drift:B(this._onDragMove,this,t),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1),z2:5});var i=n.getBoundingRect(),e=l.get("handleSize");this._handleHeight=mo(e,this._size[1]),this._handleWidth=i.width/i.height*this._handleHeight,n.setStyle(l.getModel("handleStyle").getItemStyle()),n.style.strokeNoScale=!0,n.rectHover=!0,n.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ql(n);i=l.get("handleColor");null!=i&&(n.style.fill=i),s.add(r[t]=n);n=l.getModel("textStyle");o.add(a[t]=new Xs({silent:!0,invisible:!0,style:Rc(n,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:n.getTextColor(),font:n.getFont()}),z2:10}))},this);var c,p=h;u&&(i=mo(l.get("moveHandleSize"),e[1]),c=t.moveHandle=new Fs({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:e[1]-.5,height:i}}),h=.8*i,(u=t.moveHandleIcon=Cm(l.get("moveHandleIcon"),-h/2,-h/2,h,h,"#fff",!0)).silent=!0,u.y=e[1]+i/2-.5,c.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle(),h=Math.min(e[1]/2,Math.max(i,10)),(p=t.moveZone=new Fs({invisible:!0,shape:{y:e[1]-h,height:i+h}})).on("mouseover",function(){n.enterEmphasis(c)}).on("mouseout",function(){n.leaveEmphasis(c)}),s.add(c),s.add(u),s.add(p)),p.attr({draggable:!0,cursor:BX(this._orient),drift:B(this._onDragMove,this,"all"),ondragstart:B(this._showDataInfo,this,!0),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1)})},zX.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[yo(t[0],[0,100],e,!0),yo(t[1],[0,100],e,!0)]},zX.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),r=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];CO(e,i,o,n.get("zoomLock")?"all":t,null!=r.minSpan?yo(r.minSpan,a,o,!0):null,null!=r.maxSpan?yo(r.maxSpan,a,o,!0):null);r=this._range,a=this._range=_o([yo(i[0],o,a,!0),yo(i[1],o,a,!0)]);return!r||r[0]!==a[0]||r[1]!==a[1]},zX.prototype._updateView=function(t){var i=this._displayables,o=this._handleEnds,e=_o(o.slice()),r=this._size;E([0,1],function(t){var e=i.handles[t],n=this._handleHeight;e.attr({scaleX:n/2,scaleY:n/2,x:o[t]+(t?-1:1),y:r[1]/2-n/2})},this),i.filler.setShape({x:e[0],y:0,width:e[1]-e[0],height:r[1]});var n={x:e[0],width:e[1]-e[0]};i.moveHandle&&(i.moveHandle.setShape(n),i.moveZone.setShape(n),i.moveZone.getBoundingRect(),i.moveHandleIcon&&i.moveHandleIcon.attr("x",n.x+n.width/2));for(var a=i.dataShadowSegs,s=[0,e[0],e[1],r[0]],l=0;l<a.length;l++){var u=a[l],h=u.getClipPath();h||(h=new Fs,u.setClipPath(h)),h.setShape({x:s[l],y:0,width:s[l+1]-s[l],height:r[1]})}this._updateDataInfo(t)},zX.prototype._updateDataInfo=function(t){var e,n,i=this.dataZoomModel,o=this._displayables,r=o.handleLabels,a=this._orient,s=["",""];!i.get("showDetail")||(n=i.findRepresentativeAxisProxy())&&(e=n.getAxisModel().axis,i=this._range,n=t?n.calculateDataWindow({start:i[0],end:i[1]}).valueWindow:n.getDataValueWindow(),s=[this._formatLabel(n[0],e),this._formatLabel(n[1],e)]);var l=_o(this._handleEnds.slice());function u(t){var e=mc(o.handles[t].parent,this.group),n=_c(0===t?"right":"left",e),i=this._handleWidth/2+5,e=vc([l[t]+(0===t?-i:i),this._size[1]/2],e);r[t].setStyle({x:e[0],y:e[1],verticalAlign:a===PX?"middle":n,align:a===PX?n:"center",text:s[t]})}u.call(this,0),u.call(this,1)},zX.prototype._formatLabel=function(t,e){var n=this.dataZoomModel,i=n.get("labelFormatter"),n=n.get("labelPrecision");null!=n&&"auto"!==n||(n=e.getPixelPrecision());n=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(n,20));return F(i)?i(t,n):H(i)?i.replace("{value}",n):n},zX.prototype._showDataInfo=function(t){t=this._dragging||t;var e=this._displayables,n=e.handleLabels;n[0].attr("invisible",!t),n[1].attr("invisible",!t),e.moveHandle&&this.api[t?"enterEmphasis":"leaveEmphasis"](e.moveHandle,1)},zX.prototype._onDragMove=function(t,e,n,i){this._dragging=!0,ie(i.event);n=vc([e,n],this._displayables.sliderGroup.getLocalTransform(),!0),t=this._updateInterval(t,n[0]),n=this.dataZoomModel.get("realtime");this._updateView(!n),t&&n&&this._dispatchZoomAction(!0)},zX.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1),this.dataZoomModel.get("realtime")||this._dispatchZoomAction(!1)},zX.prototype._onClickPanel=function(t){var e=this._size,t=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);t[0]<0||t[0]>e[0]||t[1]<0||t[1]>e[1]||(e=((e=this._handleEnds)[0]+e[1])/2,e=this._updateInterval("all",t[0]-e),this._updateView(),e&&this._dispatchZoomAction(!1))},zX.prototype._onBrushStart=function(t){var e=t.offsetX,t=t.offsetY;this._brushStart=new bi(e,t),this._brushing=!0,this._brushStartTime=+new Date},zX.prototype._onBrushEnd=function(t){var e,n,i;this._brushing&&(i=this._displayables.brushRect,this._brushing=!1,i&&(i.attr("ignore",!0),e=i.shape,+new Date-this._brushStartTime<200&&Math.abs(e.width)<5||(n=this._getViewExtent(),i=[0,100],this._range=_o([yo(e.x,n,i,!0),yo(e.x+e.width,n,i,!0)]),this._handleEnds=[e.x,e.x+e.width],this._updateView(),this._dispatchZoomAction(!1))))},zX.prototype._onBrush=function(t){this._brushing&&(ie(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},zX.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new LX({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);i=this._brushStart,n=this._displayables.sliderGroup,e=n.transformCoordToLocal(t,e),n=n.transformCoordToLocal(i.x,i.y),i=this._size;e[0]=Math.max(Math.min(i[0],e[0]),0),o.setShape({x:n[0],y:0,width:e[0]-n[0],height:i[1]})},zX.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?NX:null,start:e[0],end:e[1]})},zX.prototype._findCoordRect=function(){var t,e,n=WF(this.dataZoomModel).infoList;return t=!(t=!t&&n.length?(e=n[0].model.coordinateSystem).getRect&&e.getRect():t)?{x:.2*(n=this.api.getWidth()),y:.2*(e=this.api.getHeight()),width:.6*n,height:.6*e}:t},zX.type="dataZoom.slider",zX);function zX(){var t=null!==kX&&kX.apply(this,arguments)||this;return t.type=zX.type,t._displayables={},t}function BX(t){return"vertical"===t?"ns-resize":"ew-resize"}function VX(t){t.registerComponentModel(DX),t.registerComponentView(EX),uH(t)}var GX,FX=function(t,e,n){e=S((HX[t]||{})[e]);return n&&G(e)?e[e.length-1]:e},HX={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},WX=Ok.mapVisual,UX=Ok.eachVisual,YX=G,XX=E,ZX=_o,jX=yo,n=(u(qX,GX=yd),qX.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},qX.prototype.optionUpdated=function(t,e){var n=this.option;w.canvasSupported||(n.realtime=!1),e||qW(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},qX.prototype.resetVisual=function(t){var e=this.stateList;t=B(t,this),this.controllerVisuals=jW(this.option.controller,e,t),this.targetVisuals=jW(this.option.target,e,t)},qX.prototype.getItemSymbol=function(){return null},qX.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return null==t||"all"===t?this.ecModel.eachSeries(function(t,e){n.push(e)}):n=qo(t),n},qX.prototype.eachTargetSeries=function(e,n){E(this.getTargetSeriesIndices(),function(t){t=this.ecModel.getSeriesByIndex(t);t&&e.call(n,t)},this)},qX.prototype.isTargetSeries=function(e){var n=!1;return this.eachTargetSeries(function(t){t===e&&(n=!0)}),n},qX.prototype.formatValueText=function(t,e,n){var i,o=this.option,r=o.precision,a=this.dataBound,o=o.formatter;n=n||["<",">"],G(t)&&(t=t.slice(),i=!0);e=e?t:i?[s(t[0]),s(t[1])]:s(t);return H(o)?o.replace("{value}",i?e[0]:e).replace("{value2}",i?e[1]:e):F(o)?i?o(t[0],t[1]):o(t):i?t[0]===a[0]?n[0]+" "+e[1]:t[1]===a[1]?n[1]+" "+e[0]:e[0]+" - "+e[1]:e;function s(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(r,20))}},qX.prototype.resetExtent=function(){var t=this.option,t=ZX([t.min,t.max]);this._dataExtent=t},qX.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;0<=i;i--){var o=n[i],o=t.getDimensionInfo(o);if(!o.isCalculationCoord)return o.storeDimIndex}},qX.prototype.getExtent=function(){return this._dataExtent.slice()},qX.prototype.completeVisualOption=function(){var e=this.ecModel,n=this.option,t={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});b(i,t),b(o,t);var u=this.isCategory();function r(t){YX(n.color)&&!t.inRange&&(t.inRange={color:n.color.slice().reverse()}),t.inRange=t.inRange||{color:e.get("gradientColor")}}r.call(this,i),r.call(this,o),function(t,e,n){var e=t[e],i=t[n];e&&!i&&(i=t[n]={},XX(e,function(t,e){var n;!Ok.isValidType(e)||null!=(n=FX(e,"inactive",u))&&(i[e]=n,"color"!==e||i.hasOwnProperty("opacity")||i.hasOwnProperty("colorAlpha")||(i.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,a=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,s=this.get("inactiveColor"),l=this.getItemSymbol()||"roundRect";XX(this.stateList,function(t){var e=this.itemSize,n=o[t];null==(n=n||(o[t]={color:u?s:[s]})).symbol&&(n.symbol=r&&S(r)||(u?l:[l])),null==n.symbolSize&&(n.symbolSize=a&&S(a)||(u?e[0]:[e[0],e[0]])),n.symbol=WX(n.symbol,function(t){return"none"===t?l:t});var i,t=n.symbolSize;null!=t&&(i=-1/0,UX(t,function(t){i<t&&(i=t)}),n.symbolSize=WX(t,function(t){return jX(t,[0,i],[0,e[0]],!0)}))},this)}.call(this,o)},qX.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},qX.prototype.isCategory=function(){return!!this.option.categories},qX.prototype.setSelected=function(t){},qX.prototype.getSelected=function(){return null},qX.prototype.getValueState=function(t){return null},qX.prototype.getVisualMeta=function(t){return null},qX.type="visualMap",qX.dependencies=["series"],qX.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},qX);function qX(){var t=null!==GX&&GX.apply(this,arguments)||this;return t.type=qX.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}var KX,$X=[20,140],JX=(u(QX,KX=n),QX.prototype.optionUpdated=function(t,e){KX.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()}),this._resetRange()},QX.prototype.resetItemSize=function(){KX.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;null!=t[0]&&!isNaN(t[0])||(t[0]=$X[0]),null!=t[1]&&!isNaN(t[1])||(t[1]=$X[1])},QX.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):G(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},QX.prototype.completeVisualOption=function(){KX.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,function(t){t=this.option.controller[t].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},QX.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},QX.prototype.getSelected=function(){var t=this.getExtent(),e=_o((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},QX.prototype.getValueState=function(t){var e=this.option.range,n=this.getExtent();return(e[0]<=n[0]||e[0]<=t)&&(e[1]>=n[1]||t<=e[1])?"inRange":"outOfRange"},QX.prototype.findTargetDataIndices=function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},QX.prototype.getVisualMeta=function(n){var t=tZ(0,0,this.getExtent()),e=tZ(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var r=0,a=0,s=e.length,l=t.length;a<l&&(!e.length||t[a]<=e[0]);a++)t[a]<e[r]&&o(t[a],"outOfRange");for(var u=1;r<s;r++,u=0)u&&i.length&&o(e[r],"outOfRange"),o(e[r],"inRange");for(u=1;a<l;a++)(!e.length||e[e.length-1]<t[a])&&(u&&(i.length&&o(i[i.length-1].value,"outOfRange"),u=0),o(t[a],"outOfRange"));var h=i.length;return{stops:i,outerColors:[h?i[0].color:"transparent",h?i[h-1].color:"transparent"]}},QX.type="visualMap.continuous",QX.defaultOption=rp(n.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),QX);function QX(){var t=null!==KX&&KX.apply(this,arguments)||this;return t.type=QX.type,t}function tZ(t,e,n){if(n[0]===n[1])return n.slice();for(var i=(n[1]-n[0])/200,o=n[0],r=[],a=0;a<=200&&o<n[1];a++)r.push(o),o+=i;return r.push(n[1]),r}var eZ,jc=(u(nZ,eZ=Iy),nZ.prototype.init=function(t,e){this.ecModel=t,this.api=e},nZ.prototype.render=function(t,e,n,i){!1!==(this.visualMapModel=t).get("show")?this.doRender(t,e,n,i):this.group.removeAll()},nZ.prototype.renderBackground=function(t){var e=this.visualMapModel,n=Wp(e.get("padding")||0),i=t.getBoundingRect();t.add(new Fs({z2:-1,silent:!0,shape:{x:i.x-n[3],y:i.y-n[0],width:i.width+n[3]+n[1],height:i.height+n[0]+n[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},nZ.prototype.getControllerVisual=function(n,i,o){var t,e=(o=o||{}).forceState,r=this.visualMapModel,a={};function s(t){return a[t]}function l(t,e){a[t]=e}"color"===i&&(t=r.get("contentColor"),a.color=t);var u=r.controllerVisuals[e||r.getValueState(n)];return E(Ok.prepareVisualTypes(u),function(t){var e=u[t];o.convertOpacityToAlpha&&"opacity"===t&&(t="colorAlpha",e=u.__alphaForOpacity),Ok.dependsOn(t,i)&&e&&e.applyVisual(n,s,l)}),a[i]},nZ.prototype.positionGroup=function(t){var e=this.visualMapModel,n=this.api;ad(t,e.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()})},nZ.prototype.doRender=function(t,e,n,i){},nZ.type="visualMap",nZ);function nZ(){var t=null!==eZ&&eZ.apply(this,arguments)||this;return t.type=nZ.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}var iZ=[["left","right","width"],["top","bottom","height"]];function oZ(t,e,n){var i=t.option,o=i.align;if(null!=o&&"auto"!==o)return o;for(var t={width:e.getWidth(),height:e.getHeight()},r="horizontal"===i.orient?1:0,a=iZ[r],s=[0,null,10],l={},u=0;u<3;u++)l[iZ[1-r][u]]=s[u],l[a[u]]=2===u?n[0]:i[a[u]];o=[["x","width",3],["y","height",0]][r],e=rd(l,t,i.padding);return a[(e.margin[o[2]]||0)+e[o[0]]+.5*e[o[1]]<.5*t[o[1]]?0:1]}function rZ(t,e){return E(t||[],function(t){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),t}var aZ,sZ=yo,lZ=E,uZ=Math.min,hZ=Math.max,cZ=(u(pZ,aZ=jc),pZ.prototype.doRender=function(t,e,n,i){this._api=n,i&&"selectDataRange"===i.type&&i.from===this.uid||this._buildView()},pZ.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);t=t.get("text");this._renderEndsText(e,t,0),this._renderEndsText(e,t,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},pZ.prototype._renderEndsText=function(t,e,n){var i,o,r;e&&(i=null!=(i=e[1-n])?i+"":"",o=(r=this.visualMapModel).get("textGap"),e=r.itemSize,r=this._shapes.mainGroup,e=this._applyTransform([e[0]/2,0===n?-o:e[1]+o],r),o=this._applyTransform(0===n?"bottom":"top",r),n=this._orient,r=this.visualMapModel.textStyleModel,this.group.add(new Xs({style:{x:e[0],y:e[1],verticalAlign:"horizontal"===n?"middle":o,align:"horizontal"===n?o:"center",text:i,font:r.getFont(),fill:r.getTextColor()}})))},pZ.prototype._renderBar=function(t){var e=this.visualMapModel,n=this._shapes,i=e.itemSize,o=this._orient,r=this._useHandle,a=oZ(e,this.api,i),s=n.mainGroup=this._createBarGroup(a),a=new io;s.add(a),a.add(n.outOfRange=dZ()),a.add(n.inRange=dZ(null,r?gZ(this._orient):null,B(this._dragHandle,this,"all",!1),B(this._dragHandle,this,"all",!0))),a.setClipPath(new Fs({shape:{x:0,y:0,width:i[0],height:i[1],r:3}}));a=e.textStyleModel.getTextRect("国"),a=hZ(a.width,a.height);r&&(n.handleThumbs=[],n.handleLabels=[],n.handleLabelPoints=[],this._createHandle(e,s,0,i,a,o),this._createHandle(e,s,1,i,a,o)),this._createIndicator(e,s,i,a,o),t.add(s)},pZ.prototype._createHandle=function(t,e,n,i,o,r){var a=B(this._dragHandle,this,n,!1),s=B(this._dragHandle,this,n,!0),l=Ui(t.get("handleSize"),i[0]),u=Cm(t.get("handleIcon"),-l/2,-l/2,l,l,null,!0),h=gZ(this._orient);u.attr({cursor:h,draggable:!0,drift:a,ondragend:s,onmousemove:function(t){ie(t.event)}}),u.x=i[0]/2,u.useStyle(t.getModel("handleStyle").getItemStyle()),u.setStyle({strokeNoScale:!0,strokeFirst:!0}),u.style.lineWidth*=2,u.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),tu(u,!0),e.add(u);e=this.visualMapModel.textStyleModel,s=new Xs({cursor:h,draggable:!0,drift:a,onmousemove:function(t){ie(t.event)},ondragend:s,style:{x:0,y:0,text:"",font:e.getFont(),fill:e.getTextColor()}});s.ensureState("blur").style={opacity:.1},s.stateTransition={duration:200},this.group.add(s);e=[l,0],l=this._shapes;l.handleThumbs[n]=u,l.handleLabelPoints[n]=e,l.handleLabels[n]=s},pZ.prototype._createIndicator=function(t,e,n,i,o){var r=Ui(t.get("indicatorSize"),n[0]),a=Cm(t.get("indicatorIcon"),-r/2,-r/2,r,r,null,!0);a.attr({cursor:"move",invisible:!0,silent:!0,x:n[0]/2});r=t.getModel("indicatorStyle").getItemStyle();a instanceof Ps?(t=a.style,a.useStyle(P({image:t.image,x:t.x,y:t.y,width:t.width,height:t.height},r))):a.useStyle(r),e.add(a);e=this.visualMapModel.textStyleModel,e=new Xs({silent:!0,invisible:!0,style:{x:0,y:0,text:"",font:e.getFont(),fill:e.getTextColor()}});this.group.add(e);i=[("horizontal"===o?i/2:6)+n[0]/2,0],n=this._shapes;n.indicator=a,n.indicatorLabel=e,n.indicatorLabelPoint=i,this._firstShowIndicator=!0},pZ.prototype._dragHandle=function(t,e,n,i){this._useHandle&&(this._dragging=!e,e||(i=this._applyTransform([n,i],this._shapes.mainGroup,!0),this._updateInterval(t,i[1]),this._hideIndicator(),this._updateView()),e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?this._hovering||this._clearHoverLinkToSeries():fZ(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1))},pZ.prototype._resetInterval=function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),n=t.getExtent(),t=[0,t.itemSize[1]];this._handleEnds=[sZ(e[0],n,t,!0),sZ(e[1],n,t,!0)]},pZ.prototype._updateInterval=function(t,e){e=e||0;var n=this.visualMapModel,i=this._handleEnds,o=[0,n.itemSize[1]];CO(e,i,o,t,0);n=n.getExtent();this._dataInterval=[sZ(i[0],o,n,!0),sZ(i[1],o,n,!0)]},pZ.prototype._updateView=function(t){var e=this.visualMapModel,n=e.getExtent(),i=this._shapes,o=[0,e.itemSize[1]],e=t?o:this._handleEnds,t=this._createBarVisual(this._dataInterval,n,e,"inRange"),o=this._createBarVisual(n,n,o,"outOfRange");i.inRange.setStyle({fill:t.barColor}).setShape("points",t.barPoints),i.outOfRange.setStyle({fill:o.barColor}).setShape("points",o.barPoints),this._updateHandle(e,t)},pZ.prototype._createBarVisual=function(t,e,n,i){var o={forceState:i,convertOpacityToAlpha:!0},i=this._makeColorGradient(t,o),o=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],o=this._createBarPoints(n,o);return{barColor:new Ph(0,0,0,1,i),barPoints:o,handlesColor:[i[0].color,i[i.length-1].color]}},pZ.prototype._makeColorGradient=function(t,e){var n=[],i=(t[1]-t[0])/100;n.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var o=1;o<100;o++){var r=t[0]+i*o;if(r>t[1])break;n.push({color:this.getControllerVisual(r,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},pZ.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},pZ.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new io("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},pZ.prototype._updateHandle=function(i,o){var r,a,s,l,u,h;this._useHandle&&(r=this._shapes,a=this.visualMapModel,s=r.handleThumbs,l=r.handleLabels,u=a.itemSize,h=a.getExtent(),lZ([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.y=i[t];var n=sZ(i[t],[0,u[1]],h,!0),n=this.getControllerVisual(n,"symbolSize");e.scaleX=e.scaleY=n/u[0],e.x=u[0]-n/2;e=vc(r.handleLabelPoints[t],mc(e,this.group));l[t].setStyle({x:e[0],y:e[1],text:a.formatValueText(this._dataInterval[t]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",r.mainGroup):"center"})},this))},pZ.prototype._showIndicator=function(t,e,n,i){var o=this.visualMapModel,r=o.getExtent(),a=o.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=sZ(t,r,s,!0),t=a[0]-c/2,r={x:u.x,y:u.y};u.y=p,u.x=t;s=vc(l.indicatorLabelPoint,mc(u,this.group)),a=l.indicatorLabel;a.attr("invisible",!1);c=this._applyTransform("left",l.mainGroup),l="horizontal"===this._orient;a.setStyle({text:(n||"")+o.formatValueText(e),verticalAlign:l?c:"middle",align:l?"center":c});h={x:t,y:p,style:{fill:h}},s={style:{x:s[0],y:s[1]}};o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator?(o={duration:100,easing:"cubicInOut",additive:!0},u.x=r.x,u.y=r.y,u.animateTo(h,o),a.animateTo(s,o)):(u.attr(h),a.attr(s)),this._firstShowIndicator=!1;var d=this._shapes.handleLabels;if(d)for(var f=0;f<d.length;f++)this._api.enterBlur(d[f])}},pZ.prototype._enableHoverLinkToSeries=function(){var n=this;this._shapes.mainGroup.on("mousemove",function(t){var e;n._hovering=!0,n._dragging||(e=n.visualMapModel.itemSize,(t=n._applyTransform([t.offsetX,t.offsetY],n._shapes.mainGroup,!0,!0))[1]=uZ(hZ(0,t[1]),e[1]),n._doHoverLinkToSeries(t[1],0<=t[0]&&t[0]<=e[0]))}).on("mouseout",function(){n._hovering=!1,n._dragging||n._clearHoverLinkToSeries()})},pZ.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},pZ.prototype._doHoverLinkToSeries=function(t,e){var n,i,o,r=this.visualMapModel,a=r.itemSize;function s(t,e,n){for(var i=0,o=t.length;i<o;i++){var r=nr(t[i].seriesId,null);if(null==r)return;for(var a=qo(t[i].dataIndex),s=n&&n[r],l=0,u=a.length;l<u;l++){var h=a[l];s&&s[h]?s[h]=null:(e[r]||(e[r]={}))[h]=1}}}function l(t,e){var n,i,o=[];for(n in t)t.hasOwnProperty(n)&&null!=t[n]&&(e?o.push(+n):(i=l(t[n],!0)).length&&o.push({seriesId:n,dataIndex:i}));return o}r.option.hoverLink&&(n=[0,a[1]],i=r.getExtent(),a=[(t=uZ(hZ(n[0],t),n[1]))-(o=function(t,e,n){var i=6,t=t.get("hoverLinkDataSize");t&&(i=sZ(t,e,n,!0)/2);return i}(r,i,n)),t+o],t=sZ(t,n,i,!0),i=[sZ(a[0],n,i,!0),sZ(a[1],n,i,!0)],a[0]<n[0]&&(i[0]=-1/0),n[1]<a[1]&&(i[1]=1/0),e&&(i[0]===-1/0?this._showIndicator(t,i[1],"< ",o):i[1]===1/0?this._showIndicator(t,i[0],"> ",o):this._showIndicator(t,t,"≈ ",o)),t=this._hoverLinkDataIndices,o=[],(e||fZ(r))&&(o=this._hoverLinkDataIndices=r.findTargetDataIndices(i)),i=o,o={},s(t||[],t={}),s(i||[],o,t),o=[l(t),l(o)],this._dispatchHighDown("downplay",rZ(o[0],r)),this._dispatchHighDown("highlight",rZ(o[1],r)))},pZ.prototype._hoverLinkFromSeriesMouseOver=function(t){var e=t.target,n=this.visualMapModel;e&&null!=il(e).dataIndex&&(t=il(e),e=this.ecModel.getSeriesByIndex(t.seriesIndex),n.isTargetSeries(e)&&(t=(e=e.getData(t.dataType)).getStore().get(n.getDataDimensionIndex(e),t.dataIndex),isNaN(t)||this._showIndicator(t,t)))},pZ.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var e=this._shapes.handleLabels;if(e)for(var n=0;n<e.length;n++)this._api.leaveBlur(e[n])},pZ.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",rZ(t,this.visualMapModel)),t.length=0},pZ.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},pZ.prototype._applyTransform=function(t,e,n,i){i=mc(e,i?null:this.group);return(G(t)?vc:_c)(t,i,n)},pZ.prototype._dispatchHighDown=function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},pZ.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},pZ.prototype.remove=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},pZ.type="visualMap.continuous",pZ);function pZ(){var t=null!==aZ&&aZ.apply(this,arguments)||this;return t.type=pZ.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}function dZ(t,e,n,i){return new rh({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){ie(t.event)},ondragend:i})}function fZ(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function gZ(t){return"vertical"===t?"ns-resize":"ew-resize"}var yZ={type:"selectDataRange",event:"dataRangeSelected",update:"update"},mZ=function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})},vZ=[{createOnAllSeries:!0,reset:function(n,t){var i=[];return t.eachComponent("visualMap",function(t){var f,g,y,m,e=n.pipelineContext;!t.isTargetSeries(n)||e&&e.large||i.push((e=t.stateList,f=t.targetVisuals,g=B(t.getValueState,t),y=t.getDataDimensionIndex(n.getData()),m={},E(e,function(t){var e=Ok.prepareVisualTypes(f[t]);m[t]=e}),{progress:function(t,n){var e,i;function o(t){return fm(n,i,t)}function r(t,e){ym(n,i,t,e)}null!=y&&(e=n.getDimensionIndex(y));for(var a=n.getStore();null!=(i=t.next());){var s=n.getRawDataItem(i);if(!s||!1!==s.visualMap)for(var l=null!=y?a.get(e,i):i,s=g(l),u=f[s],h=m[s],c=0,p=h.length;c<p;c++){var d=h[c];u[d]&&u[d].applyVisual(l,o,r)}}}}))}),i}},{createOnAllSeries:!0,reset:function(n,t){var i=n.getData(),o=[];t.eachComponent("visualMap",function(t){var e;t.isTargetSeries(n)&&(e=t.getVisualMeta(B(_Z,null,n,t))||{stops:[],outerColors:[]},0<=(t=t.getDataDimensionIndex(i))&&(e.dimension=t,o.push(e)))}),n.getData().setVisual("visualMeta",o)}}];function _Z(t,e,n,i){for(var o=e.targetVisuals[i],r=Ok.prepareVisualTypes(o),a={color:gm(t.getData(),"color")},s=0,l=r.length;s<l;s++){var u=r[s],u=o["opacity"===u?"__alphaForOpacity":u];u&&u.applyVisual(n,h,c)}return a.color;function h(t){return a[t]}function c(t,e){a[t]=e}}var xZ=E;function bZ(t){t=t&&t.visualMap;G(t)||(t=t?[t]:[]),xZ(t,function(t){t&&(wZ(t,"splitList")&&!wZ(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList),(t=t.pieces)&&G(t)&&xZ(t,function(t){Y(t)&&(wZ(t,"start")&&!wZ(t,"min")&&(t.min=t.start),wZ(t,"end")&&!wZ(t,"max")&&(t.max=t.end))}))})}function wZ(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var SZ=!1;function MZ(e){SZ||(SZ=!0,e.registerSubTypeDefaulter("visualMap",function(t){return t.categories||(t.pieces?0<t.pieces.length:0<t.splitNumber)&&!t.calculable?"piecewise":"continuous"}),e.registerAction(yZ,mZ),E(vZ,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(bZ))}function IZ(t){t.registerComponentModel(JX),t.registerComponentView(cZ),MZ(t)}var TZ,CZ=(u(DZ,TZ=n),DZ.prototype.optionUpdated=function(t,e){TZ.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],AZ[this._mode].call(this,this._pieceList),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=S(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=L(this._pieceList,function(t){return t=S(t),"inRange"!==e&&(t.visual=null),t}))})},DZ.prototype.completeVisualOption=function(){var i=this.option,n={},t=Ok.listVisualTypes(),o=this.isCategory();function r(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}E(i.pieces,function(e){E(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),E(n,function(t,e){var n=!1;E(this.stateList,function(t){n=n||r(i,t,e)||r(i.target,t,e)},this),n||E(this.stateList,function(t){(i[t]||(i[t]={}))[e]=FX(e,"inRange"===t?"active":"inactive",o)})},this),TZ.prototype.completeVisualOption.apply(this,arguments)},DZ.prototype._resetSelected=function(t,e){var n,i=this.option,o=this._pieceList,r=(e?i:t).selected||{};i.selected=r,E(o,function(t,e){t=this.getSelectedMapKey(t);r.hasOwnProperty(t)||(r[t]=!0)},this),"single"===i.selectedMode&&(n=!1,E(o,function(t,e){t=this.getSelectedMapKey(t);r[t]&&(n?r[t]=!1:n=!0)},this))},DZ.prototype.getItemSymbol=function(){return this.get("itemSymbol")},DZ.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},DZ.prototype.getPieceList=function(){return this._pieceList},DZ.prototype._determineMode=function(){var t=this.option;return t.pieces&&0<t.pieces.length?"pieces":this.option.categories?"categories":"splitNumber"},DZ.prototype.setSelected=function(t){this.option.selected=S(t)},DZ.prototype.getValueState=function(t){t=Ok.findPieceIndex(t,this._pieceList);return null!=t&&this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?"inRange":"outOfRange"},DZ.prototype.findTargetDataIndices=function(i){var o=[],r=this._pieceList;return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimensionIndex(e),function(t,e){Ok.findPieceIndex(t,r)===i&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},DZ.prototype.getRepresentValue=function(t){return this.isCategory()||null!=t.value?t.value:(t=t.interval||[])[0]===-1/0&&t[1]===1/0?0:(t[0]+t[1])/2},DZ.prototype.getVisualMeta=function(i){if(!this.isCategory()){var t,o=[],r=["",""],a=this,e=this._pieceList.slice();e.length?((t=e[0].interval[0])!==-1/0&&e.unshift({interval:[-1/0,t]}),(t=e[e.length-1].interval[1])!==1/0&&e.push({interval:[t,1/0]})):e.push({interval:[-1/0,1/0]});var n=-1/0;return E(e,function(t){t=t.interval;t&&(t[0]>n&&s([n,t[0]],"outOfRange"),s(t.slice()),n=t[1])},this),{stops:o,outerColors:r}}function s(t,e){var n=a.getRepresentValue({interval:t});e=e||a.getValueState(n);e=i(n,e);t[0]===-1/0?r[0]=e:t[1]===1/0?r[1]=e:o.push({value:t[0],color:e},{value:t[1],color:e})}},DZ.type="visualMap.piecewise",DZ.defaultOption=rp(n.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),DZ);function DZ(){var t=null!==TZ&&TZ.apply(this,arguments)||this;return t.type=DZ.type,t._pieceList=[],t}var AZ={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),o=e.splitNumber;o=Math.max(parseInt(o,10),1),e.splitNumber=o;for(var r=(i[1]-i[0])/o;+r.toFixed(n)!==r&&n<5;)n++;e.precision=n,r=+r.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a<o;s+=r,a++){var l=a===o-1?i[1]:s+r;t.push({interval:[s,l],close:[1,1]})}e.maxOpen&&t.push({interval:[i[1],1/0],close:[0,0]}),Oo(t),E(t,function(t,e){t.index=e,t.text=this.formatValueText(t.interval)},this)},categories:function(e){var t=this.option;E(t.categories,function(t){e.push({text:this.formatValueText(t,!0),value:t})},this),kZ(t,e)},pieces:function(p){var t=this.option;E(t.pieces,function(t,e){var n={text:"",index:e};if(null!=(t=!Y(t)?{value:t}:t).label&&(n.text=t.label),t.hasOwnProperty("value")){var i=n.value=t.value;n.interval=[i,i],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],a=[1,0,1],s=[-1/0,1/0],l=[],u=0;u<2;u++){for(var h=[["gte","gt","min"],["lte","lt","max"]][u],c=0;c<3&&null==o[u];c++)o[u]=t[h[c]],r[u]=a[c],l[u]=2===c;null==o[u]&&(o[u]=s[u])}l[0]&&o[1]===1/0&&(r[0]=0),l[1]&&o[0]===-1/0&&(r[1]=0),o[0]>o[1]&&console.warn("Piece "+e+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=Ok.retrieveVisuals(t),p.push(n)},this),kZ(t,p),Oo(p),E(p,function(t){var e=t.close,e=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,e)},this)}};function kZ(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var LZ,PZ=(u(OZ,LZ=jc),OZ.prototype.doRender=function(){var i=this.group;i.removeAll();var o=this.visualMapModel,r=o.get("textGap"),t=o.textStyleModel,a=t.getFont(),s=t.getTextColor(),l=this._getItemAlign(),u=o.itemSize,e=this._getViewData(),t=e.endsText,h=Q(o.get("showLabel",!0),!t);t&&this._renderEndsText(i,t[0],u,h,l),E(e.viewPieceList,function(t){var e=t.piece,n=new io;n.onclick=B(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);t=o.getRepresentValue(e);this._createItemSymbol(n,t,[0,0,u[0],u[1]]),h&&(t=this.visualMapModel.getValueState(t),n.add(new Xs({style:{x:"right"===l?-r:u[0]+r,y:u[1]/2,text:e.text,verticalAlign:"middle",align:l,font:a,fill:s,opacity:"outOfRange"===t?.5:1}}))),i.add(n)},this),t&&this._renderEndsText(i,t[1],u,h,l),od(o.get("orient"),i,o.get("itemGap")),this.renderBackground(i),this.positionGroup(i)},OZ.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return e("highlight")}).on("mouseout",function(){return e("downplay")});var e=function(t){var e=i.visualMapModel;e.option.hoverLink&&i.api.dispatchAction({type:t,batch:rZ(e.findTargetDataIndices(n),e)})}},OZ.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return oZ(t,this.api,t.itemSize);e=e.align;return e=!e||"auto"===e?"left":e},OZ.prototype._renderEndsText=function(t,e,n,i,o){var r,a;e&&(r=new io,a=this.visualMapModel.textStyleModel,r.add(new Xs({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(r))},OZ.prototype._getViewData=function(){var t=this.visualMapModel,e=L(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),n=t.get("text"),i=t.get("orient"),t=t.get("inverse");return("horizontal"===i?t:!t)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},OZ.prototype._createItemSymbol=function(t,e,n){t.add(Cm(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},OZ.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=S(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,E(i,function(t,e){i[e]=e===o})):i[o]=!i[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},OZ.type="visualMap.piecewise",OZ);function OZ(){var t=null!==LZ&&LZ.apply(this,arguments)||this;return t.type=OZ.type,t}function RZ(t){t.registerComponentModel(CZ),t.registerComponentView(PZ),MZ(t)}var NZ={label:{enabled:!0},decal:{show:!1}},EZ=ur(),zZ={};function BZ(g,o){var t,r=g.getModel("aria");function y(t,e){if("string"!=typeof t)return t;var n=t;return E(e,function(t,e){n=n.replace(new RegExp("\\{\\s*"+e+"\\s*\\}","g"),t)}),n}r.get("enabled")&&(b((t=S(NZ)).label,g.getLocaleModel().get("aria"),!1),b(r.option,t,!1),function(){{var n;r.getModel("decal").get("show")&&(n=ct(),g.eachSeries(function(t){var e;t.isColorBySeries()||((e=n.get(t.type))||(e={},n.set(t.type,e)),EZ(t).scope=e)}),g.eachRawSeries(function(i){var o,t,e,r,a,s,l;function u(t,e){e=t?P(P({},e),t):e;return e.dirty=!0,e}g.isSeriesFiltered(i)||("function"!=typeof i.enableAriaDecal?(o=i.getData(),i.isColorBySeries()?(t=Yd(i.ecModel,i.name,zZ,g.getSeriesCount()),e=o.getVisual("decal"),o.setVisual("decal",u(e,t))):(r=i.getRawData(),a={},s=EZ(i).scope,o.each(function(t){var e=o.getRawIndex(t);a[e]=t}),l=r.count(),r.each(function(t){var e=a[t],n=r.getName(t)||t+"",t=Yd(i.ecModel,n,s,l),n=o.getItemVisual(e,"decal");o.setItemVisual(e,"decal",u(n,t))}))):i.enableAriaDecal())}))}}(),function(){var t=g.getLocaleModel().get("aria"),h=r.getModel("label");if(h.option=A(h.option,t),!h.get("enabled"))return;var e=o.getZr().dom;if(h.get("description"))return e.setAttribute("aria-label",h.get("description"));var c=g.getSeriesCount(),p=h.get(["data","maxCount"])||10,n=h.get(["series","maxCount"])||10,d=Math.min(c,n);{var f,i;c<1||(i=function(){var t=g.get("title");t&&t.length&&(t=t[0]);return t&&t.text}(),t=i?y(h.get(["general","withTitle"]),{title:i}):h.get(["general","withoutTitle"]),f=[],n=1<c?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]),t+=y(n,{seriesCount:c}),g.eachSeries(function(t,e){if(e<d){var n=void 0,e=t.get("name")?"withName":"withoutName";n=y(n=1<c?h.get(["series","multiple",e]):h.get(["series","single",e]),{seriesId:t.seriesIndex,seriesName:t.get("name"),seriesType:(e=t.subType,g.getLocaleModel().get(["series","typeNames"])[e]||"自定义图")});var i=t.getData();i.count()>p?n+=y(h.get(["data","partialData"]),{displayCnt:p}):n+=h.get(["data","allData"]);for(var o,r,a,s=h.get(["data","separator","middle"]),t=h.get(["data","separator","end"]),l=[],u=0;u<i.count();u++)u<p&&(o=i.getName(u),r=i.getValues(u),a=h.get(["data",o?"withName":"withoutName"]),l.push(y(a,{name:o,value:r.join(s)})));n+=l.join(s)+t,f.push(n)}}),i=h.getModel(["series","multiple","separator"]),n=i.get("middle"),i=i.get("end"),t+=f.join(n)+i,e.setAttribute("aria-label",t))}}())}function VZ(t){var e;t&&t.aria&&(null!=(e=t.aria).show&&(e.enabled=e.show),e.label=e.label||{},E(["description","general","series","data"],function(t){null!=e[t]&&(e.label[t]=e[t])}))}var GZ={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},FZ=(HZ.prototype.evaluate=function(t){var e=_typeof(t);return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},HZ);function HZ(t){null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)&&Xo(Yo("Illegal regexp",t,"in"))}var WZ=(UZ.prototype.evaluate=function(){return this.value},UZ);function UZ(){}var YZ=(XZ.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(!t[e].evaluate())return!1;return!0},XZ);function XZ(){}var ZZ=(jZ.prototype.evaluate=function(){for(var t=this.children,e=0;e<t.length;e++)if(t[e].evaluate())return!0;return!1},jZ);function jZ(){}var qZ=(KZ.prototype.evaluate=function(){return!this.child.evaluate()},KZ);function KZ(){}var $Z=(JZ.prototype.evaluate=function(){for(var t=!!this.valueParser,e=(0,this.getValue)(this.valueGetterParam),n=t?this.valueParser(e):null,i=0;i<this.subCondList.length;i++)if(!this.subCondList[i].evaluate(t?n:e))return!1;return!0},JZ);function JZ(){}function QZ(t,e){if(!0===t||!1===t){var n=new WZ;return n.value=t,n}return ej(t)||Xo(Yo("Illegal config. Expect a plain object but actually",t)),t.and?tj("and",t,e):t.or?tj("or",t,e):(t.not?function(t,e){var n=t.not,i="";i=Yo('"not" condition should only be `not: {}`.',"Illegal condition:",t);ej(n)||Xo(i);t=new qZ;t.child=QZ(n,e),t.child||Xo(i);return t}:function(t,e){for(var n=e.prepareGetValue(t),i=[],o=z(t),r=t.parser,a=r?yg(r):null,s=0;s<o.length;s++){var l,u,h=o[s];"parser"===h||e.valueGetterAttrMap.get(h)||(l=ft(GZ,h)?GZ[h]:h,u=t[h],u=a?a(u):u,(u=function(t,e){return"eq"===t||"ne"===t?new wg("eq"===t,e):ft(mg,t)?new vg(t,e):null}(l,u)||"reg"===l&&new FZ(u))||Xo(Yo('Illegal relational operation: "'+h+'" in condition:',t)),i.push(u))}i.length||Xo(Yo("Relational condition must have at least one operator.","Illegal condition:",t));r=new $Z;return r.valueGetterParam=n,r.valueParser=a,r.getValue=e.getValue,r.subCondList=i,r})(t,e)}function tj(t,e,n){var i=e[t],o="",o=Yo('"and"/"or" condition should only be `'+t+": [...]` and must not be empty array.","Illegal condition:",e);G(i)||Xo(o),i.length||Xo(o);t=new("and"===t?YZ:ZZ);return t.children=L(i,function(t){return QZ(t,n)}),t.children.length||Xo(o),t}function ej(t){return Y(t)&&!k(t)}var nj=(ij.prototype.evaluate=function(){return this._cond.evaluate()},ij);function ij(t,e){this._cond=QZ(t,e)}var oj={type:"echarts:filter",transform:function(t){for(var e,n,i=t.upstream,o=(n=t.config,t={valueGetterAttrMap:ct({dimension:!0}),prepareGetValue:function(t){var e=t.dimension;ft(t,"dimension")||Xo(Yo('Relation condition must has prop "dimension" specified.',"Illegal condition:",t));var n=i.getDimensionInfo(e);return n||Xo(Yo("Can not find dimension info via: "+e+".\n","Existing dimensions: ",i.cloneAllDimensionInfo(),".\n","Illegal condition:",t,".\n")),{dimIdx:n.index}},getValue:function(t){return i.retrieveValueFromItem(e,t.dimIdx)}},new nj(n,t)),r=[],a=0,s=i.count();a<s;a++)e=i.getRawDataItem(a),o.evaluate()&&r.push(e);return{data:r}}},rj="",rj=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "),aj={type:"echarts:sort",transform:function(t){var a=t.upstream,t=t.config,t=qo(t);t.length||Xo("Empty `config` in sort transform.");var s=[];E(t,function(t){var e=t.dimension,n=t.order,i=t.parser,o=t.incomparable;null==e&&Xo('Sort transform config must has "dimension" specified.'+rj),"asc"!==n&&"desc"!==n&&Xo('Sort transform config must has "order" specified.'+rj),o&&"min"!==o&&"max"!==o&&Xo('incomparable must be "min" or "max" rather than "'+o+'".'),"asc"!==n&&"desc"!==n&&Xo('order must be "asc" or "desc" rather than "'+n+'".');var r=a.getDimensionInfo(e);r||Xo(Yo("Can not find dimension info via: "+e+".\n","Existing dimensions: ",a.cloneAllDimensionInfo(),".\n","Illegal config:",t,".\n"));e=i?yg(i):null;i&&!e&&Xo(Yo("Invalid parser name "+i+".\n","Illegal config:",t,".\n")),s.push({dimIdx:r.index,parser:e,comparator:new xg(n,o)})});t=a.sourceFormat;t!==Sd&&t!==Md&&Xo('sourceFormat "'+t+'" is not supported yet');for(var e=[],n=0,i=a.count();n<i;n++)e.push(a.getRawDataItem(n));return e.sort(function(t,e){for(var n=0;n<s.length;n++){var i=s[n],o=a.retrieveValueFromItem(t,i.dimIdx),r=a.retrieveValueFromItem(e,i.dimIdx);i.parser&&(o=i.parser(o),r=i.parser(r));r=i.comparator.evaluate(o,r);if(0!==r)return r}return 0}),{data:e}}};var sj,lj=(u(uj,sj=yd),uj.prototype.init=function(t,e,n){sj.prototype.init.call(this,t,e,n),this._sourceManager=new Yg(this),Zg(this)},uj.prototype.mergeOption=function(t,e){sj.prototype.mergeOption.call(this,t,e),Zg(this)},uj.prototype.optionUpdated=function(){this._sourceManager.dirty()},uj.prototype.getSourceManager=function(){return this._sourceManager},uj.type="dataset",uj.defaultOption={seriesLayoutBy:Dd},uj);function uj(){var t=null!==sj&&sj.apply(this,arguments)||this;return t.type="dataset",t}var hj,cj=(u(pj,hj=Iy),pj.type="dataset",pj);function pj(){var t=null!==hj&&hj.apply(this,arguments)||this;return t.type="dataset",t}var dj=is.CMD;function fj(t,e){return Math.abs(t-e)<1e-5}function gj(t){var o,e,n=t.data,i=t.len(),r=[],a=0,s=0,l=0,u=0;function h(t,e){o&&2<o.length&&r.push(o),o=[t,e]}function c(t,e,n,i){fj(t,n)&&fj(e,i)||o.push(t,e,n,i,n,i)}for(var p,d,f,g,y,m,v,_,x,b,w,S,M=0;M<i;){var I=n[M++],T=1===M;switch(T&&(l=a=n[M],u=s=n[M+1],I!==dj.L&&I!==dj.C&&I!==dj.Q||(o=[l,u])),I){case dj.M:a=l=n[M++],s=u=n[M++],h(l,u);break;case dj.L:c(a,s,R=n[M++],N=n[M++]),a=R,s=N;break;case dj.C:o.push(n[M++],n[M++],n[M++],n[M++],a=n[M++],s=n[M++]);break;case dj.Q:R=n[M++],N=n[M++],e=n[M++],L=n[M++],o.push(a+2/3*(R-a),s+2/3*(N-s),e+2/3*(R-e),L+2/3*(N-L),e,L),a=e,s=L;break;case dj.A:var C=n[M++],D=n[M++],A=n[M++],k=n[M++],L=n[M++],P=n[M++]+L;M+=1;var O=!n[M++],R=Math.cos(L)*A+C,N=Math.sin(L)*k+D;T?h(l=R,u=N):c(a,s,R,N);for(var a=Math.cos(P)*A+C,s=Math.sin(P)*k+D,E=(O?-1:1)*Math.PI/2,z=L;O?P<z:z<P;z+=E){var B=O?Math.max(z+E,P):Math.min(z+E,P);p=z,d=B,f=C,g=D,y=A,m=k,x=v=S=w=b=x=_=v=void 0,v=Math.abs(d-p),_=4*Math.tan(v/4)/3,x=d<p?-1:1,b=Math.cos(p),w=Math.sin(p),S=Math.cos(d),v=Math.sin(d),p=b*y+f,d=w*m+g,f=S*y+f,g=v*m+g,y=y*_*x,x*=m*_,o.push(p-y*w,d+x*b,f+y*v,g-x*S,f,g)}break;case dj.R:l=a=n[M++],u=s=n[M++],R=l+n[M++],N=u+n[M++],h(R,u),c(R,u,R,N),c(R,N,l,N),c(l,N,l,u),c(l,u,R,u);break;case dj.Z:o&&c(a,s,l,u),a=l,s=u}}return o&&2<o.length&&r.push(o),r}function yj(t,e){var n=gj(t),i=[];e=e||1;for(var o=0;o<n.length;o++){var r=n[o],a=[],s=r[0],l=r[1];a.push(s,l);for(var u=2;u<r.length;){var h=r[u++],c=r[u++],p=r[u++],d=r[u++],f=r[u++],g=r[u++];!function t(e,n,i,o,r,a,s,l,u,h){var c,p,d,f,g,y,m,v,_;fj(e,i)&&fj(n,o)&&fj(r,s)&&fj(a,l)?u.push(s,l):(c=(v=2/h)*v,p=s-e,d=l-n,p/=y=Math.sqrt(p*p+d*d),d/=y,m=(g=r-s)*g+(_=a-l)*_,(y=(f=i-e)*f+(v=o-n)*v)<c&&m<c?u.push(s,l):(_=-p*g-d*_,y-(v=p*f+d*v)*v<c&&0<=v&&m-_*_<c&&0<=_?u.push(s,l):(_=[],_a(e,i,r,s,.5,s=[]),_a(n,o,a,l,.5,_),t(s[0],_[0],s[1],_[1],s[2],_[2],s[3],_[3],u,h),t(s[4],_[4],s[5],_[5],s[6],_[6],s[7],_[7],u,h))))}(s,l,h,c,p,d,f,g,a,e),s=f,l=g}i.push(a)}return i}function mj(t,e,n){var i=t[e],e=t[1-e],e=Math.abs(i/e),o=Math.ceil(Math.sqrt(e*n)),r=Math.floor(n/o);0===r&&(r=1,o=n);for(var a=[],s=0;s<o;s++)a.push(r);var l=n-o*r;if(0<l)for(s=0;s<l;s++)a[s%o]+=1;return a}function vj(t,e,n){for(var i=t.r0,o=t.r,r=t.startAngle,a=t.endAngle,s=Math.abs(a-r),a=s*o,l=o-i,u=a>Math.abs(l),h=mj([a,l],u?0:1,e),c=(u?s:l)/h.length,p=0;p<h.length;p++)for(var d=(u?l:s)/h[p],f=0;f<h[p];f++){var g={};u?(g.startAngle=r+c*p,g.endAngle=r+c*(p+1),g.r0=i+d*f,g.r=i+d*(f+1)):(g.startAngle=r+d*f,g.endAngle=r+d*(f+1),g.r0=i+c*p,g.r=i+c*(p+1)),g.clockwise=t.clockwise,g.cx=t.cx,g.cy=t.cy,n.push(g)}}function _j(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function xj(t,e,n){for(var i,o,r,a,s,l,u,h=t.length,c=[],p=0;p<h;p++){var d=t[p],f=t[(p+1)%h],f=(i=d[0],o=d[1],r=f[0],a=f[1],s=e.x,l=e.y,u=n.x,d=n.y,f=void 0,f=r-i,r=a-o,d=(a=u-s)*r-f*(u=d-l),Math.abs(d)<1e-6||(d=((i-s)*u-a*(o-l))/d)<0||1<d?null:new bi(d*f+i,d*r+o));f&&c.push({projPt:(i=f,d=e,r=n,o=void 0,o=new bi,bi.sub(o,r,d),o.normalize(),r=new bi,bi.sub(r,i,d),r.dot(o)),pt:f,idx:p})}if(c.length<2)return[{points:t},{points:t}];c.sort(function(t,e){return t.projPt-e.projPt});var g=c[0],y=c[c.length-1];y.idx<g.idx&&(v=g,g=y,y=v);for(var m=[g.pt.x,g.pt.y],v=[y.pt.x,y.pt.y],_=[m],x=[v],p=g.idx+1;p<=y.idx;p++)_j(_,t[p].slice());_j(_,v),_j(_,m);for(p=y.idx+1;p<=g.idx+h;p++)_j(x,t[p%h].slice());return _j(x,m),_j(x,v),[{points:_},{points:x}]}function bj(t){var e=t.points,n=[],i=[];Ra(e,n,i);var o=new Li(n[0],n[1],i[0]-n[0],i[1]-n[1]),r=o.width,a=o.height,t=o.x,i=o.y,n=new bi,o=new bi;return a<r?(n.x=o.x=t+r/2,n.y=i,o.y=i+a):(n.y=o.y=i+a/2,n.x=t,o.x=t+r),xj(e,n,o)}function wj(t,e,n,i){var o;return 1===n?i.push(e):(o=Math.floor(n/2),e=t(e),wj(t,e[0],o,i),wj(t,e[1],n-o,i)),i}function Sj(t,e){var n,i=[],o=t.shape;switch(t.type){case"rect":!function(t,e,n){for(var i=t.width,o=t.height,r=o<i,a=mj([i,o],r?0:1,e),s=r?"width":"height",l=r?"height":"width",u=r?"x":"y",h=r?"y":"x",c=t[s]/a.length,p=0;p<a.length;p++)for(var d=t[l]/a[p],f=0;f<a[p];f++){var g={};g[u]=p*c,g[h]=f*d,g[s]=c,g[l]=d,g.x+=t.x,g.y+=t.y,n.push(g)}}(o,e,i),n=Fs;break;case"sector":vj(o,e,i),n=qu;break;case"circle":vj({r0:0,r:o.r,startAngle:0,endAngle:2*Math.PI,cx:o.cx,cy:o.cy},e,i),n=qu;break;default:var r=t.getComputedTransform(),r=r?Math.sqrt(Math.max(r[0]*r[0]+r[1]*r[1],r[2]*r[2]+r[3]*r[3])):1,a=L(yj(t.getUpdatedPathProxy(),r),function(t){for(var e=[],n=0;n<t.length;)e.push([t[n++],t[n++]]);return e}),s=a.length;if(0===s)wj(bj,{points:a[0]},e,i);else if(s===e)for(var l=0;l<s;l++)i.push({points:a[l]});else{var u=0,h=L(a,function(t){var e=[],n=[];Ra(t,e,n);e=(n[1]-e[1])*(n[0]-e[0]);return u+=e,{poly:t,area:e}});h.sort(function(t,e){return e.area-t.area});for(var c=e,l=0;l<s;l++){var p=h[l];if(c<=0)break;var d=l===s-1?c:Math.ceil(p.area/u*e);d<0||(wj(bj,{points:p.poly},d,i),c-=d)}}n=rh}if(!n)return function(t,e){for(var n=[],i=0;i<e;i++)n.push(Iu(t));return n}(t,e);for(var f,g,y=[],l=0;l<i.length;l++){var m=new n;m.setShape(i[l]),f=t,(g=m).setStyle(f.style),g.z=f.z,g.z2=f.z2,g.zlevel=f.zlevel,y.push(m)}return y}function Mj(t,e){for(var n=t.length,i=t[n-2],o=t[n-1],r=[],a=0;a<e.length;)r[a++]=i,r[a++]=o;return r}function Ij(t,e){for(var n,i,o=[],r=[],a=0;a<Math.max(t.length,e.length);a++){var s=t[a],l=e[a],u=void 0,h=void 0;s?l?(n=u=(i=function(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var o=[],r=[],a=n<i?t:e,s=Math.min(n,i),i=Math.abs(i-n)/6,n=(s-2)/6,l=Math.ceil(i/n)+1,u=[a[0],a[1]],h=i,c=2;c<s;){var p=a[c-2],d=a[c-1],f=a[c++],g=a[c++],y=a[c++],m=a[c++],v=a[c++],_=a[c++];if(h<=0)u.push(f,g,y,m,v,_);else{for(var x=Math.min(h,l-1)+1,b=1;b<=x;b++){var w=b/x;_a(p,f,y,v,w,o),_a(d,g,m,_,w,r),p=o[3],d=r[3],u.push(o[1],r[1],o[2],r[2],p,d),f=o[5],g=r[5],y=o[6],m=r[6]}h-=x-1}}return a===t?[u,e]:[t,u]}(s,l))[0],i=h=i[1]):(h=Mj(i||s,s),u=s):(u=Mj(n||l,l),h=l),o.push(u),r.push(h)}return[o,r]}function Tj(t){for(var e=0,n=0,i=0,o=t.length,r=0,a=o-2;r<o;a=r,r+=2){var s=t[a],l=t[a+1],u=t[r],h=t[r+1],c=s*h-u*l;e+=c,n+=(s+u)*c,i+=(l+h)*c}return 0===e?[t[0]||0,t[1]||0]:[n/e/3,i/e/3,e]}function Cj(t,e,n,i){for(var o,r=[],a=0;a<t.length;a++){var s=t[a],l=e[a],u=Tj(s),h=Tj(l);null==o&&(o=u[2]<0!=h[2]<0);for(var c=[],p=[],d=0,f=1/0,g=[],y=s.length,m=6*function(t,e,n,i){for(var o=(t.length-2)/6,r=1/0,a=0,s=t.length,l=s-2,u=0;u<o;u++){for(var h=6*u,c=0,p=0;p<s;p+=2){var d=0===p?h:(h+p-2)%l+2,f=t[d]-n[0],d=t[1+d]-n[1],f=e[p]-i[0]-f,d=e[p+1]-i[1]-d;c+=f*f+d*d}c<r&&(r=c,a=u)}return a}(s=o?function(t){for(var e=[],n=t.length,i=0;i<n;i+=2)e[i]=t[n-i-2],e[i+1]=t[n-i-1];return e}(s):s,l,u,h),v=y-2,_=0;_<v;_+=2){var x=(m+_)%v+2;c[_+2]=s[x]-u[0],c[_+3]=s[1+x]-u[1]}if(c[0]=s[m]-u[0],c[1]=s[1+m]-u[1],0<n)for(var b=i/n,w=-i/2;w<=i/2;w+=b){for(var S=Math.sin(w),M=Math.cos(w),I=0,_=0;_<s.length;_+=2){var T=c[_],C=c[_+1],D=l[_]-h[0],A=l[_+1]-h[1],k=D*M-A*S,A=D*S+A*M,T=(g[_]=k)-T,C=(g[_+1]=A)-C;I+=T*T+C*C}if(I<f)for(var f=I,d=w,L=0;L<g.length;L++)p[L]=g[L]}else for(var P=0;P<y;P+=2)p[P]=l[P]-h[0],p[P+1]=l[P+1]-h[1];r.push({from:c,to:p,fromCp:u,toCp:h,rotation:-d})}return r}function Dj(t){return t.__isCombineMorphing}var Aj="__mOriginal_";function kj(t,e,n){var i=Aj+e,o=t[i]||t[e];t[i]||(t[i]=t[e]);var r=n.replace,a=n.after,s=n.before;t[e]=function(){var t,e=arguments;return s&&s.apply(this,e),t=(r||o).apply(this,e),a&&a.apply(this,e),t}}function Lj(t,e){var n=Aj+e;t[n]&&(t[e]=t[n],t[n]=null)}function Pj(t,e){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<i.length;){var r=i[o],a=i[o+1];i[o++]=e[0]*r+e[2]*a+e[4],i[o++]=e[1]*r+e[3]*a+e[5]}}function Oj(t,S){var e=t.getUpdatedPathProxy(),n=S.getUpdatedPathProxy(),i=Ij(gj(e),gj(n)),e=i[0],n=i[1],i=t.getComputedTransform(),t=S.getComputedTransform();i&&Pj(e,i),t&&Pj(n,t),kj(S,"updateTransform",{replace:function(){this.transform=null}}),S.transform=null;var M=Cj(e,n,10,Math.PI),I=[];kj(S,"buildPath",{replace:function(t){for(var e=S.__morphT,n=1-e,i=[],o=0;o<M.length;o++){var r=M[o],a=r.from,s=r.to,l=r.rotation*e,u=r.fromCp,r=r.toCp,h=Math.sin(l),c=Math.cos(l);Pt(i,u,r,e);for(var p=0;p<a.length;p+=2){var d=a[p],f=a[p+1],d=d*n+(m=s[p])*e,f=f*n+(v=s[p+1])*e;I[p]=d*c-f*h+i[0],I[p+1]=d*h+f*c+i[1]}var g=I[0],y=I[1];t.moveTo(g,y);for(p=2;p<a.length;){var m=I[p++],v=I[p++],_=I[p++],x=I[p++],b=I[p++],w=I[p++];g===m&&y===v&&_===b&&x===w?t.lineTo(b,w):t.bezierCurveTo(m,v,_,x,b,w),g=b,y=w}}}})}function Rj(t,e,n){if(!t||!e)return e;var i=n.done,o=n.during;return Oj(t,e),e.__morphT=0,e.animateTo({__morphT:1},A({during:function(t){e.dirtyShape(),o&&o(t)},done:function(){Lj(e,"buildPath"),Lj(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape(),i&&i()}},n)),e}function Nj(n){var i=1/0,o=1/0,r=-1/0,a=-1/0,t=L(n,function(t){var e=t.getBoundingRect(),n=t.getComputedTransform(),t=e.x+e.width/2+(n?n[4]:0),n=e.y+e.height/2+(n?n[5]:0);return i=Math.min(t,i),o=Math.min(n,o),r=Math.max(t,r),a=Math.max(n,a),[t,n]});return L(t,function(t,e){return{cp:t,z:function(t,e,n,i,o,r){t=o===n?0:Math.round(32767*(t-n)/(o-n)),e=r===i?0:Math.round(32767*(e-i)/(r-i));for(var a=0,s=32768;0<s;s/=2){var l=0,u=0;a+=s*s*(3*(l=0<(t&s)?1:l)^(u=0<(e&s)?1:u)),0===u&&(1===l&&(t=s-1-t,e=s-1-e),l=t,t=e,e=l)}return a}(t[0],t[1],i,o,r,a),path:n[e]}}).sort(function(t,e){return t.z-e.z}).map(function(t){return t.path})}function Ej(t){return Sj(t.path,t.count)}function zj(){return{fromIndividuals:[],toIndividuals:[],count:0}}function Bj(e,i,t){var o=[];!function t(e){for(var n=0;n<e.length;n++){var i=e[n];Dj(i)?t(i.childrenRef()):i instanceof Ss&&o.push(i)}}(e);var n=o.length;if(!n)return zj();var r=t.dividePath||Ej;if((a=r({path:i,count:n})).length!==n)return console.error("Invalid morphing: unmatched splitted path"),zj();for(var o=Nj(o),a=Nj(a),s=t.done,l=t.during,u=t.individualDelay,h=new vi,c=0;c<n;c++){var p=o[c],d=a[c];d.parent=i,d.copyTransform(h),u||Oj(p,d)}function f(t){for(var e=0;e<a.length;e++)a[e].addSelfToZr(t)}function g(){i.__isCombineMorphing=!1,i.__morphT=-1,i.childrenRef=null,Lj(i,"addSelfToZr"),Lj(i,"removeSelfFromZr")}i.__isCombineMorphing=!0,i.childrenRef=function(){return a},kj(i,"addSelfToZr",{after:function(t){f(t)}}),kj(i,"removeSelfFromZr",{after:function(t){for(var e=0;e<a.length;e++)a[e].removeSelfFromZr(t)}});var y=a.length;if(u)for(var m=y,v=function(){0===--m&&(g(),s&&s())},c=0;c<y;c++){var _=u?A({delay:(t.delay||0)+u(c,y,o[c],a[c]),done:v},t):t;Rj(o[c],a[c],_)}else i.__morphT=0,i.animateTo({__morphT:1},A({during:function(t){for(var e=0;e<y;e++){var n=a[e];n.__morphT=i.__morphT,n.dirtyShape()}l&&l(t)},done:function(){g();for(var t=0;t<e.length;t++)Lj(e[t],"updateTransform");s&&s()}},t));return i.__zr&&f(i.__zr),{fromIndividuals:o,toIndividuals:a,count:y}}function Vj(t,e,n){var i=e.length,o=[],r=n.dividePath||Ej;if(Dj(t)){!function t(e){for(var n=0;n<e.length;n++){var i=e[n];Dj(i)?t(i.childrenRef()):i instanceof Ss&&o.push(i)}}(t.childrenRef());var a=o.length;if(a<i)for(var s=0,l=a;l<i;l++)o.push(Iu(o[s++%a]));o.length=i}else{for(var o=r({path:t,count:i}),u=t.getComputedTransform(),l=0;l<o.length;l++)o[l].setLocalTransform(u);if(o.length!==i)return console.error("Invalid morphing: unmatched splitted path"),zj()}o=Nj(o),e=Nj(e);for(var h=n.individualDelay,l=0;l<i;l++){var c=h?A({delay:(n.delay||0)+h(l,i,o[l],e[l])},n):n;Rj(o[l],e[l],c)}return{fromIndividuals:o,toIndividuals:e,count:e.length}}function Gj(t){return G(t[0])}function Fj(t,e){for(var n=[],i=t.length,o=0;o<i;o++)n.push({one:t[o],many:[]});for(o=0;o<e.length;o++)for(var r=e[o].length,a=void 0,a=0;a<r;a++)n[a%i].many.push(e[o][a]);for(var s=0,o=i-1;0<=o;o--)if(!n[o].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}var r=l.length,u=Math.ceil(r/2);n[o].many=l.slice(u,r),n[s].many=l.slice(0,u),s++}return n}var Hj={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i<t.count;i++){var o=Iu(t.path);o.setStyle("opacity",n),e.push(o)}return e},split:null};function Wj(t,e,f,n,i,g){if(t.length&&e.length){i=jh("update",n,i);if(i&&0<i.duration){var o,r,y=n.getModel("universalTransition").get("delay"),m=Object.assign({setToFinal:!0},i);Gj(t)&&(o=t,r=e),Gj(e)&&(o=e,r=t);for(var a=o?o===t:t.length>e.length,s=o?Fj(r,o):Fj(a?e:t,[a?t:e]),l=0,u=0;u<s.length;u++)l+=s[u].many.length;for(var h=0,u=0;u<s.length;u++)!function t(e,n,o,r,i){var a=e.many,s=e.one;if(1!==a.length||i)for(var l=A({dividePath:Hj[f],individualDelay:y&&function(t,e,n,i){return y(t+o,r)}},m),l=n?Bj(a,s,l):Vj(s,a,l),u=l.fromIndividuals,h=l.toIndividuals,c=u.length,p=0;p<c;p++)d=y?A({delay:y(p,c)},m):m,g(u[p],h[p],n?a[p]:e.one,n?e.one:a[p],d);else{var d,l=n?a[0]:s,s=n?s:a[0];Dj(l)?t({many:[l],one:s},!0,o,r,!0):(Rj(l,s,d=y?A({delay:y(o,r)},m):m),g(l,s,l,s,d))}}(s[u],a,h,l),h+=s[u].many.length}}}function Uj(t){if(!t)return[];if(G(t)){for(var e=[],n=0;n<t.length;n++)e.push(Uj(t[n]));return e}var i=[];return t.traverse(function(t){t instanceof Ss&&!t.disableMorphing&&!t.invisible&&!t.ignore&&i.push(t)}),i}var Yj=1e4,Xj=ur();function Zj(t){var r=[];return E(t,function(t){var e=t.data;if(e.count()>Yj)Fo("Universal transition is disabled on large data > 10k.");else for(var n=e.getIndices(),i=function(t){for(var e=t.dimensions,n=0;n<e.length;n++){var i=t.getDimensionInfo(e[n]);if(i&&0===i.otherDims.itemGroupId)return e[n]}}(e),o=0;o<n.length;o++)r.push({data:e,dim:t.dim||i,divide:t.divide,dataIndex:o})}),r}function jj(t,e,n){t.traverse(function(t){t instanceof Ss&&$h(t,{style:{opacity:0}},e,{dataIndex:n,isFrom:!0})})}function qj(t){var e;t.parent&&(e=t.getComputedTransform(),t.setLocalTransform(e),t.parent.remove(t))}function Kj(t){t.stopAnimation(),t.isGroup&&t.traverse(function(t){t.stopAnimation()})}function $j(t,e,n){var i=jh("update",n,e);i&&t.traverse(function(t){var e;t instanceof ta&&((e=Zh(t).oldStyle)&&t.animateFrom({style:e},i))})}function Jj(t,e,i){var a=Zj(t),s=Zj(e);function l(t,e,n,i,o){(n||t)&&e.animateFrom({style:(n||t).style},o)}function n(t){for(var e=0;e<t.length;e++)if(t[e].dim)return t[e].dim}var u=n(a),h=n(s),c=!1;function o(a,s){return function(t){var e=t.data,n=t.dataIndex;if(s)return e.getId(n);var i=e.hostModel&&e.hostModel.get("dataGroupId"),o=a?u||h:h||u,t=o&&e.getDimensionInfo(o),o=t&&t.ordinalMeta;if(t){var r=e.get(t.name,n);return o?o.categories[r]||r+"":r+""}r=e.getRawDataItem(n);return r&&r.groupId?r.groupId+"":i||e.getId(n)}}var t=function(t,e){var n=t.length;if(n!==e.length)return!1;for(var i=0;i<n;i++){var o=t[i],r=e[i];if(o.data.getId(o.dataIndex)!==r.data.getId(r.dataIndex))return!1}return!0}(a,s),p={};if(!t)for(var r=0;r<s.length;r++){var d=s[r],d=d.data.getItemGraphicEl(d.dataIndex);d&&(p[d.id]=!0)}function f(t,e){var n=a[e],i=s[t],o=i.data.hostModel,e=n.data.getItemGraphicEl(n.dataIndex),n=i.data.getItemGraphicEl(i.dataIndex);e!==n?e&&p[e.id]||n&&(Kj(n),e?(Kj(e),qj(e),c=!0,Wj(Uj(e),Uj(n),i.divide,o,t,l)):jj(n,o,t)):n&&$j(n,i.dataIndex,o)}new Mx(a,s,o(!0,t),o(!1,t),null,"multiple").update(f).updateManyToOne(function(t,e){var n=s[t],i=n.data,o=i.hostModel,r=i.getItemGraphicEl(n.dataIndex),e=R(L(e,function(t){return a[t].data.getItemGraphicEl(a[t].dataIndex)}),function(t){return t&&t!==r&&!p[t.id]});r&&(Kj(r),e.length?(E(e,function(t){Kj(t),qj(t)}),c=!0,Wj(Uj(e),Uj(r),n.divide,o,t,l)):jj(r,o,n.dataIndex))}).updateOneToMany(function(e,t){var n,i=a[t],o=i.data.getItemGraphicEl(i.dataIndex);o&&p[o.id]||(t=R(L(e,function(t){return s[t].data.getItemGraphicEl(s[t].dataIndex)}),function(t){return t&&t!==o}),n=s[e[0]].data.hostModel,t.length&&(E(t,Kj),o?(Kj(o),qj(o),c=!0,Wj(Uj(o),Uj(t),i.divide,n,e[0],l)):E(t,function(t){return jj(t,n,e[0])})))}).updateManyToMany(function(n,i){new Mx(i,n,function(t){return a[t].data.getId(a[t].dataIndex)},function(t){return s[t].data.getId(s[t].dataIndex)}).update(function(t,e){f(n[t],i[e])}).execute()}).execute(),c&&E(e,function(t){var e=t.data.hostModel,t=e&&i.getViewOfSeriesModel(e),n=jh("update",e,0);t&&e.isAnimationEnabled()&&n&&0<n.duration&&t.group.traverse(function(t){t instanceof Ss&&!t.animators.length&&t.animateFrom({style:{opacity:0}},n)})})}function Qj(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function tq(t){return G(t)?t.sort().join(","):t}function eq(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function nq(t,e){for(var n=0;n<t.length;n++)if(null!=e.seriesIndex&&e.seriesIndex===t[n].seriesIndex||null!=e.seriesId&&e.seriesId===t[n].id)return n}xx([function(t){t.registerPainter("canvas",yM)}]),xx([function(t){t.registerPainter("svg",aM)}]),xx([function(t){t.registerChartView(dI),t.registerSeriesModel(_M),t.registerLayout(gI("line",!0)),t.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),t=t.getModel("lineStyle").getLineStyle();t&&!t.stroke&&(t.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",t)}}),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,vI("line"))},function(t){t.registerChartView(RI),t.registerSeriesModel(wI),t.registerLayout(t.PRIORITY.VISUAL.LAYOUT,V(Nb,"bar")),t.registerLayout(t.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Eb),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,vI("bar")),t.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})})},function(t){t.registerChartView(fT),t.registerSeriesModel(xT),mm("pie",t.registerAction),t.registerLayout(V(iT,"pie")),t.registerProcessor(oT("pie")),t.registerProcessor({seriesType:"pie",reset:function(t,e){var n=t.getData();n.filterSelf(function(t){var e=n.mapDimension("value"),t=n.get(e,t);return!("number"==typeof t&&!isNaN(t)&&t<0)})}})},function(t){xx(HC),t.registerSeriesModel(ST),t.registerChartView(PT),t.registerLayout(gI("scatter"))},function(t){xx(pD),t.registerChartView(jC),t.registerSeriesModel($C),t.registerLayout(WC),t.registerProcessor(oT("radar")),t.registerPreprocessor(XC)},function(t){xx(dA),t.registerChartView(VD),t.registerSeriesModel(HD),t.registerLayout(YD),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,UD),mm("map",t.registerAction)},function(t){t.registerChartView(TA),t.registerSeriesModel(QA),t.registerLayout(nk),t.registerVisual(ik),(t=t).registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,e=t.getData().tree.getNodeByDataIndex(e);e.isExpand=!e.isExpand})}),t.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=uA(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})})},function(t){t.registerSeriesModel(uk),t.registerChartView(Ck),t.registerVisual(jk),t.registerLayout(hL),ak(t)},function(t){t.registerChartView(vP),t.registerSeriesModel(kP),t.registerProcessor(gL),t.registerVisual(yL),t.registerVisual(vL),t.registerLayout(kL),t.registerLayout(t.PRIORITY.VISUAL.POST_CHART_LAYOUT,zL),t.registerLayout(VL),t.registerCoordinateSystem("graphView",{dimensions:jD.dimensions,create:GL}),t.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},function(){}),t.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},function(){}),t.registerAction(PP,function(n,t){t.eachComponent({mainType:"series",query:n},function(t){var e=uA(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})})},function(t){t.registerChartView(GP),t.registerSeriesModel(WP)},function(t){t.registerChartView(KP),t.registerSeriesModel(QP),t.registerLayout(eO),t.registerProcessor(oT("funnel"))},function(t){xx(XR),t.registerChartView(iO),t.registerSeriesModel(hO),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,fO)},function(t){t.registerChartView(JR),t.registerSeriesModel(eN),t.registerLayout(iN),t.registerVisual(dN),t.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})})},function(t){t.registerSeriesModel(yN),t.registerChartView(_N),t.registerVisual(CN),t.registerLayout(AN),t.registerTransform(kN)},function(t){t.registerChartView(ON),t.registerSeriesModel(qN),t.registerPreprocessor($N),t.registerVisual(nE),t.registerLayout(oE)},function(t){t.registerChartView(cE),t.registerSeriesModel(fE),t.registerLayout(gI("effectScatter"))},function(t){t.registerChartView(OE),t.registerSeriesModel(VE),t.registerLayout(PE),t.registerVisual(HE)},function(t){t.registerChartView(ZE),t.registerSeriesModel(KE)},function(t){t.registerChartView(nz),t.registerSeriesModel(wz),t.registerLayout(V(Nb,"pictorialBar"))},function(t){t.registerChartView(Iz),t.registerSeriesModel(Dz),t.registerLayout(kz),t.registerProcessor(oT("themeRiver"))},function(t){t.registerChartView(Gz),t.registerSeriesModel(Wz),t.registerLayout(V(Xz,"sunburst")),t.registerProcessor(V(oT,"sunburst")),t.registerVisual(jz),Bz(t)},function(t){t.registerChartView(RB),t.registerSeriesModel(tB)}]),xx(function(t){xx(HC),xx(UV)}),xx(function(t){xx(UV),wC.registerAxisPointerClass("PolarAxisPointer",XV),t.registerCoordinateSystem("polar",_G),t.registerComponentModel(KV),t.registerComponentView(GG),HT(t,"angle",eG,BG),HT(t,"radius",oG,VG),t.registerComponentView(IG),t.registerComponentView(LG),t.registerLayout(V(EG,"bar"))}),xx(dA),xx(function(t){xx(UV),wC.registerAxisPointerClass("SingleAxisPointer",uF),t.registerComponentView(gF),t.registerComponentView(XG),t.registerComponentModel(KG),HT(t,"single",KG,KG.defaultOption),t.registerCoordinateSystem("single",aF)}),xx(XR),xx(function(t){t.registerComponentModel(vF),t.registerComponentView(wF),t.registerCoordinateSystem("calendar",MF)}),xx(function(t){t.registerComponentModel(LF),t.registerComponentView(RF),t.registerPreprocessor(CF)}),xx(function(t){t.registerComponentModel(yH),t.registerComponentView(xH),dH("saveAsImage",SH),dH("magicType",DH),dH("dataView",BH),dH("dataZoom",lW),dH("restore",UH),xx(hH)}),xx(function(t){xx(UV),t.registerComponentModel(gW),t.registerComponentView(VW),t.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},function(){}),t.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},function(){})}),xx(UV),xx(function(t){t.registerComponentView(uU),t.registerComponentModel(pU),t.registerPreprocessor(YW),t.registerVisual(t.PRIORITY.VISUAL.BRUSH,iU),t.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),t.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},function(){}),t.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},function(){}),dH("brush",mU)}),xx(function(t){t.registerComponentModel(xU),t.registerComponentView(SU)}),xx(function(t){var e;t.registerComponentModel(DU),t.registerComponentView(BU),t.registerSubTypeDefaulter("timeline",function(){return"slider"}),(e=t).registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e,n){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:t.from}))),e.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),A({currentIndex:i.option.currentIndex},t)}),e.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){e=e.getComponent("timeline");e&&null!=t.playState&&e.setPlayState(t.playState)}),t.registerPreprocessor(HU)}),xx(function(t){t.registerComponentModel(JU),t.registerComponentView(pY),t.registerPreprocessor(function(t){YU(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}),xx(function(t){t.registerComponentModel(gY),t.registerComponentView(MY),t.registerPreprocessor(function(t){YU(t.series,"markLine")&&(t.markLine=t.markLine||{})})}),xx(function(t){t.registerComponentModel(CY),t.registerComponentView(zY),t.registerPreprocessor(function(t){YU(t.series,"markArea")&&(t.markArea=t.markArea||{})})}),xx(function(t){xx(tX),xx(cX)}),xx(function(t){xx(TX),xx(VX)}),xx(TX),xx(VX),xx(function(t){xx(IZ),xx(RZ)}),xx(IZ),xx(RZ),xx(function(t){t.registerPreprocessor(VZ),t.registerVisual(t.PRIORITY.VISUAL.ARIA,BZ)}),xx(function(t){t.registerTransform(oj),t.registerTransform(aj)}),xx(function(t){t.registerComponentModel(lj),t.registerComponentView(cj)}),xx(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,i){E(qo(i.seriesTransition),function(t){E(qo(t.to),function(t){for(var e=i.updatedSeries,n=0;n<e.length;n++)(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)&&(e[n][gy]=!0)})})}),t.registerUpdateLifecycle("series:transition",function(t,a,s){var e,o,n,r,l,u,h=Xj(a);function c(t){r.get(t)&&Fo("Duplicated seriesKey in universalTransition "+t)}h.oldSeries&&s.updatedSeries&&s.optionChanged&&((n=s.seriesTransition)?E(qo(n),function(t){var n,i,e,o,r;n=h,i=s,e=a,o=[],r=[],E(qo((t=t).from),function(t){var e=nq(n.oldSeries,t);0<=e&&o.push({data:n.oldData[e],divide:eq(n.oldData[e]),dim:t.dimension})}),E(qo(t.to),function(t){var e=nq(i.updatedSeries,t);0<=e&&(e=i.updatedSeries[e].getData(),r.push({data:e,divide:eq(e),dim:t.dimension}))}),0<o.length&&0<r.length&&Jj(o,r,e)}):(o=h,n=s,r=ct(),l=ct(),u=ct(),E(o.oldSeries,function(t,e){var n=o.oldData[e],t=Qj(t),i=tq(t);l.set(i,n),G(t)&&E(t,function(t){u.set(t,{data:n,key:i})})}),E(n.updatedSeries,function(t){var e,n,i,o;t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()&&(e=t.getData(),i=tq(o=Qj(t)),(t=l.get(i))?(c(i),r.set(i,{oldSeries:[{divide:eq(t),data:t}],newSeries:[{divide:eq(e),data:e}]})):G(o)?(c(i),n=[],E(o,function(t){t=l.get(t);t&&n.push({divide:eq(t),data:t})}),n.length&&r.set(i,{oldSeries:n,newSeries:[{data:e,divide:eq(e)}]})):(i=u.get(o))&&((o=r.get(i.key))||(o={oldSeries:[{data:i.data,divide:eq(i.data)}],newSeries:[]},r.set(i.key,o)),o.newSeries.push({data:e,divide:eq(e)})))}),E((e=r).keys(),function(t){t=e.get(t);Jj(t.oldSeries,t.newSeries,a)})),E(s.updatedSeries,function(t){t[gy]&&(t[gy]=!1)}));for(var i=t.getSeries(),p=h.oldSeries=[],d=h.oldData=[],f=0;f<i.length;f++){var g=i[f].getData();g.count()<Yj&&(p.push(i[f]),d.push(g))}})}),xx(function(t){t.registerUpdateLifecycle("series:beforeupdate",function(t,e,n){(hS(e).labelManager||(hS(e).labelManager=new lS)).clearLabels()}),t.registerUpdateLifecycle("series:layoutlabels",function(t,e,n){var i=hS(e).labelManager;n.updatedSeries.forEach(function(t){i.addLabelsOfSeries(e.getViewOfSeriesModel(t))}),i.updateLayoutConfig(e),i.layout(e),i.processLabelsOverall()})}),t.Axis=vp,t.ChartView=ky,t.ComponentModel=yd,t.ComponentView=Iy,t.List=$x,t.Model=ep,t.PRIORITY=Xc,t.SeriesModel=yy,t.color=dn,t.connect=function(e){var t;return G(e)&&(t=e,e=null,E(t,function(t){null!=t.group&&(e=t.group)}),e=e||"g_"+tx++,E(t,function(t){t.group=e})),J_[e]=!0,e},t.dataTool={},t.dependencies={zrender:"5.2.1"},t.disConnect=nx,t.disconnect=Lr,t.dispose=function(t){"string"==typeof t?t=$_[t]:t instanceof E_||(t=ix(t)),t instanceof E_&&!t.isDisposed()&&t.dispose()},t.env=w,t.extendChartView=function(t){return t=ky.extend(t),ky.registerClass(t),t},t.extendComponentModel=function(t){return t=yd.extend(t),yd.registerClass(t),t},t.extendComponentView=function(t){return t=Iy.extend(t),Iy.registerClass(t),t},t.extendSeriesModel=function(t){return t=yy.extend(t),yy.registerClass(t),t},t.format=f,t.getCoordinateSystemDimensions=function(t){if(t=sf.get(t))return t.getDimensionsInfo?t.getDimensionsInfo():t.dimensions.slice()},t.getInstanceByDom=ix,t.getInstanceById=function(t){return $_[t]},t.getMap=function(t){return e_(t)},t.graphic=r,t.helper=Uf,t.init=function(t,e,n){if(1,!t)throw new Error("Initialize failed: invalid dom.");var i=ix(t);return i?(console.warn("There is a chart instance already initialized on the dom."),i):(!j(t)||"CANVAS"===t.nodeName.toUpperCase()||(t.clientWidth||n&&null!=n.width)&&(t.clientHeight||n&&null!=n.height)||console.warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload."),(n=new E_(t,e,n)).id="ec_"+Q_++,$_[n.id]=n,yr(t,ex,n.id),P_(n),i_.trigger("afterinit",n),n)},t.innerDrawElementOnCanvas=$m,t.matrix=ci,t.number=Ah,t.parseGeoJSON=Hv,t.parseGeoJson=Hv,t.registerAction=hx,t.registerCoordinateSystem=cx,t.registerLayout=px,t.registerLoading=yx,t.registerLocale=pp,t.registerMap=mx,t.registerPostInit=sx,t.registerPostUpdate=lx,t.registerPreprocessor=rx,t.registerProcessor=ax,t.registerTheme=ox,t.registerTransform=Rg,t.registerUpdateLifecycle=ux,t.registerVisual=dx,t.setCanvasCreator=function(t){m("createCanvas",t)},t.throttle=Gy,t.time=$i,t.use=xx,t.util=_d,t.vector=Et,t.version="5.2.2",t.zrUtil=yt,t.zrender=po,Object.defineProperty(t,"__esModule",{value:!0})}); |