/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ !function(t,e){"object"==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=2311,n=function(){return e++},v="object"==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={},i=t.match(/Firefox\/([\d.]+)/),n=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),a=t.match(/Edge\/([\d.]+)/),o=/micromessenger/i.test(t);i&&(e.firefox=!0,e.version=i[1]);n&&(e.ie=!0,e.version=n[1]);a&&(e.edge=!0,e.version=a[1]);o&&(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,i=Array.prototype,r=i.forEach,h=i.filter,a=i.slice,c=i.map,d=i.reduce,o={};function f(t,e){"createCanvas"===t&&(y=null),o[t]=e}function D(t){if(null==t||"object"!=typeof t)return t;var e=t,i=u.call(t);if("[object Array]"===i){if(!$(t)){e=[];for(var n=0,a=t.length;n>1)%2;s.cssText=["position:absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),t.appendChild(r),i.push(r)}return i}(t,r),r);if(s)return s(Rt,n,a),i.zrX=Rt[0],void(i.zrY=Rt[1])}i.zrX=i.zrY=0}function Vt(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&0<=n.indexOf("touch")){var a="touchend"!==n?e.targetTouches[0]:e.changedTouches[0];a&&Et(t,a,e,i)}else Et(t,e,e,i),e.zrDelta=e.wheelDelta?e.wheelDelta/120:-(e.detail||0)/3;var o=e.button;return null==e.which&&void 0!==o&&Ot.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e}function Gt(t,e,i){Nt?t.addEventListener(e,i):t.attachEvent("on"+e,i)}var Ft=Nt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function Wt(t){return 2===t.which||3===t.which}function Ht(){this._track=[]}function Zt(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}Ht.prototype={constructor:Ht,recognize:function(t,e,i){return this._doTrack(t,e,i),this._recognize(t)},clear:function(){return this._track.length=0,this},_doTrack:function(t,e,i){var n=t.touches;if(n){for(var a={points:[],touches:[],target:e,event:t},o=0,r=n.length;o=this._maxSize&&0>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Oe(t,e),e):void Le(e,0,0,0,1):7===a.length?0<=(n=parseInt(a.substr(1),16))&&n<=16777215?(Le(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Oe(t,e),e):void Le(e,0,0,0,1):void 0;var o=a.indexOf("("),r=a.indexOf(")");if(-1!==o&&r+1===a.length){var s=a.substr(0,o),l=a.substr(o+1,r-(o+1)).split(","),u=1;switch(s){case"rgba":if(4!==l.length)return void Le(e,0,0,0,1);u=Te(l.pop());case"rgb":return 3!==l.length?void Le(e,0,0,0,1):(Le(e,Ae(l[0]),Ae(l[1]),Ae(l[2]),u),Oe(t,e),e);case"hsla":return 4!==l.length?void Le(e,0,0,0,1):(l[3]=Te(l[3]),Re(l,e),Oe(t,e),e);case"hsl":return 3!==l.length?void Le(e,0,0,0,1):(Re(l,e),Oe(t,e),e);default:return}}Le(e,0,0,0,1)}}function Re(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Te(t[1]),a=Te(t[2]),o=a<=.5?a*(n+1):a+n-a*n,r=2*a-o;return Le(e=e||[],Me(255*De(r,o,i+1/3)),Me(255*De(r,o,i)),Me(255*De(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Ee(t,e){var i=ze(t);if(i){for(var n=0;n<3;n++)i[n]=e<0?i[n]*(1-e)|0:(255-i[n])*e+i[n]|0,255e);i++);i=Math.min(i-1,u-2)}C=e;var n=g[(D=i)+1]-g[i];if(0!=n)if(S=(e-g[i])/n,l)if(I=m[i],M=m[0===i?i:i-1],A=m[u-2=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new bi(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}}},bi.create=function(t){return new bi(t.x,t.y,t.width,t.height)};var Si=function(t){for(var e in t=t||{},pi.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};Si.prototype={constructor:Si,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,i=0;i>>1])<0?l=o:s=1+o;var u=n-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);o(t,e[i+h])<0?l=h:r=h+1}return l}function Li(p,g){var r,s,m=Ii,l=0,v=[];function e(t){var e=r[t],i=s[t],n=r[t+1],a=s[t+1];s[t]=i+a,t===l-3&&(r[t+1]=r[t+2],s[t+1]=s[t+2]),l--;var o=Ci(p[n],p,e,i,0,g);e+=o,0!==(i-=o)&&0!==(a=Di(p[e+i-1],p,n,a,a-1,g))&&(i<=a?function(t,e,i,n){var a=0;for(a=0;as[t+1])break;e(t)}},this.forceMergeRuns=function(){for(;1>=1;return t+e}(a);do{if((o=Ai(t,i,n,e))=e.maxIterations){t+=e.ellipsis;break}var s=0===r?mn(t,a,e.ascCharWidth,e.cnCharWidth):0f)return{lines:[],width:0,height:0};C.textWidth=ln(C.text,w);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))C.percentWidth=S,u.push(C),S=0;else{if(M){S=C.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&tn(A=$i(A))&&(S=Math.max(S,A.width*b/A.height))}var T=_?_[1]+_[3]:0;S+=T;var D=null!=d?d-v:null;null!=D&&Dn[0]){for(r=0;rt);r++);o=i[n[r]]}if(n.splice(r+1,0,t),!(i[t]=e).virtual)if(o){var l=o.dom;l.nextSibling?s.insertBefore(e.dom,l.nextSibling):s.appendChild(e.dom)}else s.firstChild?s.insertBefore(e.dom,s.firstChild):s.appendChild(e.dom)}else ci("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n=o.length&&o.push({option:t})}}),o}function Aa(t){var r=Q();va(t,function(t,e){var i=t.exist;i&&r.set(i.id,t)}),va(t,function(t,e){var i=t.option;Y(!i||null==i.id||!r.get(i.id)||r.get(i.id)===t,"id duplicates: "+(i&&i.id)),i&&null!=i.id&&r.set(i.id,t),t.keyInfo||(t.keyInfo={})}),va(t,function(t,e){var i=t.exist,n=t.option,a=t.keyInfo;if(ya(n)){if(a.name=null!=n.name?n.name+"":i?i.name:_a+e,i)a.id=i.id;else if(null!=n.id)a.id=n.id+"";else for(var o=0;a.id="\0"+a.name+"\0"+o++,r.get(a.id););r.set(a.id,t)}})}function Ta(t){var e=t.name;return!(!e||!e.indexOf(_a))}function Da(t){return ya(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}function Ca(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?O(t.dataIndex)?k(t.dataIndex,function(t){return e.indexOfRawIndex(t)}):e.indexOfRawIndex(t.dataIndex):null!=t.name?O(t.name)?k(t.name,function(t){return e.indexOfName(t)}):e.indexOfName(t.name):void 0}function La(){var e="__\0ec_inner_"+ka+++"_"+Math.random().toFixed(5);return function(t){return t[e]||(t[e]={})}}var ka=0;function Pa(s,l,u){if(R(l)){var t={};t[l+"Index"]=0,l=t}var e=u&&u.defaultMainType;!e||Na(l,e+"Index")||Na(l,e+"Id")||Na(l,e+"Name")||(l[e+"Index"]=0);var h={};return va(l,function(t,e){t=l[e];if("dataIndex"!==e&&"dataIndexInside"!==e){var i=e.match(/^(\w+)(Index|Id|Name)$/)||[],n=i[1],a=(i[2]||"").toLowerCase();if(!(!n||!a||null==t||"index"===a&&"none"===t||u&&u.includeMainTypes&&_(u.includeMainTypes,n)<0)){var o={mainType:n};"index"===a&&"all"===t||(o[a]=t);var r=s.queryComponents(o);h[n+"Models"]=r,h[n+"Model"]=r[0]}}else h[e]=t}),h}function Na(t,e){return t&&t.hasOwnProperty(e)}function Oa(t,e,i){t.setAttribute?t.setAttribute(e,i):t[e]=i}function za(t){return"auto"===t?v.domSupported?"html":"richText":t||"html"}function Ra(t,i){var n=Q(),a=[];return L(t,function(t){var e=i(t);(n.get(e)||(a.push(e),n.set(e,[]))).push(t)}),{keys:a,buckets:n}}var Ea=".",Ba="___EC__COMPONENT__CONTAINER___";function Va(t){var e={main:"",sub:""};return t&&(t=t.split(Ea),e.main=t[0]||"",e.sub=t[1]||""),e}function Ga(t){(t.$constructor=t).extend=function(t){function e(){t.$constructor?t.$constructor.apply(this,arguments):i.apply(this,arguments)}var i=this;return C(e.prototype,t),e.extend=this.extend,e.superCall=Ha,e.superApply=Za,w(e,this),e.superClass=i,e}}var Fa=0;function Wa(t){var e=["__\0is_clz",Fa++,Math.random().toFixed(3)].join("_");t.prototype[e]=!0,t.isInstance=function(t){return!(!t||!t[e])}}function Ha(t,e){var i=U(arguments,2);return this.superClass.prototype[e].apply(t,i)}function Za(t,e,i){return this.superClass.prototype[e].apply(t,i)}function Ua(i,t){t=t||{};var a={};if(i.registerClass=function(t,e){if(e)if(function(t){Y(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Va(e)).sub){if(e.sub!==Ba){(function(t){var e=a[t.main];e&&e[Ba]||((e=a[t.main]={})[Ba]=!0);return e})(e)[e.sub]=t}}else a[e.main]=t;return t},i.getClass=function(t,e,i){var n=a[t];if(n&&n[Ba]&&(n=e?n[e]:null),i&&!n)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return n},i.getClassesByMainType=function(t){t=Va(t);var i=[],e=a[t.main];return e&&e[Ba]?L(e,function(t,e){e!==Ba&&i.push(t)}):i.push(e),i},i.hasClass=function(t){return t=Va(t),!!a[t.main]},i.getAllClassMainTypes=function(){var i=[];return L(a,function(t,e){i.push(e)}),i},i.hasSubTypes=function(t){t=Va(t);var e=a[t.main];return e&&e[Ba]},i.parseClassType=Va,t.registerWhenExtend){var n=i.extend;n&&(i.extend=function(t){var e=n.call(this,t);return i.registerClass(e,t.type)})}return i}function Xa(s){for(var t=0;tthis._ux||Fo(e-this._yi)>this._uy||this._len<5;return this.addData(ko.L,t,e),this._ctx&&i&&(this._needsDash()?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),i&&(this._xi=t,this._yi=e),this},bezierCurveTo:function(t,e,i,n,a,o){return this.addData(ko.C,t,e,i,n,a,o),this._ctx&&(this._needsDash()?this._dashedBezierTo(t,e,i,n,a,o):this._ctx.bezierCurveTo(t,e,i,n,a,o)),this._xi=a,this._yi=o,this},quadraticCurveTo:function(t,e,i,n){return this.addData(ko.Q,t,e,i,n),this._ctx&&(this._needsDash()?this._dashedQuadraticTo(t,e,i,n):this._ctx.quadraticCurveTo(t,e,i,n)),this._xi=i,this._yi=n,this},arc:function(t,e,i,n,a,o){return this.addData(ko.A,t,e,i,i,n,a-n,0,o?0:1),this._ctx&&this._ctx.arc(t,e,i,n,a,o),this._xi=Bo(a)*i+t,this._yi=Vo(a)*i+e,this},arcTo:function(t,e,i,n,a){return this._ctx&&this._ctx.arcTo(t,e,i,n,a),this},rect:function(t,e,i,n){return this._ctx&&this._ctx.rect(t,e,i,n),this.addData(ko.R,t,e,i,n),this},closePath:function(){this.addData(ko.Z);var t=this._ctx,e=this._x0,i=this._y0;return t&&(this._needsDash()&&this._dashedLineTo(e,i),t.closePath()),this._xi=e,this._yi=i,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,i=0;ie.length&&(this._expandData(),e=this.data);for(var i=0;il||Fo(r-a)>u||c===h-1)&&(t.lineTo(o,r),n=o,a=r);break;case ko.C:t.bezierCurveTo(s[c++],s[c++],s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case ko.A:var f=s[c++],p=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],w=m=er[n=0]+t&&r<=er[1]+t?h:0}if(o){l=n;n=jo(a),a=jo(l)}else n=jo(n),a=jo(a);aMath.PI/2&&p<1.5*Math.PI&&(h=-h),c+=h)}}return c}function rr(t,e,i,n,a){for(var o=0,r=0,s=0,l=0,u=0,h=0;hMath.abs(o[1])?0=e[1])return i[1]}else{if(t>=e[0])return i[0];if(t<=e[1])return i[1]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]}function ml(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?function(t){return t.replace(/^\s+/,"").replace(/\s+$/,"")}(t).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t}function vl(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t}function yl(t){return t.sort(function(t,e){return t-e}),t}function xl(t){if(t=+t,isNaN(t))return 0;for(var e=1,i=0;Math.round(t*e)/e!==t;)e*=10,i++;return i}function _l(t){var e=t.toString(),i=e.indexOf("e");if(0h&&(h=u[d],c=d);++s[c],u[c]=0,++l}return s[e]/a}var Sl=9007199254740991;function Ml(t){var e=2*Math.PI;return(t%e+e)%e}function Il(t){return-pl"'])/g,Bl={"&":"&","<":"<",">":">",'"':""","'":"'"};function Vl(t){return null==t?"":(t+"").replace(El,function(t,e){return Bl[e]})}function Gl(t,e){return"{"+t+(null==e?"":e)+"}"}var Fl=["a","b","c","d","e","f","g"];function Wl(t,e,i){O(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o':'':{renderMode:a,content:"{marker"+o+"|} ",style:{color:i}}:""}function Ul(t,e){return"0000".substr(0,e-(t+="").length)+t}function Xl(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=Tl(e),a=i?"UTC":"",o=n["get"+a+"FullYear"](),r=n["get"+a+"Month"]()+1,s=n["get"+a+"Date"](),l=n["get"+a+"Hours"](),u=n["get"+a+"Minutes"](),h=n["get"+a+"Seconds"](),c=n["get"+a+"Milliseconds"]();return t=t.replace("MM",Ul(r,2)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Ul(s,2)).replace("d",s).replace("hh",Ul(l,2)).replace("h",l).replace("mm",Ul(u,2)).replace("m",u).replace("ss",Ul(h,2)).replace("s",h).replace("SSS",Ul(c,3))}function Yl(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t}var jl=fn;var ql=(Object.freeze||Object)({addCommas:Ol,toCamelCase:zl,normalizeCssArray:Rl,encodeHTML:Vl,formatTpl:Wl,formatTplSimple:Hl,getTooltipMarker:Zl,formatTime:Xl,capitalFirst:Yl,truncateText:jl,getTextBoundingRect:function(t){return un(t.text,t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.textLineHeight,t.rich,t.truncate)},getTextRect:function(t,e,i,n,a,o,r,s){return un(t,e,i,n,a,s,o,r)}}),Kl=L,$l=["left","right","top","bottom","width","height"],Jl=[["width","left","right"],["height","top","bottom"]];function Ql(h,c,d,f,p){var g=0,m=0;null==f&&(f=1/0),null==p&&(p=1/0);var v=0;c.eachChild(function(t,e){var i,n,a=t.position,o=t.getBoundingRect(),r=c.childAt(e+1),s=r&&r.getBoundingRect();if("horizontal"===h){var l=o.width+(s?-s.x+o.x:0);v=f<(i=g+l)||t.newline?(g=0,i=l,m+=v+d,o.height):Math.max(v,o.height)}else{var u=o.height+(s?-s.y+o.y:0);v=p<(n=m+u)||t.newline?(g+=v+d,m=0,n=u,o.width):Math.max(v,o.width)}t.newline||(a[0]=g,a[1]=m,"horizontal"===h?g=i+d:m=n+d)})}var tu=Ql;A(Ql,"vertical"),A(Ql,"horizontal");function eu(t,e,i){i=Rl(i||0);var n=e.width,a=e.height,o=ml(t.left,n),r=ml(t.top,a),s=ml(t.right,n),l=ml(t.bottom,a),u=ml(t.width,n),h=ml(t.height,a),c=i[2]+i[0],d=i[1]+i[3],f=t.aspect;switch(isNaN(u)&&(u=n-s-d-o),isNaN(h)&&(h=a-l-c-r),null!=f&&(isNaN(u)&&isNaN(h)&&(n/ae)return t[n];return t[i-1]}(s,i):r;if((l=l||r)&&l.length){var u=l[a];return t&&(o[t]=u),n.colorIdx=(a+1)%l.length,u}}};function mu(t){var e=t.get("coordinateSystem"),i={coordSysName:e,coordSysDims:[],axisMap:Q(),categoryAxisMap:Q()},n=vu[e];if(n)return n(t,i,i.axisMap,i.categoryAxisMap),i}var vu={cartesian2d:function(t,e,i,n){var a=t.getReferringComponents("xAxis")[0],o=t.getReferringComponents("yAxis")[0];e.coordSysDims=["x","y"],i.set("x",a),i.set("y",o),yu(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),yu(o)&&(n.set("y",o),e.firstCategoryDimIndex=1)},singleAxis:function(t,e,i,n){var a=t.getReferringComponents("singleAxis")[0];e.coordSysDims=["single"],i.set("single",a),yu(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(t,e,i,n){var a=t.getReferringComponents("polar")[0],o=a.findAxisModel("radiusAxis"),r=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],i.set("radius",o),i.set("angle",r),yu(o)&&(n.set("radius",o),e.firstCategoryDimIndex=0),yu(r)&&(n.set("angle",r),e.firstCategoryDimIndex=1)},geo:function(t,e,i,n){e.coordSysDims=["lng","lat"]},parallel:function(t,a,o,r){var s=t.ecModel,e=s.getComponent("parallel",t.get("parallelIndex")),l=a.coordSysDims=e.dimensions.slice();L(e.parallelAxisIndex,function(t,e){var i=s.getComponent("parallelAxis",t),n=l[e];o.set(n,i),yu(i)&&null==a.firstCategoryDimIndex&&(r.set(n,i),a.firstCategoryDimIndex=e)})}};function yu(t){return"category"===t.get("type")}var xu="original",_u="arrayRows",wu="objectRows",bu="keyedColumns",Su="unknown",Mu="typedArray",Iu="column",Au="row";function Tu(t){this.fromDataset=t.fromDataset,this.data=t.data||(t.sourceFormat===bu?{}:[]),this.sourceFormat=t.sourceFormat||Su,this.seriesLayoutBy=t.seriesLayoutBy||Iu,this.dimensionsDefine=t.dimensionsDefine,this.encodeDefine=t.encodeDefine&&Q(t.encodeDefine),this.startIndex=t.startIndex||0,this.dimensionsDetectCount=t.dimensionsDetectCount}Tu.seriesDataToSource=function(t){return new Tu({data:t,sourceFormat:V(t)?Mu:xu,fromDataset:!1})},Wa(Tu);var Du=La();function Cu(t){var e=t.option,i=e.data,n=V(i)?Mu:xu,a=!1,o=e.seriesLayoutBy,r=e.sourceHeader,s=e.dimensions,l=function(t){var e=t.option;if(!e.data)return t.ecModel.getComponent("dataset",e.datasetIndex||0)}(t);if(l){var u=l.option;i=u.source,n=Du(l).sourceFormat,a=!0,o=o||u.seriesLayoutBy,null==r&&(r=u.sourceHeader),s=s||u.dimensions}var h=function(t,e,i,n,a){if(!t)return{dimensionsDefine:Lu(a)};var o,r,s,l;if(e===_u)"auto"===n||null==n?ku(function(t){null!=t&&"-"!==t&&(R(t)?null==r&&(r=1):r=0)},i,t,10):r=n?1:0,a||1!==r||(a=[],ku(function(t,e){a[e]=null!=t?t:""},i,t)),o=a?a.length:i===Au?t.length:t[0]?t[0].length:null;else if(e===wu)a||(a=function(t){var e,i=0;for(;i":"\n",f="richText"===c,p={},g=0;function i(t){return{renderMode:c,content:Vl(Ol(t)),style:p}}var m=this.getData(),o=m.mapDimension("defaultedTooltip",!0),n=o.length,r=this.getRawValue(a),s=O(r),v=m.getItemVisual(a,"color");E(v)&&v.colorStops&&(v=(v.colorStops[0]||{}).color),v=v||"transparent";var l=(1":"",n=i+u.join(i||", ");return{renderMode:c,content:n,style:p}}(r):i(n?wh(m,a,o[0]):s?r[0]:r)).content,u=d.seriesIndex+"at"+g,y=Zl({color:v,type:"item",renderMode:c,markerId:u});p[u]=v,++g;var x=m.getName(a),_=this.name;Ta(this)||(_=""),_=_?Vl(_)+(h?": ":e):"";var w="string"==typeof y?y:y.content;return{html:h?w+_+l:_+w+(x?Vl(x)+": "+l:l),markers:p}},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,i){var n=this.ecModel,a=gu.getColorFromPalette.call(this,t,e,i);return a=a||n.getColorFromPalette(t,e,i)},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 Gh(t){var e=t.name;Ta(t)||(t.name=function(t){var i=t.getRawData(),e=i.mapDimension("seriesName",!0),n=[];return L(e,function(t){var e=i.getDimensionInfo(t);e.displayName&&n.push(e.displayName)}),n.join(" ")}(t)||e)}function Fh(t){return t.model.getRawData().count()}function Wh(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Hh}function Hh(t,e){t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Zh(e,i){L(e.CHANGABLE_METHODS,function(t){e.wrapMethod(t,A(Uh,i))})}function Uh(t){var e=Xh(t);e&&e.setOutputEnd(this.count())}function Xh(t){var e=(t.ecModel||{}).scheduler,i=e&&e.getPipeline(t.uid);if(i){var n=i.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(t.uid))}return n}}b(Vh,Mh),b(Vh,gu);var Yh=function(){this.group=new Si,this.uid=fl("viewComponent")};Yh.prototype={constructor:Yh,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){},filterForExposedEvent:null};var jh=Yh.prototype;jh.updateView=jh.updateLayout=jh.updateVisual=function(t,e,i,n){},Ga(Yh),Ua(Yh,{registerWhenExtend:!0});function qh(){var s=La();return function(t){var e=s(t),i=t.pipelineContext,n=e.large,a=e.progressiveRender,o=e.large=i.large,r=e.progressiveRender=i.progressiveRender;return!!(n^o||a^r)&&"reset"}}var Kh=La(),$h=qh();function Jh(){this.group=new Si,this.uid=fl("viewChart"),this.renderTask=Ih({plan:ic,reset:nc}),this.renderTask.context={view:this}}var Qh=Jh.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){ec(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){ec(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){},incrementalPrepareRender:null,incrementalRender:null,updateTransform:null,filterForExposedEvent:null};function tc(t,e,i){if(t&&(t.trigger(e,i),t.isGroup&&!Ns(t)))for(var n=0,a=t.childCount();nc?i+=p(g("data.partialData"),{displayCnt:c}):i+=g("data.allData");for(var r=[],s=0;si.blockIndex?i.step:null,o=n&&n.modDataCount;return{step:a,modBy:null!=o?Math.ceil(o/a):null,modDataCount:o}}},mc.getPipeline=function(t){return this._pipelineMap.get(t)},mc.updateStreamModes=function(t,e){var i=this._pipelineMap.get(t.uid),n=t.getData().count(),a=i.progressiveEnabled&&e.incrementalPrepareRender&&n>=i.threshold,o=t.get("large")&&n>=t.get("largeThreshold"),r="mod"===t.get("progressiveChunkMode")?n:null;t.pipelineContext=i.context={progressiveRender:a,modDataCount:r,large:o}},mc.restorePipelines=function(t){var n=this,a=n._pipelineMap=Q();t.eachSeries(function(t){var e=t.getProgressive(),i=t.uid;a.set(i,{id:i,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:e&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(e||700),count:0}),Dc(n,t,t.dataTask)})},mc.prepareStageTasks=function(){var i=this._stageTaskMap,n=this.ecInstance.getModel(),a=this.api;L(this._allHandlers,function(t){var e=i.get(t.uid)||i.set(t.uid,[]);t.reset&&function(n,a,t,o,r){var s=t.seriesTaskMap||(t.seriesTaskMap=Q()),e=a.seriesType,i=a.getTargetSeries;a.createOnAllSeries?o.eachRawSeries(l):e?o.eachRawSeriesByType(e,l):i&&i(o,r).each(l);function l(t){var e=t.uid,i=s.get(e)||s.set(e,Ih({plan:Sc,reset:Mc,count:Tc}));i.context={model:t,ecModel:o,api:r,useClearVisual:a.isVisual&&!a.isLayout,plan:a.plan,reset:a.reset,scheduler:n},Dc(n,t,i)}var u=n._pipelineMap;s.each(function(t,e){u.get(e)||(t.dispose(),s.removeKey(e))})}(this,t,e,n,a),t.overallReset&&function(n,t,e,i,a){var o=e.overallTask=e.overallTask||Ih({reset:xc});o.context={ecModel:i,api:a,overallReset:t.overallReset,scheduler:n};var r=o.agentStubMap=o.agentStubMap||Q(),s=t.seriesType,l=t.getTargetSeries,u=!0,h=t.modifyOutputEnd;s?i.eachRawSeriesByType(s,c):l?l(i,a).each(c):(u=!1,L(i.getSeries(),c));function c(t){var e=t.uid,i=r.get(e);i||(i=r.set(e,Ih({reset:_c,onDirty:bc})),o.dirty()),i.context={model:t,overallProgress:u,modifyOutputEnd:h},i.agent=o,i.__block=u,Dc(n,t,i)}var d=n._pipelineMap;r.each(function(t,e){d.get(e)||(t.dispose(),o.dirty(),r.removeKey(e))})}(this,t,e,n,a)},this)},mc.prepareView=function(t,e,i,n){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=i,o.api=n,a.__block=!t.incrementalPrepareRender,Dc(this,e,a)},mc.performDataProcessorTasks=function(t,e){vc(this,this._dataProcessorHandlers,t,e,{block:!0})},mc.performVisualTasks=function(t,e,i){vc(this,this._visualHandlers,t,e,i)},mc.performSeriesTasks=function(t){var e;t.eachSeries(function(t){e|=t.dataTask.perform()}),this.unfinished|=e},mc.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 yc=mc.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)};function xc(t){t.overallReset(t.ecModel,t.api,t.payload)}function _c(t,e){return t.overallProgress&&wc}function wc(){this.agent.dirty(),this.getDownstream().dirty()}function bc(){this.agent&&this.agent.dirty()}function Sc(t){return t.plan&&t.plan(t.model,t.ecModel,t.api,t.payload)}function Mc(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=wa(t.reset(t.model,t.ecModel,t.api,t.payload));return 1t.get("hoverLayerThreshold")&&!v.node&&t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var e=i._chartsMap[t.__viewId];e.__alive&&e.group.traverse(function(t){t.useHoverLayer=!0})}})}(n,t),fc(n._zr.dom,t)}function Dd(e,i){ad(Rd,function(t){t(e,i)})}gd.resize=function(t){this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var i=e.resetOption("media"),n=t&&t.silent;this[ud]=!0,i&&yd(this),vd.update.call(this),this[ud]=!1,bd.call(this,n),Sd.call(this,n)}},gd.showLoading=function(t,e){if(rd(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Vd[t]){var i=Vd[t](this._api,e),n=this._zr;this._loadingFX=i,n.add(i)}},gd.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},gd.makeActionFromEvent=function(t){var e=C({},t);return e.type=Nd[t.type],e},gd.dispatchAction=function(t,e){rd(e)||(e={silent:!!e}),Pd[t.type]&&this._model&&(this[ud]?this._pendingActions.push(t):(wd.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&v.browser.weChat&&this._throttledZrFlush(),bd.call(this,e.silent),Sd.call(this,e.silent)))},gd.appendData=function(t){var e=t.seriesIndex;this.getModel().getSeriesByIndex(e).appendData(t),this._scheduler.unfinished=!0},gd.on=dd("on"),gd.off=dd("off"),gd.one=dd("one");var Cd=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function Ld(t,e){var i=t.get("z"),n=t.get("zlevel");e.group.traverse(function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=n&&(t.zlevel=n))})}function kd(){this.eventInfo}gd._initEvents=function(){ad(Cd,function(u){function t(t){var e,i=this.getModel(),n=t.target;if("globalout"===u)e={};else if(n&&null!=n.dataIndex){var a=n.dataModel||i.getSeriesByIndex(n.seriesIndex);e=a&&a.getDataParams(n.dataIndex,n.dataType,n)||{}}else n&&n.eventData&&(e=C({},n.eventData));if(e){var o=e.componentType,r=e.componentIndex;"markLine"!==o&&"markPoint"!==o&&"markArea"!==o||(o="series",r=e.seriesIndex);var s=o&&null!=r&&i.getComponent(o,r),l=s&&this["series"===s.mainType?"_chartsMap":"_componentsMap"][s.__viewId];e.event=t,e.type=u,this._ecEventProcessor.eventInfo={targetEl:n,packedEvent:e,model:s,view:l},this.trigger(u,e)}}t.zrEventfulCallAtLast=!0,this._zr.on(u,t,this)},this),ad(Nd,function(t,e){this._messageCenter.on(e,function(t){this.trigger(e,t)},this)},this)},gd.isDisposed=function(){return this._disposed},gd.clear=function(){this.setOption({series:[]},!0)},gd.dispose=function(){if(!this._disposed){this._disposed=!0,Oa(this.getDom(),Zd,"");var e=this._api,i=this._model;ad(this._componentsViews,function(t){t.dispose(i,e)}),ad(this._chartsViews,function(t){t.dispose(i,e)}),this._zr.dispose(),delete Gd[this.id]}},b(pd,Ct),kd.prototype={constructor:kd,normalizeQuery:function(t){var s={},l={},u={};if(R(t)){var e=sd(t);s.mainType=e.main||null,s.subType=e.sub||null}else{var h=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};L(t,function(t,e){for(var i=!1,n=0;nx[1]&&(x[1]=y)}e&&(this._nameList[d]=e[f])}this._rawCount=this._count=l,this._extent={},Tf(this)},If._initDataFromProvider=function(t,e){if(!(e<=t)){for(var i,n=this._chunkSize,a=this._rawData,o=this._storage,r=this.dimensions,s=r.length,l=this._dimensionInfos,u=this._nameList,h=this._idList,c=this._rawExtent,d=this._nameRepeatCount={},f=this._chunkCount,p=0;pM[1]&&(M[1]=S)}if(!a.pure){var I=u[v];if(m&&null==I)if(null!=m.name)u[v]=I=m.name;else if(null!=i){var A=r[i],T=o[A][y];if(T){I=T[x];var D=l[A].ordinalMeta;D&&D.categories.length&&(I=D.categories[I])}}var C=null==m?null:m.id;null==C&&null!=I&&(d[I]=d[I]||0,0=this._rawCount||t<0)return-1;var e=this._indices,i=e[t];if(null!=i&&it))return o;a=o-1}}return-1},If.indicesOfNearest=function(t,e,i){var n=[];if(!this._storage[t])return n;null==i&&(i=1/0);for(var a=Number.MAX_VALUE,o=-1,r=0,s=this.count();rt[I][1])&&(M=!1)}M&&(o[r++]=this.getRawIndex(m))}return rw[1]&&(w[1]=_)}}}return a},If.downSample=function(t,e,i,n){for(var a=Nf(this,[t]),o=a._storage,r=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=this._chunkSize,c=a._rawExtent[t],d=new(_f(this))(u),f=0,p=0;pc[1]&&(c[1]=x),d[f++]=_}return a._count=f,a._indices=d,a.getRawIndex=Lf,a},If.getItemModel=function(t){var e=this.hostModel;return new ul(this.getRawDataItem(t),e,e&&e.ecModel)},If.diff=function(e){var i=this;return new uf(e?e.getIndices():[],this.getIndices(),function(t){return kf(e,t)},function(t){return kf(i,t)})},If.getVisual=function(t){var e=this._visual;return e&&e[t]},If.setVisual=function(t,e){if(pf(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},If.setLayout=function(t,e){if(pf(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},If.getLayout=function(t){return this._layout[t]},If.getItemLayout=function(t){return this._itemLayouts[t]},If.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?C(this._itemLayouts[t]||{},e):e},If.clearItemLayouts=function(){this._itemLayouts.length=0},If.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},If.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{},a=this.hasItemVisual;if(this._itemVisuals[t]=n,pf(e))for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o],a[o]=!0);else n[e]=i,a[e]=!0},If.clearAllVisual=function(){this._visual={},this._itemVisuals=[],this.hasItemVisual={}};function Rf(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType}function Ef(t,e,i){Tu.isInstance(e)||(e=Tu.seriesDataToSource(e)),i=i||{},t=(t||[]).slice();for(var n=(i.dimsDef||[]).slice(),l=Q(i.encodeDef),a=Q(),o=Q(),u=[],r=function(t,e,i,n){var a=Math.max(t.dimensionsDetectCount||1,e.length,i.length,n||0);return L(e,function(t){var e=t.dimsDef;e&&(a=Math.max(a,e.length))}),a}(e,t,n,i.dimCount),s=0;s=e[0]&&t<=e[1]},Zf.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Zf.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Zf.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1])},Zf.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},Zf.prototype.getExtent=function(){return this._extent.slice()},Zf.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Zf.prototype.isBlank=function(){return this._isBlank},Zf.prototype.setBlank=function(t){this._isBlank=t},Zf.prototype.getLabel=null,Ga(Zf),Ua(Zf,{registerWhenExtend:!0}),Uf.createByAxisModel=function(t){var e=t.option,i=e.data,n=i&&k(i,jf);return new Uf({categories:n,needCollect:!n,deduplication:!1!==e.dedplication})};var Xf=Uf.prototype;function Yf(t){return t._map||(t._map=Q(t.categories))}function jf(t){return E(t)&&null!=t.value?t.value:t+""}Xf.getOrdinal=function(t){return Yf(this).get(t)},Xf.parseAndCollect=function(t){var e,i=this._needCollect;if("string"!=typeof t&&!i)return t;if(i&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var n=Yf(this);return null==(e=n.get(t))&&(i?(e=this.categories.length,this.categories[e]=t,n.set(t,e)):e=NaN),e};var qf=Zf.prototype,Kf=Zf.extend({type:"ordinal",init:function(t,e){t&&!O(t)||(t=new Uf({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),qf.contain.call(this,t)&&null!=this._ordinalMeta.categories[t]},normalize:function(t){return qf.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(qf.scale.call(this,t))},getTicks:function(){for(var t=[],e=this._extent,i=e[0];i<=e[1];)t.push(i),i++;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:et,niceExtent:et});Kf.create=function(){return new Kf};var $f=vl;function Jf(t){return _l(t)+2}function Qf(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function tp(t,e){isFinite(t[0])||(t[0]=e[0]),isFinite(t[1])||(t[1]=e[1]),Qf(t,0,e),Qf(t,1,e),t[0]>t[1]&&(t[0]=t[1])}var ep=vl,ip=Zf.extend({type:"interval",_interval:0,_intervalPrecision:2,setExtent:function(t,e){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(e)||(i[1]=parseFloat(e))},unionExtent:function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),ip.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=Jf(t)},getTicks:function(){return function(t,e,i,n){var a=[];if(!t)return a;e[0](a.length?a[a.length-1]:i[1])&&a.push(e[1]),a}(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=_l(t)||0:"auto"===i&&(i=this._intervalPrecision),Ol(t=ep(t,i,!0))},niceTicks:function(t,e,i){t=t||5;var n=this._extent,a=n[1]-n[0];if(isFinite(a)){a<0&&(a=-a,n.reverse());var o=function(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=Ll(o/e,!0);null!=i&&ra[1]?(i=a[1],a[0]):(i=a[0],a[1]);var o=e.toGlobalCoord(e.dataToCoord(0));return o>>1;t[a][1]>1^-(1&s),l=l>>1^-(1&l),a=s+=a,o=l+=o,n.push([s/i,l/i])}return n}eg.prototype={constructor:eg,properties:null,getBoundingRect:function(){var t=this._rect;if(t)return t;for(var e=Number.MAX_VALUE,i=[e,e],n=[-e,-e],a=[],o=[],r=this.geometries,s=0;ss[1];h(e[0].coord,s[0])&&(a?e[0].coord=s[0]:e.shift());a&&h(s[0],e[0].coord)&&e.unshift({coord:s[0]});h(s[1],r.coord)&&(a?r.coord=s[1]:e.pop());a&&h(r.coord,s[1])&&e.push({coord:s[1]});function h(t,e){return u?en[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var Yg=hr.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:Cr(hr.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,o=Xg(i,e.smoothConstraint);if(e.connectNulls){for(;0e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Jg(t,e,i,n){return"polar"===t.type?function(t,e,i,n){var a=t.getAngleAxis(),o=t.getRadiusAxis().getExtent().slice();o[0]>o[1]&&o.reverse();var r=a.getExtent(),s=Math.PI/180;i&&(o[0]-=.5,o[1]+=.5);var l=new Pr({shape:{cx:vl(t.cx,1),cy:vl(t.cy,1),r0:vl(o[0],1),r:vl(o[1],1),startAngle:-r[0]*s,endAngle:-r[1]*s,clockwise:a.inverse}});return e&&(l.shape.endAngle=-r[0]*s,Xs(l,{shape:{endAngle:-r[1]*s}},n)),l}(t,e,i,n):function(t,e,i,n){var a=$g(t.getAxis("x")),o=$g(t.getAxis("y")),r=t.getBaseAxis().isHorizontal(),s=Math.min(a[0],a[1]),l=Math.min(o[0],o[1]),u=Math.max(a[0],a[1])-s,h=Math.max(o[0],o[1])-l;if(i)s-=.5,u+=.5,l-=.5,h+=.5;else{var c=n.get("lineStyle.width")||2,d=n.get("clipOverflow")?c/2:Math.max(u,h);r?(l-=d,h+=2*d):(s-=d,u+=2*d)}var f=new Hr({shape:{x:s,y:l,width:u,height:h}});return e&&(f.shape[r?"width":"height"]=0,Xs(f,{shape:{width:u,height:h}},n)),f}(t,e,i,n)}function Qg(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;rn)return!1;return!0}(o,e))){var r=e.mapDimension(o.dim),s={};return L(o.getViewLabels(),function(t){s[t.tickValue]=1}),function(t){return!s.hasOwnProperty(e.get(r,t))}}}}Jh.extend({type:"line",init:function(){var t=new Si,e=new Lg;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=t.getModel("lineStyle"),s=t.getModel("areaStyle"),l=o.mapArray(o.getItemLayout),u="polar"===n.type,h=this._coordSys,c=this._symbolDraw,d=this._polyline,f=this._polygon,p=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=s.get("origin"),y=function(t,e,i){if(!i.valueDim)return[];for(var n=[],a=0,o=e.count();ah[c-1].coord&&(h.reverse(),d.reverse());var f=h[0].coord-10,p=h[c-1].coord+10,g=p-f;if(g<.001)return"transparent";L(h,function(t){t.offset=(t.coord-f)/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 Jr(0,0,0,0,h,!0);return m[n]=f,m[n+"2"]=p,m}}}(o,n)||o.getVisual("color");d.useStyle(T(r.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"}));var M=t.get("smooth");if(M=Kg(t.get("smooth")),d.setShape({smooth:M,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),f){var I=o.getCalculationInfo("stackedOnSeries"),A=0;f.useStyle(T(s.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel"})),I&&(A=Kg(I.get("smooth"))),f.setShape({smooth:M,stackedOnSmooth:A,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=y,this._points=l,this._step=b,this._valueOrigin=v},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=Ca(a,n);if(!(o instanceof Array)&&null!=o&&0<=o){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;(r=new _g(a,o)).position=s,r.setZ(t.get("zlevel"),t.get("z")),r.ignore=isNaN(s[0])||isNaN(s[1]),r.__temp=!0,a.setItemGraphicEl(o,r),r.stopSymbolAnimation(!0),this.group.add(r)}r.highlight()}else Jh.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=Ca(a,n);if(null!=o&&0<=o){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else Jh.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Yg({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new jg({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i},_updateAnimation:function(t,e,i,n,a,o){var r=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,i,n,a,o,r,s){for(var l=function(t,e){var i=[];return e.diff(t).add(function(t){i.push({cmd:"+",idx:t})}).update(function(t,e){i.push({cmd:"=",idx:e,idx1:t})}).remove(function(t){i.push({cmd:"-",idx:t})}).execute(),i}(t,e),u=[],h=[],c=[],d=[],f=[],p=[],g=[],m=zg(a,e,r),v=zg(o,t,s),y=0;ye&&(e=t[i]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,i=0;ie[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(lm,pg);var um={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)"]}}},hm={};hm.categoryAxis=m({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},um),hm.valueAxis=m({boundaryGap:[0,0],splitNumber:5},um),hm.timeAxis=T({scale:!0,min:"dataMin",max:"dataMax"},hm.valueAxis),hm.logAxis=T({scale:!0,logBase:10},hm.valueAxis);function cm(o,t,r,e){L(dm,function(a){t.extend({type:o+"Axis."+a,mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?au(t):{};m(t,e.getTheme().get(a+"Axis")),m(t,this.getDefaultOption()),t.type=r(o,t),i&&nu(t,n,i)},optionUpdated:function(){"category"===this.option.type&&(this.__ordinalMeta=Uf.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:p([{},hm[a+"Axis"],e],!0)})}),hu.registerSubTypeDefaulter(o+"Axis",A(r,o))}var dm=["value","category","time","log"],fm=hu.extend({type:"cartesian2dAxis",axis:null,init:function(){fm.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){fm.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){fm.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function pm(t,e){return e.type||(e.data?"category":"value")}m(fm.prototype,Gp);var gm={offset:0};function mm(t,e){return t.getCoordSysModel()===e}function vm(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}cm("x",fm,pm,gm),cm("y",fm,pm,gm),hu.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 ym=vm.prototype;function xm(t,e,i,n){i.getAxesOnZeroOf=function(){return a?[a]:[]};var a,o=t[e],r=i.model,s=r.get("axisLine.onZero"),l=r.get("axisLine.onZeroAxisIndex");if(s){if(null!=l)_m(o[l])&&(a=o[l]);else for(var u in o)if(o.hasOwnProperty(u)&&_m(o[u])&&!n[h(o[u])]){a=o[u];break}a&&(n[h(a)]=!0)}function h(t){return t.dim+"_"+t.index}}function _m(t){return t&&"category"!==t.type&&"time"!==t.type&&function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(0u[1]?-1:1,c=["start"===o?u[0]-h*l:"end"===o?u[1]+h*l:(u[0]+u[1])/2,Pm(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*Im/180),Pm(o)?n=Dm(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var a,o,r=Ml(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;a=Il(r-Im/2)?(o=l?"bottom":"top","center"):Il(r-1.5*Im)?(o=l?"top":"bottom","center"):(o="middle",r<1.5*Im&&Im/2l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r=i.r0}}});var vv=Math.PI/180;function yv(a,t,e,i,n,o,r){function s(t,e,i){for(var n=t;na[n].y+a[n].height)return void l(n,i/2);l(e-1,i/2)}function l(t,e){for(var i=t;0<=i&&(a[i].y-=e,!(0a[i-1].y+a[i-1].height));i--);}function u(t,e,i,n,a,o){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s=e?p.push(a[g]):f.push(a[g]);u(f,!1,t,e,i,n),u(p,!0,t,e,i,n)}function xv(t){return"center"===t.position}function _v(I,A,t,e,i){var T,D,C=I.getData(),L=[],k=!1,P=(I.get("minShowLabelAngle")||0)*vv;C.each(function(t){var e=C.getItemLayout(t),i=C.getItemModel(t),n=i.getModel("label"),a=n.get("position")||i.get("emphasis.label.position"),o=i.getModel("labelLine"),r=o.get("length"),s=o.get("length2");if(!(e.anglei[0]&&isFinite(u)&&isFinite(i[0]););else{var h=a.getTicks().length-1;f"+k(t,function(t,e){var i=a.get(a.mapDimension(t.dim),n);return Vl(t.name+" : "+i)}).join("
")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid"},label:{position:"top"},symbol:"emptyCircle",symbolSize:4}});sf({type:"radar",render:function(l,t,e){var i=l.coordinateSystem,g=this.group,m=l.getData(),s=this._data;function u(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return O(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),o=qp(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function h(t,e,i,n,a,o){i.removeAll();for(var r=0;r"+Vl(n+" : "+i)},getTooltipPosition:function(t){if(null!=t){var e=this.getData().getName(t),i=this.coordinateSystem,n=i.getRegion(e);return n&&i.dataToPoint(n.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)"}}}}),uv);var Kv="\0_ec_interaction_mutex";function $v(t,e){return!!Jv(t)[e]}function Jv(t){return t[Kv]||(t[Kv]={})}function Qv(i){this.pointerChecker,this._zr=i,this._opt={};var t=N,n=t(ty,this),a=t(ey,this),o=t(iy,this),r=t(ny,this),s=t(ay,this);Ct.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(t,e){this.disable(),this._opt=T(D(e)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(i.on("mousedown",n),i.on("mousemove",a),i.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(i.on("mousewheel",r),i.on("pinch",s))},this.disable=function(){i.off("mousedown",n),i.off("mousemove",a),i.off("mouseup",o),i.off("mousewheel",r),i.off("pinch",s)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function ty(t){if(!(Wt(t)||t.target&&t.target.draggable)){var e=t.offsetX,i=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,i)&&(this._x=e,this._y=i,this._dragging=!0)}}function ey(t){if(this._dragging&&sy("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!$v(this._zr,"globalPan")){var e=t.offsetX,i=t.offsetY,n=this._x,a=this._y,o=e-n,r=i-a;this._x=e,this._y=i,this._opt.preventDefaultMouseMove&&Ft(t.event),ry(this,"pan","moveOnMouseMove",t,{dx:o,dy:r,oldX:n,oldY:a,newX:e,newY:i})}}function iy(t){Wt(t)||(this._dragging=!1)}function ny(t){var e=sy("zoomOnMouseWheel",t,this._opt),i=sy("moveOnMouseWheel",t,this._opt),n=t.wheelDelta,a=Math.abs(n),o=t.offsetX,r=t.offsetY;if(0!==n&&(e||i)){if(e){var s=3x.x)||(m-=Math.PI);var b=v?"left":"right";g.setStyle({textPosition:b,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==u){var S=i.__edge;Us(S=S||(i.__edge=new qr({shape:tx(o,f,f),style:T({opacity:0,strokeNoScale:!0},o.lineStyle)})),{shape:tx(o,d,p),style:{opacity:1}},a),n.add(S)}}function Qy(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,u=s.getModel(),h=(o=$y(s,u,o),s.parentNode===l?s:s.parentNode||s);null==(r=h.getLayout());)h=h.parentNode===l?h:h.parentNode||h;Us(i,{position:[r.x+1,r.y+1]},a,function(){n.remove(i),t.setItemGraphicEl(e,null)}),i.fadeOut(null,{keepLabel:!0});var c=i.__edge;c&&Us(c,{shape:tx(o,r,r),style:{opacity:0}},a,function(){n.remove(c)})}function tx(t,e,i){var n,a,o,r,s,l,u,h,c=t.orient;if("radial"!==t.layout)return s=e.x,u=e.y,l=i.x,h=i.y,"LR"!==c&&"RL"!==c||(n=s+(l-s)*t.curvature,a=u,o=l+(s-l)*t.curvature,r=h),"TB"!==c&&"BT"!==c||(n=s,a=u+(h-u)*t.curvature,o=l,r=h+(u-h)*t.curvature),{x1:s,y1:u,x2:l,y2:h,cpx1:n,cpy1:a,cpx2:o,cpy2:r};s=e.rawX,u=e.rawY,l=i.rawX,h=i.rawY;var d=Uy(s,u),f=Uy(s,u+(h-u)*t.curvature),p=Uy(l,h+(u-h)*t.curvature),g=Uy(l,h);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:f.x,cpy1:f.y,cpx2:p.x,cpy2:p.y}}function ex(t,e){for(var i,n=[t];i=n.pop();)if(e(i),i.isExpand){var a=i.children;if(a.length)for(var o=a.length-1;0<=o;o--)n.push(a[o])}}Vy.prototype={constructor:Vy,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),R(t=t||{})&&(t={order:t});var n,a=t.order||"preorder",o=this[t.attr||"children"];"preorder"===a&&(n=e.call(i,this));for(var r=0;!n&&re&&(e=n.height)}this.height=e+1},getNodeById:function(t){if(this.getId()===t)return this;for(var e=0,i=this.children,n=i.length;eo&&(o=t.depth)});var r=t.expandAndCollapse&&0<=t.initialTreeDepth?t.initialTreeDepth:o;return a.root.eachNode("preorder",function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=r}),a.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,i=e.root.children[0],n=e.getNodeByDataIndex(t),a=n.getValue(),o=n.name;n&&n!==i;)o=n.parentNode.name+"."+o,n=n.parentNode;return Vl(o+(isNaN(a)||null==a?"":" : "+a))},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}}),sf({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new Si,this._controller=new Qv(e.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},render:function(n,t,i,e){var a=n.getData(),o=n.layoutInfo,r=this._mainGroup,s=n.get("layout");"radial"===s?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]),this._updateViewCoordSys(n),this._updateController(n,t,i);var l=this._data,u={expandAndCollapse:n.get("expandAndCollapse"),layout:s,orient:n.getOrient(),curvature:n.get("lineStyle.curveness"),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add(function(t){Ky(a,t)&&Jy(a,t,null,r,n,u)}).update(function(t,e){var i=l.getItemGraphicEl(e);Ky(a,t)?Jy(a,t,i,r,n,u):i&&Qy(l,e,i,r,n,u)}).remove(function(t){var e=l.getItemGraphicEl(t);e&&Qy(l,t,e,r,n,u)}).execute(),this._nodeScaleRatio=n.get("nodeScaleRatio"),this._updateNodeAndLinkScale(n),!0===u.expandAndCollapse&&a.eachItemGraphicEl(function(t,e){t.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:n.id,dataIndex:e})})}),this._data=a},_updateViewCoordSys:function(t){var i=t.getData(),n=[];i.each(function(t){var e=i.getItemLayout(t);!e||isNaN(e.x)||isNaN(e.y)||n.push([+e.x,+e.y])});var e=[],a=[];Io(n,e,a),a[0]-e[0]==0&&(a[0]+=1,e[0]-=1),a[1]-e[1]==0&&(a[1]+=1,e[1]-=1);var o=t.coordinateSystem=new by;o.zoomLimit=t.get("scaleLimit"),o.setBoundingRect(e[0],e[1],a[0]-e[0],a[1]-e[1]),o.setCenter(t.get("center")),o.setZoom(t.get("zoom")),this.group.attr({position:o.position,scale:o.scale}),this._viewCoordSys=o},_updateController:function(a,t,o){var e=this._controller,i=this._controllerHost,r=this.group;e.setPointerChecker(function(t,e,i){var n=r.getBoundingRect();return n.applyTransform(r.transform),n.contain(e,i)&&!cy(t,o,a)}),e.enable(a.get("roam")),i.zoomLimit=a.get("scaleLimit"),i.zoom=a.coordinateSystem.getZoom(),e.off("pan").off("zoom").on("pan",function(t){ly(i,t.dx,t.dy),o.dispatchAction({seriesId:a.id,type:"treeRoam",dx:t.dx,dy:t.dy})},this).on("zoom",function(t){uy(i,t.scale,t.originX,t.originY),o.dispatchAction({seriesId:a.id,type:"treeRoam",zoom:t.scale,originX:t.originX,originY:t.originY}),this._updateNodeAndLinkScale(a)},this)},_updateNodeAndLinkScale:function(t){var e=t.getData(),i=this._getNodeGlobalScale(t),n=[i,i];e.eachItemGraphicEl(function(t,e){t.attr("scale",n)})},_getNodeGlobalScale:function(t){var e=t.coordinateSystem;if("view"!==e.type)return 1;var i=this._nodeScaleRatio,n=e.scale,a=n&&n[0]||1;return((e.getZoom()-1)*i+1)/a},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},remove:function(){this._mainGroup.removeAll(),this._data=null}}),$d({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(n,t){t.eachComponent({mainType:"series",subType:"tree",query:n},function(t){var e=n.dataIndex,i=t.getData().tree.getNodeByDataIndex(e);i.isExpand=!i.isExpand})}),$d({type:"treeRoam",event:"treeRoam",update:"none"},function(i,t){t.eachComponent({mainType:"series",subType:"tree",query:i},function(t){var e=xy(t.coordinateSystem,i);t.setCenter&&t.setCenter(e.center),t.setZoom&&t.setZoom(e.zoom)})});function ix(t,e,i){if(t&&0<=_(e,t.type)){var n=i.getData().tree.root,a=t.targetNode;if("string"==typeof a&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var o=t.targetNodeId;if(null!=o&&(a=n.getNodeById(o)))return{node:a}}}function nx(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function ax(t,e){return 0<=_(nx(t),e)}function ox(t,e){for(var i=[];t;){var n=t.dataIndex;i.push({name:t.name,dataIndex:n,value:e.getRawValue(n)}),t=t.parentNode}return i.reverse(),i}tf(em("tree","circle")),Qd(function(t,e){t.eachSeriesByType("tree",function(t){!function(t,e){var i=function(t,e){return eu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;r="radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,Zy(function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth})):(a=i.width,o=i.height,Zy());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){t.hierNode={defaultAncestor:null,ancestor:t,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var e,i,n=[t];e=n.pop();)if(i=e.children,e.isExpand&&i.length)for(var a=i.length-1;0<=a;a--){var o=i[a];o.hierNode={defaultAncestor:null,ancestor:o,prelim:0,modifier:0,change:0,shift:0,i:a,thread:null},n.push(o)}}(s),function(t,e,i){for(var n,a=[t],o=[];n=a.pop();)if(o.push(n),n.isExpand){var r=n.children;if(r.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)});var d=u===h?1:r(u,h)/2,f=d-u.getLayout().x,p=0,g=0,m=0,v=0;if("radial"===n)p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),ex(l,function(t){m=(t.getLayout().x+f)*p,v=(t.depth-1)*g;var e=Uy(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)});else{var y=t.getOrient();"RL"===y||"LR"===y?(g=o/(h.getLayout().x+d+f),p=a/(c.depth-1||1),ex(l,function(t){v=(t.getLayout().x+f)*g,m="LR"===y?(t.depth-1)*p:a-(t.depth-1)*p,t.setLayout({x:m,y:v},!0)})):"TB"!==y&&"BT"!==y||(p=a/(h.getLayout().x+d+f),g=o/(c.depth-1||1),ex(l,function(t){m=(t.getLayout().x+f)*p,v="TB"===y?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:m,y:v},!0)}))}}}(t,e)})}),Vh.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],preventUsingHoverLayer:!0,_viewRoot:null,defaultOption:{progressive: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 i={name:t.name,children:t.data};!function i(t){var n=0;L(t.children,function(t){i(t);var e=t.value;O(e)&&(e=e[0]),n+=e});var e=t.value;O(e)&&(e=e[0]);null!=e&&!isNaN(e)||(e=n);e<0&&(e=0);O(t.value)?t.value[0]=e:t.value=e}(i);var n=t.levels||[];n=t.levels=function(t,e){var n,i=e.get("color");if(!i)return;if(L(t=t||[],function(t){var e=new ul(t),i=e.get("color");(e.get("itemStyle.color")||i&&"none"!==i)&&(n=!0)}),!n){(t[0]||(t[0]={})).color=i.slice()}return t}(n,e);var a={};return a.levels=n,Gy.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=O(i)?Ol(i[0]):Ol(i);return Vl(e.getName(t)+": "+n)},getDataParams:function(t){var e=Vh.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=ox(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},C(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=Q(),this._idIndexMapCount=0);var i=e.get(t);return null==i&&e.set(t,i=this._idIndexMapCount++),i},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 rx=5;function sx(t){this.group=new Si,t.add(this.group)}function lx(t,e,i,n,a,o){var r=[[a?t:t-rx,e],[t+i,e],[t+i,e+n],[a?t:t-rx,e+n]];return o||r.splice(2,0,[t+i+rx,e+n/2]),a||r.push([t,e+n/2]),r}sx.prototype={constructor:sx,render:function(t,e,i,n){var a=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),a.get("show")&&i){var r=a.getModel("itemStyle"),s=r.getModel("textStyle"),l={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(i,l,s),this._renderContent(t,l,r,s,n),iu(o,l.pos,l.box)}},_prepare:function(t,e,i){for(var n=t;n;n=n.parentNode){var a=n.getModel().get("name"),o=i.getTextRect(a),r=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=r+8,e.renderList.push({node:n,text:a,width:r})}},_renderContent:function(t,e,i,n,a){for(var o,r,s=0,l=e.emptyItemWidth,u=t.get("breadcrumb.height"),h=function(t,e,i){var n=e.width,a=e.height,o=ml(t.x,n),r=ml(t.y,a),s=ml(t.x2,n),l=ml(t.y2,a);return(isNaN(o)||isNaN(parseFloat(t.x)))&&(o=0),(isNaN(s)||isNaN(parseFloat(t.x2)))&&(s=n),(isNaN(r)||isNaN(parseFloat(t.y)))&&(r=0),(isNaN(l)||isNaN(parseFloat(t.y2)))&&(l=a),i=Rl(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}}(e.pos,e.box),c=e.totalWidth,d=e.renderList,f=d.length-1;0<=f;f--){var p=d[f],g=p.node,m=p.width,v=p.text;c>h.width&&(c-=m-l,m=l,v=null);var y=new Rr({shape:{points:lx(s,0,m,u,f===d.length-1,0===f)},style:T(i.getItemStyle(),{lineJoin:"bevel",text:v,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:A(a,g)});this.group.add(y),o=t,r=g,y.eventData={componentType:"series",componentSubType:"treemap",componentIndex:o.componentIndex,seriesIndex:o.componentIndex,seriesName:o.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:r&&r.dataIndex,name:r&&r.name},treePathInfo:r&&ox(r,o)},s+=m+8}},remove:function(){this.group.removeAll()}};function ux(t){var e=xx(t);return e.stroke=e.fill=e.lineWidth=null,e}var hx=N,cx=Si,dx=Hr,fx=L,px=["label"],gx=["emphasis","label"],mx=["upperLabel"],vx=["emphasis","upperLabel"],yx=10,xx=Xa([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]);function _x(d,r,s,l,u,i,f,t,e,n){if(f){var p=f.getLayout();if(p&&p.isInView){var h=p.width,c=p.height,g=p.borderWidth,m=p.invisible,v=f.getRawIndex(),y=t&&t.getRawIndex(),a=f.viewChildren,x=p.upperHeight,o=a&&a.length,_=f.getModel("itemStyle"),w=f.getModel("emphasis.itemStyle"),b=T("nodeGroup",cx);if(b){if(e.add(b),b.attr("position",[p.x||0,p.y||0]),b.__tmNodeWidth=h,b.__tmNodeHeight=c,p.isAboveViewRoot)return b;var S=T("background",dx,n,1);if(S&&function(t,n,a){n.dataIndex=f.dataIndex,n.seriesIndex=d.seriesIndex,n.setShape({x:0,y:0,width:h,height:c});var o=f.getVisual("borderColor",!0),r=w.get("borderColor");I(n,function(){var t=ux(_);t.fill=o;var e=xx(w);if(e.fill=r,a){var i=h-2*g;A(t,e,o,i,x,{x:g,y:0,width:i,height:x})}else t.text=e.text=null;n.setStyle(t),ks(n,e)}),t.add(n)}(b,S,o&&p.upperHeight),!o){var M=T("content",dx,n,2);M&&function(t,i){i.dataIndex=f.dataIndex,i.seriesIndex=d.seriesIndex;var n=Math.max(h-2*g,0),a=Math.max(c-2*g,0);i.culling=!0,i.setShape({x:g,y:g,width:n,height:a});var o=f.getVisual("color",!0);I(i,function(){var t=ux(_);t.fill=o;var e=xx(w);A(t,e,o,n,a),i.setStyle(t),ks(i,e)}),t.add(i)}(b,M)}return b}}}function I(t,e){m?t.invisible||i.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function A(t,e,i,n,a,o){var r=f.getModel(),s=W(d.getFormattedLabel(f.dataIndex,"normal",null,null,o?"upperLabel":"label"),r.get("name"));if(!o&&p.isLeafRoot){var l=d.get("drillDownIcon",!0);s=l?l+" "+s:s}var u=r.getModel(o?mx:px),h=r.getModel(o?vx:gx),c=u.getShallow("show");zs(t,e,u,h,{defaultText:c?s:null,autoColor:i,isRectText:!0}),o&&(t.textRect=D(o)),t.truncate=c&&u.get("ellipsis")?{outerWidth:n,outerHeight:a,minChar:2}:null}function T(t,e,i,n){var a=null!=y&&s[t][y],o=u[t];return a?(s[t][y]=null,function(t,e,i){(t[v]={}).old="nodeGroup"===i?e.position.slice():C({},e.shape)}(o,a,t)):m||((a=new e({z:function(t,e){var i=t*yx+e;return(i-1)/i}(i,n)})).__tmDepth=i,function(t,e,i){var n=t[v]={},a=f.parentNode;if(a&&(!l||"drillDown"===l.direction)){var o=0,r=0,s=u.background[a.getRawIndex()];!l&&s&&s.old&&(o=s.old.width,r=s.old.height),n.old="nodeGroup"===i?[0,r]:{x:o,y:r,width:0,height:0}}n.fadein="nodeGroup"!==i}(o,0,a.__tmStorageName=t)),r[t][v]=a}}sf({type:"treemap",init:function(t,e){this._containerGroup,this._storage={nodeGroup:[],background:[],content:[]},this._oldTree,this._breadcrumb,this._controller,this._state="ready"},render:function(t,e,i,n){if(!(_(e.findComponents({mainType:"series",subType:"treemap",query:n}),t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var a=ix(n,["treemapZoomToNode","treemapRootToNode"],t),o=n&&n.type,r=t.layoutInfo,s=!this._oldTree,l=this._storage,u="treemapRootToNode"===o&&a&&l?{rootNodeGroup:l.nodeGroup[a.node.getRawIndex()],direction:n.direction}:null,h=this._giveContainerGroup(r),c=this._doRender(h,t,u);s||o&&"treemapZoomToNode"!==o&&"treemapRootToNode"!==o?c.renderFinally():this._doAnimation(h,c,t,u),this._resetController(i),this._renderBreadcrumb(t,i,a)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new cx,this._initEvents(e),this.group.add(e)),e.attr("position",[t.x,t.y]),e},_doRender:function(t,e,i){var n=e.getData().tree,a=this._oldTree,o={nodeGroup:[],background:[],content:[]},r={nodeGroup:[],background:[],content:[]},s=this._storage,l=[],c=A(_x,e,r,s,i,o,l);!function o(r,s,l,u,h){u?fx(s=r,function(t,e){t.isRemoved()||i(e,e)}):new uf(s,r,t,t).add(i).update(i).remove(A(i,null)).execute();function t(t){return t.getId()}function i(t,e){var i=null!=t?r[t]:null,n=null!=e?s[e]:null,a=c(i,n,l,h);a&&o(i&&i.viewChildren||[],n&&n.viewChildren||[],a,u,h+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var u,h,d=(h={nodeGroup:[],background:[],content:[]},(u=s)&&fx(u,function(t,e){var i=h[e];fx(t,function(t){t&&(i.push(t),t.__tmWillDelete=1)})}),h);return this._oldTree=n,this._storage=r,{lastsForAnimation:o,willDeleteEls:d,renderFinally:function(){fx(d,function(t){fx(t,function(t){t.parent&&t.parent.remove(t)})}),fx(l,function(t){t.invisible=!0,t.dirty()})}}},_doAnimation:function(t,o,e,s){if(e.get("animation")){var l=e.get("animationDurationUpdate"),u=e.get("animationEasing"),h=function(){var o,r=[],s={};return{add:function(t,e,i,n,a){return R(n)&&(a=n,n=0),!s[t.id]&&(s[t.id]=1,r.push({el:t,target:e,time:i,delay:n,easing:a}),!0)},done:function(t){return o=t,this},start:function(){for(var t=r.length,e=0,i=r.length;e=r.length||t===r[t.depth]){var i=qx(l,c,t,e,y,s);n(t,i,a,o,r,s)}})}else p=Ux(c),t.setVisual("color",p)}(o,{},k(a.levelModels,function(t){return t?t.get(Wx):null}),r,t.getViewRoot().getAncestors(),t)}};function Zx(i,n,a,o){var r=C({},n);return L(["color","colorAlpha","colorSaturation"],function(t){var e=i.get(t,!0);null==e&&a&&(e=a[t]),null==e&&(e=n[t]),null==e&&(e=o.get(t)),null!=e&&(r[t]=e)}),r}function Ux(t){var e=Xx(t,"color");if(e){var i=Xx(t,"colorAlpha"),n=Xx(t,"colorSaturation");return n&&(e=He(e,null,null,n)),i&&(e=Ze(e,i)),e}}function Xx(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function Yx(t,e,i,n,a,o){if(o&&o.length){var r=jx(e,"color")||null!=a.color&&"none"!==a.color&&(jx(e,"colorAlpha")||jx(e,"colorSaturation"));if(r){var s=e.get("visualMin"),l=e.get("visualMax"),u=i.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 Dx(c);return d.__drColorMappingBy=h,d}}}function jx(t,e){var i=t.get(e);return Fx(i)&&i.length?{name:e,range:i}:null}function qx(t,e,i,n,a,o){var r=C({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,u="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=a.mapValueToVisual(u)}return r}var Kx=Math.max,$x=Math.min,Jx=W,Qx=L,t_=["itemStyle","borderWidth"],e_=["itemStyle","gapWidth"],i_=["upperLabel","show"],n_=["upperLabel","height"],a_={seriesType:"treemap",reset:function(t,e,i,n){var a=i.getWidth(),o=i.getHeight(),r=t.option,s=eu(t.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()}),l=r.size||[],u=ml(Jx(s.width,l[0]),a),h=ml(Jx(s.height,l[1]),o),c=n&&n.type,d=ix(n,["treemapZoomToNode","treemapRootToNode"],t),f="treemapRender"===c||"treemapMove"===c?n.rootRect:null,p=t.getViewRoot(),g=nx(p);if("treemapMove"!==c){var m="treemapZoomToNode"===c?function(t,e,i,n,a){var o,r=(e||{}).node,s=[n,a];if(!r||r===i)return s;var l=n*a,u=l*t.option.zoomToNodeRatio;for(;o=r.parentNode;){for(var h=0,c=o.children,d=0,f=c.length;ds[1]&&(s[1]=e)})}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,i,n,a){if(!n)return i;for(var o=t.get("visibleMin"),r=a.length,s=r,l=r-1;0<=l;l--){var u=a["asc"===n?r-l-1:l].getValue();u/i*ei[l[r]])&&(h=i[l[r]]);for(var c=0,d=t.length;c "+d)),u++)}var f,p=i.get("coordinateSystem");if("cartesian2d"===p||"polar"===p)f=Hf(t,i);else{var g=Gu.get(p),m=g&&"view"!==g.type&&g.dimensions||[];_(m,"value")<0&&m.concat(["value"]);var v=Vf(t,{coordDimensions:m});(f=new Mf(v,i)).initData(t)}var y=new Mf(["value"],i);return y.initData(l,s),a&&a(f,y),Py({mainData:f,struct:o,structAttr:"graph",datas:{node:f,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}var m_=rf({type:"series.graph",init:function(t){m_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){m_.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){m_.superApply(this,"mergeDefaultAndTheme",arguments),ba(t,["edgeLabel"],["show"])},getInitialData:function(t,s){var e=t.edges||t.links||[],i=t.data||t.nodes||[],l=this;if(i&&e)return g_(i,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 i=l.getModel("edgeLabel"),n=new ul({label:i.option},i.parentModel,s),a=l.getModel("emphasis.edgeLabel"),o=new ul({emphasis:{label:a.option}},a.parentModel,s);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?n:t&&"emphasis"===t[0]&&"label"===t[1]?o: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,i){if("edge"!==i)return m_.superApply(this,"formatTooltip",arguments);var n=this.getData(),a=this.getDataParams(t,i),o=n.graph.getEdgeByIndex(t),r=n.getName(o.node1.dataIndex),s=n.getName(o.node2.dataIndex),l=[];return null!=r&&l.push(r),null!=s&&l.push(s),l=Vl(l.join(" > ")),a.value&&(l+=" : "+Vl(a.value)),l},_updateCategoriesData:function(){var t=k(this.option.categories||[],function(t){return null!=t.value?t:C({value:0},t)}),e=new Mf(["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 m_.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}}}}),v_=Ur.prototype,y_=qr.prototype;function x_(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var __=cs({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){this[x_(e)?"_buildPathLine":"_buildPathCurve"](t,e)},_buildPathLine:v_.buildPath,_buildPathCurve:y_.buildPath,pointAt:function(t){return this[x_(this.shape)?"_pointAtLine":"_pointAtCurve"](t)},_pointAtLine:v_.pointAt,_pointAtCurve:y_.pointAt,tangentAt:function(t){var e=this.shape,i=x_(e)?[e.x2-e.x1,e.y2-e.y1]:this._tangentAtCurve(t);return mt(i,i)},_tangentAtCurve:y_.tangentAt}),w_=["fromSymbol","toSymbol"];function b_(t){return"_"+t+"Type"}function S_(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){O(o)||(o=[o,o]);var r=qp(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function M_(t,e){t.x1=e[0][0],t.y1=e[0][1],t.x2=e[1][0],t.y2=e[1][1],t.percent=1;var i=e[2];i?(t.cpx1=i[0],t.cpy1=i[1]):(t.cpx1=NaN,t.cpy1=NaN)}function I_(t,e,i){Si.call(this),this._createLine(t,e,i)}var A_=I_.prototype;function T_(t){this._ctor=t||I_,this.group=new Si}A_.beforeUpdate=function(){var t=this.childOfName("fromSymbol"),e=this.childOfName("toSymbol"),i=this.childOfName("label");if(t||e||!i.ignore){for(var n=1,a=this.parent;a;)a.scale&&(n/=a.scale[0]),a=a.parent;var o=this.childOfName("line");if(this.__dirty||o.__dirty){var r=o.shape.percent,s=o.pointAt(0),l=o.pointAt(r),u=ht([],l,s);if(mt(u,u),t){t.attr("position",s);var h=o.tangentAt(0);t.attr("rotation",Math.PI/2-Math.atan2(h[1],h[0])),t.attr("scale",[n*r,n*r])}if(e){e.attr("position",l);h=o.tangentAt(1);e.attr("rotation",-Math.PI/2-Math.atan2(h[1],h[0])),e.attr("scale",[n*r,n*r])}if(!i.ignore){var c,d,f;i.attr("position",l);var p=5*n;if("end"===i.__position)c=[u[0]*p+l[0],u[1]*p+l[1]],d=.8=t&&(0===e?0:n[e-1][0])o&&(e[1-n]=e[n]+c.sign*o),e}function dw(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:0a*(1-h[0])?(l="jump",r=s-a*(1-h[2])):0<=(r=s-a*h[1])&&(r=s-a*(1-h[1]))<=0&&(r=0),(r*=e.axisExpandWidth/u)?cw(r,n,o,"all"):l="none";else{a=n[1]-n[0];(n=[mw(0,o[1]*s/a-a/2)])[1]=gw(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}},Gu.register("parallel",{create:function(n,a){var o=[];return n.eachComponent("parallel",function(t,e){var i=new ww(t,n,a);i.name="parallel_"+e,i.resize(t,a),(t.coordinateSystem=i).model=t,o.push(i)}),n.eachSeries(function(t){if("parallel"===t.get("coordinateSystem")){var e=n.queryComponents({mainType:"parallel",index:t.get("parallelIndex"),id:t.get("parallelId")})[0];t.coordinateSystem=e.coordinateSystem}}),o}});var Sw=hu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return Xa([["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 i=e.length-1;0<=i;i--)yl(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(t))return"inactive";if(1===e.length){var i=e[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var n=0,a=e.length;nf&&(f=m.depth),g.setLayout({depth:v?m.depth:c},!0),"vertical"===o?g.setLayout({dy:i},!0):g.setLayout({dx:i},!0);for(var y=0;y "))},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 wS(t,e,i){Si.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var bS=wS.prototype;function SS(t,e,i){Si.call(this),this._createPolyline(t,e,i)}bS.createLine=function(t,e,i){return new I_(t,e,i)},bS._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");O(n)||(n=[n,n]);var o=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==a&&(this.remove(r),(r=qp(a,-.5,-.5,1,1,o)).z2=100,r.culling=!0,this.add(r)),r&&(r.setStyle("shadowColor",o),r.setStyle(i.getItemStyle(["color"])),r.attr("scale",n),r.setColor(o),r.attr("scale",n),this._symbolType=a,this._updateEffectAnimation(t,i,e))},bS._updateEffectAnimation=function(e,t,i){var n=this.childAt(1);if(n){var a=this,o=e.getItemLayout(i),r=1e3*t.get("period"),s=t.get("loop"),l=t.get("constantSpeed"),u=W(t.get("delay"),function(t){return t/e.count()*r/3}),h="function"==typeof u;if(n.ignore=!0,this.updateAnimationPoints(n,o),0e);r++);r=Math.min(r-1,a-2)}wt(t.position,i[r],i[r+1],(e-n[r])/(n[r+1]-n[r]));var s=i[r+1][0]-i[r][0],l=i[r+1][1]-i[r][1];t.rotation=-Math.atan2(l,s)-Math.PI/2,this._lastFrame=r,this._lastFramePercent=e,t.ignore=!1}},w(IS,wS);var TS=cs({shape:{polyline:!1,curveness:0,segs:[]},buildPath:function(t,e){var i=e.segs,n=e.curveness;if(e.polyline)for(var a=0;a=e[0]&&t<=e[1]}}(y,e.option.range):function(e,n,a){var i=e[1]-e[0],o=(n=k(n,function(t){return{interval:[(t.interval[0]-e[0])/i,(t.interval[1]-e[0])/i]}})).length,r=0;return function(t){for(var e=r;e=e.y&&t[1]<=e.y+e.height:i.contain(i.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(),i=this.getRect(),n=[],a="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),n[a]=e.toGlobalCoord(e.dataToCoord(+t)),n[1-a]=0==a?i.y+i.height/2:i.x+i.width/2,n}}).dimensions});var rM=["axisLine","axisTickLabel","axisName"],sM="splitLine",lM=Gm.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=oM(t),r=new Mm(t,o);L(rM,r.add,r),a.add(r.getGroup()),t.get(sM+".show")&&this["_"+sM](t),lM.superCall(this,"render",t,e,i,n)},_splitLine:function(t){var e=t.axis;if(!e.scale.isBlank()){var i=t.getModel("splitLine"),n=i.getModel("lineStyle"),a=n.get("width"),o=n.get("color");o=o instanceof Array?o:[o];for(var r=t.coordinateSystem.getRect(),s=e.isHorizontal(),l=[],u=0,h=e.getTicksCoords({tickModel:i}),c=[],d=[],f=0;fr)return!0;if(o){var s=Em(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var o=AM(t).pointerEl=new il[a.type](TM(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var a=AM(t).labelEl=new Hr(TM(e.label));t.add(a),kM(a,n)}},updatePointerEl:function(t,e,i){var n=AM(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=AM(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),kM(a,n))},_renderHandle:function(t){if(!this._dragging&&this.updateHandleTransform){var e,i=this._axisPointerModel,n=this._api.getZr(),a=this._handle,o=i.getModel("handle"),r=i.get("status");if(!o.get("show")||!r||"hide"===r)return a&&n.remove(a),void(this._handle=null);this._handle||(e=!0,a=this._handle=Js(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){Ft(t.event)},onmousedown:DM(this._onHandleDragMove,this,0,0),drift:DM(this._onHandleDragMove,this),ondragend:DM(this._onHandleDragEnd,this)}),n.add(a)),NM(a,i,!1);a.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");O(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),uc(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){LM(this._axisPointerModel,!e&&this._moveAnimation,this._handle,PM(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(PM(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(PM(n)),AM(i).lastProp=null,this._doDispatchAxisPointer()}},_doDispatchAxisPointer:function(){if(this._handle){var 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(t){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},getHandleTransform:null,updateHandleTransform:null,clear:function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),i=this._group,n=this._handle;e&&i&&(this._lastGraphicKey=null,i&&e.remove(i),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null)},doClear:function(){},buildLabel:function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}}}).constructor=CM);var WM=CM.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=HM(r,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=OM(n),c=ZM[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}BM(e,t,Zm(r.model,i),i,n,a)},getHandleTransform:function(t,e,i){var n=Zm(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:EM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.grid,r=a.getGlobalExtent(!0),s=HM(o,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,u=t.position;u[l]+=e[l],u[l]=Math.min(r[1],u[l]),u[l]=Math.max(r[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{position:u,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function HM(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var ZM={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:VM([e,i[0]],[e,i[1]],UM(t))}},shadow:function(t,e,i){var n=Math.max(1,t.getBandWidth()),a=i[1]-i[0];return{type:"Rect",shape:GM([e-n/2,i[0]],[n,a],UM(t))}}};function UM(t){return"x"===t.dim?0:1}Gm.registerAxisPointerClass("CartesianAxisPointer",WM),qd(function(t){if(t){t.axisPointer&&0!==t.axisPointer.length||(t.axisPointer={});var e=t.axisPointer.link;e&&!O(e)&&(t.axisPointer.link=[e])}}),Kd(ld.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=zm(t,e)}),$d({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},function(t,e,i){var n=t.currTrigger,r=[t.x,t.y],a=t,o=t.dispatchAction||N(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){yM(r)&&(r=hM({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=yM(r),u=a.axesInfo,h=s.axesInfo,c="leave"===n||yM(r),d={},f={},p={list:[],map:{}},g={showPointer:dM(gM,f),showTooltip:dM(mM,p)};cM(s.coordSysMap,function(t,e){var o=l||t.containPoint(r);cM(s.coordSysAxesInfo[e],function(t,e){var i=t.axis,n=function(t,e){for(var i=0;i<(t||[]).length;i++){var n=t[i];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}(u,t);if(!c&&o&&(!u||n)){var a=n&&n.value;null!=a||l||(a=i.pointToData(r)),null!=a&&pM(t,a,g,!1,d)}})});var m={};return cM(h,function(a,t){var o=a.linkGroup;o&&!f[t]&&cM(o.axesInfo,function(t,e){var i=f[e];if(t!==a&&i){var n=i.value;o.mapper&&(n=a.axis.scale.parse(o.mapper(n,vM(t),vM(a)))),m[a.key]=n}})}),cM(m,function(t,e){pM(h[e],t,g,!0,d)}),function(a,t,e){var o=e.axesInfo=[];cM(t,function(t,e){var i=t.axisPointerModel.option,n=a[e];n?(t.useHandle||(i.status="show"),i.value=n.value,i.seriesDataIndices=(n.payloadBatch||[]).slice()):t.useHandle||(i.status="hide"),"show"===i.status&&o.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}(f,h,d),function(t,e,i,n){if(yM(e)||!t.list.length)return n({type:"hideTip"});var a=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:i.tooltipOption,position:i.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:t.list})}(p,r,t,o),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=fM(n)[a]||{},r=fM(n)[a]={};cM(t,function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&cM(i.seriesDataIndices,function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t})});var s=[],l=[];L(o,function(t,e){r[e]||l.push(t)}),L(r,function(t,e){o[e]||s.push(t)}),l.length&&i.dispatchAction({type:"downplay",escapeConnect:!0,batch:l}),s.length&&i.dispatchAction({type:"highlight",escapeConnect:!0,batch:s})}(h,0,i),d}});var XM=["x","y"],YM=["width","height"],jM=CM.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=$M(r,1-KM(o)),l=r.dataToPoint(e)[0],u=n.get("type");if(u&&"none"!==u){var h=OM(n),c=qM[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}BM(e,t,oM(i),i,n,a)},getHandleTransform:function(t,e,i){var n=oM(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:EM(e.axis,t,n),rotation:n.rotation+(n.labelDirection<0?Math.PI:0)}},updateHandleTransform:function(t,e,i,n){var a=i.axis,o=a.coordinateSystem,r=KM(a),s=$M(o,r),l=t.position;l[r]+=e[r],l[r]=Math.min(s[1],l[r]),l[r]=Math.max(s[0],l[r]);var u=$M(o,1-r),h=(u[1]+u[0])/2,c=[h,h];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),qM={line:function(t,e,i){return{type:"Line",subPixelOptimize:!0,shape:VM([e,i[0]],[e,i[1]],KM(t))}},shadow:function(t,e,i){var n=t.getBandWidth(),a=i[1]-i[0];return{type:"Rect",shape:GM([e-n/2,i[0]],[n,a],KM(t))}}};function KM(t){return t.isHorizontal()?0:1}function $M(t,e){var i=t.getRect();return[i[XM[e]],i[XM[e]]+i[YM[e]]]}Gm.registerAxisPointerClass("SingleAxisPointer",jM),of({type:"single"});var JM=Vh.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){JM.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){var e=t.length,i=Ra(t,function(t){return t[2]}),n=[];i.buckets.each(function(t,e){n.push({name:e,dataList:t})});for(var a=n.length,o=-1,r=-1,s=0;sMath.PI/2?"right":"left"):y&&"center"!==y?"left"===y?(d=l.r0+v,f>Math.PI/2&&(y="right")):"right"===y&&(d=l.r-v,f>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*p+l.cx,_=d*g+l.cy;c.attr("position",[x,_]);var w=S("rotate"),b=0;function S(t){var e=o.get(t);return null==e?a.get(t):e}"radial"===w?(b=-f)<-Math.PI/2&&(b+=Math.PI):"tangential"===w?(b=Math.PI/2-f)>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)},rI._initEvents=function(t,e,i,n){t.off("mouseover").off("mouseout").off("emphasis").off("normal");function a(){r.onEmphasis(n)}function o(){r.onNormal()}var r=this;i.isAnimationEnabled()&&t.on("mouseover",a).on("mouseout",o).on("emphasis",a).on("normal",o).on("downplay",function(){r.onDownplay()}).on("highlight",function(){r.onHighlight()})},w(oI,Si);Jh.extend({type:"sunburst",init:function(){},render:function(a,o,t,e){var n=this;this.seriesModel=a,this.api=t,this.ecModel=o;var r=a.getData(),s=r.tree.root,i=a.getViewRoot(),l=this.group,u=a.get("renderLabelForZeroData"),h=[];i.eachNode(function(t){h.push(t)});var c=this._oldChildren||[];if(function(i,n){if(0===i.length&&0===n.length)return;function t(t){return t.getId()}function e(t,e){!function(t,e){u||!t||t.getValue()||(t=null);if(t!==s&&e!==s)if(e&&e.piece)t?(e.piece.updateData(!1,t,"normal",a,o),r.setItemGraphicEl(t.dataIndex,e.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(e);else if(t){var i=new oI(t,a,o);l.add(i),r.setItemGraphicEl(t.dataIndex,i)}}(null==t?null:i[t],null==e?null:n[e])}new uf(n,i,t,t).add(e).update(e).remove(A(e,null)).execute()}(h,c),function(t,e){if(0=i.r0}}});var sI="sunburstRootToNode";$d({type:sI,update:"updateView"},function(a,t){t.eachComponent({mainType:"series",subType:"sunburst",query:a},function(t,e){var i=ix(a,[sI],t);if(i){var n=t.getViewRoot();n&&(a.direction=ax(n,i.node)?"rollUp":"drillDown"),t.resetViewRoot(i.node)}})});var lI="sunburstHighlight";$d({type:lI,update:"updateView"},function(n,t){t.eachComponent({mainType:"series",subType:"sunburst",query:n},function(t,e){var i=ix(n,[lI],t);i&&(n.highlight=i.node)})});$d({type:"sunburstUnhighlight",update:"updateView"},function(i,t){t.eachComponent({mainType:"series",subType:"sunburst",query:i},function(t,e){i.unhighlight=!0})});var uI=Math.PI/180;function hI(t,e){if("function"==typeof e)return t.sort(e);var n="asc"===e;return t.sort(function(t,e){var i=(t.getValue()-e.getValue())*(n?1:-1);return 0==i?(t.dataIndex-e.dataIndex)*(n?-1:1):i})}function cI(o,r){return r=r||[0,0],k(["x","y"],function(t,e){var i=this.getAxis(t),n=r[e],a=o[e]/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))},this)}tf(A(mv,"sunburst")),Qd(A(function(t,e,C,i){e.eachSeriesByType(t,function(t){var e=t.get("center"),i=t.get("radius");O(i)||(i=[0,i]),O(e)||(e=[e,e]);var n=C.getWidth(),a=C.getHeight(),h=Math.min(n,a),c=ml(e[0],n),d=ml(e[1],a),f=ml(i[0],h/2),o=ml(i[1],h/2),r=-t.get("startAngle")*uI,p=t.get("minAngle")*uI,g=t.getData().tree.root,s=t.getViewRoot(),m=s.depth,l=t.get("sort");null!=l&&!function e(t,i){var n=t.children||[];t.children=hI(n,i);n.length&&L(t.children,function(t){e(t,i)})}(s,l);var u=0;L(s.children,function(t){isNaN(t.getValue())||u++});var v=s.getValue(),y=Math.PI/(v||u)*2,x=0t[1]&&t.reverse(),{coordSys:{type:"polar",cx:a.cx,cy:a.cy,r:t[1],r0:t[0]},api:{coord:N(function(t){var e=o.dataToRadius(t[0]),i=r.dataToAngle(t[1]),n=a.coordToPoint([e,i]);return n.push(e,i*Math.PI/180),n}),size:N(pI,a)}}},calendar:function(i){var t=i.getRect(),e=i.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:i.getCellWidth(),cellHeight:i.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(t,e){return i.dataToPoint(t,e)}}}}};function bI(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function SI(o,r,e,t){var i=o.get("renderItem"),n=o.coordinateSystem,a={};n&&(a=n.prepareCustoms?n.prepareCustoms():wI[n.type](n));var s,l,u,h,c,d=T({getWidth:t.getWidth,getHeight:t.getHeight,getZr:t.getZr,getDevicePixelRatio:t.getDevicePixelRatio,value:function(t,e){return null==e&&(e=s),r.get(r.getDimension(t||0),e)},style:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(mI).getItemStyle();null!=c&&(i.fill=c);var n=r.getItemVisual(e,"opacity");null!=n&&(i.opacity=n);var a=t?DI(t,u):u;return Es(i,a,null,{autoColor:c,isRectText:!0}),i.text=a.getShallow("show")?H(o.getFormattedLabel(e,"normal"),xg(r,e)):null,t&&CI(i,t),i},styleEmphasis:function(t,e){null==e&&(e=s),g(e);var i=l.getModel(vI).getItemStyle(),n=t?DI(t,h):h;return Es(i,n,null,{isRectText:!0},!0),i.text=n.getShallow("show")?Z(o.getFormattedLabel(e,"emphasis"),o.getFormattedLabel(e,"normal"),xg(r,e)):null,t&&CI(i,t),i},visual:function(t,e){return null==e&&(e=s),r.getItemVisual(e,t)},barLayout:function(t){if(n.getBaseAxis){return function(t){var e=[],i=t.axis;if("category"===i.type){for(var n=i.getBandWidth(),a=0;ae[0]&&(e=e.slice().reverse());var n=t.coordToPoint([e[0],i]),a=t.coordToPoint([e[1],i]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function XI(t){return t.getRadiusAxis().inverse?0:1}function YI(t){var e=t[0],i=t[t.length-1];e&&i&&Math.abs(Math.abs(e.coord-i.coord)-360)<1e-4&&t.pop()}Gm.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(e,t){if(this.group.removeAll(),e.get("show")){var i=e.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords(),r=k(i.getViewLabels(),function(t){return(t=D(t)).coord=i.dataToCoord(t.tickValue),t});YI(r),YI(o),L(ZI,function(t){!e.get(t+".show")||i.scale.isBlank()&&"axisLine"!==t||this["_"+t](e,n,o,a,r)},this)}},_axisLine:function(t,e,i,n){var a=t.getModel("axisLine.lineStyle"),o=new Lr({shape:{cx:e.cx,cy:e.cy,r:n[XI(e)]},style:a.getLineStyle(),z2:1,silent:!0});o.style.fill=null,this.group.add(o)},_axisTick:function(t,e,i,n){var a=t.getModel("axisTick"),o=(a.get("inside")?-1:1)*a.get("length"),r=n[XI(e)],s=k(i,function(t){return new Ur({shape:UI(e,[r,r+o],t.coord)})});this.group.add(gs(s,{style:T(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(c,d,t,f,e){var p=c.getCategories(!0),g=c.getModel("axisLabel"),m=g.get("margin"),v=c.get("triggerEvent");L(e,function(t,e){var i=g,n=t.tickValue,a=f[XI(d)],o=d.coordToPoint([a+m,t.coord]),r=d.cx,s=d.cy,l=Math.abs(o[0]-r)/a<.3?"center":o[0]>r?"left":"right",u=Math.abs(o[1]-s)/a<.3?"middle":o[1]>s?"top":"bottom";p&&p[n]&&p[n].textStyle&&(i=new ul(p[n].textStyle,g,g.ecModel));var h=new Dr({silent:Mm.isLabelSilent(c)});this.group.add(h),Es(h.style,i,{x:o[0],y:o[1],textFill:i.getTextColor()||c.get("axisLine.lineStyle.color"),text:t.formattedLabel,textAlign:l,textVerticalAlign:u}),v&&(h.eventData=Mm.makeAxisEventDataBase(c),h.eventData.targetType="axisLabel",h.eventData.value=t.rawLabel)},this)},_splitLine:function(t,e,i,n){var a=t.getModel("splitLine").getModel("lineStyle"),o=a.get("color"),r=0;o=o instanceof Array?o:[o];for(var s=[],l=0;lm?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,i,0,s,d))}});var $I={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:VM(e.coordToPoint([n[0],i]),e.coordToPoint([n[1],i]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:i}}},shadow:function(t,e,i,n,a){var o=Math.max(1,t.getBandWidth()),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:FM(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:FM(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}};function JI(n,t){t.update="updateView",$d(t,function(t,e){var i={};return e.eachComponent({mainType:"geo",query:t},function(e){e[n](t.name),L(e.coordinateSystem.regions,function(t){i[t.name]=e.isSelected(t.name)||!1})}),{selected:i,name:t.name}})}Gm.registerAxisPointerClass("PolarAxisPointer",KI),Qd(A(function(t,e,i){var P={},N=function(t){var g={};L(t,function(t,e){var i=t.getData(),n=t.coordinateSystem,a=n.getBaseAxis(),o=OI(n,a),r=a.getExtent(),s="category"===a.type?a.getBandWidth():Math.abs(r[1]-r[0])/i.count(),l=g[o]||{bandWidth:s,remainedWidth:s,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},u=l.stacks;g[o]=l;var h=NI(t);u[h]||l.autoWidthCount++,u[h]=u[h]||{width:0,maxWidth:0};var c=ml(t.get("barWidth"),s),d=ml(t.get("barMaxWidth"),s),f=t.get("barGap"),p=t.get("barCategoryGap");c&&!u[h].width&&(c=Math.min(l.remainedWidth,c),u[h].width=c,l.remainedWidth-=c),d&&(u[h].maxWidth=d),null!=f&&(l.gap=f),null!=p&&(l.categoryGap=p)});var d={};return L(g,function(t,i){d[i]={};var e=t.stacks,n=t.bandWidth,a=ml(t.categoryGap,n),o=ml(t.gap,1),r=t.remainedWidth,s=t.autoWidthCount,l=(r-a)/(s+(s-1)*o);l=Math.max(l,0),L(e,function(t,e){var i=t.maxWidth;i&&i=n.start.time&&i.timeo.end.time&&t.reverse(),t},_getRangeInfo:function(t){var e;(t=[this.getDateInfo(t[0]),this.getDateInfo(t[1])])[0].time>t[1].time&&(e=!0,t.reverse());var i=Math.floor(t[1].time/864e5)-Math.floor(t[0].time/864e5)+1,n=new Date(t[0].time),a=n.getDate(),o=t[1].date.getDate();if(n.setDate(a+i-1),n.getDate()!==o)for(var r=0n.weeks||0===t&&en.lweek)return!1;var a=7*(t-1)-n.fweek+e,o=new Date(n.start.time);return o.setDate(n.start.d+a),this.getDateInfo(o)}},QI.dimensions=QI.prototype.dimensions,QI.getDimensionsInfo=QI.prototype.getDimensionsInfo,QI.create=function(i,n){var a=[];return i.eachComponent("calendar",function(t){var e=new QI(t,i,n);a.push(e),t.coordinateSystem=e}),i.eachSeries(function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=a[t.get("calendarIndex")||0])}),a},Gu.register("calendar",QI);var eA=hu.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,i,n){var a=au(t);eA.superApply(this,"init",arguments),iA(t,a)},mergeOption:function(t,e){eA.superApply(this,"mergeOption",arguments),iA(this.option,t)}});function iA(t,e){var i=t.cellSize;O(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=k([0,1],function(t){return function(t,e){return null!=t[Jl[e][0]]||null!=t[Jl[e][1]]&&null!=t[Jl[e][2]]}(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]});nu(t,e,{type:"box",ignoreSize:n})}var nA={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},aA={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]};of({type:"calendar",_tlpoints:null,_blpoints:null,_firstDayOfMonth:null,_firstDayPoints:null,render:function(t,e,i){var n=this.group;n.removeAll();var a=t.coordinateSystem,o=a.getRangeInfo(),r=a.getOrient();this._renderDayRect(t,o,n),this._renderLines(t,o,r,n),this._renderYearText(t,o,r,n),this._renderMonthText(t,r,n),this._renderWeekText(t,o,r,n)},_renderDayRect:function(t,e,i){for(var n=t.coordinateSystem,a=t.getModel("itemStyle").getItemStyle(),o=n.getCellWidth(),r=n.getCellHeight(),s=e.start.time;s<=e.end.time;s=n.getNextNDay(s,1).time){var l=n.dataToRect([s],!1).tl,u=new Hr({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(u)}},_renderLines:function(i,t,n,a){var o=this,r=i.coordinateSystem,s=i.getModel("splitLine.lineStyle").getLineStyle(),l=i.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){o._firstDayOfMonth.push(r.getDateInfo(t)),o._firstDayPoints.push(r.dataToRect([t],!1).tl);var e=o._getLinePointsOfOneWeek(i,t,n);o._tlpoints.push(e[0]),o._blpoints.push(e[e.length-1]),l&&o._drawSplitline(e,s,a)}d(r.getNextNDay(t.end.time,1).formatedDate),l&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,e,n),s,a),l&&this._drawSplitline(o._getEdgesPoints(o._blpoints,e,n),s,a)},_getEdgesPoints:function(t,e,i){var n=[t[0].slice(),t[t.length-1].slice()],a="horizontal"===i?0:1;return n[0][a]=n[0][a]-e/2,n[1][a]=n[1][a]+e/2,n},_drawSplitline:function(t,e,i){var n=new Er({z2:20,shape:{points:t},style:e});i.add(n)},_getLinePointsOfOneWeek:function(t,e,i){var n=t.coordinateSystem;e=n.getDateInfo(e);for(var a=[],o=0;o<7;o++){var r=n.getNextNDay(e.time,o),s=n.dataToRect([r.time],!1);a[2*r.day]=s.tl,a[2*r.day+1]=s["horizontal"===i?"bl":"tr"]}return a},_formatterLabel:function(t,e){return"string"==typeof t&&t?Hl(t,e):"function"==typeof t?t(e):e.nameMap},_yearTextPositionControl:function(t,e,i,n,a){e=e.slice();var o=["center","bottom"];"bottom"===n?(e[1]+=a,o=["center","top"]):"left"===n?e[0]-=a:"right"===n?(e[0]+=a,o=["center","top"]):e[1]-=a;var r=0;return"left"!==n&&"right"!==n||(r=Math.PI/2),{rotation:r,position:e,style:{textAlign:o[0],textVerticalAlign:o[1]}}},_renderYearText:function(t,e,i,n){var a=t.getModel("yearLabel");if(a.get("show")){var o=a.get("margin"),r=a.get("position");r=r||("horizontal"!==i?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===i?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var f=a.get("formatter"),p={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(f,p),m=new Dr({z2:30});Es(m.style,a,{text:g}),m.attr(this._yearTextPositionControl(m,c[r],i,r,o)),n.add(m)}},_monthTextPositionControl:function(t,e,i,n,a){var o="left",r="top",s=t[0],l=t[1];return"horizontal"===i?(l+=a,e&&(o="center"),"start"===n&&(r="bottom")):(s+=a,e&&(r="middle"),"start"===n&&(o="right")),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderMonthText:function(t,e,i){var n=t.getModel("monthLabel");if(n.get("show")){var a=n.get("nameMap"),o=n.get("margin"),r=n.get("position"),s=n.get("align"),l=[this._tlpoints,this._blpoints];R(a)&&(a=nA[a.toUpperCase()]||[]);var u="start"===r?0:1,h="horizontal"===e?0:1;o="start"===r?-o:o;for(var c="center"===s,d=0;dd.getHeight()&&(i.textPosition="top",o=!0);var r=o?-5-n.height:p+8;a+n.width/2>d.getWidth()?(i.textPosition=["100%",r],i.textAlign="right"):a-n.width/2<0&&(i.textPosition=[0,r],i.textAlign="left")}})}function t(t,e){var i,n=g[t],a=g[e],o=new ul(l[n],h,h.ecModel);if(n&&!a){if(function(t){return 0===t.indexOf("my")}(n))i={model:o,onclick:o.option.onclick,featureName:n};else{var r=cA(n);if(!r)return;i=new r(o,c,d)}u[n]=i}else{if(!(i=u[a]))return;i.model=o,i.ecModel=c,i.api=d}n||!a?o.get("show")&&!i.unusable?(function(a,o,t){var r=a.getModel("iconStyle"),s=a.getModel("emphasis.iconStyle"),e=o.getIcons?o.getIcons():a.get("icon"),l=a.get("title")||{};if("string"==typeof e){var i=e,n=l;l={},(e={})[t]=i,l[t]=n}var u=a.iconPaths={};L(e,function(t,e){var i=Js(t,{},{x:-p/2,y:-p/2,width:p,height:p});i.setStyle(r.getItemStyle()),i.hoverStyle=s.getItemStyle();var n=h.getModel("tooltip");n&&n.get("show")&&i.attr("tooltip",C({content:l[e],formatter:n.get("formatter",!0)||function(){return l[e]},formatterParams:{componentType:"toolbox",name:e,title:l[e],$vars:["name","title"]},position:n.get("position",!0)||"bottom"},n.option)),ks(i),h.get("showTitle")&&(i.__title=l[e],i.on("mouseover",function(){var t=s.getItemStyle();i.setStyle({text:l[e],textPosition:s.get("textPosition")||"bottom",textFill:s.get("textFill")||t.fill||t.stroke||"#000",textAlign:s.get("textAlign")||"center",textBackgroundColor:s.get("textBackgroundColor"),textBorderRadius:s.get("textBorderRadius"),textPadding:s.get("textPadding")})}).on("mouseout",function(){i.setStyle({textFill:null,textBackgroundColor:null})})),i.trigger(a.get("iconStatus."+e)||"normal"),f.add(i),i.on("click",N(o.onclick,o,c,d,e)),u[e]=i})}(o,i,n),o.setIconStatus=function(t,e){var i=this.option,n=this.iconPaths;i.iconStatus=i.iconStatus||{},i.iconStatus[t]=e,n[t]&&n[t].trigger(e)},i.render&&i.render(o,c,d,s)):i.remove&&i.remove(c,d):i.dispose&&i.dispose(c,d)}},updateView:function(t,e,i,n){L(this._features,function(t){t.updateView&&t.updateView(t.model,e,i,n)})},remove:function(e,i){L(this._features,function(t){t.remove&&t.remove(e,i)}),this.group.removeAll()},dispose:function(e,i){L(this._features,function(t){t.dispose&&t.dispose(e,i)})}});var pA=dc.toolbox.saveAsImage;function gA(t){this.model=t}gA.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:pA.title,type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:pA.lang.slice()},gA.prototype.unusable=!v.canvasSupported,gA.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=i.get("type",!0)||"png",o=e.getConnectedDataURL({type:a,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if("function"!=typeof MouseEvent||v.browser.ie||v.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var r=atob(o.split(",")[1]),s=r.length,l=new Uint8Array(s);s--;)l[s]=r.charCodeAt(s);var u=new Blob([l]);window.navigator.msSaveOrOpenBlob(u,n+"."+a)}else{var h=i.get("lang"),c='';window.open().document.write(c)}else{var d=document.createElement("a");d.download=n+"."+a,d.target="_blank",d.href=o;var f=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});d.dispatchEvent(f)}},hA("saveAsImage",gA);var mA=dc.toolbox.magicType;function vA(t){this.model=t}vA.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(mA.title),option:{},seriesIndex:{}};var yA=vA.prototype;yA.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return L(t.get("type"),function(t){e[t]&&(i[t]=e[t])}),i};var xA={line:function(t,e,i,n){if("bar"===t)return m({id:e,type:"line",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.line")||{},!0)},bar:function(t,e,i,n){if("line"===t)return m({id:e,type:"bar",data:i.get("data"),stack:i.get("stack"),markPoint:i.get("markPoint"),markLine:i.get("markLine")},n.get("option.bar")||{},!0)},stack:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return m({id:e,stack:""},n.get("option.tiled")||{},!0)}},_A=[["line","bar"],["stack","tiled"]];yA.onclick=function(u,t,h){var c=this.model,e=c.get("seriesIndex."+h);if(xA[h]){var d={series:[]};L(_A,function(t){0<=_(t,h)&&L(t,function(t){c.setIconStatus(t,"normal")})}),c.setIconStatus(h,"emphasis"),u.eachComponent({mainType:"series",query:null==e?null:{seriesIndex:e}},function(t){var e=t.subType,i=t.id,n=xA[h](e,i,t,c);n&&(T(n,t.option),d.series.push(n));var a=t.coordinateSystem;if(a&&"cartesian2d"===a.type&&("line"===h||"bar"===h)){var o=a.getAxesByScale("ordinal")[0];if(o){var r=o.dim+"Axis",s=u.queryComponents({mainType:r,index:t.get(name+"Index"),id:t.get(name+"Id")})[0].componentIndex;d[r]=d[r]||[];for(var l=0;l<=s;l++)d[r][s]=d[r][s]||{};d[r][s].boundaryGap="bar"===h}}}),t.dispatchAction({type:"changeMagicType",currentType:h,newOption:d})}},$d({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(t,e){e.mergeOption(t.newOption)}),hA("magicType",vA);var wA=dc.toolbox.dataView,bA=new Array(60).join("-"),SA="\t";function MA(t){var e=function(t){var a={},o=[],r=[];return t.eachRawSeries(function(t){var e=t.coordinateSystem;if(!e||"cartesian2d"!==e.type&&"polar"!==e.type)o.push(t);else{var i=e.getBaseAxis();if("category"===i.type){var n=i.dim+"_"+i.index;a[n]||(a[n]={categoryAxis:i,valueAxis:e.getOtherAxis(i),series:[]},r.push({axisDim:i.dim,axisIndex:i.index})),a[n].series.push(t)}else o.push(t)}}),{seriesGroupByCategoryAxis:a,other:o,meta:r}}(t);return{value:M([function(t){var h=[];return L(t,function(t,e){var i=t.categoryAxis,n=t.valueAxis.dim,a=[" "].concat(k(t.series,function(t){return t.name})),o=[i.model.getCategories()];L(t.series,function(t){o.push(t.getRawData().mapArray(n,function(t){return t}))});for(var r=[a.join(SA)],s=0;st[1]&&t.reverse(),t}function EA(t,e){return Pa(t,e,{includeMainTypes:NA})}zA.setOutputRanges=function(t,e){this.matchOutputRanges(t,e,function(t,e,i){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var n=FA[t.brushType](0,i,e);t.__rangeOffset={offset:HA[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}})},zA.matchOutputRanges=function(t,n,a){CA(t,function(i){var t=this.findTargetInfo(i,n);t&&!0!==t&&L(t.coordSyses,function(t){var e=FA[i.brushType](1,t,i.range);a(i,e.values,t,n)})},this)},zA.setInputRanges=function(t,a){CA(t,function(t){var e=this.findTargetInfo(t,a);if(t.range=t.range||[],e&&!0!==e){t.panelId=e.panelId;var i=FA[t.brushType](0,e.coordSys,t.coordRange),n=t.__rangeOffset;t.range=n?HA[t.brushType](i.values,n.offset,function(t,e){var i=UA(t),n=UA(e),a=[i[0]/n[0],i[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}(i.xyMinMax,n.xyMinMax)):i.values}},this)},zA.makePanelOpts=function(i,n){return k(this._targetInfoList,function(t){var e=t.getPanelRect();return{panelId:t.panelId,defaultBrushType:n&&n(t),clipPath:pb(e),isTargetByCursor:mb(e,i,t.coordSysModel),getLinearBrushOtherExtent:gb(e)}})},zA.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&0<=LA(n.coordSyses,e.coordinateSystem)},zA.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=EA(e,t),a=0;an[1]&&(n[1]=e[1])})}),n[1]c[1];if(r&&!s&&!l)return!0;r&&(n=!0),s&&(e=!0),l&&(i=!0)}return n&&e&&i}):nT(h,function(t){if("empty"===a)i.setData(u=u.map(t,function(t){return function(t){return t>=c[0]&&t<=c[1]}(t)?t:NaN}));else{var e={};e[t]=c,u.selectRange(e)}}),nT(h,function(t){u.setApproximateExtent(c,t)}))})}}};var rT=L,sT=tT,lT=af({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,i){this._dataIntervalByAxis={},this._dataInfo={},this._axisProxies={},this.textStyleModel,this._autoThrottle=!0,this._rangePropMode=["percent","percent"];var n=uT(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=uT(t);m(this.option,t,!0),this.doInit(e)},doInit:function(t){var i=this.option;v.canvasSupported||(i.realtime=!1),this._setDefaultThrottle(t),hT(this,t),rT([["start","startValue"],["end","endValue"]],function(t,e){"value"===this._rangePropMode[e]&&(i[t[0]]=null)},this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var r=this._axisProxies;this.eachTargetAxis(function(t,e,i,n){var a=this.dependentModels[t.axis][e],o=a.__dzAxisProxy||(a.__dzAxisProxy=new iT(t.name,e,this,n));r[t.name+"_"+e]=o},this)},_resetTarget:function(){var i=this.option,t=this._judgeAutoMode();sT(function(t){var e=t.axisIndex;i[e]=wa(i[e])},this),"axisIndex"===t?this._autoSetAxisIndex():"orient"===t&&this._autoSetOrient()},_judgeAutoMode:function(){var e=this.option,i=!1;sT(function(t){null!=e[t.axisIndex]&&(i=!0)},this);var t=e.orient;return null==t&&i?"orient":i?void 0:(null==t&&(e.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var o=!0,e=this.get("orient",!0),r=this.option,t=this.dependentModels;if(o){var i="vertical"===e?"y":"x";t[i+"Axis"].length?(r[i+"AxisIndex"]=[0],o=!1):rT(t.singleAxis,function(t){o&&t.get("orient",!0)===e&&(r.singleAxisIndex=[t.componentIndex],o=!1)})}o&&sT(function(t){if(o){var e=[],i=this.dependentModels[t.axis];if(i.length&&!e.length)for(var n=0,a=i.length;ne[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&qT(e)}};function qT(t){return new bi(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var KT=["#ddd"];af({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 i=this.option;e||ET(i,t,["inBrush","outOfBrush"]);var n=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:KT},n.hasOwnProperty("liftZ")||(n.liftZ=5)},setAreas:function(t){t&&(this.areas=k(t,function(t){return $T(this.option,t)},this))},setBrushOption:function(t){this.brushOption=$T(this.option,t),this.brushType=this.brushOption.brushType}});function $T(t,e){return m({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new ul(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}function JT(t,e,i,n){n&&n.$from===t.id||this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}of({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new Bw(e.getZr())).on("brush",N(this._onBrush,this)).mount()},render:function(t){return this.model=t,JT.apply(this,arguments)},updateTransform:JT,updateView:JT,dispose:function(){this._brushController.dispose()},_onBrush:function(t,e){var i=this.model.id;this.model.brushTargetManager.setOutputRanges(t,this.ecModel),e.isEnd&&!e.removeOnClick||this.api.dispatchAction({type:"brush",brushId:i,areas:D(t),$from:i})}}),$d({type:"brush",event:"brush"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(t){t.setAreas(e.areas)})}),$d({type:"brushSelect",event:"brushSelected",update:"none"},function(){});var QT=dc.toolbox.brush;function tD(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}tD.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(QT.title)};var eD=tD.prototype;eD.render=eD.updateView=function(e,t,i){var n,a,o;t.eachComponent({mainType:"brush"},function(t){n=t.brushType,a=t.brushOption.brushMode||"single",o|=t.areas.length}),this._brushType=n,this._brushMode=a,L(e.get("type",!0),function(t){e.setIconStatus(t,("keep"===t?"multiple"===a:"clear"===t?o:t===n)?"emphasis":"normal")})},eD.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return L(t.get("type",!0),function(t){e[t]&&(i[t]=e[t])}),i},eD.onclick=function(t,e,i){var n=this._brushType,a=this._brushMode;"clear"===i?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===i?n:n!==i&&i,brushMode:"keep"===i?"multiple"===a?"single":"multiple":a}})},hA("brush",tD),qd(function(t,e){var i=t&&t.brush;if(O(i)||(i=i?[i]:[]),i.length){var n=[];L(i,function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))});var a=t&&t.toolbox;O(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o=a.feature||(a.feature={}),r=o.brush||(o.brush={}),s=r.type||(r.type=[]);s.push.apply(s,n),function(i){var e={};L(i,function(t){e[t]=1}),i.length=0,L(e,function(t,e){i.push(e)})}(s),e&&!s.length&&s.push.apply(s,NT)}}),af({type:"title",layoutMode:{type:"box",ignoreSize:!0},defaultOption:{zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bolder",color:"#333"},subtextStyle:{color:"#aaa"}}}),of({type:"title",render:function(t,e,i){if(this.group.removeAll(),t.get("show")){var n=this.group,a=t.getModel("textStyle"),o=t.getModel("subtextStyle"),r=t.get("textAlign"),s=H(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Dr({style:Es({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Dr({style:Es({},o,{text:h,textFill:o.getTextColor(),y:u.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),f=t.get("sublink"),p=t.get("triggerEvent",!0);l.silent=!d&&!p,c.silent=!f&&!p,d&&l.on("click",function(){window.open(d,"_"+t.get("target"))}),f&&c.on("click",function(){window.open(f,"_"+t.get("subtarget"))}),l.eventData=c.eventData=p?{componentType:"title",componentIndex:t.componentIndex}:null,n.add(l),h&&n.add(c);var g=n.getBoundingRect(),m=t.getBoxLayoutParams();m.width=g.width,m.height=g.height;var v=eu(m,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?v.x+=v.width:"center"===r&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),n.attr("position",[v.x,v.y]);var y={textAlign:r,textVerticalAlign:s};l.setStyle(y),c.setStyle(y),g=n.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var w=new Hr({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});n.add(w)}}});function iD(t){var e=t.itemStyle||(t.itemStyle={}),i=e.emphasis||(e.emphasis={}),n=t.label||t.label||{},a=n.normal||(n.normal={}),o={normal:1,emphasis:1};L(n,function(t,e){o[e]||nD(a,e)||(a[e]=t)}),i.label&&!nD(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function nD(t,e){return t.hasOwnProperty(e)}hu.registerSubTypeDefaulter("timeline",function(){return"slider"}),$d({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(t,e){var i=e.getComponent("timeline");return i&&null!=t.currentIndex&&(i.setCurrentIndex(t.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.setPlayState(!1)),e.resetOption("timeline"),T({currentIndex:i.option.currentIndex},t)}),$d({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)});var aD=hu.extend({type:"timeline",layoutMode:"box",defaultOption:{zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){aD.superApply(this,"mergeOption",arguments),this._initData()},setCurrentIndex:function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(e<=t&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},getCurrentIndex:function(){return this.option.currentIndex},isIndexMax:function(){return this.getCurrentIndex()>=this._data.count()-1},setPlayState:function(t){this.option.autoPlay=!!t},getPlayState:function(){return!!this.option.autoPlay},_initData:function(){var t=this.option,e=t.data||[],i=t.axisType,a=this._names=[];if("category"===i){var o=[];L(e,function(t,e){var i,n=Ma(t);E(t)?(i=D(t)).value=e:i=e,o.push(i),R(n)||null!=n&&!isNaN(n)||(n=""),a.push(n+"")}),e=o}var n={category:"ordinal",time:"time"}[i]||"number";(this._data=new Mf([{name:"value",type:n}],this)).initData(e,a)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}});b(aD.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:[]}}),Mh);function oD(t,e,i,n){pg.call(this,t,e,i),this.type=n||"value",this.model=null}var rD=Yh.extend({type:"timeline"});oD.prototype={constructor:oD,getLabelModel:function(){return this.model.getModel("label")},isHorizontal:function(){return"horizontal"===this.model.get("orient")}},w(oD,pg);var sD=N,lD=L,uD=Math.PI;function hD(t,e,i,n,a,o){var r=e.get("color");a?(a.setColor(r),i.add(a),o&&o.onUpdate(a)):((a=qp(t.get("symbol"),-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a));var s=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(s),n=m({rectHover:!0,z2:100},n,!0);var l=t.get("symbolSize");(l=l instanceof Array?l.slice():[+l,+l])[0]/=2,l[1]/=2,n.scale=l;var u=t.get("symbolOffset");if(u){var h=n.position=n.position||[0,0];h[0]+=ml(u[0],l[0]),h[1]+=ml(u[1],l[1])}var c=t.get("symbolRotate");return n.rotation=(c||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function cD(t,e,i,n,a){if(!t.dragging){var o=n.getModel("checkpointStyle"),r=i.dataToCoord(n.getData().get(["value"],e));a||!o.get("animation",!0)?t.attr({position:[r,0]}):(t.stopAnimation(!0),t.animateTo({position:[r,0]},o.get("animationDuration",!0),o.get("animationEasing",!0)))}}rD.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,i,n){if(this.model=e,this.api=i,this.ecModel=t,this.group.removeAll(),e.get("show",!0)){var a=this._layout(e,i),o=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,e);e.formatTooltip=function(t){return Vl(s.scale.getLabel(t))},lD(["AxisLine","AxisTick","Control","CurrentPointer"],function(t){this["_render"+t](a,o,s,e)},this),this._renderAxisLabel(a,r,s,e),this._position(a,e)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.position"),n=t.get("orient"),a=function(t,e){return eu(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2n[1]&&(i=n[1]),i"),a&&(o+=fD(a),null!=i&&(o+=" : ")),null!=i&&(o+=fD(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});b(gD,Mh),gD.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 mD=_;function vD(t,e,i,n,a,o){var r=[],s=Ff(e,n)?e.getCalculationInfo("stackResultDimension"):n,l=MD(e,s,t),u=e.indicesOfNearest(s,l)[0];r[a]=e.get(i,u),r[o]=e.get(n,u);var h=xl(e.get(n,u));return 0<=(h=Math.min(h,20))&&(r[o]=+r[o].toFixed(h)),r}var yD=A,xD={min:yD(vD,"min"),max:yD(vD,"max"),average:yD(vD,"average")};function _D(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!O(e.coord)&&n){var a=n.dimensions,o=wD(e,i,n,t);if((e=D(e)).type&&xD[e.type]&&o.baseAxis&&o.valueAxis){var r=mD(a,o.baseAxis.dim),s=mD(a,o.valueAxis.dim);e.coord=xD[e.type](i,o.baseDataDim,o.valueDataDim,r,s),e.value=e.coord[s]}else{for(var l=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],u=0;u<2;u++)xD[l[u]]&&(l[u]=MD(i,i.mapDimension(a[u]),l[u]));e.coord=l}}return e}function wD(t,e,i,n){var a={};return null!=t.valueIndex||null!=t.valueDim?(a.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,a.valueAxis=i.getAxis(function(t,e){var i=t.getData(),n=i.dimensions;e=i.getDimension(e);for(var a=0;ai[l],p=[-c.x,-c.y];n||(p[s]=a.position[s]);var g=[0,0],m=[-d.x,-d.y],v=H(t.get("pageButtonGap",!0),t.get("itemGap",!0));f&&("end"===t.get("pageButtonPosition",!0)?m[s]+=i[l]-d[l]:g[s]+=d[l]+v);m[1-s]+=c[u]/2-d[u]/2,a.attr("position",p),o.attr("position",g),r.attr("position",m);var y=this.group.getBoundingRect();if((y={x:0,y:0})[l]=f?i[l]:c[l],y[u]=Math.max(c[u],d[u]),y[h]=Math.min(0,d[h]+m[1-s]),o.__rectSize=i[l],f){var x={x:0,y:0};x[l]=Math.max(i[l]-d[l]-v,0),x[u]=y[u],o.setClipPath(new Hr({shape:x})),o.__rectSize=x[l]}else r.eachChild(function(t){t.attr({invisible:!0,silent:!0})});var _=this._getPageInfo(t);return null!=_.pageIndex&&Us(a,{position:_.contentPosition},f&&t),this._updatePageInfoView(t,_),y},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(n,a){var o=this._controllerGroup;L(["pagePrev","pageNext"],function(t){var e=null!=a[t+"DataIndex"],i=o.childOfName(t);i&&(i.setStyle("fill",e?n.get("pageIconColor",!0):n.get("pageIconInactiveColor",!0)),i.cursor=e?"pointer":"default")});var t=o.childOfName("pageText"),e=n.get("pageFormatter"),i=a.pageIndex,r=null!=i?i+1:0,s=a.pageCount;t&&e&&t.setStyle("text",R(e)?e.replace("{current}",r).replace("{total}",s):e({current:r,total:s}))},_getPageInfo:function(t){var e=t.get("scrollDataIndex",!0),i=this.getContentGroup(),n=this._containerGroup.__rectSize,a=t.getOrient().index,o=KD[a],r=$D[a],s=this._findTargetItemIndex(e),l=i.children(),u=l[s],h=l.length,c=h?1:0,d={contentPosition:i.position.slice(),pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return d;var f=y(u);d.contentPosition[a]=-f.s;for(var p=s+1,g=f,m=f,v=null;p<=h;++p)(!(v=y(l[p]))&&m.e>g.s+n||v&&!x(v,g.s))&&(g=m.i>g.i?m:v)&&(null==d.pageNextDataIndex&&(d.pageNextDataIndex=g.i),++d.pageCount),m=v;for(p=s-1,g=f,m=f,v=null;-1<=p;--p)(v=y(l[p]))&&x(m,v.s)||!(g.i=e&&t.s<=e+n}},_findTargetItemIndex:function(n){var a,o,t=this.getContentGroup();return this._showController&&t.eachChild(function(t,e){var i=t.__legendDataIndex;null==o&&null!=i&&(o=e),i===n&&(a=e)}),null!=a?a:o}});$d("legendScroll","legendscroll",function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(t){t.setScrollDataIndex(i)})});lT.extend({type:"dataZoom.slider",layoutMode:"box",defaultOption:{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#2f4554",width:.5,opacity:.3},areaStyle:{color:"rgba(47,69,84,0.3)",opacity:.3}},borderColor:"#ddd",fillerColor:"rgba(167,183,204,0.4)",handleIcon:"M8.2,13.6V3.9H6.3v9.7H3.1v14.9h3.3v9.7h1.8v-9.7h3.3V13.6H8.2z M9.7,24.4H4.8v-1.4h4.9V24.4z M9.7,19.1H4.8v-1.4h4.9V19.1z",handleSize:"100%",handleStyle:{color:"#a7b7cc"},labelPrecision:null,labelFormatter:null,showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#333"}}});var QD=Hr,tC=gl,eC=yl,iC=N,nC=L,aC="horizontal",oC="vertical",rC=["line","bar","candlestick","scatter"],sC=cT.extend({type:"dataZoom.slider",init:function(t,e){this._displayables={},this._orient,this._range,this._handleEnds,this._size,this._handleWidth,this._handleHeight,this._location,this._dragging,this._dataShadowInfo,this.api=e},render:function(t,e,i,n){sC.superApply(this,"render",arguments),uc(this,"_dispatchZoomAction",this.dataZoomModel.get("throttle"),"fixRate"),this._orient=t.get("orient"),!1!==this.dataZoomModel.get("show")?(n&&"dataZoom"===n.type&&n.from===this.uid||this._buildView(),this._updateView()):this.group.removeAll()},remove:function(){sC.superApply(this,"remove",arguments),hc(this,"_dispatchZoomAction")},dispose:function(){sC.superApply(this,"dispose",arguments),hc(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new Si;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},_resetLocation:function(){var t=this.dataZoomModel,e=this.api,i=this._findCoordRect(),n={width:e.getWidth(),height:e.getHeight()},a=this._orient===aC?{right:n.width-i.x-i.width,top:n.height-30-7,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},o=au(t.option);L(["right","top","width","height"],function(t){"ph"===o[t]&&(o[t]=a[t])});var r=eu(o,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],this._orient===oC&&this._size.reverse()},_positionGroup:function(){var t=this.group,e=this._location,i=this._orient,n=this.dataZoomModel.getFirstTargetAxisModel(),a=n&&n.get("inverse"),o=this._displayables.barGroup,r=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(i!==aC||a?i===aC&&a?{scale:r?[-1,1]:[-1,-1]}:i!==oC||a?{scale:r?[-1,-1]:[-1,1],rotation:Math.PI/2}:{scale:r?[1,-1]:[1,1],rotation:Math.PI/2}:{scale:r?[1,1]:[1,-1]});var s=t.getBoundingRect([o]);t.attr("position",[e.x-s.x,e.y-s.y])},_getViewExtent:function(){return[0,this._size[0]]},_renderBackground:function(){var t=this.dataZoomModel,e=this._size,i=this._displayables.barGroup;i.add(new QD({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new QD({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:N(this._onClickPanelClick,this)}))},_renderDataShadow:function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(t){var e=this._size,i=t.series,n=i.getRawData(),a=i.getShadowDim?i.getShadowDim():t.otherDim;if(null!=a){var o=n.getDataExtent(a),r=.3*(o[1]-o[0]);o=[o[0]-r,o[1]+r];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],d=u[1]/(n.count()-1),f=0,p=Math.round(n.count()/e[0]);n.each([a],function(t,e){if(0e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2,o=this._updateInterval("all",i[0]-a);this._updateView(),o&&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 i;if(nC(this.getTargetCoordInfo(),function(t){if(!i&&t.length){var e=t[0].model.coordinateSystem;i=e.getRect&&e.getRect()}}),!i){var t=this.api.getWidth(),e=this.api.getHeight();i={x:.2*t,y:.2*e,width:.6*t,height:.6*e}}return i}});function lC(t){return"vertical"===t?"ns-resize":"ew-resize"}lT.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}});var uC="\0_ec_dataZoom_roams";function hC(t,n){var e=dC(t),a=n.dataZoomId,o=n.coordId;L(e,function(t,e){var i=t.dataZoomInfos;i[a]&&_(n.allCoordIds,o)<0&&(delete i[a],t.count--)}),fC(e);var i=e[o];i||((i=e[o]={coordId:o,dataZoomInfos:{},count:0}).controller=function(t,r){var e=new Qv(t.getZr());return L(["pan","zoom","scrollMove"],function(o){e.on(o,function(n){var a=[];L(r.dataZoomInfos,function(t){if(n.isAvailableBehavior(t.dataZoomModel.option)){var e=(t.getRange||{})[o],i=e&&e(r.controller,n);!t.dataZoomModel.get("disabled",!0)&&i&&a.push({dataZoomId:t.dataZoomId,start:i[0],end:i[1]})}}),a.length&&r.dispatchAction(a)})}),e}(t,i),i.dispatchAction=A(pC,t)),i.dataZoomInfos[a]||i.count++,i.dataZoomInfos[a]=n;var r=function(t){var n,a={type_true:2,type_move:1,type_false:0,type_undefined:-1},o=!0;return L(t,function(t){var e=t.dataZoomModel,i=!e.get("disabled",!0)&&(!e.get("zoomLock",!0)||"move");a["type_"+n]"],O(t)&&(t=t.slice(),n=!0),a=e?t:n?[u(t[0]),u(t[1])]:u(t),R(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):z(l)?n?l(t[0],t[1]):l(t):n?t[0]===s[0]?i[0]+" "+a[1]:t[1]===s[1]?i[1]+" "+a[0]:a[0]+" - "+a[1]:a;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=kC([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension,i=t.dimensions;if(null!=e||i.length){if(null!=e)return t.getDimension(e);for(var n=t.dimensions,a=n.length-1;0<=a;a--){var o=n[a];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.ecModel,e=this.option,i={inRange:e.inRange,outOfRange:e.outOfRange},n=e.target||(e.target={}),a=e.controller||(e.controller={});m(n,i),m(a,i);var u=this.isCategory();function o(n){CC(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")},LC(this.stateList,function(t){var e=n[t];if(R(e)){var i=IC(e,"active",u);i?(n[t]={},n[t][e]=i):delete n[t]}},this)}o.call(this,n),o.call(this,a),function(t,e,i){var n=t[e],a=t[i];n&&!a&&(a=t[i]={},LC(n,function(t,e){if(Dx.isValidType(e)){var i=IC(e,"inactive",u);null!=i&&(a[e]=i,"color"!==e||a.hasOwnProperty("opacity")||a.hasOwnProperty("colorAlpha")||(a.opacity=[0,0]))}}))}.call(this,n,"inRange","outOfRange"),function(o){var r=(o.inRange||{}).symbol||(o.outOfRange||{}).symbol,s=(o.inRange||{}).symbolSize||(o.outOfRange||{}).symbolSize,l=this.get("inactiveColor");LC(this.stateList,function(t){var e=this.itemSize,i=o[t];null==(i=i||(o[t]={color:u?l:[l]})).symbol&&(i.symbol=r&&D(r)||(u?"roundRect":["roundRect"])),null==i.symbolSize&&(i.symbolSize=s&&D(s)||(u?e[0]:[e[0],e[0]])),i.symbol=TC(i.symbol,function(t){return"none"===t||"square"===t?"roundRect":t});var n=i.symbolSize;if(null!=n){var a=-1/0;DC(n,function(t){ae[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){NC.prototype.completeVisualOption.apply(this,arguments),L(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=yl((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(n){var a=[];return this.eachTargetSeries(function(t){var i=[],e=t.getData();e.each(this.getDataDimension(e),function(t,e){n[0]<=t&&t<=n[1]&&i.push(e)},this),a.push({seriesId:t.id,dataIndex:i})},this),a},getVisualMeta:function(i){var t=RC(this,"outOfRange",this.getExtent()),e=RC(this,"inRange",this.option.range.slice()),n=[];function a(t,e){n.push({value:t,color:i(t,e)})}for(var o=0,r=0,s=e.length,l=t.length;rt[1])break;i.push({color:this.getControllerVisual(o,"color",e),offset:a/100})}return i.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),i},_createBarPoints:function(t,e){var i=this.visualMapModel.itemSize;return[[i[0]-e[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-e[1],t[1]]]},_createBarGroup:function(t){var e=this._orient,i=this.visualMapModel.get("inverse");return new Si("horizontal"!==e||i?"horizontal"===e&&i?{scale:"bottom"===t?[-1,1]:[1,1],rotation:-Math.PI/2}:"vertical"!==e||i?{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(n,a){if(this._useHandle){var o=this._shapes,r=this.visualMapModel,s=o.handleThumbs,l=o.handleLabels;FC([0,1],function(t){var e=s[t];e.setStyle("fill",a.handlesColor[t]),e.position[1]=n[t];var i=js(o.handleLabelPoints[t],Ys(e,this.group));l[t].setStyle({x:i[0],y:i[1],text:r.formatValueText(this._dataInterval[t]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===t?"bottom":"top":"left",o.barGroup)})},this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=GC(t,o,s,!0),u=this._shapes,h=u.indicator;if(h){h.position[1]=l,h.attr("invisible",!1),h.setShape("points",function(t,e,i,n){return t?[[0,-WC(e,HC(i,0))],[6,0],[0,WC(e,HC(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});h.setStyle("fill",c);var d=js(u.indicatorLabelPoint,Ys(h,this.group)),f=u.indicatorLabel;f.attr("invisible",!1);var p=this._applyTransform("left",u.barGroup),g=this._orient;f.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?p:"middle",textAlign:"horizontal"===g?"center":p,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var n=this;this._shapes.barGroup.on("mousemove",function(t){if(n._hovering=!0,!n._dragging){var e=n.visualMapModel.itemSize,i=n._applyTransform([t.offsetX,t.offsetY],n._shapes.barGroup,!0,!0);i[1]=WC(HC(0,i[1]),e[1]),n._doHoverLinkToSeries(i[1],0<=i[0]&&i[0]<=e[0])}}).on("mouseout",function(){n._hovering=!1,n._dragging||n._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 i=this.visualMapModel,n=i.itemSize;if(i.option.hoverLink){var a=[0,n[1]],o=i.getExtent();t=WC(HC(a[0],t),a[1]);var r=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=GC(a,e,i,!0)/2);return n}(i,o,a),s=[t-r,t+r],l=GC(t,a,o,!0),u=[GC(s[0],a,o,!0),GC(s[1],a,o,!0)];s[0] ",r):this._showIndicator(l,l,"≈ ",r));var h=this._hoverLinkDataIndices,c=[];(e||XC(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(u));var d=function(t,e){var i={},n={};return a(t||[],i),a(e||[],n,i),[o(i),o(n)];function a(t,e,i){for(var n=0,a=t.length;ni&&n([i,e[0]],"outOfRange"),n(e.slice()),i=e[1])},this),{stops:o,outerColors:r}}function n(t,e){var i=s.getRepresentValue({interval:t});e=e||s.getValueState(i);var n=a(i,e);t[0]===-1/0?r[0]=n:t[1]===1/0?r[1]=n:o.push({value:t[0],color:n},{value:t[1],color:n})}}}),qC={splitNumber:function(){var t=this.option,e=this._pieceList,i=Math.min(t.precision,20),n=this.getExtent(),a=t.splitNumber;a=Math.max(parseInt(a,10),1),t.splitNumber=a;for(var o=(n[1]-n[0])/a;+o.toFixed(i)!==o&&i<5;)i++;t.precision=i,o=+o.toFixed(i);var r=0;t.minOpen&&e.push({index:r++,interval:[-1/0,n[0]],close:[0,0]});for(var s=n[0],l=r+a;r","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)},this)}};function KC(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}EC.extend({type:"visualMap.piecewise",doRender:function(){var o=this.group;o.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(),i=e.endsText,d=W(r.get("showLabel",!0),!i);i&&this._renderEndsText(o,i[0],c,d,h),L(e.viewPieceList,function(t){var e=t.piece,i=new Si;i.onclick=N(this._onItemClick,this,e),this._enableHoverLink(i,t.indexInModelPieceList);var n=r.getRepresentValue(e);if(this._createItemSymbol(i,n,[0,0,c[0],c[1]]),d){var a=this.visualMapModel.getValueState(n);i.add(new Dr({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"===a?.5:1}}))}o.add(i)},this),i&&this._renderEndsText(o,i[1],c,d,h),tu(r.get("orient"),o,r.get("itemGap")),this.renderBackground(o),this.positionGroup(o)},_enableHoverLink:function(t,i){function e(t){var e=this.visualMapModel;e.option.hoverLink&&this.api.dispatchAction({type:t,batch:VC(e.findTargetDataIndices(i),e)})}t.on("mouseover",N(e,this,"highlight")).on("mouseout",N(e,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return BC(t,this.api,t.itemSize);var i=e.align;return i&&"auto"!==i||(i="left"),i},_renderEndsText:function(t,e,i,n,a){if(e){var o=new Si,r=this.visualMapModel.textStyleModel;o.add(new Dr({style:{x:n?"right"===a?i[0]:0:i[0]/2,y:i[1]/2,textVerticalAlign:"middle",textAlign:n?a:"center",text:e,textFont:r.getFont(),textFill:r.getTextColor()}})),t.add(o)}},_getViewData:function(){var t=this.visualMapModel,e=k(t.getPieceList(),function(t,e){return{piece:t,indexInModelPieceList:e}}),i=t.get("text"),n=t.get("orient"),a=t.get("inverse");return("horizontal"===n?a:!a)?e.reverse():i=i&&i.slice().reverse(),{viewPieceList:e,endsText:i}},_createItemSymbol:function(t,e,i){t.add(qp(this.getControllerVisual(e,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(e,"color")))},_onItemClick:function(t){var e=this.visualMapModel,i=e.option,n=D(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,L(n,function(t,e){n[e]=e===a})):n[a]=!n[a],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:n})}});qd(xC);var $C,JC="urn:schemas-microsoft-com:vml",QC="undefined"==typeof window?null:window,tL=!1,eL=QC&&QC.document;function iL(t){return $C(t)}if(eL&&!v.canvasSupported)try{eL.namespaces.zrvml||eL.namespaces.add("zrvml",JC),$C=function(t){return eL.createElement("')}}catch(t){$C=function(t){return eL.createElement("<"+t+' xmlns="'+JC+'" class="zrvml">')}}var nL,aL=Ho.CMD,oL=Math.round,rL=Math.sqrt,sL=Math.abs,lL=Math.cos,uL=Math.sin,hL=Math.max;if(!v.canvasSupported){var cL=",",dL="progid:DXImageTransform.Microsoft",fL=21600,pL=fL/2,gL=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=fL+","+fL,t.coordorigin="0,0"},mL=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},vL=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},yL=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},xL=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},_L=function(t,e){return"string"==typeof t?0<=t.lastIndexOf("%")?parseFloat(t)/100*e:parseFloat(t):t},wL=function(t,e,i){var n=ze(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=mL(n[0],n[1],n[2]),t.opacity=i*n[3])},bL=function(t,e,i,n){var a="fill"===e,o=t.getElementsByTagName(e)[0];null!=i[e]&&"none"!==i[e]&&(a||!a&&i.lineWidth)?(t[a?"filled":"stroked"]="true",i[e]instanceof jr&&yL(t,o),o=o||iL(e),a?function(t,e,i){var n,a,o=e.fill;if(null!=o)if(o instanceof jr){var r,s=0,l=[0,0],u=0,h=1,c=i.getBoundingRect(),d=c.width,f=c.height;if("linear"===o.type){r="gradient";var p=i.transform,g=[o.x*d,o.y*f],m=[o.x2*d,o.y2*f];p&&(bt(g,g,p),bt(m,m,p));var v=m[0]-g[0],y=m[1]-g[1];(s=180*Math.atan2(v,y)/Math.PI)<0&&(s+=360),s<1e-6&&(s=0)}else{r="gradientradial";g=[o.x*d,o.y*f],p=i.transform;var x=i.scale,_=d,w=f;l=[(g[0]-c.x)/_,(g[1]-c.y)/w],p&&bt(g,g,p),_/=x[0]*fL,w/=x[1]*fL;var b=hL(_,w);u=0/b,h=2*o.r/b-u}var S=o.colorStops.slice();S.sort(function(t,e){return t.offset-e.offset});for(var M=S.length,I=[],A=[],T=0;T=c&&d<=i+1){for(var n=[],a=0;a=c&&d<=a+1)return lk(h,e.components,u,l);p[t]=e}else p[t]=void 0}var s;f++}for(;f<=e;){var r=o();if(r)return r}},pushComponent:function(t,e,i){var n=t[t.length-1];n&&n.added===e&&n.removed===i?t[t.length-1]={count:n.count+1,added:e,removed:i}:t.push({count:1,added:e,removed:i})},extractCommon:function(t,e,i,n){for(var a=e.length,o=i.length,r=t.newPos,s=r-n,l=0;r+1