/* 2020-9-22 15:23:28 | 版权所有 军懋国兴 */ 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.echarts={})}(this,function(t){"use strict";var e;"undefined"!=typeof window?e=window.__DEV__:"undefined"!=typeof global&&(e=global.__DEV__),void 0===e&&(e=!0);var T=e,n=2311,i=function(){return n++},v="object"===("undefined"==typeof wx?"undefined":_typeof(wx))&&"function"==typeof wx.getSystemInfoSync?{browser:{},os:{},node:!1,wxa:!0,canvasSupported:!0,svgSupported:!1,touchEventsSupported:!0,domSupported:!1}:"undefined"==typeof document&&"undefined"!=typeof self?{browser:{},os:{},node:!1,worker:!0,canvasSupported:!0,domSupported:!1}:"undefined"==typeof navigator?{browser:{},os:{},node:!0,worker:!1,canvasSupported:!0,svgSupported:!0,domSupported:!1}:function(t){var e={},n=t.match(/Firefox\/([\d.]+)/),i=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),a=/micromessenger/i.test(t);n&&(e.firefox=!0,e.version=n[1]);i&&(e.ie=!0,e.version=i[1]);o&&(e.edge=!0,e.version=o[1]);a&&(e.weChat=!0);return{browser:e,os:{},node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!e.ie&&!e.edge,pointerEventsSupported:"onpointerdown"in window&&(e.edge||e.ie&&11<=e.version),domSupported:"undefined"!=typeof document}}(navigator.userAgent);var s={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},l={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},u=Object.prototype.toString,o=Array.prototype,r=o.forEach,h=o.filter,a=o.slice,c=o.map,d=o.reduce,p={};function f(t,e){"createCanvas"===t&&(x=null),p[t]=e}function D(t){if(null==t||"object"!=_typeof(t))return t;var e=t,n=u.call(t);if("[object Array]"===n){if(!J(t)){e=[];for(var i=0,o=t.length;i=this._maxSize&&0>4|(3840&i)>>8,240&i|(240&i)>>4,15&i|(15&i)<<4,1),Ie(t,e),e):void we(e,0,0,0,1):7===o.length?0<=(i=parseInt(o.substr(1),16))&&i<=16777215?(we(e,(16711680&i)>>16,(65280&i)>>8,255&i,1),Ie(t,e),e):void we(e,0,0,0,1):void 0;var a=o.indexOf("("),r=o.indexOf(")");if(-1!==a&&r+1===o.length){var s=o.substr(0,a),l=o.substr(a+1,r-(a+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void we(e,0,0,0,1);u=ye(l.pop());case"rgb":return 3!==l.length?void we(e,0,0,0,1):(we(e,ve(l[0]),ve(l[1]),ve(l[2]),u),Ie(t,e),e);case"hsla":return 4!==l.length?void we(e,0,0,0,1):(l[3]=ye(l[3]),Te(l,e),Ie(t,e),e);case"hsl":return 3!==l.length?void we(e,0,0,0,1):(Te(l,e),Ie(t,e),e);default:return}}we(e,0,0,0,1)}}function Te(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=ye(t[1]),o=ye(t[2]),a=o<=.5?o*(i+1):o+i-o*i,r=2*o-a;return we(e=e||[],ge(255*xe(r,a,n+1/3)),ge(255*xe(r,a,n)),ge(255*xe(r,a,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function De(t,e){var n=Ae(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,255e);n++);n=Math.min(n-1,u-2)}P=e;var i,o=v[(k=n)+1]-v[n];if(0!=o)if(I=(e-v[n])/o,l)if(T=y[n],A=y[0===n?n:n-1],D=y[u-2=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},clone:function(){return new hn(this.x,this.y,this.width,this.height)},copy:function(t){this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},hn.create=function(t){return new hn(t.x,t.y,t.width,t.height)};var cn=function(t){for(var e in t=t||{},en.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};cn.prototype={constructor:cn,isGroup:!0,type:"group",silent:!1,children:function(){return this._children.slice()},childAt:function(t){return this._children[t]},childOfName:function(t){for(var e=this._children,n=0;n>>1])<0?l=a:s=1+a;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>>1);0>>1);a(t,e[n+h])<0?l=h:r=h+1}return l}function yn(f,g){var r,s,m=pn,l=0,v=[];function e(t){var e=r[t],n=s[t],i=r[t+1],o=s[t+1];s[t]=n+o,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var a=vn(f[i],f,e,n,0,g);e+=a,0!=(n-=a)&&0!==(o=mn(f[e+n-1],f,i,o,o-1,g))&&(n<=o?function(t,e,n,i){var o=0;for(o=0;os[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(o);do{(a=fn(t,n,i,e))=e.maxIterations){t+=e.ellipsis;break}var r=0===a?function(t,e,n,i){for(var o=0,a=0,r=t.length;ap)return{lines:[],width:0,height:0};C.textWidth=Xn(C.text,w);var S,M,I,A,T=x.textWidth,D=null==T||"auto"===T;"string"==typeof T&&"%"===T.charAt(T.length-1)?(C.percentWidth=T,u.push(C),T=0):(D&&(T=C.textWidth,(M=(S=x.textBackgroundColor)&&S.image)&&Vn(M=function(t){if("string"!=typeof t)return t;var e=Rn.get(t);return e&&e.image}(M))&&(T=Math.max(T,M.width*b/M.height))),T+=I=_?_[1]+_[3]:0,null!=(A=null!=d?d-v:null)&&Ao[0]){for(s=0;st);s++);r=i[o[s]]}o.splice(s+1,0,t),(i[t]=e).virtual||(r?(n=r.dom).nextSibling?l.insertBefore(e.dom,n.nextSibling):l.appendChild(e.dom):l.firstChild?l.insertBefore(e.dom,l.firstChild):l.appendChild(e.dom))}else Je("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){for(var n,i=this._zlevelList,o=0;o=a.length&&a.push({option:t})}}),a}function po(t){var r=tt();io(t,function(t,e){var n=t.exist;n&&r.set(n.id,t)}),io(t,function(t,e){var n=t.option;Y(!n||null==n.id||!r.get(n.id)||r.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&r.set(n.id,t),t.keyInfo||(t.keyInfo={})}),io(t,function(t,e){var n=t.exist,i=t.option,o=t.keyInfo;if(oo(i)){if(o.name=null!=i.name?i.name+"":n?n.name:ro+e,n)o.id=n.id;else if(null!=i.id)o.id=i.id+"";else for(var a=0;o.id="\0"+o.name+"\0"+a++,r.get(o.id););r.set(o.id,t)}})}function fo(t){var e=t.name;return e&&e.indexOf(ro)}function go(t){return oo(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function mo(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?C(t.dataIndex)?L(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?C(t.name)?L(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function vo(){var e="__\0ec_inner_"+yo+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var yo=0;function xo(s,l,u){var t;N(l)&&((t={})[l+"Index"]=0,l=t);var e=u&&u.defaultMainType;!e||_o(l,e+"Index")||_o(l,e+"Id")||_o(l,e+"Name")||(l[e+"Index"]=0);var h={};return io(l,function(t,e){var n,i,o,a,r,t=l[e];"dataIndex"!==e&&"dataIndexInside"!==e?(i=(n=e.match(/^(\w+)(Index|Id|Name)$/)||[])[1],o=(n[2]||"").toLowerCase(),!i||!o||null==t||"index"===o&&"none"===t||u&&u.includeMainTypes&&M(u.includeMainTypes,i)<0||(a={mainType:i},"index"===o&&"all"===t||(a[o]=t),r=s.queryComponents(a),h[i+"Models"]=r,h[i+"Model"]=r[0])):h[e]=t}),h}function _o(t,e){return t&&t.hasOwnProperty(e)}function wo(t,e,n){t.setAttribute?t.setAttribute(e,n):t[e]=n}function bo(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}var So=".",Mo="___EC__COMPONENT__CONTAINER___";function Io(t){var e={main:"",sub:""};return t&&(t=t.split(So),e.main=t[0]||"",e.sub=t[1]||""),e}function Ao(t,i){(t.$constructor=t).extend=function(e){T&&z(i,function(t){e[t]||console.warn("Method `"+t+"` should be implemented"+(e.type?" in "+e.type:"")+".")});function t(){e.$constructor?e.$constructor.apply(this,arguments):n.apply(this,arguments)}var n=this;return k(t.prototype,e),t.extend=this.extend,t.superCall=Co,t.superApply=Lo,w(t,this),t.superClass=n,t}}var To=0;function Do(t){var e=["__\0is_clz",To++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,T&&Y(!t.isInstance,'The method "is" can not be defined.'),t.isInstance=function(t){return!(!t||!t[e])}}function Co(t,e){var n=X(arguments,2);return this.superClass.prototype[e].apply(t,n)}function Lo(t,e,n){return this.superClass.prototype[e].apply(t,n)}function ko(n,t){t=t||{};var i,o={};return n.registerClass=function(t,e){var n;return e&&(Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n=e),'componentType "'+n+'" illegal'),(e=Io(e)).sub?e.sub!==Mo&&(function(t){var e=o[t.main];e&&e[Mo]||((e=o[t.main]={})[Mo]=!0);return e}(e)[e.sub]=t):(T&&o[e.main]&&console.warn(e.main+" exists."),o[e.main]=t)),t},n.getClass=function(t,e,n){var i=o[t];if(i&&i[Mo]&&(i=e?i[e]:null),n&&!i)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return i},n.getClassesByMainType=function(t){t=Io(t);var n=[],e=o[t.main];return e&&e[Mo]?z(e,function(t,e){e!==Mo&&n.push(t)}):n.push(e),n},n.hasClass=function(t){return t=Io(t),!!o[t.main]},n.getAllClassMainTypes=function(){var n=[];return z(o,function(t,e){n.push(e)}),n},n.hasSubTypes=function(t){t=Io(t);var e=o[t.main];return e&&e[Mo]},n.parseClassType=Io,!t.registerWhenExtend||(i=n.extend)&&(n.extend=function(t){var e=i.call(this,t);return n.registerClass(e,t.type)}),n}function Po(s){for(var t=0;tthis._ux||Ma(e-this._yi)>this._uy||this._len<5;return this.addData(fa.L,t,e),this._ctx&&n&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,n,i,o,a){return this.addData(fa.C,t,e,n,i,o,a),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,n,i,o,a):this._ctx.bezierCurveTo(t,e,n,i,o,a)),this._xi=o,this._yi=a,this},quadraticCurveTo:function(t,e,n,i){return this.addData(fa.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},arc:function(t,e,n,i,o,a){return this.addData(fa.A,t,e,n,n,i,o-i,0,a?0:1),this._ctx&&this._ctx.arc(t,e,n,i,o,a),this._xi=wa(o)*n+t,this._yi=ba(o)*n+e,this},arcTo:function(t,e,n,i,o){return this._ctx&&this._ctx.arcTo(t,e,n,i,o),this},rect:function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(fa.R,t,e,n,i),this},closePath:function(){this.addData(fa.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},fill:function(t){t&&t.fill(),this.toStatic()},stroke:function(t){t&&t.stroke(),this.toStatic()},setLineDash:function(t){if(t instanceof Array){this._lineDash=t;for(var e=this._dashIdx=0,n=0;ne.length&&(this._expandData(),e=this.data);for(var n=0;nl||Ma(r-o)>u||c===h-1)&&(t.lineTo(a,r),i=a,o=r);break;case fa.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case fa.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),i=s[c-2],o=s[c-1];break;case fa.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=za[i=0]+t&&r<=za[1]+t?h:0}(o=a?(l=i,i=ka(o),ka(l)):(i=ka(i),ka(o)))Math.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h))}return c}(f,g,v,y,y+x,_,S,o);l=Math.cos(y+x)*m+f,u=Math.sin(y+x)*v+g;break;case Oa.R:h=l=t[d++],c=u=t[d++];w=h+t[d++],b=c+t[d++];if(n){if(Ta(h,c,w,c,e,i,o)||Ta(w,c,w,b,e,i,o)||Ta(w,b,h,b,e,i,o)||Ta(h,b,h,c,e,i,o))return!0}else s+=Na(w,c,w,b,i,o),s+=Na(h,b,h,c,i,o);break;case Oa.Z:if(n){if(Ta(l,u,h,c,e,i,o))return!0}else s+=Na(l,u,h,c,i,o);l=h,u=c}}return n||(a=u,r=c,Math.abs(a-r)Math.abs(a[1])?0=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/o*a+n[0]}function Rs(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+/,"").replace(/\s+$/,"").match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function zs(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Bs(t){return t.sort(function(t,e){return t-e}),t}function Vs(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function Gs(t){var e=t.toString(),n=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/o}var Hs=9007199254740991;function Zs(t){var e=2*Math.PI;return(t%e+e)%e}function Us(t){return-Os"'])/g,ol={"&":"&","<":"<",">":">",'"':""","'":"'"};function al(t){return null==t?"":(t+"").replace(il,function(t,e){return ol[e]})}function rl(t,e){return"{"+t+(null==e?"":e)+"}"}var sl=["a","b","c","d","e","f","g"];function ll(t,e,n){C(e)||(e=[e]);var i=e.length;if(!i)return"";for(var o=e[0].$vars||[],a=0;a':'':{renderMode:o,content:"{marker"+a+"|} ",style:{color:n}}:""}function cl(t,e){return"0000".substr(0,e-(t+="").length)+t}function dl(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=js(e),o=n?"UTC":"",a=i["get"+o+"FullYear"](),r=i["get"+o+"Month"]()+1,s=i["get"+o+"Date"](),l=i["get"+o+"Hours"](),u=i["get"+o+"Minutes"](),h=i["get"+o+"Seconds"](),c=i["get"+o+"Milliseconds"]();return t=t.replace("MM",cl(r,2)).replace("M",r).replace("yyyy",a).replace("yy",a%100).replace("dd",cl(s,2)).replace("d",s).replace("hh",cl(l,2)).replace("h",l).replace("mm",cl(u,2)).replace("m",u).replace("ss",cl(h,2)).replace("s",h).replace("SSS",cl(c,3))}function pl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var fl=$n,gl=(Object.freeze||Object)({addCommas:tl,toCamelCase:el,normalizeCssArray:nl,encodeHTML:al,formatTpl:ll,formatTplSimple:ul,getTooltipMarker:hl,formatTime:dl,capitalFirst:pl,truncateText:fl,getTextRect:jn}),ml=z,vl=["left","right","top","bottom","width","height"],yl=[["width","left","right"],["height","top","bottom"]];function xl(h,c,d,p,f){var g=0,m=0;null==p&&(p=1/0),null==f&&(f=1/0);var v=0;c.eachChild(function(t,e){var n,i,o,a,r=t.position,s=t.getBoundingRect(),l=c.childAt(e+1),u=l&&l.getBoundingRect();v="horizontal"===h?(n=s.width+(u?-u.x+s.x:0),p<(i=g+n)||t.newline?(g=0,i=n,m+=v+d,s.height):Math.max(v,s.height)):(o=s.height+(u?-u.y+s.y:0),f<(a=m+o)||t.newline?(g+=v+d,m=0,a=o,s.width):Math.max(v,s.width)),t.newline||(r[0]=g,r[1]=m,"horizontal"===h?g=i+d:m=a+d)})}var _l=xl;R(xl,"vertical"),R(xl,"horizontal");function wl(t,e,n){n=nl(n||0);var i=e.width,o=e.height,a=Rs(t.left,i),r=Rs(t.top,o),s=Rs(t.right,i),l=Rs(t.bottom,o),u=Rs(t.width,i),h=Rs(t.height,o),c=n[2]+n[0],d=n[1]+n[3],p=t.aspect;switch(isNaN(u)&&(u=i-s-d-a),isNaN(h)&&(h=o-l-c-r),null!=p&&(isNaN(u)&&isNaN(h)&&(i/oe)return t[i];return t[n-1]}(s,n):r;if((l=l||r)&&l.length){var u=l[o];return t&&(a[t]=u),i.colorIdx=(o+1)%l.length,u}}};function Rl(t){var e=t.get("coordinateSystem"),n={coordSysName:e,coordSysDims:[],axisMap:tt(),categoryAxisMap:tt()},i=zl[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}var zl={cartesian2d:function(t,e,n,i){var o=t.getReferringComponents("xAxis")[0],a=t.getReferringComponents("yAxis")[0];if(T){if(!o)throw new Error('xAxis "'+H(t.get("xAxisIndex"),t.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+H(t.get("xAxisIndex"),t.get("yAxisId"),0)+'" not found')}e.coordSysDims=["x","y"],n.set("x",o),n.set("y",a),Bl(o)&&(i.set("x",o),e.firstCategoryDimIndex=0),Bl(a)&&(i.set("y",a),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,n,i){var o=t.getReferringComponents("singleAxis")[0];if(T&&!o)throw new Error("singleAxis should be specified.");e.coordSysDims=["single"],n.set("single",o),Bl(o)&&(i.set("single",o),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var o=t.getReferringComponents("polar")[0],a=o.findAxisModel("radiusAxis"),r=o.findAxisModel("angleAxis");if(T){if(!r)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}e.coordSysDims=["radius","angle"],n.set("radius",a),n.set("angle",r),Bl(a)&&(i.set("radius",a),e.firstCategoryDimIndex=0),Bl(r)&&(i.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e){e.coordSysDims=["lng","lat"]},parallel:function(t,o,a,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=o.coordSysDims=e.dimensions.slice();z(e.parallelAxisIndex,function(t,e){var n=s.getComponent("parallelAxis",t),i=l[e];a.set(i,n),Bl(n)&&null==o.firstCategoryDimIndex&&(r.set(i,n),o.firstCategoryDimIndex=e)})}};function Bl(t){return"category"===t.get("type")}var Vl="original",Gl="arrayRows",Fl="objectRows",Wl="keyedColumns",Hl="unknown",Zl="typedArray",Ul="column",Xl="row";function jl(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===Wl?{}:[]),this.sourceFormat=t.sourceFormat||Hl,this.seriesLayoutBy=t.seriesLayoutBy||Ul,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&tt(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}jl.seriesDataToSource=function(t){return new jl({data:t,sourceFormat:G(t)?Zl:Vl,fromDataset:!1})},Do(jl);var Yl=vo();function ql(t){var e,n=t.option,i=n.data,o=G(i)?Zl:Vl,a=!1,r=n.seriesLayoutBy,s=n.sourceHeader,l=n.dimensions,u=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);u&&(i=(e=u.option).source,o=Yl(u).sourceFormat,a=!0,r=r||e.seriesLayoutBy,null==s&&(s=e.sourceHeader),l=l||e.dimensions);var h=function(t,e,n,i,o){if(!t)return{dimensionsDefine:Kl(o)};var a,r,s,l;{var u;e===Gl?("auto"===i||null==i?$l(function(t){null!=t&&"-"!==t&&(N(t)?null==r&&(r=1):r=0)},n,t,10):r=i?1:0,o||1!==r||(o=[],$l(function(t,e){o[e]=null!=t?t:""},n,t)),a=o?o.length:n===Xl?t.length:t[0]?t[0].length:null):e===Fl?o||(o=function(t){var e,n=0;for(;n=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()};var Yu,qu,Ku,$u,Ju,Qu,th=Qu={reset:function(t,e,n,i){qu=t,Yu=e,Ku=n,$u=i,Ju=Math.ceil($u/Ku),Qu.next=1":"\n",p="richText"===c,f={},g=0;function n(t){return{renderMode:c,content:al(tl(t)),style:f}}var m=this.getData(),a=m.mapDimension("defaultedTooltip",!0),i=a.length,r=this.getRawValue(o),s=C(r),v=m.getItemVisual(o,"color");B(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",i=n+u.join(n||", ");return{renderMode:c,content:i,style:f}}(r):n(i?Fu(m,o,a[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=hl({color:v,type:"item",renderMode:c,markerId:u});f[u]=v,++g;var x=m.getName(o),_=this.name;fo(this)||(_=""),_=_?al(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?al(x)+": "+l:l),markers:f}},isAnimationEnabled:function(){if(v.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){this.dataTask.dirty()},getColorFromPalette:function(t,e,n){var i=this.ecModel;return El.getColorFromPalette.call(this,t,e,n)||i.getColorFromPalette(t,e,n)},coordDimToDataDim:function(t){return this.getRawData().mapDimension(t,!0)},getProgressive:function(){return this.get("progressive")},getProgressiveThreshold:function(){return this.get("progressiveThreshold")},getAxisTooltipData:null,getTooltipPosition:null,pipeTask:null,preventIncremental:null,pipelineContext:null});function rh(t){var n,e,i,o=t.name;fo(t)||(t.name=(n=t.getRawData(),e=n.mapDimension("seriesName",!0),i=[],z(e,function(t){var e=n.getDimensionInfo(t);e.displayName&&i.push(e.displayName)}),i.join(" ")||o))}function sh(t){return t.model.getRawData().count()}function lh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),uh}function uh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function hh(e,n){z(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,R(ch,n))})}function ch(t){var e=dh(t);e&&e.setOutputEnd(this.count())}function dh(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i,o=n.currentTask;return!o||(i=o.agentStubMap)&&(o=i.get(t.uid)),o}}b(ah,Zu),b(ah,El);var ph=function(){this.group=new cn,this.uid=Ns("viewComponent")};ph.prototype={constructor:ph,init:function(){},render:function(){},dispose:function(){},filterForExposedEvent:null};var fh=ph.prototype;fh.updateView=fh.updateLayout=fh.updateVisual=function(t,e,n,i){},Ao(ph),ko(ph,{registerWhenExtend:!0});function gh(){var s=vo();return function(t){var e=s(t),n=t.pipelineContext,i=e.large,o=e.progressiveRender,a=e.large=n.large,r=e.progressiveRender=n.progressiveRender;return!!(i^a||o^r)&&"reset"}}var mh=vo(),vh=gh();function yh(){this.group=new cn,this.uid=Ns("viewChart"),this.renderTask=Uu({plan:bh,reset:Sh}),this.renderTask.context={view:this}}var xh=yh.prototype={type:"chart",init:function(){},render:function(){},highlight:function(t,e,n,i){wh(t.getData(),i,"emphasis")},downplay:function(t,e,n,i){wh(t.getData(),i,"normal")},remove:function(){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function _h(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var n=0;nd?o+=g(m("data.partialData"),{displayCnt:d}):o+=m("data.allData");for(var r,s,l=[],u=0;un.blockIndex?n.step:null,a=i&&i.modDataCount;return{step:o,modBy:null!=a?Math.ceil(a/o):null,modDataCount:a}}},Rh.getPipeline=function(t){return this._pipelineMap.get(t)},Rh.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,a=t.get("large")&&i>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:r,large:a}},Rh.restorePipelines=function(t){var i=this,o=i._pipelineMap=tt();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}),Yh(i,t,t.dataTask)})},Rh.prepareStageTasks=function(){var n=this._stageTaskMap,i=this.ecInstance.getModel(),o=this.api;z(this._allHandlers,function(t){var e=n.get(t.uid)||n.set(t.uid,[]);t.reset&&function(i,o,t,a,r){var s=t.seriesTaskMap||(t.seriesTaskMap=tt()),e=o.seriesType,n=o.getTargetSeries;o.createOnAllSeries?a.eachRawSeries(l):e?a.eachRawSeriesByType(e,l):n&&n(a,r).each(l);function l(t){var e=t.uid,n=s.get(e)||s.set(e,Uu({plan:Hh,reset:Zh,count:jh}));n.context={model:t,ecModel:a,api:r,useClearVisual:o.isVisual&&!o.isLayout,plan:o.plan,reset:o.reset,scheduler:i},Yh(i,t,n)}var u=i._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,i,o),t.overallReset&&function(i,t,e,n,o){var a=e.overallTask=e.overallTask||Uu({reset:Vh});a.context={ecModel:n,api:o,overallReset:t.overallReset,scheduler:i};var r=a.agentStubMap=a.agentStubMap||tt(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?n.eachRawSeriesByType(s,c):l?l(n,o).each(c):(u=!1,z(n.getSeries(),c));function c(t){var e=t.uid,n=r.get(e);n||(n=r.set(e,Uu({reset:Gh,onDirty:Wh})),a.dirty()),n.context={model:t,overallProgress:u,modifyOutputEnd:h},n.agent=a,n.__block=u,Yh(i,t,n)}var d=i._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),a.dirty(),r.removeKey(e))})}(this,t,e,i,o)},this)},Rh.prepareView=function(t,e,n,i){var o=t.renderTask,a=o.context;a.model=e,a.ecModel=n,a.api=i,o.__block=!t.incrementalPrepareRender,Yh(this,e,o)},Rh.performDataProcessorTasks=function(t,e){zh(this,this._dataProcessorHandlers,t,e,{block:!0})},Rh.performVisualTasks=function(t,e,n){zh(this,this._visualHandlers,t,e,n)},Rh.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},Rh.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})};var Bh=Rh.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function Vh(t){t.overallReset(t.ecModel,t.api,t.payload)}function Gh(t,e){return t.overallProgress&&Fh}function Fh(){this.agent.dirty(),this.getDownstream().dirty()}function Wh(){this.agent&&this.agent.dirty()}function Hh(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Zh(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=so(t.reset(t.model,t.ecModel,t.api,t.payload));return 1s.get("hoverLayerThreshold")&&!v.node&&l.traverse(function(t){t.isGroup||(t.useHoverLayer=!0)}),Nh(i._zr.dom,t)}function qc(e,n){Mc(id,function(t){t(e,n)})}Rc.resize=function(t){T&&Sc(!this[Lc],"`resize` should not be called during main process."),this._zr.resize(t);var e,n,i=this._model;this._loadingFX&&this._loadingFX.resize(),i&&(e=i.resetOption("media"),n=t&&t.silent,this[Lc]=!0,e&&Vc(this),Bc.update.call(this),this[Lc]=!1,Hc.call(this,n),Zc.call(this,n))},Rc.showLoading=function(t,e){var n,i;Ac(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),rd[t]?(n=rd[t](this._api,e),i=this._zr,this._loadingFX=n,i.add(n)):T&&console.warn("Loading effects "+t+" not exists.")},Rc.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},Rc.makeActionFromEvent=function(t){var e=k({},t);return e.type=td[t.type],e},Rc.dispatchAction=function(t,e){Ac(e)||(e={silent:!!e}),Qc[t.type]&&this._model&&(this[Lc]?this._pendingActions.push(t):(Wc.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),Hc.call(this,e.silent),Zc.call(this,e.silent)))},Rc.appendData=function(t){var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);T&&Sc(t.data&&n),n.appendData(t),this._scheduler.unfinished=!0},Rc.on=Nc("on"),Rc.off=Nc("off"),Rc.one=Nc("one");var Kc=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function $c(t,e){var n=t.get("z"),i=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=i&&(t.zlevel=i))})}function Jc(){this.eventInfo}Rc._initEvents=function(){Mc(Kc,function(h){this._zr.on(h,function(t){var e,n,i,o,a,r,s=this.getModel(),l=t.target,u="globalout"===h;u?n={}:l&&null!=l.dataIndex?n=(e=l.dataModel||s.getSeriesByIndex(l.seriesIndex))&&e.getDataParams(l.dataIndex,l.dataType,l)||{}:l&&l.eventData&&(n=k({},l.eventData)),n&&(i=n.componentType,o=n.componentIndex,"markLine"!==i&&"markPoint"!==i&&"markArea"!==i||(i="series",o=n.seriesIndex),r=(a=i&&null!=o&&s.getComponent(i,o))&&this["series"===a.mainType?"_chartsMap":"_componentsMap"][a.__viewId],T&&(u||a&&r||console.warn("model or view can not be found by params")),n.event=t,n.type=h,this._ecEventProcessor.eventInfo={targetEl:l,packedEvent:n,model:a,view:r},this.trigger(h,n))},this)},this),Mc(td,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},Rc.isDisposed=function(){return this._disposed},Rc.clear=function(){this.setOption({series:[]},!0)},Rc.dispose=function(){var e,n;this._disposed?T&&console.warn("Instance "+this.id+" has been disposed"):(this._disposed=!0,wo(this.getDom(),cd,""),e=this._api,n=this._model,Mc(this._componentsViews,function(t){t.dispose(n,e)}),Mc(this._chartsViews,function(t){t.dispose(n,e)}),this._zr.dispose(),delete sd[this.id])},b(Ec,Dt),Jc.prototype={constructor:Jc,normalizeQuery:function(t){var e,s,l,u={},h={},c={};return N(t)?(e=Tc(t),u.mainType=e.main||null,u.subType=e.sub||null):(s=["Index","Name","Id"],l={name:1,dataIndex:1,dataType:1},z(t,function(t,e){for(var n=!1,i=0;iR[1]&&(R[1]=E)}o.pure||(A=u[I],M&&null==A&&(null!=M.name?u[I]=A=M.name:null==n||(D=a[T=r[n]][k])&&(A=D[P],(C=l[T].ordinalMeta)&&C.categories.length&&(A=C.categories[A]))),null==(L=null==M?null:M.id)&&null!=A&&(d[A]=d[A]||0,0=this._rawCount||t<0)return-1;var e=this._indices,n=e[t];if(null!=n&&nt))return a;o=a-1}}return-1},Zd.indicesOfNearest=function(t,e,n){var i=[];if(!this._storage[t])return i;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,a=-1,r=0,s=this.count();rt[I][1])&&(M=!1)}M&&(a[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return o},Zd.downSample=function(t,e,n,i){for(var o=$d(this,[t]),a=o._storage,r=[],s=Math.floor(1/e),l=a[t],u=this.count(),h=this._chunkSize,c=o._rawExtent[t],d=new(Vd(this))(u),p=0,f=0;fc[1]&&(c[1]=x),d[p++]=_}return o._count=p,o._indices=d,o.getRawIndex=jd,o},Zd.getItemModel=function(t){var e=this.hostModel;return new Cs(this.getRawDataItem(t),e,e&&e.ecModel)},Zd.diff=function(e){var n=this;return new Cd(e?e.getIndices():[],this.getIndices(),function(t){return Yd(e,t)},function(t){return Yd(n,t)})},Zd.getVisual=function(t){var e=this._visual;return e&&e[t]},Zd.setVisual=function(t,e){if(Od(t))for(var n in t)t.hasOwnProperty(n)&&this.setVisual(n,t[n]);else this._visual=this._visual||{},this._visual[t]=e},Zd.setLayout=function(t,e){if(Od(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},Zd.getLayout=function(t){return this._layout[t]},Zd.getItemLayout=function(t){return this._itemLayouts[t]},Zd.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?k(this._itemLayouts[t]||{},e):e},Zd.clearItemLayouts=function(){this._itemLayouts.length=0},Zd.getItemVisual=function(t,e,n){var i=this._itemVisuals[t],o=i&&i[e];return null!=o||n?o:this.getVisual(e)},Zd.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{},o=this.hasItemVisual;if(this._itemVisuals[t]=i,Od(e))for(var a in e)e.hasOwnProperty(a)&&(i[a]=e[a],o[a]=!0);else i[e]=n,o[e]=!0},Zd.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Qd(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function tp(t,e,n){jl.isInstance(e)||(e=jl.seriesDataToSource(e)),n=n||{},t=(t||[]).slice();for(var i,o,a,r,s,l=(n.dimsDef||[]).slice(),u=tt(n.encodeDef),h=tt(),c=tt(),d=[],p=(i=e,o=t,a=l,r=n.dimCount,s=Math.max(i.dimensionsDetectCount||1,o.length,a.length,r||0),z(o,function(t){var e=t.dimsDef;e&&(s=Math.max(s,e.length))}),s),f=0;f=e[0]&&t<=e[1]},sp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},sp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},sp.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},sp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},sp.prototype.getExtent=function(){return this._extent.slice()},sp.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},sp.prototype.isBlank=function(){return this._isBlank},sp.prototype.setBlank=function(t){this._isBlank=t},sp.prototype.getLabel=null,Ao(sp),ko(sp,{registerWhenExtend:!0}),lp.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&L(n,cp);return new lp({categories:i,needCollect:!i,deduplication:!1!==e.dedplication})};var up=lp.prototype;function hp(t){return t._map||(t._map=tt(t.categories))}function cp(t){return B(t)&&null!=t.value?t.value:t+""}up.getOrdinal=function(t){return hp(this).get(t)},up.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=hp(this);return null==(n=i.get(t))&&(e?(n=this.categories.length,this.categories[n]=t,i.set(t,n)):n=NaN),n};var dp=sp.prototype,pp=sp.extend({type:"ordinal",init:function(t,e){t&&!C(t)||(t=new lp({categories:t})),this._ordinalMeta=t,this._extent=e||[0,t.categories.length-1]},parse:function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},contain:function(t){return t=this.parse(t),dp.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return dp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(dp.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push(n),n++;return t},getLabel:function(t){if(!this.isBlank())return this._ordinalMeta.categories[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getApproximateExtent(e))},getOrdinalMeta:function(){return this._ordinalMeta},niceTicks:nt,niceExtent:nt});pp.create=function(){return new pp};var fp=zs;function gp(t){return Gs(t)+2}function mp(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function vp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),mp(t,0,e),mp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var yp=zs,xp=sp.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),xp.prototype.setExtent.call(this,e[0],e[1])},getInterval:function(){return this._interval},setInterval:function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=gp(t)},getTicks:function(){return function(t,e,n,i){var o=[];if(!t)return o;e[0](o.length?o[o.length-1]:n[1])&&o.push(e[1]),o}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var n=e&&e.precision;return null==n?n=Gs(t)||0:"auto"===n&&(n=this._intervalPrecision),tl(t=yp(t,n,!0))},niceTicks:function(t,e,n){t=t||5;var i,o=this._extent,a=o[1]-o[0];isFinite(a)&&(a<0&&o.reverse(),i=function(t,e,n,i){var o={},a=t[1]-t[0],r=o.interval=Ks(a/e,!0);null!=n&&ri[1]?(n=i[1],i[0]):(n=i[0],i[1]),a=e.toGlobalCoord(e.dataToCoord(0));return a>>1;t[o][1]>1^-(1&s),l=(l=t.charCodeAt(r+1)-64)>>1^-(1&l),o=s+=o,a=l+=a;i.push([s/n,l/n])}return i}yf.prototype={constructor:yf,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,n=[e,e],i=[-e,-e],o=[],a=[],r=this.geometries,s=0;sr[1];u(e[0].coord,r[0])&&(i?e[0].coord=r[0]:e.shift());i&&u(r[0],e[0].coord)&&e.unshift({coord:r[0]});u(r[1],a.coord)&&(i?a.coord=r[1]:e.pop());i&&u(a.coord,r[1])&&e.push({coord:r[1]});function u(t,e){return l?ei[0]&&(i[0]=a[0]),a[1]>i[1]&&(i[1]=a[1])}return{min:e?n:i,max:e?i:n}}var fg=Ua.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:hr(Ua.prototype.brush),buildPath:function(t,e){var n=e.points,i=0,o=n.length,a=pg(n,e.smoothConstraint);if(e.connectNulls){for(;0i[0]?1:-1,i[0]+=n*e,i[1]-=n*e),i}function xg(t,e,n,i){return("polar"===t.type?function(t,e,n,i){var o=t.getAngleAxis(),a=t.getRadiusAxis().getExtent().slice();a[0]>a[1]&&a.reverse();var r=o.getExtent(),s=Math.PI/180;n&&(a[0]-=.5,a[1]+=.5);var l=new pr({shape:{cx:zs(t.cx,1),cy:zs(t.cy,1),r0:zs(a[0],1),r:zs(a[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:o.inverse}});return e&&(l.shape.endAngle=-r[0]*s,gs(l,{shape:{endAngle:-r[1]*s}},i)),l}:function(t,e,n,i){var o,a,r=yg(t.getAxis("x")),s=yg(t.getAxis("y")),l=t.getBaseAxis().isHorizontal(),u=Math.min(r[0],r[1]),h=Math.min(s[0],s[1]),c=Math.max(r[0],r[1])-u,d=Math.max(s[0],s[1])-h;n?(u-=.5,c+=.5,h-=.5,d+=.5):(o=i.get("lineStyle.width")||2,a=i.get("clipOverflow")?o/2:Math.max(c,d),l?(h-=a,d+=2*a):(u-=a,c+=2*a));var p=new xr({shape:{x:u,y:h,width:c,height:d}});return e&&(p.shape[l?"width":"height"]=0,gs(p,{shape:{width:c,height:d}},i)),p})(t,e,n,i)}function _g(t,e,n){for(var i=e.getBaseAxis(),o="x"===i.dim||"radius"===i.dim?0:1,a=[],r=0;ri)return!1;return!0}(a,e))){var r=e.mapDimension(a.dim),s={};return z(a.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}yh.extend({type:"line",init:function(){var t=new cn,e=new $f;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,n){var i=t.coordinateSystem,o=this.group,a=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=a.mapArray(a.getItemLayout),u="polar"===i.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,n){if(!n.valueDim)return[];for(var i=[],o=0,a=e.count();oh[c-1].coord&&(h.reverse(),d.reverse());var p=h[0].coord-10,f=h[c-1].coord+10,g=f-p;if(g<.001)return"transparent";z(h,function(t){t.offset=(t.coord-p)/g}),h.push({offset:c?h[c-1].offset:.5,color:d[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:d[0]||"transparent"});var m=new Tr(0,0,0,0,h,!0);return m[a]=p,m[a+"2"]=f,m}T&&console.warn("Visual map on line style only support x or y dimension.")}else T&&console.warn("Visual map on line style is only supported on cartesian2d.")}(a,i)||a.getVisual("color");d.useStyle(O(r.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M,I,A=t.get("smooth"),A=vg(t.get("smooth"));d.setShape({smooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p&&(M=a.getCalculationInfo("stackedOnSeries"),I=0,p.useStyle(O(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),M&&(I=vg(M.get("smooth"))),p.setShape({smooth:A,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})),this._data=a,this._coordSys=i,this._stackedOnPoints=y,this._points=l,this._step=b,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,n,i){var o=t.getData(),a=mo(o,i);if(!(a instanceof Array)&&null!=a&&0<=a){var r=o.getItemGraphicEl(a);if(!r){var s=o.getItemLayout(a);if(!s)return;(r=new Bf(o,a)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,o.setItemGraphicEl(a,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else yh.prototype.highlight.call(this,t,e,n,i)},downplay:function(t,e,n,i){var o,a=t.getData(),r=mo(a,i);null!=r&&0<=r?(o=a.getItemGraphicEl(r))&&(o.__temp?(a.setItemGraphicEl(r,null),this.group.remove(o)):o.downplay()):yh.prototype.downplay.call(this,t,e,n,i)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new fg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new gg({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(n),this._polygon=n},_updateAnimation:function(t,e,n,i,o,a){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,o,a,r,s){for(var l,u,h=(l=t,u=[],e.diff(l).add(function(t){u.push({cmd:"+",idx:t})}).update(function(t,e){u.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){u.push({cmd:"-",idx:t})}).execute(),u),c=[],d=[],p=[],f=[],g=[],m=[],v=[],y=ng(o,e,r),x=ng(a,t,s),_=0;_e&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},w(Cg,Pf);var Lg={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:"#333",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:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}}},kg={};kg.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Lg),kg.valueAxis=m({boundaryGap:[0,0],splitNumber:5},Lg),kg.timeAxis=O({scale:!0,min:"dataMin",max:"dataMax"},kg.valueAxis),kg.logAxis=O({scale:!0,logBase:10},kg.valueAxis);function Pg(a,t,r,e){z(Ng,function(o){t.extend({type:a+"Axis."+o,mergeDefaultAndTheme:function(t,e){var n=this.layoutMode,i=n?Ml(t):{};m(t,e.getTheme().get(o+"Axis")),m(t,this.getDefaultOption()),t.type=r(a,t),n&&Sl(t,i,n)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=lp.createByAxisModel(this))},getCategories:function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:g([{},kg[o+"Axis"],e],!0)})}),Ll.registerSubTypeDefaulter(a+"Axis",R(r,a))}var Ng=["value","category","time","log"],Og=Ll.extend({type:"cartesian2dAxis",axis:null,init:function(){Og.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Og.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Og.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Eg(t,e){return e.type||(e.data?"category":"value")}m(Og.prototype,nf);var Rg={offset:0};function zg(t,e){return t.getCoordSysModel()===e}function Bg(t,e,n){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,n),this.model=t}Pg("x",Og,Eg,Rg),Pg("y",Og,Eg,Rg),Ll.extend({type:"grid",dependencies:["xAxis","yAxis"],layoutMode:"box",coordinateSystem:null,defaultOption:{show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:60,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"}});var Vg=Bg.prototype;function Gg(t,e,n,i){n.getAxesOnZeroOf=function(){return o?[o]:[]};var o,a=t[e],r=n.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)Fg(a[l])&&(o=a[l]);else for(var u in a)if(a.hasOwnProperty(u)&&Fg(a[u])&&!i[h(a[u])]){o=a[u];break}o&&(i[h(o)]=!0)}function h(t){return t.dim+"_"+t.index}}function Fg(t){return t&&"category"!==t.type&&"time"!==t.type&&(e=t.scale.getExtent(),n=e[0],i=e[1],!(0o[1]?-1:1,r=["start"===t?o[0]-a*i:"end"===t?o[1]+a*i:(o[0]+o[1])/2,Qg(t)?x.labelOffset+e*i:0],null!=(l=_.get("nameRotate"))&&(l=l*Ug/180),Qg(t)?s=qg(x.rotation,null!=l?l:x.rotation,e):(s=function(t,e,n,i){var o,a,r=Zs(n-t.rotation),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;o=Us(r-Ug/2)?(a=l?"bottom":"top","center"):Us(r-1.5*Ug)?(a=l?"top":"bottom","center"):(a="middle",r<1.5*Ug&&Ug/2h[1]&&h.reverse(),(null==l||l>h[1])&&(l=h[1]),l=n.r0}}});function Rm(o,t,e,n,i,a,r){function s(t,e){for(var n=t;0<=n&&(o[n].y-=e,!(0o[n-1].y+o[n-1].height));n--);}function l(t,e,n,i,o,a){for(var r,s,l,u,h=e?Number.MAX_VALUE:0,c=0,d=t.length;co[i].y+o[i].height)return s(i,n/2);s(e-1,n/2)}(f,c,-u),h=o[f].y+o[f].height;r-h<0&&s(c-1,h-r);for(f=0;f=e?p.push(o[f]):d.push(o[f]);l(d,!1,t,e,n,i),l(p,!0,t,e,n,i)}function zm(M,I,t,e){var A,T,D=M.getData(),C=[],L=!1;D.each(function(t){var e=D.getItemLayout(t),n=D.getItemModel(t),i=n.getModel("label"),o=i.get("position")||n.get("emphasis.label.position"),a=n.getModel("labelLine"),r=a.get("length"),s=a.get("length2"),l=(e.startAngle+e.endAngle)/2,u=Math.cos(l),h=Math.sin(l);A=e.cx,T=e.cy;var c,d,p,f,g,m,v,y,x="inside"===o||"inner"===o,_="center"===o?(m=e.cx,v=e.cy,"center"):(m=(c=(x?(e.r+e.r0)/2*u:e.r*u)+A)+3*u,v=(d=(x?(e.r+e.r0)/2*h:e.r*h)+T)+3*h,x||(m=(g=(p=c+u*(r+I-e.r))+(u<0?-1:1)*s)+(u<0?-5:5),y=[[c,d],[p,v=f=d+h*(r+I-e.r)],[g,f]]),x?"center":0n[0]&&isFinite(o)&&isFinite(n[0]););else{var h=r.getTicks().length-1;p"+L(t,function(t,e){var n=o.get(o.mapDimension(t.dim),i);return al(t.name+" : "+n)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});Td({type:"radar",render:function(l){var e=l.coordinateSystem,v=this.group,y=l.getData(),s=this._data;function u(t,e){var n=t.getItemVisual(e,"symbol")||"circle",i=t.getItemVisual(e,"color");if("none"!==n){var o,a=(C(o=t.getItemVisual(e,"symbolSize"))||(o=[+o,+o]),o),r=df(n,-1,-1,2,2,i);return r.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),r}}function h(t,e,n,i,o,a){n.removeAll();for(var r=0;r"+al(i+" : "+n)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},defaultOption:{zlevel:0,z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:.75,showLegendSymbol:!0,dataRangeHoverLink:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,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)"}}}});b(_v,Dm);var wv="\0_ec_interaction_mutex";function bv(t,e){return Sv(t)[e]}function Sv(t){return t[wv]||(t[wv]={})}function Mv(n){this.pointerChecker,this._zr=n,this._opt={};var t=P,i=t(Iv,this),o=t(Av,this),a=t(Tv,this),r=t(Dv,this),s=t(Cv,this);Dt.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=O(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(n.on("mousedown",i),n.on("mousemove",o),n.on("mouseup",a)),!0!==t&&"scale"!==t&&"zoom"!==t||(n.on("mousewheel",r),n.on("pinch",s))},this.disable=function(){n.off("mousedown",i),n.off("mousemove",o),n.off("mouseup",a),n.off("mousewheel",r),n.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function Iv(t){var e,n;zt(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))}function Av(t){var e,n,i,o,a,r;!zt(t)&&Pv("moveOnMouseMove",t,this._opt)&&this._dragging&&"pinch"!==t.gestureEvent&&!bv(this._zr,"globalPan")&&(e=t.offsetX,n=t.offsetY,a=e-(i=this._x),r=n-(o=this._y),this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&Rt(t.event),kv(this,"pan","moveOnMouseMove",t,{dx:a,dy:r,oldX:i,oldY:o,newX:e,newY:n}))}function Tv(t){zt(t)||(this._dragging=!1)}function Dv(t){var e,n,i=Pv("zoomOnMouseWheel",t,this._opt),o=Pv("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,r=Math.abs(a),s=t.offsetX,l=t.offsetY;0!==a&&(i||o)&&(i&&(e=3m.x)||(y-=Math.PI)),w=x?"left":"right",S.setStyle({textPosition:w,textRotation:-y,textOrigin:"center",verticalAlign:"middle"})),s.parentNode&&s.parentNode!==u&&(fs(b=(b=n.__edge)||(n.__edge=new Mr({shape:cy(a,p,p),style:O({opacity:0,strokeNoScale:!0},a.lineStyle)})),{shape:cy(a,d,f),style:{opacity:1}},o),i.add(b))}function hy(t,e,n,i,o,a){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),a=ly(s,u,a),h=s.parentNode!==l&&s.parentNode||s;null==(r=h.getLayout());)h=h.parentNode!==l&&h.parentNode||h;fs(n,{position:[r.x+1,r.y+1]},o,function(){i.remove(n),t.setItemGraphicEl(e,null)}),n.fadeOut(null,{keepLabel:!0});var c=n.__edge;c&&fs(c,{shape:cy(a,r,r),style:{opacity:0}},o,function(){i.remove(c)})}function cy(t,e,n){var i,o,a,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=n.x,h=n.y,"LR"!==c&&"RL"!==c||(i=s+(l-s)*t.curvature,o=u,a=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(i=s,o=u+(h-u)*t.curvature,a=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:i,cpy1:o,cpx2:a,cpy2:r};s=e.rawX,u=e.rawY,l=n.rawX,h=n.rawY;var d=iy(s,u),p=iy(s,u+(h-u)*t.curvature),f=iy(l,h+(u-h)*t.curvature),g=iy(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}function dy(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var o=n.children;if(o.length)for(var a=o.length-1;0<=a;a--)i.push(o[a])}}$v.prototype={constructor:$v,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,n){"function"==typeof t&&(n=e,e=t,t=null),N(t=t||{})&&(t={order:t});var i,o=t.order||"preorder",a=this[t.attr||"children"];"preorder"===o&&(i=e.call(n,this));for(var r=0;!i&&re&&(e=i.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;ea&&(a=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:a;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<=r}),o.data},getOrient:function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},formatTooltip:function(t){for(var e=this.getData().tree,n=e.root.children[0],i=e.getNodeByDataIndex(t),o=i.getValue(),a=i.name;i&&i!==n;)a=i.parentNode.name+"."+a,i=i.parentNode;return al(a+(isNaN(o)||null==o?"":" : "+o))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",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",borderColor:"#c23531",borderWidth:1.5},label:{show:!0,color:"#555"},leaves:{label:{show:!0}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}}),Td({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new cn,this._controller=new Mv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(i,t,n){var o=i.getData(),e=i.layoutInfo,a=this._mainGroup,r=i.get("layout");"radial"===r?a.attr("position",[e.x+e.width/2,e.y+e.height/2]):a.attr("position",[e.x,e.y]),this._updateViewCoordSys(i),this._updateController(i,t,n);var s=this._data,l={expandAndCollapse:i.get("expandAndCollapse"),layout:r,orient:i.getOrient(),curvature:i.get("lineStyle.curveness"),symbolRotate:i.get("symbolRotate"),symbolOffset:i.get("symbolOffset"),hoverAnimation:i.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};o.diff(s).add(function(t){sy(o,t)&&uy(o,t,null,a,i,l)}).update(function(t,e){var n=s.getItemGraphicEl(e);sy(o,t)?uy(o,t,n,a,i,l):n&&hy(s,e,n,a,i,l)}).remove(function(t){var e=s.getItemGraphicEl(t);e&&hy(s,t,e,a,i,l)}).execute(),this._nodeScaleRatio=i.get("nodeScaleRatio"),this._updateNodeAndLinkScale(i),!0===l.expandAndCollapse&&o.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){n.dispatchAction({type:"treeExpandAndCollapse",seriesId:i.id,dataIndex:e})})}),this._data=o},_updateViewCoordSys:function(t){var n=t.getData(),i=[];n.each(function(t){var e=n.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||i.push([+e.x,+e.y])});var e=[],o=[];ha(i,e,o),o[0]-e[0]==0&&(o[0]+=1,--e[0]),o[1]-e[1]==0&&(o[1]+=1,--e[1]);var a=t.coordinateSystem=new Jm;a.zoomLimit=t.get("scaleLimit"),a.setBoundingRect(e[0],e[1],o[0]-e[0],o[1]-e[1]),a.setCenter(t.get("center")),a.setZoom(t.get("zoom")),this.group.attr({position:a.position,scale:a.scale}),this._viewCoordSys=a},_updateController:function(o,t,a){var e=this._controller,n=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,n){var i=r.getBoundingRect();return i.applyTransform(r.transform),i.contain(e,n)&&!Rv(t,a,o)}),e.enable(o.get("roam")),n.zoomLimit=o.get("scaleLimit"),n.zoom=o.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){Nv(n,t.dx,t.dy),a.dispatchAction({seriesId:o.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){Ov(n,t.scale,t.originX,t.originY),a.dispatchAction({seriesId:o.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(o)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),n=this._getNodeGlobalScale(t),i=[n,n];e.eachItemGraphicEl(function(t,e){t.attr("scale",i)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var n=this._nodeScaleRatio,i=e.scale,o=i&&i[0]||1;return((e.getZoom()-1)*n+1)/o},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),yd({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=i.dataIndex,n=t.getData().tree.getNodeByDataIndex(e);n.isExpand=!n.isExpand})}),yd({type:"treeRoam",event:"treeRoam",update:"none"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=Gv(t.coordinateSystem,n);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function py(t,e,n){if(t&&0<=M(e,t.type)){var i=n.getData().tree.root,o=t.targetNode;if("string"==typeof o&&(o=i.getNodeById(o)),o&&i.contains(o))return{node:o};var a=t.targetNodeId;if(null!=a&&(o=i.getNodeById(a)))return{node:o}}}function fy(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function gy(t,e){return 0<=M(fy(t),e)}function my(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}wd(bg("tree","circle")),_d(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var n=function(t,e){return wl(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),o=0,a=0,r=null;r="radial"===i?(o=2*Math.PI,a=Math.min(n.height,n.width)/2,ny(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(o=n.width,a=n.height,ny());var s=t.getData().tree.root,l=s.children[0];{var u,h,c,d,p,f,g,m,v,y;l&&(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 a=n[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},i.push(a)}}(s),function(t,e,n){for(var i,o=[t],a=[];i=o.pop();)if(a.push(i),i.isExpand){var r=i.children;if(r.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}),d=u===h?1:r(u,h)/2,p=d-u.getLayout().x,v=m=g=f=0,"radial"===i?(f=o/(h.getLayout().x+d+p),g=a/(c.depth-1||1),dy(l,function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=iy(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)})):"RL"===(y=t.getOrient())||"LR"===y?(g=a/(h.getLayout().x+d+p),f=o/(c.depth-1||1),dy(l,function(t){v=(t.getLayout().x+p)*g,m="LR"===y?(t.depth-1)*f:o-(t.depth-1)*f,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(f=o/(h.getLayout().x+d+p),g=a/(c.depth-1||1),dy(l,function(t){m=(t.getLayout().x+p)*f,v="TB"===y?(t.depth-1)*g:a-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))}}(t,e)})}),ah.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,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)",borderColor:"rgba(255,255,255,0.7)",borderWidth:1,shadowColor:"rgba(150,150,150,1)",shadowBlur:3,shadowOffsetX:0,shadowOffsetY:0,textStyle:{color:"#fff"}},emphasis:{textStyle:{}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0},upperLabel:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},getInitialData:function(t,e){var n={name:t.name,children:t.data};!function n(t){var i=0;z(t.children,function(t){n(t);var e=t.value;C(e)&&(e=e[0]),i+=e});var e=t.value;C(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=i);e<0&&(e=0);C(t.value)?t.value[0]=e:t.value=e}(n);var i=t.levels||[],i=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;{z(t=t||[],function(t){var e=new Cs(t),n=e.get("color");(e.get("itemStyle.color")||n&&"none"!==n)&&(i=!0)}),i||((t[0]||(t[0]={})).color=n.slice())}return t}(i,e),o={};return o.levels=i,Jv.createTree(n,this,o).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=C(n)?tl(n[0]):tl(n);return al(e.getName(t)+": "+i)},getDataParams:function(t){var e=ah.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=my(n,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},k(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tt(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},getViewRoot:function(){return this._viewRoot},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)}});var vy=5;function yy(t){this.group=new cn,t.add(this.group)}yy.prototype={constructor:yy,render:function(t,e,n,i){var o,a,r,s=t.getModel("breadcrumb"),l=this.group;l.removeAll(),s.get("show")&&n&&(a=(o=s.getModel("itemStyle")).getModel("textStyle"),r={pos:{left:s.get("left"),right:s.get("right"),top:s.get("top"),bottom:s.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:s.get("emptyItemWidth"),totalWidth:0,renderList:[]},this._prepare(n,r,a),this._renderContent(t,r,o,a,i),bl(l,r.pos,r.box))},_prepare:function(t,e,n){for(var i=t;i;i=i.parentNode){var o=i.getModel().get("name"),a=n.getTextRect(o),r=Math.max(a.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:i,text:o,width:r})}},_renderContent:function(t,e,n,i,o){for(var a,r,s,l,u,h,c,d,p,f,g,m,v,y,x,_,w,b=0,S=e.emptyItemWidth,M=t.get("breadcrumb.height"),I=(a=e.pos,r=e.box,l=r.width,u=r.height,h=Rs(a.x,l),c=Rs(a.y,u),d=Rs(a.x2,l),p=Rs(a.y2,u),(isNaN(h)||isNaN(parseFloat(a.x)))&&(h=0),(isNaN(d)||isNaN(parseFloat(a.x2)))&&(d=l),(isNaN(c)||isNaN(parseFloat(a.y)))&&(c=0),(isNaN(p)||isNaN(parseFloat(a.y2)))&&(p=u),s=nl(s||0),{width:Math.max(d-h-s[1]-s[3],0),height:Math.max(p-c-s[0]-s[2],0)}),A=e.totalWidth,T=e.renderList,D=T.length-1;0<=D;D--){var C=T[D],L=C.node,k=C.width,P=C.text;I.width=r.length||t===r[t.depth])&&(n=ax(l,c,t,e,y,s),i(t,n,o,a,r,s))})):(f=ex(c),t.setVisual("color",f))}}(n,{},L(e.levelModels,function(t){return t?t.get(Jy):null}),i,t.getViewRoot().getAncestors(),t)}};function tx(n,i,o,a){var r=k({},i);return z(["color","colorAlpha","colorSaturation"],function(t){var e=n.get(t,!0);null==e&&o&&(e=o[t]),null==e&&(e=i[t]),null==e&&(e=a.get(t)),null!=e&&(r[t]=e)}),r}function ex(t){var e=nx(t,"color");if(e){var n=nx(t,"colorAlpha"),i=nx(t,"colorSaturation");return i&&(e=Pe(e,null,null,i)),n&&(e=Ne(e,n)),e}}function nx(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ix(t,e,n,i,o,a){if(a&&a.length){var r=ox(e,"color")||null!=o.color&&"none"!==o.color&&(ox(e,"colorAlpha")||ox(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=n.dataExtent.slice();null!=s&&su[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:r.name,dataExtent:u,visual:r.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new By(c);return d.__drColorMappingBy=h,d}}}function ox(t,e){var n=t.get(e);return $y(n)&&n.length?{name:e,range:n}:null}function ax(t,e,n,i,o,a){var r,s,l,u=k({},e);return o&&(l="index"===(s="color"===(r=o.type)&&o.__drColorMappingBy)?i:"id"===s?a.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension")),u[r]=o.mapValueToVisual(l)),u}var rx=Math.max,sx=Math.min,lx=H,ux=z,hx=["itemStyle","borderWidth"],cx=["itemStyle","gapWidth"],dx=["upperLabel","show"],px=["upperLabel","height"],fx={seriesType:"treemap",reset:function(t,e,n,i){var o,a,r,s,l=n.getWidth(),u=n.getHeight(),h=t.option,c=wl(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),d=h.size||[],p=Rs(lx(c.width,d[0]),l),f=Rs(lx(c.height,d[1]),u),g=i&&i.type,m=py(i,["treemapZoomToNode","treemapRootToNode"],t),v="treemapRender"===g||"treemapMove"===g?i.rootRect:null,y=t.getViewRoot(),x=fy(y);"treemapMove"!==g&&(o="treemapZoomToNode"===g?function(t,e,n,i,o){var a,r=(e||{}).node,s=[i,o];if(!r||r===n)return s;var l=i*o,u=l*t.option.zoomToNodeRatio;for(;a=r.parentNode;){for(var h=0,c=a.children,d=0,p=c.length;ds[1]&&(s[1]=e)})):s=[NaN,NaN]}return{sum:i,dataExtent:s}}(e,r,s);if(0===c.sum)return t.viewChildren=[];if(c.sum=function(t,e,n,i,o){if(!i)return n;for(var a=t.get("visibleMin"),r=o.length,s=r,l=r-1;0<=l;l--){var u=o["asc"===i?r-l-1:l].getValue();u/n*en[l[r]])&&(h=n[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var p,f,g,m,v=n.get("coordinateSystem");"cartesian2d"===v||"polar"===v?m=rp(t,n):(M(f=(p=su.get(v))&&"view"!==p.type&&p.dimensions||[],"value")<0&&f.concat(["value"]),g=np(t,{coordDimensions:f}),(m=new Hd(g,n)).initData(t));var y=new Hd(["value"],n);return y.initData(l,s),o&&o(m,y),Zv({mainData:m,struct:a,structAttr:"graph",datas:{node:m,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var Tx=Ad({type:"series.graph",init:function(t){Tx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){Tx.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){Tx.superApply(this,"mergeDefaultAndTheme",arguments),lo(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],n=t.data||t.nodes||[],l=this;if(n&&e)return Ax(n,e,this,!0,function(t,e){t.wrapMethod("getItemModel",function(t){var e=l._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t});var n=l.getModel("edgeLabel"),i=new Cs({label:n.option},n.parentModel,s),o=l.getModel("emphasis.edgeLabel"),a=new Cs({emphasis:{label:o.option}},o.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?i:t&&"emphasis"===t[0]&&"label"===t[1]?a:this.parentModel}e.wrapMethod("getItemModel",function(t){return t.customizeGetParent(r),t})}).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(t,e,n){if("edge"!==n)return Tx.superApply(this,"formatTooltip",arguments);var i=this.getData(),o=this.getDataParams(t,n),a=i.graph.getEdgeByIndex(t),r=i.getName(a.node1.dataIndex),s=i.getName(a.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=al(l.join(" > ")),o.value&&(l+=" : "+al(o.value)),l},_updateCategoriesData:function(){var t=L(this.option.categories||[],function(t){return null!=t.value?t:k({value:0},t)}),e=new Hd(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray(function(t){return e.getItemModel(t,!0)})},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t},isAnimationEnabled:function(){return Tx.superCall(this,"isAnimationEnabled")&&!("force"===this.get("layout")&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,hoverAnimation:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle"},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{label:{show:!0}}}}),Dx=_r.prototype,Cx=Mr.prototype;function Lx(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var kx=Er({type:"ec-line",style:{stroke:"#000",fill:null},shape:{x1:0,y1:0,x2:0,y2:0,percent:1,cpx1:null,cpy1:null},buildPath:function(t,e){(Lx(e)?Dx:Cx).buildPath(t,e)},pointAt:function(t){return Lx(this.shape)?Dx.pointAt.call(this,t):Cx.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,n=Lx(e)?[e.x2-e.x1,e.y2-e.y1]:Cx.tangentAt.call(this,t);return gt(n,n)}}),Px=["fromSymbol","toSymbol"];function Nx(t){return"_"+t+"Type"}function Ox(t,e,n){var i=e.getItemVisual(n,"color"),o=e.getItemVisual(n,t),a=e.getItemVisual(n,t+"Size");if(o&&"none"!==o){C(a)||(a=[a,a]);var r=df(o,-a[0]/2,-a[1]/2,a[0],a[1],i);return r.name=t,r}}function Ex(t,e){var n=e[0],i=e[1],o=e[2];t.x1=n[0],t.y1=n[1],t.x2=i[0],t.y2=i[1],t.percent=1,o?(t.cpx1=o[0],t.cpy1=o[1]):(t.cpx1=NaN,t.cpy1=NaN)}function Rx(t,e,n){cn.call(this),this._createLine(t,e,n)}var zx=Rx.prototype;function Bx(t){this._ctor=t||Rx,this.group=new cn}zx.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),n=this.childOfName("label");if(t||e||!n.ignore){for(var i=1,o=this.parent;o;)o.scale&&(i/=o.scale[0]),o=o.parent;var a,r,s,l,u,h,c,d,p,f,g,m,v,y=this.childOfName("line");(this.__dirty||y.__dirty)&&(a=y.shape.percent,r=y.pointAt(0),gt(l=ct([],s=y.pointAt(a),r),l),t&&(t.attr("position",r),f=y.tangentAt(0),t.attr("rotation",Math.PI/2-Math.atan2(f[1],f[0])),t.attr("scale",[i*a,i*a])),e&&(e.attr("position",s),f=y.tangentAt(1),e.attr("rotation",-Math.PI/2-Math.atan2(f[1],f[0])),e.attr("scale",[i*a,i*a])),n.ignore||(n.attr("position",s),d=5*i,"end"===n.__position?(u=[l[0]*d+s[0],l[1]*d+s[1]],h=.8=t&&(0===e?0:i[e-1][0])a&&(e[1-i]=e[i]+h.sign*a),e}function m_(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:0o*(1-h[0])?(l="jump",r=s-o*(1-h[2])):0<=(r=s-o*h[1])&&(r=s-o*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?g_(r,i,a,"all"):l="none"):(o=i[1]-i[0],(i=[__(0,a[1]*s/o-o/2)])[1]=x_(a[1],i[0]+o),i[0]=i[1]-o),{axisExpandWindow:i,behavior:l}}},su.register("parallel",{create:function(i,o){var a=[];return i.eachComponent("parallel",function(t,e){var n=new I_(t,i,o);n.name="parallel_"+e,n.resize(t,o),(t.coordinateSystem=n).model=t,a.push(n)}),i.eachSeries(function(t){var e;"parallel"===t.get("coordinateSystem")&&(e=i.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0],t.coordinateSystem=e.coordinateSystem)}),a}});var T_=Ll.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Po([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=D(t);if(e)for(var n=e.length-1;0<=n;n--)Bs(e[n])},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=h.length)return t;var o=[],a=e[i++];return z(t,function(t,e){o.push({key:e,values:n(t,i)})}),a?o.sort(function(t,e){return a(t.key,e.key)}):o}(function n(t,i){if(i>=h.length)return t;for(var e=-1,o=t.length,a=h[i++],r={},s={};++e "))},preventIncremental:function(){return!!this.get("effect.show")},getProgressive:function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},getProgressiveThreshold:function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},defaultOption:{coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!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,label:{show:!1,position:"end"},lineStyle:{opacity:.5}}});function Sb(t,e,n){cn.call(this),this.add(this.createLine(t,e,n)),this._updateEffectSymbol(t,e)}var Mb=Sb.prototype;function Ib(t,e,n){cn.call(this),this._createPolyline(t,e,n)}Mb.createLine=function(t,e,n){return new Rx(t,e,n)},Mb._updateEffectSymbol=function(t,e){var n=t.getItemModel(e).getModel("effect"),i=n.get("symbolSize"),o=n.get("symbol");C(i)||(i=[i,i]);var a=n.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==o&&(this.remove(r),(r=df(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.attr("scale",i),r.setColor(a),r.attr("scale",i),this._symbolType=o,this._updateEffectAnimation(t,n,e))},Mb._updateEffectAnimation=function(e,t,n){var i,o,a,r,s,l,u,h,c,d=this.childAt(1);d&&(i=this,o=e.getItemLayout(n),a=1e3*t.get("period"),r=t.get("loop"),s=t.get("constantSpeed"),u="function"==typeof(l=H(t.get("delay"),function(t){return t/e.count()*a/3})),d.ignore=!0,this.updateAnimationPoints(d,o),0e);r++);r=Math.min(r-1,o-2)}_t(t.position,n[r],n[r+1],(e-i[r])/(i[r+1]-i[r]));var s=n[r+1][0]-n[r][0],l=n[r+1][1]-n[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(Tb,Sb);var Cb=Er({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var o=0;o=v[0]&&t<=v[1]}):(h=T,c=e.getPieceList(),d=e.option.selected,p=h[1]-h[0],f=(c=L(c,function(t){return{interval:[(t.interval[0]-h[0])/p,(t.interval[1]-h[0])/p]}})).length,g=0,function(t){for(var e=g;e=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},pointToData:function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},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}}).dimensions});var lS=["axisLine","axisTickLabel","axisName"],uS="splitLine",hS=sm.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,n,i){var o=this.group;o.removeAll();var a=sS(t),r=new jg(t,a);z(lS,r.add,r),o.add(r.getGroup()),t.get(uS+".show")&&this["_"+uS](t),hS.superCall(this,"render",t,e,n,i)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){for(var n=t.getModel("splitLine"),i=n.getModel("lineStyle"),o=i.get("width"),a=(a=i.get("color"))instanceof Array?a:[a],r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:n}),c=[],d=[],p=0;pr)return!0;if(a){var s=om(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(){},createPointerEl:function(t,e){var n,i=e.pointer;i&&(n=DS(t).pointerEl=new bs[i.type](CS(e.pointer)),t.add(n))},createLabelEl:function(t,e,n,i){var o;e.label&&(o=DS(t).labelEl=new xr(CS(e.label)),t.add(o),NS(o,i))},updatePointerEl:function(t,e,n){var i=DS(t).pointerEl;i&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,n,i){var o=DS(t).labelEl;o&&(o.setStyle(e.label.style),n(o,{shape:e.label.shape,position:e.label.position}),NS(o,i))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),o=this._handle,a=n.getModel("handle"),r=n.get("status");if(!a.get("show")||!r||"hide"===r)return o&&i.remove(o),void(this._handle=null);this._handle||(e=!0,o=this._handle=ws(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Rt(t.event)},onmousedown:LS(this._onHandleDragMove,this,0,0),drift:LS(this._onHandleDragMove,this),ondragend:LS(this._onHandleDragEnd,this)}),i.add(o)),ES(o,n,!1);o.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=a.get("size");C(s)||(s=[s,s]),o.attr("scale",[s[0]/2,s[1]/2]),Ch(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){PS(this._axisPointerModel,!e&&this._moveAnimation,this._handle,OS(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var n,i=this._handle;i&&(this._dragging=!0,n=this.updateHandleTransform(OS(i),[t,e],this._axisModel,this._axisPointerModel),this._payloadInfo=n,i.stopAnimation(),i.attr(OS(n)),DS(i).lastProp=null,this._doDispatchAxisPointer())},_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}]}))},_onHandleDragEnd:function(){var t;this._dragging=!1,this._handle&&(t=this._axisPointerModel.get("value"),this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"}))},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}}).constructor=kS);var ZS=kS.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.grid,u=i.get("type"),h=US(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(e,!0));u&&"none"!==u&&(a=RS(i),(r=XS[u](s,c,h,a)).style=a,t.graphicKey=r.type,t.pointer=r),GS(e,t,cm(l.model,n),n,i,o)},getHandleTransform:function(t,e,n){var i=cm(e.axis.grid.model,e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:VS(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.grid,a=i.getGlobalExtent(!0),r=US(o,i).getOtherAxis(i).getGlobalExtent(),s="x"===i.dim?0:1,l=t.position;l[s]+=e[s],l[s]=Math.min(a[1],l[s]),l[s]=Math.max(a[0],l[s]);var u=(r[1]+r[0])/2,h=[u,u];h[s]=l[s];return{position:l,rotation:t.rotation,cursorPoint:h,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][s]}}});function US(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var XS={line:function(t,e,n,i){var o=FS([e,n[0]],[e,n[1]],jS(t));return Fr({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),o=n[1]-n[0];return{type:"Rect",shape:WS([e-i/2,n[0]],[i,o],jS(t))}}};function jS(t){return"x"===t.dim?0:1}sm.registerAxisPointerClass("CartesianAxisPointer",ZS),md(function(t){var e;t&&(t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={}),(e=t.axisPointer.link)&&!C(e)&&(t.axisPointer.link=[e]))}),vd(Cc.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=nm(t,e)}),yd({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||P(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){_S(r)&&(r=dS({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=_S(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||_S(r),d={},p={},f={list:[],map:{}},g={showPointer:fS(vS,p),showTooltip:fS(yS,f)};pS(s.coordSysMap,function(t,e){var a=l||t.containPoint(r);pS(s.coordSysAxesInfo[e],function(t,e){var n,i=t.axis,o=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||!a||u&&!o||(null!=(n=o&&o.value)||l||(n=i.pointToData(r)),null!=n&&mS(t,n,g,!1,d))})});var m,v,y,x={};return pS(h,function(o,t){var a=o.linkGroup;a&&!p[t]&&pS(a.axesInfo,function(t,e){var n,i=p[e];t!==o&&i&&(n=i.value,a.mapper&&(n=o.axis.scale.parse(a.mapper(n,xS(t),xS(o)))),x[o.key]=n)})}),pS(x,function(t,e){mS(h[e],t,g,!0,d)}),m=p,v=h,y=d.axesInfo=[],pS(v,function(t,e){var n=t.axisPointerModel.option,i=m[e];i?(t.useHandle||(n.status="show"),n.value=i.value,n.seriesDataIndices=(i.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(_S(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})}(f,r,t,a),function(t,e){var n=e.getZr(),i="axisPointerLastHighlights",o=gS(n)[i]||{},a=gS(n)[i]={};pS(t,function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&pS(n.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t})});var r=[],s=[];z(o,function(t,e){a[e]||s.push(t)}),z(a,function(t,e){o[e]||r.push(t)}),s.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,batch:s}),r.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,batch:r})}(h,n),d}});var YS=["x","y"],qS=["width","height"],KS=kS.extend({makeElOption:function(t,e,n,i,o){var a,r,s=n.axis,l=s.coordinateSystem,u=QS(l,1-JS(s)),h=l.dataToPoint(e)[0],c=i.get("type");c&&"none"!==c&&(a=RS(i),(r=$S[c](s,h,u,a)).style=a,t.graphicKey=r.type,t.pointer=r),GS(e,t,sS(n),n,i,o)},getHandleTransform:function(t,e,n){var i=sS(e,{labelInside:!1});return i.labelMargin=n.get("handle.margin"),{position:VS(e.axis,t,i),rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,n){var i=n.axis,o=i.coordinateSystem,a=JS(i),r=QS(o,a),s=t.position;s[a]+=e[a],s[a]=Math.min(r[1],s[a]),s[a]=Math.max(r[0],s[a]);var l=QS(o,1-a),u=(l[1]+l[0])/2,h=[u,u];return h[a]=s[a],{position:s,rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}}}),$S={line:function(t,e,n,i){var o=FS([e,n[0]],[e,n[1]],JS(t));return Fr({shape:o,style:i}),{type:"Line",shape:o}},shadow:function(t,e,n){var i=t.getBandWidth(),o=n[1]-n[0];return{type:"Rect",shape:WS([e-i/2,n[0]],[i,o],JS(t))}}};function JS(t){return t.isHorizontal()?0:1}function QS(t,e){var n=t.getRect();return[n[YS[e]],n[YS[e]]+n[qS[e]]]}sm.registerAxisPointerClass("SingleAxisPointer",KS),Id({type:"single"});var tM=ah.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){tM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,n=L(Bw().key(function(t){return t[2]}).entries(t),function(t){return{name:t.key,dataList:t.values}}),i=n.length,o=-1,a=-1,r=0;rMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,p>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,p>Math.PI/2&&(y="left")):(d=(l.r+l.r0)/2,y="center"),c.attr("style",{text:s,textAlign:y,textVerticalAlign:S("verticalAlign")||"middle",opacity:S("opacity")});var x=d*f+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=a.get(t);return null==e?o.get(t):e}"radial"===w?(b=-p)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-p)>Math.PI/2?b-=Math.PI:b<-Math.PI/2&&(b+=Math.PI):"number"==typeof w&&(b=w*Math.PI/180),c.attr("rotation",b)},lM._initEvents=function(t,e,n,i){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function o(){r.onEmphasis(i)}function a(){r.onNormal()}var r=this;n.isAnimationEnabled()&&t.on("mouseover",o).on("mouseout",a).on("emphasis",o).on("normal",a).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(sM,cn);yh.extend({type:"sunburst",init:function(){},render:function(o,a,t,e){var i=this;this.seriesModel=o,this.api=t,this.ecModel=a;var r=o.getData(),s=r.tree.root,n=o.getViewRoot(),l=this.group,u=o.get("renderLabelForZeroData"),h=[];n.eachNode(function(t){h.push(t)});var c,d,p=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){u||!t||t.getValue()||(t=null);{var n;t!==s&&e!==s&&(e&&e.piece?t?(e.piece.updateData(!1,t,"normal",o,a),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e):t&&(n=new sM(t,o,a),l.add(n),r.setItemGraphicEl(t.dataIndex,n)))}}(null==t?null:n[t],null==e?null:i[e])}new Cd(i,n,t,t).add(e).update(e).remove(R(e,null)).execute()}(h,p),function(t,e){{var n;0=n.r0}}});var uM="sunburstRootToNode";yd({type:uM,update:"updateView"},function(o,t){t.eachComponent({mainType:"series",subType:"sunburst",query:o},function(t,e){var n=py(o,[uM],t);{var i;n&&((i=t.getViewRoot())&&(o.direction=gy(i,n.node)?"rollUp":"drillDown"),t.resetViewRoot(n.node))}})});var hM="sunburstHighlight";yd({type:hM,update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){var n=py(i,[hM],t);n&&(i.highlight=n.node)})});yd({type:"sunburstUnhighlight",update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){n.unhighlight=!0})});var cM=Math.PI/180;function dM(t,e){if("function"==typeof e)return t.sort(e);var i="asc"===e;return t.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 pM(a,r){return r=r||[0,0],L(["x","y"],function(t,e){var n=this.getAxis(t),i=r[e],o=a[e]/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}wd(R(Em,"sunburst")),_d(R(function(t,e,T){e.eachSeriesByType(t,function(t){var e=t.get("center"),n=t.get("radius");C(n)||(n=[0,n]),C(e)||(e=[e,e]);var i=T.getWidth(),o=T.getHeight(),c=Math.min(i,o),d=Rs(e[0],i),p=Rs(e[1],o),f=Rs(n[0],c/2),a=Rs(n[1],c/2),r=-t.get("startAngle")*cM,g=t.get("minAngle")*cM,m=t.getData().tree.root,s=t.getViewRoot(),v=s.depth,l=t.get("sort");null!=l&&!function e(t,n){var i=t.children||[];t.children=dM(i,n);i.length&&z(t.children,function(t){e(t,n)})}(s,l);var u=0;z(s.children,function(t){isNaN(t.getValue())||u++});var h,y,x=s.getValue(),_=Math.PI/(x||u)*2,w=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:o.cx,cy:o.cy,r:t[1],r0:t[0]},api:{coord:P(function(t){var e=a.dataToRadius(t[0]),n=r.dataToAngle(t[1]),i=o.coordToPoint([e,n]);return i.push(e,n*Math.PI/180),i}),size:P(mM,o)}}},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 SM(t,e,n,i,o){null==n[t]||o||(e[t]=n[t],n[t]=i[t])}function MM(o,a,e,t){var n=o.get("renderItem"),i=o.coordinateSystem,r={};i&&(T&&(Y(n,"series.render is required."),Y(i.prepareCustoms||bM[i.type],"This coordSys does not support custom series.")),r=i.prepareCustoms?i.prepareCustoms():bM[i.type](i));var s,l,u,h,c,d,p,f=O({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=u),a.get(a.getDimension(t||0),e)},style:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(vM).getItemStyle();null!=p&&(n.fill=p);var i=a.getItemVisual(e,"opacity");return null!=i&&(n.opacity=i),rs(n,c,null,{autoColor:p,isRectText:!0}),n.text=c.getShallow("show")?Z(o.getFormattedLabel(e,"normal"),zf(a,e)):null,t&&k(n,t),n},styleEmphasis:function(t,e){null==e&&(e=u),v(e);var n=h.getModel(yM).getItemStyle();return rs(n,d,null,{isRectText:!0},!0),n.text=d.getShallow("show")?U(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),zf(a,e)):null,t&&k(n,t),n},visual:function(t,e){return null==e&&(e=u),a.getItemVisual(e,t)},barLayout:function(t){if(i.getBaseAxis){return function(t){var e=[],n=t.axis;if("category"===n.type){for(var i=n.getBandWidth(),o=0;on[s],p=[-h.x,-h.y];p[r]=i.position[r];var f=[0,0],g=[-c.x,-c.y],m=Z(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=n[s]-c[s]:f[r]+=c[s]+m),g[1-r]+=h[l]/2-c[l]/2,i.attr("position",p),o.attr("position",f),a.attr("position",g);var v,y=this.group.getBoundingRect();(y={x:0,y:0})[s]=d?n[s]:h[s],y[l]=Math.max(h[l],c[l]),y[u]=Math.min(0,c[u]+g[1-r]),o.__rectSize=n[s],d?((v={x:0,y:0})[s]=Math.max(n[s]-c[s]-m,0),v[l]=y[l],o.setClipPath(new xr({shape:v})),o.__rectSize=v[s]):a.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(t);return null!=x.pageIndex&&fs(i,{position:x.contentPosition},d&&t),this._updatePageInfoView(t,x),y},_pageGo:function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},_updatePageInfoView:function(i,o){var a=this._controllerGroup;z(["pagePrev","pageNext"],function(t){var e=null!=o[t+"DataIndex"],n=a.childOfName(t);n&&(n.setStyle("fill",e?i.get("pageIconColor",!0):i.get("pageIconInactiveColor",!0)),n.cursor=e?"pointer":"default")});var t=a.childOfName("pageText"),e=i.get("pageFormatter"),n=o.pageIndex,r=null!=n?n+1:0,s=o.pageCount;t&&e&&t.setStyle("text",N(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e,n,i,o,a=t.get("scrollDataIndex",!0),r=this.getContentGroup(),s=r.getBoundingRect(),l=this._containerGroup.__rectSize,u=t.getOrient().index,h=qM[u],c=qM[1-u],d=KM[u],p=r.position.slice();this._showController?r.eachChild(function(t){t.__legendDataIndex===a&&(o=t)}):o=r.childAt(0);var f=l?Math.ceil(s[h]/l):0;if(o){var g=o.getBoundingRect(),m=o.position[u]+g[d];p[u]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[h]),e=s[h]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[h]=l,y[c]=s[c],y[d]=-p[u]-s[d];var x=r.children();if(r.eachChild(function(t,e){var n=w(t);n.intersect(y)&&(null==v&&(v=e),i=t.__legendDataIndex),e===x.length-1&&n[d]+n[h]<=y[d]+y[h]&&(i=null)}),null!=v){var _=w(x[v]);if(y[d]=_[d]+_[h]-y[h],v<=0&&_[d]>=y[d])n=null;else{for(;0e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),o=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:o[0],y2:o[1]}}function MI(t){return t.getRadiusAxis().inverse?0:1}function II(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()}sm.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e){var n,i,o,a,r;this.group.removeAll(),e.get("show")&&(n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),a=n.getTicksCoords(),II(r=L(n.getViewLabels(),function(t){return(t=D(t)).coord=n.dataToCoord(t.tickValue),t})),II(a),z(bI,function(t){!e.get(t+".show")||n.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,i,a,o,r)},this))},_axisLine:function(t,e,n,i){var o=t.getModel("axisLine.lineStyle"),a=new cr({shape:{cx:e.cx,cy:e.cy,r:i[MI(e)]},style:o.getLineStyle(),z2:1,silent:!0});a.style.fill=null,this.group.add(a)},_axisTick:function(t,e,n,i){var o=t.getModel("axisTick"),a=(o.get("inside")?-1:1)*o.get("length"),r=i[MI(e)],s=L(n,function(t){return new _r({shape:SI(e,[r,r+a],t.coord)})});this.group.add(Vr(s,{style:O(o.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,p,e){var f=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin");z(e,function(t,e){var n=g,i=t.tickValue,o=p[MI(d)],a=d.coordToPoint([o+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(a[0]-r)/o<.3?"center":a[0]>r?"left":"right",u=Math.abs(a[1]-s)/o<.3?"middle":a[1]>s?"top":"bottom";f&&f[i]&&f[i].textStyle&&(n=new Cs(f[i].textStyle,g,g.ecModel));var h=new ur({silent:!0});this.group.add(h),rs(h.style,n,{x:a[0],y:a[1],textFill:n.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u})},this)},_splitLine:function(t,e,n,i){for(var o=t.getModel("splitLine").getModel("lineStyle"),a=0,r=(r=o.get("color"))instanceof Array?r:[r],s=[],l=0;lg?"left":"right",Math.abs(s[1]-m)/f<.3?"middle":s[1]>m?"top":"bottom")}return{position:s,align:l,verticalAlign:u}}(e,n,l,d))}});var CI={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:FS(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()),a=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:HS(e.cx,e.cy,i[0],i[1],(-n-o/2)*a,(o/2-n)*a)}:{type:"Sector",shape:HS(e.cx,e.cy,n-o/2,n+o/2,0,2*Math.PI)}}};function LI(i,t){t.update="updateView",yd(t,function(t,e){var n={};return e.eachComponent({mainType:"geo",query:t},function(e){e[i](t.name),z(e.coordinateSystem.regions,function(t){n[t.name]=e.isSelected(t.name)||!1})}),{selected:n,name:t.name}})}sm.registerAxisPointerClass("PolarAxisPointer",DI),_d(R(function(t,e,n){n.getWidth(),n.getHeight();var k={},P=function(t){var p={};z(t,function(t,e){var n=t.getData(),i=t.coordinateSystem.getBaseAxis(),o=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(o[1]-o[0])/n.count(),r=p[dI(i)]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},s=r.stacks;p[dI(i)]=r;var l=cI(t);s[l]||r.autoWidthCount++,s[l]=s[l]||{width:0,maxWidth:0};var u=Rs(t.get("barWidth"),a),h=Rs(t.get("barMaxWidth"),a),c=t.get("barGap"),d=t.get("barCategoryGap");u&&!s[l].width&&(u=Math.min(r.remainedWidth,u),s[l].width=u,r.remainedWidth-=u),h&&(s[l].maxWidth=h),null!=c&&(r.gap=c),null!=d&&(r.categoryGap=d)});var d={};return z(p,function(t,n){d[n]={};var e=t.stacks,i=t.bandWidth,o=Rs(t.categoryGap,i),a=Rs(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-o)/(s+(s-1)*a),l=Math.max(l,0);z(e,function(t,e){var n=t.maxWidth;n&&nt[1]&&t.reverse(),t}function KI(t,e){return xo(t,e,{includeMainTypes:XI})}YI.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,n){var i;(t.coordRanges||(t.coordRanges=[])).push(e),t.coordRange||(t.coordRange=e,i=tA[t.brushType](0,n,e),t.__rangeOffset={offset:nA[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax})})},YI.matchOutputRanges=function(t,i,o){WI(t,function(n){var t=this.findTargetInfo(n,i);t&&!0!==t&&z(t.coordSyses,function(t){var e=tA[n.brushType](1,t,n.range);o(n,e.values,t,i)})},this)},YI.setInputRanges=function(t,u){WI(t,function(t){var e,n,i,o,a,r,s,l=this.findTargetInfo(t,u);T&&(Y(!l||!0===l||t.coordRange,"coordRange must be specified when coord index specified."),Y(!l||!0!==l||t.range,"range must be specified in global brush.")),t.range=t.range||[],l&&!0!==l&&(t.panelId=l.panelId,e=tA[t.brushType](0,l.coordSys,t.coordRange),n=t.__rangeOffset,t.range=n?nA[t.brushType](e.values,n.offset,(i=e.xyMinMax,o=n.xyMinMax,a=oA(i),r=oA(o),s=[a[0]/r[0],a[1]/r[1]],isNaN(s[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s)):e.values)},this)},YI.makePanelOpts=function(n,i){return L(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:i&&i(t),clipPath:yw(e),isTargetByCursor:_w(e,n,t.coordSysModel),getLinearBrushOtherExtent:xw(e)}})},YI.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&0<=HI(i.coordSyses,e.coordinateSystem)},YI.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=KI(e,t),o=0;oe[0][1]&&(e[0][1]=a[0]),a[1]e[1][1]&&(e[1][1]=a[1])}return e&&pA(e)}};function pA(t){return new hn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var fA=["#ddd"];Md({type:"brush",dependencies:["geo","grid","xAxis","yAxis","parallel","series"],defaultOption:{toolbox:null,brushLink:null,seriesIndex:"all",geoIndex:null,xAxisIndex:null,yAxisIndex:null,brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(120,140,180,0.3)",borderColor:"rgba(120,140,180,0.8)"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},areas:[],brushType:null,brushOption:{},coordInfoList:[],optionUpdated:function(t,e){var n=this.option;e||EI(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:fA},i.hasOwnProperty("liftZ")||(i.liftZ=5)},setAreas:function(t){T&&(Y(C(t)),z(t,function(t){Y(t.brushType,"Illegal areas")})),t&&(this.areas=L(t,function(t){return gA(this.option,t)},this))},setBrushOption:function(t){this.brushOption=gA(this.option,t),this.brushType=this.brushOption.brushType}});function gA(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cs(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function mA(t,e,n,i){i&&i.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}Id({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new W_(e.getZr())).on("brush",P(this._onBrush,this)).mount()},render:function(t){return this.model=t,mA.apply(this,arguments)},updateTransform:mA,updateView:mA,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var n=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:n,areas:D(t),$from:n})}}),yd({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),yd({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var vA={};function yA(t,e){vA[t]=e}function xA(t){return vA[t]}var _A=Ph.toolbox.brush;function wA(t,e,n){this.model=t,this.ecModel=e,this.api=n,this._brushType,this._brushMode}wA.defaultOption={show:!0,type:["rect","polygon","lineX","lineY","keep","clear"],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:D(_A.title)};var bA=wA.prototype;bA.render=bA.updateView=function(e,t,n){var i,o,a;t.eachComponent({mainType:"brush"},function(t){i=t.brushType,o=t.brushOption.brushMode||"single",a|=t.areas.length}),this._brushType=i,this._brushMode=o,z(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===o:"clear"===t?a:t===i)?"emphasis":"normal")})},bA.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return z(t.get("type",!0),function(t){e[t]&&(n[t]=e[t])}),n},bA.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}})},yA("brush",wA),md(function(t,e){var n,i,o,a,r,s,l,u=t&&t.brush;C(u)||(u=u?[u]:[]),u.length&&(n=[],z(u,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}),C(i=t&&t.toolbox)&&(i=i[0]),i||(i={feature:{}},t.toolbox=[i]),(r=(a=(o=i.feature||(i.feature={})).brush||(o.brush={})).type||(a.type=[])).push.apply(r,n),l={},z(s=r,function(t){l[t]=1}),s.length=0,z(l,function(t,e){s.push(e)}),e&&!r.length&&r.push.apply(r,kI))});function SA(t,e,n){this._model=t}function MA(t,e,n,i){var o=n.calendarModel,a=n.seriesModel,r=o?o.coordinateSystem:a?a.coordinateSystem:null;return r===this?r[t](i):null}SA.prototype={constructor:SA,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"},"value"]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=js(t)).getFullYear(),n=(n=t.getMonth()+1)<10?"0"+n:n,i=(i=t.getDate())<10?"0"+i:i,o=t.getDay();return{y:e,m:n,d:i,day:o=Math.abs((o+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+n+"-"+i,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},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.get("cellSize").slice(),a=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[n,7]:[7,n];z([0,1],function(t){u(o,t)&&(a[i[t]]=o[t]*r[t])});var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=wl(a,s);function u(t,e){return null!=t[e]&&"auto"!==t[e]}z([0,1],function(t){u(o,t)||(o[t]=l[i[t]]/r[t])}),this._sw=o[0],this._sh=o[1]},dataToPoint:function(t,e){C(t)&&(t=t[0]),null==e&&(e=!0);var n=this.getDateInfo(t),i=this._rangeInfo,o=n.formatedDate;if(e&&!(n.time>=i.start.time&&n.timea.end.time&&i.reverse(),i},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var n=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,i=new Date(t[0].time),o=i.getDate(),a=t[1].date.getDate();if(i.setDate(o+n-1),i.getDate()!==a)for(var r=0i.weeks||0===t&&ei.lweek)return!1;var o=7*(t-1)-i.fweek+e,a=new Date(i.start.time);return a.setDate(i.start.d+o),this.getDateInfo(a)}},SA.dimensions=SA.prototype.dimensions,SA.getDimensionsInfo=SA.prototype.getDimensionsInfo,SA.create=function(t,e){var n=[];return t.eachComponent("calendar",function(t){var e=new SA(t);n.push(e),t.coordinateSystem=e}),t.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=n[t.get("calendarIndex")||0])}),n},su.register("calendar",SA);var IA=Ll.extend({type:"calendar",coordinateSystem:null,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%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},init:function(t,e,n,i){var o=Ml(t);IA.superApply(this,"init",arguments),AA(t,o)},mergeOption:function(t,e){IA.superApply(this,"mergeOption",arguments),AA(this.option,t)}});function AA(t,i){var o=t.cellSize;C(o)?1===o.length&&(o[1]=o[0]):o=t.cellSize=[o,o];var e=L([0,1],function(t){var e,n;return(null!=(e=i)[yl[n=t][0]]||null!=e[yl[n][1]]&&null!=e[yl[n][2]])&&(o[t]="auto"),null!=o[t]&&"auto"!==o[t]});Sl(t,i,{type:"box",ignoreSize:e})}var TA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},DA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};Id({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t){var e=this.group;e.removeAll();var n=t.coordinateSystem,i=n.getRangeInfo(),o=n.getOrient();this._renderDayRect(t,i,e),this._renderLines(t,i,o,e),this._renderYearText(t,i,o,e),this._renderMonthText(t,o,e),this._renderWeekText(t,i,o,e)},_renderDayRect:function(t,e,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),a=i.getCellWidth(),r=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new xr({shape:{x:l[0],y:l[1],width:a,height:r},cursor:"default",style:o});n.add(u)}},_renderLines:function(n,t,i,o){var a=this,r=n.coordinateSystem,s=n.getModel("splitLine.lineStyle").getLineStyle(),l=n.get("splitLine.show"),e=s.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=t.start,h=0;u.time<=t.end.time;h++){d(u.formatedDate),0===h&&(u=r.getDateInfo(t.start.y+"-"+t.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=r.getDateInfo(c)}function d(t){a._firstDayOfMonth.push(r.getDateInfo(t)),a._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=a._getLinePointsOfOneWeek(n,t,i);a._tlpoints.push(e[0]),a._blpoints.push(e[e.length-1]),l&&a._drawSplitline(e,s,o)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,e,i),s,o),l&&this._drawSplitline(a._getEdgesPoints(a._blpoints,e,i),s,o)},_getEdgesPoints:function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],o="horizontal"===n?0:1;return i[0][o]=i[0][o]-e/2,i[1][o]=i[1][o]+e/2,i},_drawSplitline:function(t,e,n){var i=new yr({z2:20,shape:{points:t},style:e});n.add(i)},_getLinePointsOfOneWeek:function(t,e,n){var i=t.coordinateSystem;e=i.getDateInfo(e);for(var o=[],a=0;a<7;a++){var r=i.getNextNDay(e.time,a),s=i.dataToRect([r.time],!1);o[2*r.day]=s.tl,o[2*r.day+1]=s["horizontal"===n?"bl":"tr"]}return o},_formatterLabel:function(t,e){return"string"==typeof t&&t?ul(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,n,i,o){e=e.slice();var a=["center","bottom"];"bottom"===i?(e[1]+=o,a=["center","top"]):"left"===i?e[0]-=o:"right"===i?(e[0]+=o,a=["center","top"]):e[1]-=o;var r=0;return"left"!==i&&"right"!==i||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:a[0],textVerticalAlign:a[1]}}},_renderYearText:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p,f,g,m=t.getModel("yearLabel");m.get("show")&&(o=m.get("margin"),a=(a=m.get("position"))||("horizontal"!==n?"top":"left"),s=((r=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]])[0][0]+r[1][0])/2,l=(r[0][1]+r[1][1])/2,h={top:[s,r[u="horizontal"===n?0:1][1]],bottom:[s,r[1-u][1]],left:[r[1-u][0],l],right:[r[u][0],l]},c=e.start.y,+e.end.y>+e.start.y&&(c=c+"-"+e.end.y),d=m.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:c},f=this._formatterLabel(d,p),rs((g=new ur({z2:30})).style,m,{text:f}),g.attr(this._yearTextPositionControl(g,h[a],n,a,o)),i.add(g))},_monthTextPositionControl:function(t,e,n,i,o){var a="left",r="top",s=t[0],l=t[1];return"horizontal"===n?(l+=o,e&&(a="center"),"start"===i&&(r="bottom")):(s+=o,e&&(r="middle"),"start"===i&&(a="right")),{x:s,y:l,textAlign:a,textVerticalAlign:r}},_renderMonthText:function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var o=i.get("nameMap"),a=i.get("margin"),r=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];N(o)&&(o=TA[o.toUpperCase()]||[]);for(var u="start"===r?0:1,h="horizontal"===e?0:1,a="start"===r?-a:a,c="center"===s,d=0;di[1]&&(i[1]=e[1])})}),i[1]c[1];if(r&&!s&&!l)return!0;r&&(i=!0),s&&(e=!0),l&&(n=!0)}return i&&e&&n}):zA(h,function(t){var e;"empty"===i?n.setData(u.map(t,function(t){return(e=t)>=c[0]&&e<=c[1]?t:NaN;var e})):((e={})[t]=c,u.selectRange(e))}),zA(h,function(t){u.setApproximateExtent(c,t)}))}))}};var GA=z,FA=OA,WA=Md({type:"dataZoom",dependencies:["xAxis","yAxis","zAxis","radiusAxis","angleAxis","singleAxis","series"],defaultOption:{zlevel:0,z:4,orient:null,xAxisIndex:null,yAxisIndex:null,filterMode:"filter",throttle:null,start:0,end:100,startValue:null,endValue:null,minSpan:null,maxSpan:null,minValueSpan:null,maxValueSpan:null,rangeMode:null},init:function(t,e,n){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var i=HA(t);this.mergeDefaultAndTheme(t,n),this.doInit(i)},mergeOption:function(t){var e=HA(t);m(this.option,t,!0),this.doInit(e)},doInit:function(t){var n=this.option;v.canvasSupported||(n.realtime=!1),this._setDefaultThrottle(t),ZA(this,t),GA([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(n[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,n,i){var o=this.dependentModels[t.axis][e],a=o.__dzAxisProxy||(o.__dzAxisProxy=new RA(t.name,e,this,i));r[t.name+"_"+e]=a},this)},_resetTarget:function(){var n=this.option,t=this._judgeAutoMode();FA(function(t){var e=t.axisIndex;n[e]=so(n[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,n=!1;FA(function(t){null!=e[t.axisIndex]&&(n=!0)},this);var t=e.orient;return null==t&&n?"orient":n?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t,a=!0,e=this.get("orient",!0),r=this.option,n=this.dependentModels;a&&(n[(t="vertical"===e?"y":"x")+"Axis"].length?(r[t+"AxisIndex"]=[0],a=!1):GA(n.singleAxis,function(t){a&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],a=!1)})),a&&FA(function(t){if(a){var e=[],n=this.dependentModels[t.axis];if(n.length&&!e.length)for(var i=0,o=n.length;io[0]||a[1]<0||a[1]>o[1]||(n=((e=this._handleEnds)[0]+e[1])/2,i=this._updateInterval("all",a[0]-n),this._updateView(),i&&this._dispatchZoomAction())},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t,e,n;return KA(this.getTargetCoordInfo(),function(t){var e;!n&&t.length&&(e=t[0].model.coordinateSystem,n=e.getRect&&e.getRect())}),n||(t=this.api.getWidth(),e=this.api.getHeight(),n={x:.2*t,y:.2*e,width:.6*t,height:.6*e}),n}});function eT(t){return"vertical"===t?"ns-resize":"ew-resize"}WA.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var nT="\0_ec_dataZoom_roams";function iT(t,i){var e=aT(t),o=i.dataZoomId,a=i.coordId;z(e,function(t,e){var n=t.dataZoomInfos;n[o]&&M(i.allCoordIds,a)<0&&(delete n[o],t.count--)}),rT(e);var r,n,s=e[a];s||((s=e[a]={coordId:a,dataZoomInfos:{},count:0}).controller=(r=s,n=new Mv(t.getZr()),z(["pan","zoom","scrollMove"],function(a){n.on(a,function(i){var o=[];z(r.dataZoomInfos,function(t){var e,n;i.isAvailableBehavior(t.dataZoomModel.option)&&(n=(e=(t.getRange||{})[a])&&e(r.controller,i),!t.dataZoomModel.get("disabled",!0)&&n&&o.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]}))}),o.length&&r.dispatchAction(o)})}),n),s.dispatchAction=R(sT,t)),s.dataZoomInfos[o]||s.count++,s.dataZoomInfos[o]=i;var l,u,h,c,d=(l=s.dataZoomInfos,h={type_true:2,type_move:1,type_false:0,type_undefined:-1},c=!0,z(l,function(t){var e=t.dataZoomModel,n=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");h["type_"+u]"],C(t)&&(t=t.slice(),i=!0),o=e?t:i?[u(t[0]),u(t[1])]:u(t),N(l)?l.replace("{value}",i?o[0]:o).replace("{value2}",i?o[1]:o):A(l)?i?l(t[0],t[1]):l(t):i?t[0]===s[0]?n[0]+" "+o[1]:t[1]===s[1]?n[1]+" "+o[0]:o[0]+" - "+o[1]:o;function u(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=MT([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,o=i.length-1;0<=o;o--){var a=i[o];if(!t.getDimensionInfo(a).isCalculationCoord)return a}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),o=e.controller||(e.controller={});m(i,n),m(o,n);var u=this.isCategory();function a(i){bT(e.color)&&!i.inRange&&(i.inRange={color:e.color.slice().reverse()}),i.inRange=i.inRange||{color:t.get("gradientColor")},ST(this.stateList,function(t){var e,n=i[t];N(n)&&((e=yT(n,"active",u))?(i[t]={},i[t][n]=e):delete i[t])},this)}a.call(this,i),a.call(this,o),function(t,e,n){var i=t[e],o=t[n];i&&!o&&(o=t[n]={},ST(i,function(t,e){var n;!By.isValidType(e)||null!=(n=yT(e,"inactive",u))&&(o[e]=n,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}))}.call(this,i,"inRange","outOfRange"),function(a){var r=(a.inRange||{}).symbol||(a.outOfRange||{}).symbol,s=(a.inRange||{}).symbolSize||(a.outOfRange||{}).symbolSize,l=this.get("inactiveColor");ST(this.stateList,function(t){var e=this.itemSize,n=a[t];null==(n=n||(a[t]={color:u?l:[l]})).symbol&&(n.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==n.symbolSize&&(n.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),n.symbol=_T(n.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var i,o=n.symbolSize;null!=o&&(i=-1/0,wT(o,function(t){ie[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){AT.prototype.completeVisualOption.apply(this,arguments),z(this.stateList,function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=0)},this)},setSelected:function(t){this.option.range=t.slice(),this._resetRange()},getSelected:function(){var t=this.getExtent(),e=Bs((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(i){var o=[];return this.eachTargetSeries(function(t){var n=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){i[0]<=t&&t<=i[1]&&n.push(e)},this),o.push({seriesId:t.id,dataIndex:n})},this),o},getVisualMeta:function(n){var t=CT(0,0,this.getExtent()),e=CT(0,0,this.option.range.slice()),i=[];function o(t,e){i.push({value:t,color:n(t,e)})}for(var a=0,r=0,s=e.length,l=t.length;rt[1])break;n.push({color:this.getControllerVisual(a,"color",e),offset:o/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},_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]]]},_createBarGroup:function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new cn("horizontal"!==e||n?"horizontal"===e&&n?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||n?{scale:"left"===t?[1,1]:[-1,1]}:{scale:"left"===t?[1,-1]:[-1,-1]}:{scale:"bottom"===t?[1,1]:[-1,1],rotation:Math.PI/2})},_updateHandle:function(i,o){var a,r,s,l;this._useHandle&&(a=this._shapes,r=this.visualMapModel,s=a.handleThumbs,l=a.handleLabels,OT([0,1],function(t){var e=s[t];e.setStyle("fill",o.handlesColor[t]),e.position[1]=i[t];var n=vs(a.handleLabelPoints[t],ms(e,this.group));l[t].setStyle({x:n[0],y:n[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",a.barGroup)})},this))},_showIndicator:function(t,e,n,i){var o,a,r,s,l,u,h,c,d,p=this.visualMapModel,f=p.getExtent(),g=p.itemSize,m=[0,g[1]],v=NT(t,f,m,!0),y=this._shapes,x=y.indicator;x&&(x.position[1]=v,x.attr("invisible",!1),x.setShape("points",(o=!!n,a=i,r=v,s=g[1],o?[[0,-ET(a,RT(r,0))],[6,0],[0,ET(a,RT(s-r,0))]]:[[0,0],[5,-5],[5,5]])),l=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),x.setStyle("fill",l),u=vs(y.indicatorLabelPoint,ms(x,this.group)),(h=y.indicatorLabel).attr("invisible",!1),c=this._applyTransform("left",y.barGroup),d=this._orient,h.setStyle({text:(n||"")+p.formatValueText(e),textVerticalAlign:"horizontal"===d?c:"middle",textAlign:"horizontal"===d?"center":c,x:u[0],y:u[1]}))},_enableHoverLinkToSeries:function(){var i=this;this._shapes.barGroup.on("mousemove",function(t){var e,n;i._hovering=!0,i._dragging||(e=i.visualMapModel.itemSize,(n=i._applyTransform([t.offsetX,t.offsetY],i._shapes.barGroup,!0,!0))[1]=ET(RT(0,n[1]),e[1]),i._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=e[0]))}).on("mouseout",function(){i._hovering=!1,i._dragging||i._clearHoverLinkToSeries()})},_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()},_doHoverLinkToSeries:function(t,e){var n,i,o,a,r,s,l,u,h,c,d,p,f=this.visualMapModel,g=f.itemSize;function m(t,e,n){for(var i=0,o=t.length;i ",o):this._showIndicator(r,r,"≈ ",o)),l=this._hoverLinkDataIndices,u=[],(e||VT(f))&&(u=this._hoverLinkDataIndices=f.findTargetDataIndices(s)),c=u,p={},m(l||[],d={}),m(c||[],p,d),h=[v(d),v(p)],this._dispatchHighDown("downplay",PT(h[0])),this._dispatchHighDown("highlight",PT(h[1])))},_hoverLinkFromSeriesMouseOver:function(t){var e,n,i,o=t.target,a=this.visualMapModel;o&&null!=o.dataIndex&&(e=this.ecModel.getSeriesByIndex(o.seriesIndex),a.isTargetSeries(e)&&(i=(n=e.getData(o.dataType)).get(a.getDataDimension(n),o.dataIndex,!0),isNaN(i)||this._showIndicator(i,i)))},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",PT(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,n,i){var o=ms(e,i?null:this.group);return bs[C(t)?"applyTransform":"transformDirection"](t,o,n)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function BT(t,e,n,i){return new vr({shape:{points:t},draggable:!!n,cursor:e,drift:n,onmousemove:function(t){Rt(t.event)},ondragend:i})}function VT(t){var e=t.get("hoverLinkOnHandle");return null==e?t.get("realtime"):e}function GT(t){return"vertical"===t?"ns-resize":"ew-resize"}yd({type:"selectDataRange",event:"dataRangeSelected",update:"update"},function(e,t){t.eachComponent({mainType:"visualMap",query:e},function(t){t.setSelected(e.selected)})}),md(pT);var FT=AT.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){FT.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var n=this._mode=this._determineMode();WT[this._mode].call(this),this._resetSelected(t,e);var i=this.option.categories;this.resetVisual(function(t,e){"categories"===n?(t.mappingMethod="category",t.categories=D(i)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=L(this._pieceList,function(t){t=D(t);return"inRange"!==e&&(t.visual=null),t}))})},completeVisualOption:function(){var i=this.option,n={},t=By.listVisualTypes(),o=this.isCategory();function a(t,e,n){return t&&t[e]&&(B(t[e])?t[e].hasOwnProperty(n):t[e]===n)}z(i.pieces,function(e){z(t,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),z(n,function(t,e){var n=0;z(this.stateList,function(t){n|=a(i,t,e)||a(i.target,t,e)},this),n||z(this.stateList,function(t){(i[t]||(i[t]={}))[e]=yT(e,"inRange"===t?"active":"inactive",o)})},this),AT.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i,n=this.option,o=this._pieceList,a=(e?n:t).selected||{};n.selected=a,z(o,function(t,e){var n=this.getSelectedMapKey(t);a.hasOwnProperty(n)||(a[n]=!0)},this),"single"===n.selectedMode&&(i=!1,z(o,function(t,e){var n=this.getSelectedMapKey(t);a[n]&&(i?a[n]=!1:i=!0)},this))},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&0n&&i([n,e[0]],"outOfRange"),i(e.slice()),n=e[1])},this),{stops:a,outerColors:r}}function i(t,e){var n=s.getRepresentValue({interval:t});e=e||s.getValueState(n);var i=o(n,e);t[0]===-1/0?r[0]=i:t[1]===1/0?r[1]=i:a.push({value:t[0],color:i},{value:t[1],color:i})}}}),WT={splitNumber:function(){var t=this.option,e=this._pieceList,n=Math.min(t.precision,20),i=this.getExtent(),o=t.splitNumber;o=Math.max(parseInt(o,10),1),t.splitNumber=o;for(var a=(i[1]-i[0])/o;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,i[0]],close:[0,0]});for(var s=i[0],l=r+o;ro[1]&&console.warn("Piece "+e+"is illegal: "+o+" lower bound should not greater then uppper bound."),o[0]===o[1]&&a[0]&&a[1]&&(n.value=o[0])}n.visual=By.retrieveVisuals(t),d.push(n)},this),HT(t,d),$s(d),z(d,function(t){var e=t.close,n=[["<","≤"][e[1]],[">","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)},this)}};function HT(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}LT.extend({type:"visualMap.piecewise",doRender:function(){var a=this.group;a.removeAll();var r=this.visualMapModel,s=r.get("textGap"),t=r.textStyleModel,l=t.getFont(),u=t.getTextColor(),h=this._getItemAlign(),c=r.itemSize,e=this._getViewData(),n=e.endsText,d=H(r.get("showLabel",!0),!n);n&&this._renderEndsText(a,n[0],c,d,h),z(e.viewPieceList,function(t){var e=t.piece,n=new cn;n.onclick=P(this._onItemClick,this,e),this._enableHoverLink(n,t.indexInModelPieceList);var i=r.getRepresentValue(e);{var o;this._createItemSymbol(n,i,[0,0,c[0],c[1]]),d&&(o=this.visualMapModel.getValueState(i),n.add(new ur({style:{x:"right"===h?-s:c[0]+s,y:c[1]/2,text:e.text,textVerticalAlign:"middle",textAlign:h,textFont:l,textFill:u,opacity:"outOfRange"===o?.5:1}})))}a.add(n)},this),n&&this._renderEndsText(a,n[1],c,d,h),_l(r.get("orient"),a,r.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},_enableHoverLink:function(t,n){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:PT(e.findTargetDataIndices(n))})}t.on("mouseover",P(e,this,"highlight")).on("mouseout",P(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return kT(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},_renderEndsText:function(t,e,n,i,o){var a,r;e&&(a=new cn,r=this.visualMapModel.textStyleModel,a.add(new ur({style:{x:i?"right"===o?n[0]:0:n[0]/2,y:n[1]/2,textVerticalAlign:"middle",textAlign:i?o:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(a))},_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"),o=t.get("inverse");return("horizontal"===i?o:!o)?e.reverse():n=n&&n.slice().reverse(),{viewPieceList:e,endsText:n}},_createItemSymbol:function(t,e,n){t.add(df(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,n=e.option,i=D(n.selected),o=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[o]=!0,z(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})}});md(pT);var ZT=tl,UT=al;function XT(t){lo(t,"label",["show"])}var jT=Md({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,n,i){if(T&&"marker"===this.type)throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(t,n),this.mergeOption(t,n,i.createdBySelf,!0)},isAnimationEnabled:function(){if(v.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,i,e,o){var a=this.constructor,r=this.mainType+"Model";e||i.eachSeries(function(t){var e=t.get(this.mainType,!0),n=t[r];e&&e.data?(n?n.mergeOption(e,i,!0):(o&&XT(e),z(e.data,function(t){t instanceof Array?(XT(t[0]),XT(t[1])):XT(t)}),k(n=new a(e,this,i),{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),n.__hostSeries=t),t[r]=n):t[r]=null},this)},formatTooltip:function(t){var e=this.getData(),n=this.getRawValue(t),i=C(n)?L(n,ZT).join(", "):ZT(n),o=e.getName(t),a=UT(this.name);return null==n&&!o||(a+="
"),o&&(a+=UT(o),null!=n&&(a+=" : ")),null!=n&&(a+=UT(i)),a},getData:function(){return this._data},setData:function(t){this._data=t}});b(jT,Zu),jT.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}}});var YT=M;function qT(t,e,n,i,o,a){var r=[],s=op(e,i)?e.getCalculationInfo("stackResultDimension"):i,l=nD(e,s,t),u=e.indicesOfNearest(s,l)[0];r[o]=e.get(n,u),r[a]=e.get(i,u);var h=Vs(e.get(i,u));return 0<=(h=Math.min(h,20))&&(r[a]=+r[a].toFixed(h)),r}var KT=R,$T={min:KT(qT,"min"),max:KT(qT,"max"),average:KT(qT,"average")};function JT(t,e){var n,i=t.getData(),o=t.coordinateSystem;if(e&&(n=e,isNaN(parseFloat(n.x))||isNaN(parseFloat(n.y)))&&!C(e.coord)&&o){var a=o.dimensions,r=QT(e,i,o,t);if((e=D(e)).type&&$T[e.type]&&r.baseAxis&&r.valueAxis){var s=YT(a,r.baseAxis.dim),l=YT(a,r.valueAxis.dim);e.coord=$T[e.type](i,r.baseDataDim,r.valueDataDim,s,l),e.value=e.coord[l]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)$T[u[h]]&&(u[h]=nD(i,i.mapDimension(a[h]),u[h]));e.coord=u}}return e}function QT(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){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var o=0;o=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var o,t=this.option,e=t.data||[],n=t.axisType,a=this._names=[];"category"===n&&(o=[],z(e,function(t,e){var n,i=ho(t);B(t)?(n=D(t)).value=e:n=e,o.push(n),N(i)||null!=i&&!isNaN(i)||(i=""),a.push(i+"")}),e=o);var i={category:"ordinal",time:"time"}[n]||"number";(this._data=new Hd([{name:"value",type:i}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(yD.extend({type:"timeline.slider",defaultOption:{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"emptyCircle",symbolSize:10,lineStyle:{show:!0,width:2,color:"#304654"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#304654"},itemStyle:{color:"#304654",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:13,color:"#c23531",borderWidth:5,borderColor:"rgba(194,53,49, 0.5)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:22,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:"path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z",prevIcon:"path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z",color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{label:{show:!0,color:"#c23531"},itemStyle:{color:"#c23531"},controlStyle:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}}),Zu);function xD(t,e,n,i){Pf.call(this,t,e,n),this.type=i||"value",this.model=null}var _D=ph.extend({type:"timeline"});xD.prototype={constructor:xD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(xD,Pf);var wD=P,bD=z,SD=Math.PI;function MD(t,e,n,i,o,a){var r=e.get("color");o?(o.setColor(r),n.add(o),a&&a.onUpdate(o)):((o=df(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),n.add(o),a&&a.onCreate(o));var s=e.getItemStyle(["color","symbol","symbolSize"]);o.setStyle(s),i=m({rectHover:!0,z2:100},i,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,i.scale=l;var u,h=t.get("symbolOffset");h&&((u=i.position=i.position||[0,0])[0]+=Rs(h[0],l[0]),u[1]+=Rs(h[1],l[1]));var c=t.get("symbolRotate");return i.rotation=(c||0)*Math.PI/180||0,o.attr(i),o.updateTransform(),o}function ID(t,e,n,i,o){var a,r;t.dragging||(a=i.getModel("checkpointStyle"),r=n.dataToCoord(i.getData().get(["value"],e)),o||!a.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},a.get("animationDuration",!0),a.get("animationEasing",!0))))}_D.extend({type:"timeline.slider",init:function(t,e){this.api=e,this._axis,this._viewRect,this._timer,this._currentPointer,this._mainGroup,this._labelGroup},render:function(e,t,n){var i,o,a,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"),a=this._createGroup("labelGroup"),r=this._axis=this._createAxis(i,e),e.formatTooltip=function(t){return al(r.scale.getLabel(t))},bD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](i,o,r,e)},this),this._renderAxisLabel(i,a,r,e),this._position(i,e)),this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var n,i,o=t.get("label.position"),a=t.get("orient"),r=(i=e,wl((n=t).getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()},n.get("padding")));null==o||"auto"===o?o="horizontal"===a?r.y+r.height/2i[1]&&(n=i[1]),nd.getHeight()&&(r.textPosition="top",i=!0),o=i?-5-e.height:p+8,n+e.width/2>d.getWidth()?(r.textPosition=["100%",o],r.textAlign="right"):n-e.width/2<0&&(r.textPosition=[0,o],r.textAlign="left"))}))},updateView:function(t,e,n,i){z(this._features,function(t){t.updateView&&t.updateView(t.model,e,n,i)})},remove:function(e,n){z(this._features,function(t){t.remove&&t.remove(e,n)}),this.group.removeAll()},dispose:function(e,n){z(this._features,function(t){t.dispose&&t.dispose(e,n)})}});var TD=Ph.toolbox.saveAsImage;function DD(t){this.model=t}DD.defaultOption={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:TD.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:TD.lang.slice()},DD.prototype.unusable=!v.canvasSupported,DD.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=document.createElement("a"),a=n.get("type",!0)||"png";o.download=i+"."+a,o.target="_blank";var r=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if(o.href=r,"function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,u=new Uint8Array(l);l--;)u[l]=s.charCodeAt(l);var h=new Blob([u]);window.navigator.msSaveOrOpenBlob(h,i+"."+a)}else{var c=n.get("lang"),d='';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});o.dispatchEvent(p)}},yA("saveAsImage",DD);var CD=Ph.toolbox.magicType;function LD(t){this.model=t}LD.defaultOption={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",tiled:"M2.3,2.2h22.8V25H2.3V2.2z M35,2.2h22.8V25H35V2.2zM2.3,35h22.8v22.8H2.3V35z M35,35h22.8v22.8H35V35z"},title:D(CD.title),option:{},seriesIndex:{}};var kD=LD.prototype;kD.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return z(t.get("type"),function(t){e[t]&&(n[t]=e[t])}),n};var PD={line:function(t,e,n,i){if("bar"===t)return m({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 m({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){if("line"===t||"bar"===t)return m({id:e,stack:"__ec_magicType_stack__"},i.get("option.stack")||{},!0)},tiled:function(t,e,n,i){if("line"===t||"bar"===t)return m({id:e,stack:""},i.get("option.tiled")||{},!0)}},ND=[["line","bar"],["stack","tiled"]];kD.onclick=function(u,t,h){var c,d=this.model,e=d.get("seriesIndex."+h);PD[h]&&(c={series:[]},z(ND,function(t){0<=M(t,h)&&z(t,function(t){d.setIconStatus(t,"normal")})}),d.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,n=t.id,i=PD[h](e,n,t,d);i&&(O(i,t.option),c.series.push(i));var o=t.coordinateSystem;if(o&&"cartesian2d"===o.type&&("line"===h||"bar"===h)){var a=o.getAxesByScale("ordinal")[0];if(a){var r=a.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;c[r]=c[r]||[];for(var l=0;l<=s;l++)c[r][s]=c[r][s]||{};c[r][s].boundaryGap="bar"===h}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:c}))},yd({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),yA("magicType",LD);var OD=Ph.toolbox.dataView,ED=new Array(60).join("-"),RD="\t";function zD(t){var o,a,r,h,e=(o={},a=[],r=[],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:[]},r.push({axisDim:e.dim,axisIndex:e.index})),o[n].series.push(t)):a.push(t)}),{seriesGroupByCategoryAxis:o,other:a,meta:r});return{value:I([(h=[],z(e.seriesGroupByCategoryAxis,function(t,e){var n=t.categoryAxis,i=t.valueAxis.dim,o=[" "].concat(L(t.series,function(t){return t.name})),a=[n.model.getCategories()];z(t.series,function(t){a.push(t.getRawData().mapArray(i,function(t){return t}))});for(var r=[o.join(RD)],s=0;s')}}catch(t){QD=function(t){return iC.createElement("<"+t+' xmlns="'+tC+'" class="zrvml">')}}var aC=Aa.CMD,rC=Math.round,sC=Math.sqrt,lC=Math.abs,uC=Math.cos,hC=Math.sin,cC=Math.max;if(!v.canvasSupported){var dC=",",pC="progid:DXImageTransform.Microsoft",fC=21600,gC=fC/2,mC=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=fC+","+fC,t.coordorigin="0,0"},vC=function(t,e,n){return"rgb("+[t,e,n].join(",")+")"},yC=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},xC=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},_C=function(t,e,n){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+n},wC=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},bC=function(t,e,n){var i=Ae(e);n=+n,isNaN(n)&&(n=1),i&&(t.color=vC(i[0],i[1],i[2]),t.opacity=n*i[3])},SC=function(t,e,n){var i,o,a=e.fill;if(null!=a)if(a instanceof Sr){var r,s,l,u,h,c,d,p,f,g,m=0,v=[0,0],y=0,x=1,_=n.getBoundingRect(),w=_.width,b=_.height;"linear"===a.type?(r="gradient",c=n.transform,h=[a.x*w,a.y*b],s=[a.x2*w,a.y2*b],c&&(wt(h,h,c),wt(s,s,c)),l=s[0]-h[0],u=s[1]-h[1],(m=180*Math.atan2(l,u)/Math.PI)<0&&(m+=360),m<1e-6&&(m=0)):(r="gradientradial",h=[a.x*w,a.y*b],c=n.transform,d=n.scale,p=w,f=b,v=[(h[0]-_.x)/p,(h[1]-_.y)/f],c&&wt(h,h,c),p/=d[0]*fC,f/=d[1]*fC,y=0/(g=cC(p,f)),x=2*a.r/g-y);var S=a.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M,I,A,T,D=S.length,C=[],L=[],k=0;k=c&&d<=n+1){for(var i=[],o=0;o=c&&d<=a+1)return function(t){for(var e=0,n=t.length,i=0,o=0;e