You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
678 KiB

import{k as t,r as e,j as i,a7 as n,b as a,c as o,d as r,e as s,B as l,F as h,z as u,X as c,C as d}from"./index-909bd241.js";import{h as p}from"./moment-6961f857.js";import{_ as f}from"./plugin-vue_export-helper-46f75680.js";var g={},m={};"undefined"!=typeof window||void 0!==t&&t.__DEV__;var v={},y=2311;var x=function(){return y++};var _="undefined"==typeof navigator?{browser:{},os:{},node:!0,canvasSupported:!0,svgSupported:!0}:function(t){var e={},i={},n=t.match(/Firefox\/([\d.]+)/),a=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge\/([\d.]+)/),r=/micromessenger/i.test(t);n&&(i.firefox=!0,i.version=n[1]);a&&(i.ie=!0,i.version=a[1]);o&&(i.edge=!0,i.version=o[1]);r&&(i.weChat=!0);return{browser:i,os:e,node:!1,canvasSupported:!!document.createElement("canvas").getContext,svgSupported:"undefined"!=typeof SVGRect,touchEventsSupported:"ontouchstart"in window&&!i.ie&&!i.edge,pointerEventsSupported:"onpointerdown"in window&&(i.edge||i.ie&&i.version>=11)}}(navigator.userAgent),b={},w={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},S={"[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},M=Object.prototype.toString,I=Array.prototype,A=I.forEach,T=I.filter,C=I.slice,L=I.map,D=I.reduce,P={};function k(t){if(null==t||"object"!=typeof t)return t;var e=t,i=M.call(t);if("[object Array]"===i){e=[];for(var n=0,a=t.length;n<a;n++)e[n]=k(t[n])}else if(S[i]){var o=t.constructor;if(t.constructor.from)e=o.from(t);else{e=new o(t.length);for(n=0,a=t.length;n<a;n++)e[n]=k(t[n])}}else if(!w[i]&&!F(t)&&!H(t))for(var r in e={},t)t.hasOwnProperty(r)&&(e[r]=k(t[r]));return e}function O(t,e,i){if(!G(e)||!G(t))return i?k(e):t;for(var n in e)if(e.hasOwnProperty(n)){var a=t[n],o=e[n];!G(o)||!G(a)||B(o)||B(a)||H(o)||H(a)||W(o)||W(a)||F(o)||F(a)?!i&&n in t||(t[n]=k(e[n])):O(a,o,i)}return t}function z(t,e,i){for(var n in e)e.hasOwnProperty(n)&&(i?null!=e[n]:null==t[n])&&(t[n]=e[n]);return t}var E,R=function(){return P.createCanvas()};function N(t,e,i){if(t&&e)if(t.forEach&&t.forEach===A)t.forEach(e,i);else if(t.length===+t.length)for(var n=0,a=t.length;n<a;n++)e.call(i,t[n],n,t);else for(var o in t)t.hasOwnProperty(o)&&e.call(i,t[o],o,t)}function V(t,e){var i=C.call(arguments,2);return function(){return t.apply(e,i.concat(C.call(arguments)))}}function B(t){return"[object Array]"===M.call(t)}function G(t){var e=typeof t;return"function"===e||!!t&&"object"==e}function W(t){return!!w[M.call(t)]}function H(t){return"object"==typeof t&&"number"==typeof t.nodeType&&"object"==typeof t.ownerDocument}P.createCanvas=function(){return document.createElement("canvas")};function F(t){return t.__ec_primitive__}function Z(t){t&&N(t,(function(t,e){this.set(e,t)}),this)}Z.prototype={constructor:Z,get:function(t){return this["_ec_"+t]},set:function(t,e){return this["_ec_"+t]=e,e},each:function(t,e){for(var i in void 0!==e&&(t=V(t,e)),this)this.hasOwnProperty(i)&&t(this[i],i.slice(4))},removeKey:function(t){delete this["_ec_"+t]}},b.$override=function(t,e){P[t]=e},b.clone=k,b.merge=O,b.mergeAll=function(t,e){for(var i=t[0],n=1,a=t.length;n<a;n++)i=O(i,t[n],e);return i},b.extend=function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t},b.defaults=z,b.createCanvas=R,b.getContext=function(){return E||(E=R().getContext("2d")),E},b.indexOf=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0,n=t.length;i<n;i++)if(t[i]===e)return i}return-1},b.inherits=function(t,e){var i=t.prototype;function n(){}for(var a in n.prototype=e.prototype,t.prototype=new n,i)t.prototype[a]=i[a];t.prototype.constructor=t,t.superClass=e},b.mixin=function(t,e,i){z(t="prototype"in t?t.prototype:t,e="prototype"in e?e.prototype:e,i)},b.isArrayLike=function(t){if(t)return"string"!=typeof t&&"number"==typeof t.length},b.each=N,b.map=function(t,e,i){if(t&&e){if(t.map&&t.map===L)return t.map(e,i);for(var n=[],a=0,o=t.length;a<o;a++)n.push(e.call(i,t[a],a,t));return n}},b.reduce=function(t,e,i,n){if(t&&e){if(t.reduce&&t.reduce===D)return t.reduce(e,i,n);for(var a=0,o=t.length;a<o;a++)i=e.call(n,i,t[a],a,t);return i}},b.filter=function(t,e,i){if(t&&e){if(t.filter&&t.filter===T)return t.filter(e,i);for(var n=[],a=0,o=t.length;a<o;a++)e.call(i,t[a],a,t)&&n.push(t[a]);return n}},b.find=function(t,e,i){if(t&&e)for(var n=0,a=t.length;n<a;n++)if(e.call(i,t[n],n,t))return t[n]},b.bind=V,b.curry=function(t){var e=C.call(arguments,1);return function(){return t.apply(this,e.concat(C.call(arguments)))}},b.isArray=B,b.isFunction=function(t){return"function"==typeof t},b.isString=function(t){return"[object String]"===M.call(t)},b.isObject=G,b.isBuiltInObject=W,b.isDom=H,b.eqNaN=function(t){return t!=t},b.retrieve=function(t){for(var e=0,i=arguments.length;e<i;e++)if(null!=arguments[e])return arguments[e]},b.retrieve2=function(t,e){return null!=t?t:e},b.retrieve3=function(t,e,i){return null!=t?t:null!=e?e:i},b.slice=function(){return Function.call.apply(C,arguments)},b.normalizeCssArray=function(t){if("number"==typeof t)return[t,t,t,t];var e=t.length;return 2===e?[t[0],t[1],t[0],t[1]]:3===e?[t[0],t[1],t[2],t[1]]:t},b.assert=function(t,e){if(!t)throw new Error(e)},b.setAsPrimitive=function(t){t.__ec_primitive__=!0},b.isPrimitive=F,b.createHashMap=function(t){return new Z(t)},b.noop=function(){};var j={},U="undefined"==typeof Float32Array?Array:Float32Array;function q(t){return Math.sqrt(Y(t))}var X=q;function Y(t){return t[0]*t[0]+t[1]*t[1]}var $=Y;function K(t,e){return Math.sqrt((t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1]))}var J=K;function Q(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}var tt=Q;function et(){this.on("mousedown",this._dragStart,this),this.on("mousemove",this._drag,this),this.on("mouseup",this._dragEnd,this),this.on("globalout",this._dragEnd,this)}function it(t,e){return{target:t,topTarget:e&&e.topTarget}}j.create=function(t,e){var i=new U(2);return null==t&&(t=0),null==e&&(e=0),i[0]=t,i[1]=e,i},j.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t},j.clone=function(t){var e=new U(2);return e[0]=t[0],e[1]=t[1],e},j.set=function(t,e,i){return t[0]=e,t[1]=i,t},j.add=function(t,e,i){return t[0]=e[0]+i[0],t[1]=e[1]+i[1],t},j.scaleAndAdd=function(t,e,i,n){return t[0]=e[0]+i[0]*n,t[1]=e[1]+i[1]*n,t},j.sub=function(t,e,i){return t[0]=e[0]-i[0],t[1]=e[1]-i[1],t},j.len=q,j.length=X,j.lenSquare=Y,j.lengthSquare=$,j.mul=function(t,e,i){return t[0]=e[0]*i[0],t[1]=e[1]*i[1],t},j.div=function(t,e,i){return t[0]=e[0]/i[0],t[1]=e[1]/i[1],t},j.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},j.scale=function(t,e,i){return t[0]=e[0]*i,t[1]=e[1]*i,t},j.normalize=function(t,e){var i=q(e);return 0===i?(t[0]=0,t[1]=0):(t[0]=e[0]/i,t[1]=e[1]/i),t},j.distance=K,j.dist=J,j.distanceSquare=Q,j.distSquare=tt,j.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t},j.lerp=function(t,e,i,n){return t[0]=e[0]+n*(i[0]-e[0]),t[1]=e[1]+n*(i[1]-e[1]),t},j.applyTransform=function(t,e,i){var n=e[0],a=e[1];return t[0]=i[0]*n+i[2]*a+i[4],t[1]=i[1]*n+i[3]*a+i[5],t},j.min=function(t,e,i){return t[0]=Math.min(e[0],i[0]),t[1]=Math.min(e[1],i[1]),t},j.max=function(t,e,i){return t[0]=Math.max(e[0],i[0]),t[1]=Math.max(e[1],i[1]),t},et.prototype={constructor:et,_dragStart:function(t){var e=t.target;e&&e.draggable&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.dispatchToElement(it(e,t),"dragstart",t.event))},_drag:function(t){var e=this._draggingTarget;if(e){var i=t.offsetX,n=t.offsetY,a=i-this._x,o=n-this._y;this._x=i,this._y=n,e.drift(a,o,t),this.dispatchToElement(it(e,t),"drag",t.event);var r=this.findHover(i,n,e).target,s=this._dropTarget;this._dropTarget=r,e!==r&&(s&&r!==s&&this.dispatchToElement(it(s,t),"dragleave",t.event),r&&r!==s&&this.dispatchToElement(it(r,t),"dragenter",t.event))}},_dragEnd:function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.dispatchToElement(it(e,t),"dragend",t.event),this._dropTarget&&this.dispatchToElement(it(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null}};var nt=et,at=Array.prototype.slice,ot=function(){this._$handlers={}};ot.prototype={constructor:ot,one:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===e)return this;return n[t].push({h:e,one:!0,ctx:i||this}),this},on:function(t,e,i){var n=this._$handlers;if(!e||!t)return this;n[t]||(n[t]=[]);for(var a=0;a<n[t].length;a++)if(n[t][a].h===e)return this;return n[t].push({h:e,one:!1,ctx:i||this}),this},isSilent:function(t){var e=this._$handlers;return e[t]&&e[t].length},off:function(t,e){var i=this._$handlers;if(!t)return this._$handlers={},this;if(e){if(i[t]){for(var n=[],a=0,o=i[t].length;a<o;a++)i[t][a].h!=e&&n.push(i[t][a]);i[t]=n}i[t]&&0===i[t].length&&delete i[t]}else delete i[t];return this},trigger:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>3&&(e=at.call(e,1));for(var n=this._$handlers[t],a=n.length,o=0;o<a;){switch(i){case 1:n[o].h.call(n[o].ctx);break;case 2:n[o].h.call(n[o].ctx,e[1]);break;case 3:n[o].h.call(n[o].ctx,e[1],e[2]);break;default:n[o].h.apply(n[o].ctx,e)}n[o].one?(n.splice(o,1),a--):o++}}return this},triggerWithContext:function(t){if(this._$handlers[t]){var e=arguments,i=e.length;i>4&&(e=at.call(e,1,e.length-1));for(var n=e[e.length-1],a=this._$handlers[t],o=a.length,r=0;r<o;){switch(i){case 1:a[r].h.call(n);break;case 2:a[r].h.call(n,e[1]);break;case 3:a[r].h.call(n,e[1],e[2]);break;default:a[r].h.apply(n,e)}a[r].one?(a.splice(r,1),o--):r++}}return this}};var rt=ot,st=b,lt=j,ht=nt,ut=rt;function ct(){}ct.prototype.dispose=function(){};var dt=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],pt=function(t,e,i,n){ut.call(this),this.storage=t,this.painter=e,this.painterRoot=n,i=i||new ct,this.proxy=i,i.handler=this,this._hovered={},this._lastTouchMoment,this._lastX,this._lastY,ht.call(this),st.each(dt,(function(t){i.on&&i.on(t,this[t],this)}),this)};function ft(t,e,i){if(t[t.rectHover?"rectContain":"contain"](e,i)){for(var n,a=t;a;){if(a.clipPath&&!a.clipPath.contain(e,i))return!1;a.silent&&(n=!0),a=a.parent}return!n||"silent"}return!1}pt.prototype={constructor:pt,mousemove:function(t){var e=t.zrX,i=t.zrY,n=this._hovered,a=n.target;a&&!a.__zr&&(a=(n=this.findHover(n.x,n.y)).target);var o=this._hovered=this.findHover(e,i),r=o.target,s=this.proxy;s.setCursor&&s.setCursor(r?r.cursor:"default"),a&&r!==a&&this.dispatchToElement(n,"mouseout",t),this.dispatchToElement(o,"mousemove",t),r&&r!==a&&this.dispatchToElement(o,"mouseover",t)},mouseout:function(t){this.dispatchToElement(this._hovered,"mouseout",t);var e,i=t.toElement||t.relatedTarget;do{i=i&&i.parentNode}while(i&&9!=i.nodeType&&!(e=i===this.painterRoot));!e&&this.trigger("globalout",{event:t})},resize:function(t){this._hovered={}},dispatch:function(t,e){var i=this[t];i&&i.call(this,e)},dispose:function(){this.proxy.dispose(),this.storage=this.proxy=this.painter=null},setCursorStyle:function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},dispatchToElement:function(t,e,i){var n=(t=t||{}).target;if(!n||!n.silent){for(var a="on"+e,o=function(t,e,i){return{type:t,event:i,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:i.zrX,offsetY:i.zrY,gestureEvent:i.gestureEvent,pinchX:i.pinchX,pinchY:i.pinchY,pinchScale:i.pinchScale,wheelDelta:i.zrDelta,zrByTouch:i.zrByTouch,which:i.which}}(e,t,i);n&&(n[a]&&(o.cancelBubble=n[a].call(n,o)),n.trigger(e,o),n=n.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer((function(t){"function"==typeof t[a]&&t[a].call(t,o),t.trigger&&t.trigger(e,o)})))}},findHover:function(t,e,i){for(var n=this.storage.getDisplayList(),a={x:t,y:e},o=n.length-1;o>=0;o--){var r;if(n[o]!==i&&!n[o].ignore&&(r=ft(n[o],t,e))&&(!a.topTarget&&(a.topTarget=n[o]),"silent"!==r)){a.target=n[o];break}}return a}},st.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){pt.prototype[t]=function(e){var i=this.findHover(e.zrX,e.zrY),n=i.target;if("mousedown"===t)this._downEl=n,this._downPoint=[e.zrX,e.zrY],this._upEl=n;else if("mosueup"===t)this._upEl=n;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||lt.dist(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(i,t,e)}})),st.mixin(pt,ut),st.mixin(pt,ht);var gt=pt,mt={},vt="undefined"==typeof Float32Array?Array:Float32Array;function yt(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}mt.create=function(){var t=new vt(6);return yt(t),t},mt.identity=yt,mt.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t},mt.mul=function(t,e,i){var n=e[0]*i[0]+e[2]*i[1],a=e[1]*i[0]+e[3]*i[1],o=e[0]*i[2]+e[2]*i[3],r=e[1]*i[2]+e[3]*i[3],s=e[0]*i[4]+e[2]*i[5]+e[4],l=e[1]*i[4]+e[3]*i[5]+e[5];return t[0]=n,t[1]=a,t[2]=o,t[3]=r,t[4]=s,t[5]=l,t},mt.translate=function(t,e,i){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+i[0],t[5]=e[5]+i[1],t},mt.rotate=function(t,e,i){var n=e[0],a=e[2],o=e[4],r=e[1],s=e[3],l=e[5],h=Math.sin(i),u=Math.cos(i);return t[0]=n*u+r*h,t[1]=-n*h+r*u,t[2]=a*u+s*h,t[3]=-a*h+u*s,t[4]=u*o+h*l,t[5]=u*l-h*o,t},mt.scale=function(t,e,i){var n=i[0],a=i[1];return t[0]=e[0]*n,t[1]=e[1]*a,t[2]=e[2]*n,t[3]=e[3]*a,t[4]=e[4]*n,t[5]=e[5]*a,t},mt.invert=function(t,e){var i=e[0],n=e[2],a=e[4],o=e[1],r=e[3],s=e[5],l=i*r-o*n;return l?(l=1/l,t[0]=r*l,t[1]=-o*l,t[2]=-n*l,t[3]=i*l,t[4]=(n*s-r*a)*l,t[5]=(o*a-i*s)*l,t):null};var xt=mt,_t=j,bt=xt.identity;function wt(t){return t>5e-5||t<-5e-5}var St=function(t){(t=t||{}).position||(this.position=[0,0]),null==t.rotation&&(this.rotation=0),t.scale||(this.scale=[1,1]),this.origin=this.origin||null},Mt=St.prototype;Mt.transform=null,Mt.needLocalTransform=function(){return wt(this.rotation)||wt(this.position[0])||wt(this.position[1])||wt(this.scale[0]-1)||wt(this.scale[1]-1)},Mt.updateTransform=function(){var t=this.parent,e=t&&t.transform,i=this.needLocalTransform(),n=this.transform;i||e?(n=n||xt.create(),i?this.getLocalTransform(n):bt(n),e&&(i?xt.mul(n,t.transform,n):xt.copy(n,t.transform)),this.transform=n,this.invTransform=this.invTransform||xt.create(),xt.invert(this.invTransform,n)):n&&bt(n)},Mt.getLocalTransform=function(t){return St.getLocalTransform(this,t)},Mt.setTransform=function(t){var e=this.transform,i=t.dpr||1;e?t.setTransform(i*e[0],i*e[1],i*e[2],i*e[3],i*e[4],i*e[5]):t.setTransform(i,0,0,i,0,0)},Mt.restoreTransform=function(t){var e=t.dpr||1;t.setTransform(e,0,0,e,0,0)};var It=[];Mt.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(xt.mul(It,t.invTransform,e),e=It);var i=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=this.position,o=this.scale;wt(i-1)&&(i=Math.sqrt(i)),wt(n-1)&&(n=Math.sqrt(n)),e[0]<0&&(i=-i),e[3]<0&&(n=-n),a[0]=e[4],a[1]=e[5],o[0]=i,o[1]=n,this.rotation=Math.atan2(-e[1]/n,e[0]/i)}},Mt.getGlobalScale=function(){var t=this.transform;if(!t)return[1,1];var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]),i=Math.sqrt(t[2]*t[2]+t[3]*t[3]);return t[0]<0&&(e=-e),t[3]<0&&(i=-i),[e,i]},Mt.transformCoordToLocal=function(t,e){var i=[t,e],n=this.invTransform;return n&&_t.applyTransform(i,i,n),i},Mt.transformCoordToGlobal=function(t,e){var i=[t,e],n=this.transform;return n&&_t.applyTransform(i,i,n),i},St.getLocalTransform=function(t,e){bt(e=e||[]);var i=t.origin,n=t.scale||[1,1],a=t.rotation||0,o=t.position||[0,0];return i&&(e[4]-=i[0],e[5]-=i[1]),xt.scale(e,e,n),a&&xt.rotate(e,e,a),i&&(e[4]+=i[0],e[5]+=i[1]),e[4]+=o[0],e[5]+=o[1],e};var At=St,Tt={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),-i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,i=.1;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=.4*Math.asin(1/i)/(2*Math.PI),i*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,i=.1,n=.4;return 0===t?0:1===t?1:(!i||i<1?(i=1,e=.1):e=n*Math.asin(1/i)/(2*Math.PI),(t*=2)<1?i*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*-.5:i*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/n)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Tt.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Tt.bounceIn(2*t):.5*Tt.bounceOut(2*t-1)+.5}},Ct=Tt;function Lt(t){this._target=t.target,this._life=t.life||1e3,this._delay=t.delay||0,this._initialized=!1,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"Linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart,this._pausedTime=0,this._paused=!1}Lt.prototype={constructor:Lt,step:function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),this._paused)this._pausedTime+=e;else{var i=(t-this._startTime-this._pausedTime)/this._life;if(!(i<0)){i=Math.min(i,1);var n=this.easing,a="string"==typeof n?Ct[n]:n,o="function"==typeof a?a(i):i;return this.fire("frame",o),1==i?this.loop?(this.restart(t),"restart"):(this._needsRemove=!0,"destroy"):null}}},restart:function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(t,e){this[t="on"+t]&&this[t](this._target,e)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var Dt=Lt,Pt={},kt=function(){this.head=null,this.tail=null,this._len=0},Ot=kt.prototype;Ot.insert=function(t){var e=new zt(t);return this.insertEntry(e),e},Ot.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},Ot.remove=function(t){var e=t.prev,i=t.next;e?e.next=i:this.head=i,i?i.prev=e:this.tail=e,t.next=t.prev=null,this._len--},Ot.len=function(){return this._len},Ot.clear=function(){this.head=this.tail=null,this._len=0};var zt=function(t){this.value=t,this.next,this.prev},Et=function(t){this._list=new kt,this._map={},this._maxSize=t||10,this._lastRemovedEntry=null},Rt=Et.prototype;Rt.put=function(t,e){var i=this._list,n=this._map,a=null;if(null==n[t]){var o=i.len(),r=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=i.head;i.remove(s),delete n[s.key],a=s.value,this._lastRemovedEntry=s}r?r.value=e:r=new zt(e),r.key=t,i.insertEntry(r),n[t]=r}return a},Rt.get=function(t){var e=this._map[t],i=this._list;if(null!=e)return e!==i.tail&&(i.remove(e),i.insertEntry(e)),e.value},Rt.clear=function(){this._list.clear(),this._map={}};var Nt=Et,Vt={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Bt(t){return(t=Math.round(t))<0?0:t>255?255:t}function Gt(t){return t<0?0:t>1?1:t}function Wt(t){return t.length&&"%"===t.charAt(t.length-1)?Bt(parseFloat(t)/100*255):Bt(parseInt(t,10))}function Ht(t){return t.length&&"%"===t.charAt(t.length-1)?Gt(parseFloat(t)/100):Gt(parseFloat(t))}function Ft(t,e,i){return i<0?i+=1:i>1&&(i-=1),6*i<1?t+(e-t)*i*6:2*i<1?e:3*i<2?t+(e-t)*(2/3-i)*6:t}function Zt(t,e,i){return t+(e-t)*i}function jt(t,e,i,n,a){return t[0]=e,t[1]=i,t[2]=n,t[3]=a,t}function Ut(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var qt=new Nt(20),Xt=null;function Yt(t,e){Xt&&Ut(Xt,e),Xt=qt.put(t,Xt||e.slice())}function $t(t,e){if(t){e=e||[];var i=qt.get(t);if(i)return Ut(e,i);var n,a=(t+="").replace(/ /g,"").toLowerCase();if(a in Vt)return Ut(e,Vt[a]),Yt(t,e),e;if("#"===a.charAt(0))return 4===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=4095?(jt(e,(3840&n)>>4|(3840&n)>>8,240&n|(240&n)>>4,15&n|(15&n)<<4,1),Yt(t,e),e):void jt(e,0,0,0,1):7===a.length?(n=parseInt(a.substr(1),16))>=0&&n<=16777215?(jt(e,(16711680&n)>>16,(65280&n)>>8,255&n,1),Yt(t,e),e):void jt(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(","),h=1;switch(s){case"rgba":if(4!==l.length)return void jt(e,0,0,0,1);h=Ht(l.pop());case"rgb":return 3!==l.length?void jt(e,0,0,0,1):(jt(e,Wt(l[0]),Wt(l[1]),Wt(l[2]),h),Yt(t,e),e);case"hsla":return 4!==l.length?void jt(e,0,0,0,1):(l[3]=Ht(l[3]),Kt(l,e),Yt(t,e),e);case"hsl":return 3!==l.length?void jt(e,0,0,0,1):(Kt(l,e),Yt(t,e),e);default:return}}jt(e,0,0,0,1)}}function Kt(t,e){var i=(parseFloat(t[0])%360+360)%360/360,n=Ht(t[1]),a=Ht(t[2]),o=a<=.5?a*(n+1):a+n-a*n,r=2*a-o;return jt(e=e||[],Bt(255*Ft(r,o,i+1/3)),Bt(255*Ft(r,o,i)),Bt(255*Ft(r,o,i-1/3)),1),4===t.length&&(e[3]=t[3]),e}function Jt(t,e,i){if(e&&e.length&&t>=0&&t<=1){i=i||[];var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=e[a],s=e[o],l=n-a;return i[0]=Bt(Zt(r[0],s[0],l)),i[1]=Bt(Zt(r[1],s[1],l)),i[2]=Bt(Zt(r[2],s[2],l)),i[3]=Gt(Zt(r[3],s[3],l)),i}}var Qt=Jt;function te(t,e,i){if(e&&e.length&&t>=0&&t<=1){var n=t*(e.length-1),a=Math.floor(n),o=Math.ceil(n),r=$t(e[a]),s=$t(e[o]),l=n-a,h=ie([Bt(Zt(r[0],s[0],l)),Bt(Zt(r[1],s[1],l)),Bt(Zt(r[2],s[2],l)),Gt(Zt(r[3],s[3],l))],"rgba");return i?{color:h,leftIndex:a,rightIndex:o,value:n}:h}}var ee=te;function ie(t,e){if(t&&t.length){var i=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(i+=","+t[3]),e+"("+i+")"}}Pt.parse=$t,Pt.lift=function(t,e){var i=$t(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;return ie(i,4===i.length?"rgba":"rgb")}},Pt.toHex=function(t){var e=$t(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},Pt.fastLerp=Jt,Pt.fastMapToColor=Qt,Pt.lerp=te,Pt.mapToColor=ee,Pt.modifyHSL=function(t,e,i,n){if(t=$t(t))return t=function(t){if(t){var e,i,n=t[0]/255,a=t[1]/255,o=t[2]/255,r=Math.min(n,a,o),s=Math.max(n,a,o),l=s-r,h=(s+r)/2;if(0===l)e=0,i=0;else{i=h<.5?l/(s+r):l/(2-s-r);var u=((s-n)/6+l/2)/l,c=((s-a)/6+l/2)/l,d=((s-o)/6+l/2)/l;n===s?e=d-c:a===s?e=1/3+u-d:o===s&&(e=2/3+c-u),e<0&&(e+=1),e>1&&(e-=1)}var p=[360*e,i,h];return null!=t[3]&&p.push(t[3]),p}}(t),null!=e&&(t[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=i&&(t[1]=Ht(i)),null!=n&&(t[2]=Ht(n)),ie(Kt(t),"rgba")},Pt.modifyAlpha=function(t,e){if((t=$t(t))&&null!=e)return t[3]=Gt(e),ie(t,"rgba")},Pt.stringify=ie;var ne=Dt,ae=Pt,oe=b.isArrayLike,re=Array.prototype.slice;function se(t,e){return t[e]}function le(t,e,i){t[e]=i}function he(t,e,i){return(e-t)*i+t}function ue(t,e,i){return i>.5?e:t}function ce(t,e,i,n,a){var o=t.length;if(1==a)for(var r=0;r<o;r++)n[r]=he(t[r],e[r],i);else{var s=o&&t[0].length;for(r=0;r<o;r++)for(var l=0;l<s;l++)n[r][l]=he(t[r][l],e[r][l],i)}}function de(t,e,i){var n=t.length,a=e.length;if(n!==a)if(n>a)t.length=a;else for(var o=n;o<a;o++)t.push(1===i?e[o]:re.call(e[o]));var r=t[0]&&t[0].length;for(o=0;o<t.length;o++)if(1===i)isNaN(t[o])&&(t[o]=e[o]);else for(var s=0;s<r;s++)isNaN(t[o][s])&&(t[o][s]=e[o][s])}function pe(t,e,i){if(t===e)return!0;var n=t.length;if(n!==e.length)return!1;if(1===i){for(var a=0;a<n;a++)if(t[a]!==e[a])return!1}else{var o=t[0].length;for(a=0;a<n;a++)for(var r=0;r<o;r++)if(t[a][r]!==e[a][r])return!1}return!0}function fe(t,e,i,n,a,o,r,s,l){var h=t.length;if(1==l)for(var u=0;u<h;u++)s[u]=ge(t[u],e[u],i[u],n[u],a,o,r);else{var c=t[0].length;for(u=0;u<h;u++)for(var d=0;d<c;d++)s[u][d]=ge(t[u][d],e[u][d],i[u][d],n[u][d],a,o,r)}}function ge(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}function me(t){if(oe(t)){var e=t.length;if(oe(t[0])){for(var i=[],n=0;n<e;n++)i.push(re.call(t[n]));return i}return re.call(t)}return t}function ve(t){return t[0]=Math.floor(t[0]),t[1]=Math.floor(t[1]),t[2]=Math.floor(t[2]),"rgba("+t.join(",")+")"}function ye(t,e,i,n,a,o){var r=t._getter,s=t._setter,l="spline"===e,h=n.length;if(h){var u,c=n[0].value,d=oe(c),p=!1,f=!1,g=d?function(t){var e=t[t.length-1].value;return oe(e&&e[0])?2:1}(n):0;n.sort((function(t,e){return t.time-e.time})),u=n[h-1].time;for(var m=[],v=[],y=n[0].value,x=!0,_=0;_<h;_++){m.push(n[_].time/u);var b=n[_].value;if(d&&pe(b,y,g)||!d&&b===y||(x=!1),y=b,"string"==typeof b){var w=ae.parse(b);w?(b=w,p=!0):f=!0}v.push(b)}if(o||!x){var S=v[h-1];for(_=0;_<h-1;_++)d?de(v[_],S,g):!isNaN(v[_])||isNaN(S)||f||p||(v[_]=S);d&&de(r(t._target,a),S,g);var M,I,A,T,C,L=0,D=0;if(p)var P=[0,0,0,0];var k=new ne({target:t._target,life:u,loop:t._loop,delay:t._delay,onframe:function(t,e){var i;if(e<0)i=0;else if(e<D){for(i=Math.min(L+1,h-1);i>=0&&!(m[i]<=e);i--);i=Math.min(i,h-2)}else{for(i=L;i<h&&!(m[i]>e);i++);i=Math.min(i-1,h-2)}L=i,D=e;var n=m[i+1]-m[i];if(0!==n)if(M=(e-m[i])/n,l)if(A=v[i],I=v[0===i?i:i-1],T=v[i>h-2?h-1:i+1],C=v[i>h-3?h-1:i+2],d)fe(I,A,T,C,M,M*M,M*M*M,r(t,a),g);else{if(p)o=fe(I,A,T,C,M,M*M,M*M*M,P,1),o=ve(P);else{if(f)return ue(A,T,M);o=ge(I,A,T,C,M,M*M,M*M*M)}s(t,a,o)}else if(d)ce(v[i],v[i+1],M,r(t,a),g);else{var o;if(p)ce(v[i],v[i+1],M,P,1),o=ve(P);else{if(f)return ue(v[i],v[i+1],M);o=he(v[i],v[i+1],M)}s(t,a,o)}},ondestroy:i});return e&&"spline"!==e&&(k.easing=e),k}}}var xe=function(t,e,i,n){this._tracks={},this._target=t,this._loop=e||!1,this._getter=i||se,this._setter=n||le,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};xe.prototype={when:function(t,e){var i=this._tracks;for(var n in e)if(e.hasOwnProperty(n)){if(!i[n]){i[n]=[];var a=this._getter(this._target,n);if(null==a)continue;0!==t&&i[n].push({time:0,value:me(a)})}i[n].push({time:t,value:e[n]})}return this},during:function(t){return this._onframeList.push(t),this},pause:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].pause();this._paused=!0},resume:function(){for(var t=0;t<this._clipList.length;t++)this._clipList[t].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var t=this._doneList,e=t.length,i=0;i<e;i++)t[i].call(this)},start:function(t,e){var i,n=this,a=0,o=function(){--a||n._doneCallback()};for(var r in this._tracks)if(this._tracks.hasOwnProperty(r)){var s=ye(this,t,o,this._tracks[r],r,e);s&&(this._clipList.push(s),a++,this.animation&&this.animation.addClip(s),i=s)}if(i){var l=i.onframe;i.onframe=function(t,e){l(t,e);for(var i=0;i<n._onframeList.length;i++)n._onframeList[i](t,e)}}return a||this._doneCallback(),this},stop:function(t){for(var e=this._clipList,i=this.animation,n=0;n<e.length;n++){var a=e[n];t&&a.onframe(this._target,1),i&&i.removeClip(a)}e.length=0},delay:function(t){return this._delay=t,this},done:function(t){return t&&this._doneList.push(t),this},getClips:function(){return this._clipList}};var _e=xe,be={},we=1;"undefined"!=typeof window&&(we=Math.max(window.devicePixelRatio||1,1));var Se=we;be.debugMode=0,be.devicePixelRatio=Se;var Me=be.debugMode,Ie=function(){};1===Me?Ie=function(){for(var t in arguments)throw new Error(arguments[t])}:Me>1&&(Ie=function(){for(var t in arguments);});var Ae=Ie,Te=_e,Ce=Ae,Le=b,De=Le.isString,Pe=Le.isFunction,ke=Le.isObject,Oe=Le.isArrayLike,ze=Le.indexOf,Ee=function(){this.animators=[]};Ee.prototype={constructor:Ee,animate:function(t,e){var i,n=!1,a=this,o=this.__zr;if(t){var r=t.split("."),s=a;n="shape"===r[0];for(var l=0,h=r.length;l<h;l++)s&&(s=s[r[l]]);s&&(i=s)}else i=a;if(i){var u=a.animators,c=new Te(i,e);return c.during((function(t){a.dirty(n)})).done((function(){u.splice(ze(u,c),1)})),u.push(c),o&&o.animation.addAnimator(c),c}Ce('Property "'+t+'" is not existed in element '+a.id)},stopAnimation:function(t){for(var e=this.animators,i=e.length,n=0;n<i;n++)e[n].stop(t);return e.length=0,this},animateTo:function(t,e,i,n,a,o){De(i)?(a=n,n=i,i=0):Pe(n)?(a=n,n="linear",i=0):Pe(i)?(a=i,i=0):Pe(e)?(a=e,e=500):e||(e=500),this.stopAnimation(),this._animateToShallow("",this,t,e,i);var r=this.animators.slice(),s=r.length;function l(){--s||a&&a()}s||a&&a();for(var h=0;h<r.length;h++)r[h].done(l).start(n,o)},_animateToShallow:function(t,e,i,n,a){var o={},r=0;for(var s in i)if(i.hasOwnProperty(s))if(null!=e[s])ke(i[s])&&!Oe(i[s])?this._animateToShallow(t?t+"."+s:s,e[s],i[s],n,a):(o[s]=i[s],r++);else if(null!=i[s])if(t){var l={};l[t]={},l[t][s]=i[s],this.attr(l)}else this.attr(s,i[s]);return r>0&&this.animate(t,!1).when(null==n?500:n,o).delay(a||0),this}};var Re=x,Ne=rt,Ve=At,Be=Ee,Ge=b,We=function(t){Ve.call(this,t),Ne.call(this,t),Be.call(this,t),this.id=t.id||Re()};We.prototype={type:"element",name:"",__zr:null,ignore:!1,clipPath:null,drift:function(t,e){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.dirty(!1)},beforeUpdate:function(){},afterUpdate:function(){},update:function(){this.updateTransform()},traverse:function(t,e){},attrKV:function(t,e){if("position"===t||"scale"===t||"origin"===t){if(e){var i=this[t];i||(i=this[t]=[]),i[0]=e[0],i[1]=e[1]}}else this[t]=e},hide:function(){this.ignore=!0,this.__zr&&this.__zr.refresh()},show:function(){this.ignore=!1,this.__zr&&this.__zr.refresh()},attr:function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(Ge.isObject(t))for(var i in t)t.hasOwnProperty(i)&&this.attrKV(i,t[i]);return this.dirty(!1),this},setClipPath:function(t){var e=this.__zr;e&&t.addSelfToZr(e),this.clipPath&&this.clipPath!==t&&this.removeClipPath(),this.clipPath=t,t.__zr=e,t.__clipTarget=this,this.dirty(!1)},removeClipPath:function(){var t=this.clipPath;t&&(t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__clipTarget=null,this.clipPath=null,this.dirty(!1))},addSelfToZr:function(t){this.__zr=t;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.addAnimator(e[i]);this.clipPath&&this.clipPath.addSelfToZr(t)},removeSelfFromZr:function(t){this.__zr=null;var e=this.animators;if(e)for(var i=0;i<e.length;i++)t.animation.removeAnimator(e[i]);this.clipPath&&this.clipPath.removeSelfFromZr(t)}},Ge.mixin(We,Be),Ge.mixin(We,Ve),Ge.mixin(We,Ne);var He,Fe,Ze,je,Ue=We,qe=mt,Xe=j.applyTransform,Ye=Math.min,$e=Math.max;function Ke(t,e,i,n){i<0&&(t+=i,i=-i),n<0&&(e+=n,n=-n),this.x=t,this.y=e,this.width=i,this.height=n}Ke.prototype={constructor:Ke,union:function(t){var e=Ye(t.x,this.x),i=Ye(t.y,this.y);this.width=$e(t.x+t.width,this.x+this.width)-e,this.height=$e(t.y+t.height,this.y+this.height)-i,this.x=e,this.y=i},applyTransform:(He=[],Fe=[],Ze=[],je=[],function(t){if(t){He[0]=Ze[0]=this.x,He[1]=je[1]=this.y,Fe[0]=je[0]=this.x+this.width,Fe[1]=Ze[1]=this.y+this.height,Xe(He,He,t),Xe(Fe,Fe,t),Xe(Ze,Ze,t),Xe(je,je,t),this.x=Ye(He[0],Fe[0],Ze[0],je[0]),this.y=Ye(He[1],Fe[1],Ze[1],je[1]);var e=$e(He[0],Fe[0],Ze[0],je[0]),i=$e(He[1],Fe[1],Ze[1],je[1]);this.width=e-this.x,this.height=i-this.y}}),calculateTransform:function(t){var e=this,i=t.width/e.width,n=t.height/e.height,a=qe.create();return qe.translate(a,a,[-e.x,-e.y]),qe.scale(a,a,[i,n]),qe.translate(a,a,[t.x,t.y]),a},intersect:function(t){if(!t)return!1;t instanceof Ke||(t=Ke.create(t));var e=this,i=e.x,n=e.x+e.width,a=e.y,o=e.y+e.height,r=t.x,s=t.x+t.width,l=t.y,h=t.y+t.height;return!(n<r||s<i||o<l||h<a)},contain:function(t,e){var i=this;return t>=i.x&&t<=i.x+i.width&&e>=i.y&&e<=i.y+i.height},clone:function(){return new Ke(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}}},Ke.create=function(t){return new Ke(t.x,t.y,t.width,t.height)};var Je=Ke,Qe=b,ti=Ue,ei=Je,ii=function(t){for(var e in t=t||{},ti.call(this,t),t)t.hasOwnProperty(e)&&(this[e]=t[e]);this._children=[],this.__storage=null,this.__dirty=!0};ii.prototype={constructor:ii,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<e.length;i++)if(e[i].name===t)return e[i]},childCount:function(){return this._children.length},add:function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},addBefore:function(t,e){if(t&&t!==this&&t.parent!==this&&e&&e.parent===this){var i=this._children,n=i.indexOf(e);n>=0&&(i.splice(n,0,t),this._doAdd(t))}return this},_doAdd:function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__storage,i=this.__zr;e&&e!==t.__storage&&(e.addToStorage(t),t instanceof ii&&t.addChildrenToStorage(e)),i&&i.refresh()},remove:function(t){var e=this.__zr,i=this.__storage,n=this._children,a=Qe.indexOf(n,t);return a<0||(n.splice(a,1),t.parent=null,i&&(i.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(i)),e&&e.refresh()),this},removeAll:function(){var t,e,i=this._children,n=this.__storage;for(e=0;e<i.length;e++)t=i[e],n&&(n.delFromStorage(t),t instanceof ii&&t.delChildrenFromStorage(n)),t.parent=null;return i.length=0,this},eachChild:function(t,e){for(var i=this._children,n=0;n<i.length;n++){var a=i[n];t.call(e,a,n)}return this},traverse:function(t,e){for(var i=0;i<this._children.length;i++){var n=this._children[i];t.call(e,n),"group"===n.type&&n.traverse(t,e)}return this},addChildrenToStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.addToStorage(i),i instanceof ii&&i.addChildrenToStorage(t)}},delChildrenFromStorage:function(t){for(var e=0;e<this._children.length;e++){var i=this._children[e];t.delFromStorage(i),i instanceof ii&&i.delChildrenFromStorage(t)}},dirty:function(){return this.__dirty=!0,this.__zr&&this.__zr.refresh(),this},getBoundingRect:function(t){for(var e=null,i=new ei(0,0,0,0),n=t||this._children,a=[],o=0;o<n.length;o++){var r=n[o];if(!r.ignore&&!r.invisible){var s=r.getBoundingRect(),l=r.getLocalTransform(a);l?(i.copy(s),i.applyTransform(l),(e=e||i.clone()).union(i)):(e=e||s.clone()).union(s)}}return e||i}},Qe.inherits(ii,ti);var ni=ii;function ai(t,e,i,n){var a=e+1;if(a===i)return 1;if(n(t[a++],t[e])<0){for(;a<i&&n(t[a],t[a-1])<0;)a++;!function(t,e,i){i--;for(;e<i;){var n=t[e];t[e++]=t[i],t[i--]=n}}(t,e,a)}else for(;a<i&&n(t[a],t[a-1])>=0;)a++;return a-e}function oi(t,e,i,n,a){for(n===e&&n++;n<i;n++){for(var o,r=t[n],s=e,l=n;s<l;)a(r,t[o=s+l>>>1])<0?l=o:s=o+1;var h=n-s;switch(h){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(;h>0;)t[s+h]=t[s+h-1],h--}t[s]=r}}function ri(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])>0){for(s=n-a;l<s&&o(t,e[i+a+l])>0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=a,l+=a}else{for(s=a+1;l<s&&o(t,e[i+a-l])<=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=r;r=a-l,l=a-h}for(r++;r<l;){var u=r+(l-r>>>1);o(t,e[i+u])>0?r=u+1:l=u}return l}function si(t,e,i,n,a,o){var r=0,s=0,l=1;if(o(t,e[i+a])<0){for(s=a+1;l<s&&o(t,e[i+a-l])<0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s);var h=r;r=a-l,l=a-h}else{for(s=n-a;l<s&&o(t,e[i+a+l])>=0;)r=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),r+=a,l+=a}for(r++;r<l;){var u=r+(l-r>>>1);o(t,e[i+u])<0?l=u:r=u+1}return l}function li(t,e){var i,n,a=7,o=0;t.length;var r=[];function s(s){var l=i[s],h=n[s],u=i[s+1],c=n[s+1];n[s]=h+c,s===o-3&&(i[s+1]=i[s+2],n[s+1]=n[s+2]),o--;var d=si(t[u],t,l,h,0,e);l+=d,0!==(h-=d)&&0!==(c=ri(t[l+h-1],t,u,c,c-1,e))&&(h<=c?function(i,n,o,s){var l=0;for(l=0;l<n;l++)r[l]=t[i+l];var h=0,u=o,c=i;if(t[c++]=t[u++],0==--s){for(l=0;l<n;l++)t[c+l]=r[h+l];return}if(1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];return void(t[c+s]=r[h])}var d,p,f,g=a;for(;;){d=0,p=0,f=!1;do{if(e(t[u],r[h])<0){if(t[c++]=t[u++],p++,d=0,0==--s){f=!0;break}}else if(t[c++]=r[h++],d++,p=0,1==--n){f=!0;break}}while((d|p)<g);if(f)break;do{if(0!==(d=si(t[u],r,h,n,0,e))){for(l=0;l<d;l++)t[c+l]=r[h+l];if(c+=d,h+=d,(n-=d)<=1){f=!0;break}}if(t[c++]=t[u++],0==--s){f=!0;break}if(0!==(p=ri(r[h],t,u,s,0,e))){for(l=0;l<p;l++)t[c+l]=t[u+l];if(c+=p,u+=p,0===(s-=p)){f=!0;break}}if(t[c++]=r[h++],1==--n){f=!0;break}g--}while(d>=7||p>=7);if(f)break;g<0&&(g=0),g+=2}if((a=g)<1&&(a=1),1===n){for(l=0;l<s;l++)t[c+l]=t[u+l];t[c+s]=r[h]}else{if(0===n)throw new Error;for(l=0;l<n;l++)t[c+l]=r[h+l]}}(l,h,u,c):function(i,n,o,s){var l=0;for(l=0;l<s;l++)r[l]=t[o+l];var h=i+n-1,u=s-1,c=o+s-1,d=0,p=0;if(t[c--]=t[h--],0==--n){for(d=c-(s-1),l=0;l<s;l++)t[d+l]=r[l];return}if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];return void(t[c]=r[u])}var f=a;for(;;){var g=0,m=0,v=!1;do{if(e(r[u],t[h])<0){if(t[c--]=t[h--],g++,m=0,0==--n){v=!0;break}}else if(t[c--]=r[u--],m++,g=0,1==--s){v=!0;break}}while((g|m)<f);if(v)break;do{if(0!==(g=n-si(r[u],t,i,n,n-1,e))){for(n-=g,p=(c-=g)+1,d=(h-=g)+1,l=g-1;l>=0;l--)t[p+l]=t[d+l];if(0===n){v=!0;break}}if(t[c--]=r[u--],1==--s){v=!0;break}if(0!==(m=s-ri(t[h],r,0,s,s-1,e))){for(s-=m,p=(c-=m)+1,d=(u-=m)+1,l=0;l<m;l++)t[p+l]=r[d+l];if(s<=1){v=!0;break}}if(t[c--]=t[h--],0==--n){v=!0;break}f--}while(g>=7||m>=7);if(v)break;f<0&&(f=0),f+=2}(a=f)<1&&(a=1);if(1===s){for(p=(c-=n)+1,d=(h-=n)+1,l=n-1;l>=0;l--)t[p+l]=t[d+l];t[c]=r[u]}else{if(0===s)throw new Error;for(d=c-(s-1),l=0;l<s;l++)t[d+l]=r[l]}}(l,h,u,c))}i=[],n=[],this.mergeRuns=function(){for(;o>1;){var t=o-2;if(t>=1&&n[t-1]<=n[t]+n[t+1]||t>=2&&n[t-2]<=n[t]+n[t-1])n[t-1]<n[t+1]&&t--;else if(n[t]>n[t+1])break;s(t)}},this.forceMergeRuns=function(){for(;o>1;){var t=o-2;t>0&&n[t-1]<n[t+1]&&t--,s(t)}},this.pushRun=function(t,e){i[o]=t,n[o]=e,o+=1}}var hi=function(t,e,i,n){i||(i=0),n||(n=t.length);var a=n-i;if(!(a<2)){var o=0;if(a<32)oi(t,i,n,i+(o=ai(t,i,n,e)),e);else{var r=new li(t,e),s=function(t){for(var e=0;t>=32;)e|=1&t,t>>=1;return t+e}(a);do{if((o=ai(t,i,n,e))<s){var l=a;l>s&&(l=s),oi(t,i,i+l,i+o,e),o=l}r.pushRun(i,o),r.mergeRuns(),a-=o,i+=o}while(0!==a);r.forceMergeRuns()}}},ui=b,ci=_,di=ni,pi=hi;function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi=function(){this._roots=[],this._displayList=[],this._displayListLen=0};gi.prototype={constructor:gi,traverse:function(t,e){for(var i=0;i<this._roots.length;i++)this._roots[i].traverse(t,e)},getDisplayList:function(t,e){return e=e||!1,t&&this.updateDisplayList(e),this._displayList},updateDisplayList:function(t){this._displayListLen=0;for(var e=this._roots,i=this._displayList,n=0,a=e.length;n<a;n++)this._updateAndAddDisplayable(e[n],null,t);i.length=this._displayListLen,ci.canvasSupported&&pi(i,fi)},_updateAndAddDisplayable:function(t,e,i){if(!t.ignore||i){t.beforeUpdate(),t.__dirty&&t.update(),t.afterUpdate();var n=t.clipPath;if(n){e=e?e.slice():[];for(var a=n,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.clipPath}if(t.isGroup){for(var r=t._children,s=0;s<r.length;s++){var l=r[s];t.__dirty&&(l.__dirty=!0),this._updateAndAddDisplayable(l,e,i)}t.__dirty=!1}else t.__clipPaths=e,this._displayList[this._displayListLen++]=t}},addRoot:function(t){t.__storage!==this&&(t instanceof di&&t.addChildrenToStorage(this),this.addToStorage(t),this._roots.push(t))},delRoot:function(t){if(null==t){for(var e=0;e<this._roots.length;e++){var i=this._roots[e];i instanceof di&&i.delChildrenFromStorage(this)}return this._roots=[],this._displayList=[],void(this._displayListLen=0)}if(t instanceof Array){e=0;for(var n=t.length;e<n;e++)this.delRoot(t[e])}else{var a=ui.indexOf(this._roots,t);a>=0&&(this.delFromStorage(t),this._roots.splice(a,1),t instanceof di&&t.delChildrenFromStorage(this))}},addToStorage:function(t){return t.__storage=this,t.dirty(!1),this},delFromStorage:function(t){return t&&(t.__storage=null),this},dispose:function(){this._renderList=this._roots=null},displayableSortFunc:fi};var mi=gi,vi=[["shadowBlur",0],["shadowOffsetX",0],["shadowOffsetY",0],["shadowColor","#000"],["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]],yi=function(t,e){this.extendFrom(t,!1),this.host=e};function xi(t,e,i){var n=null==e.x?0:e.x,a=null==e.x2?1:e.x2,o=null==e.y?0:e.y,r=null==e.y2?0:e.y2;return e.global||(n=n*i.width+i.x,a=a*i.width+i.x,o=o*i.height+i.y,r=r*i.height+i.y),t.createLinearGradient(n,o,a,r)}function _i(t,e,i){var n=i.width,a=i.height,o=Math.min(n,a),r=null==e.x?.5:e.x,s=null==e.y?.5:e.y,l=null==e.r?.5:e.r;return e.global||(r=r*n+i.x,s=s*a+i.y,l*=o),t.createRadialGradient(r,s,0,r,s,l)}for(var bi=yi.prototype={constructor:yi,host:null,fill:"#000",stroke:null,opacity:1,lineDash:null,lineDashOffset:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,lineWidth:1,strokeNoScale:!1,text:null,font:null,textFont:null,fontStyle:null,fontWeight:null,fontSize:null,fontFamily:null,textTag:null,textFill:"#000",textStroke:null,textWidth:null,textHeight:null,textStrokeWidth:0,textLineHeight:null,textPosition:"inside",textRect:null,textOffset:null,textAlign:null,textVerticalAlign:null,textDistance:5,textShadowColor:"transparent",textShadowBlur:0,textShadowOffsetX:0,textShadowOffsetY:0,textBoxShadowColor:"transparent",textBoxShadowBlur:0,textBoxShadowOffsetX:0,textBoxShadowOffsetY:0,transformText:!1,textRotation:0,textOrigin:null,textBackgroundColor:null,textBorderColor:null,textBorderWidth:0,textBorderRadius:0,textPadding:null,rich:null,truncate:null,blend:null,bind:function(t,e,i){for(var n=this,a=i&&i.style,o=!a,r=0;r<vi.length;r++){var s=vi[r],l=s[0];(o||n[l]!==a[l])&&(t[l]=n[l]||s[1])}if((o||n.fill!==a.fill)&&(t.fillStyle=n.fill),(o||n.stroke!==a.stroke)&&(t.strokeStyle=n.stroke),(o||n.opacity!==a.opacity)&&(t.globalAlpha=null==n.opacity?1:n.opacity),(o||n.blend!==a.blend)&&(t.globalCompositeOperation=n.blend||"source-over"),this.hasStroke()){var h=n.lineWidth;t.lineWidth=h/(this.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1)}},hasFill:function(){var t=this.fill;return null!=t&&"none"!==t},hasStroke:function(){var t=this.stroke;return null!=t&&"none"!==t&&this.lineWidth>0},extendFrom:function(t,e){if(t)for(var i in t)!t.hasOwnProperty(i)||!0!==e&&(!1===e?this.hasOwnProperty(i):null==t[i])||(this[i]=t[i])},set:function(t,e){"string"==typeof t?this[t]=e:this.extendFrom(t,!0)},clone:function(){var t=new this.constructor;return t.extendFrom(this,!0),t},getGradient:function(t,e,i){for(var n=("radial"===e.type?_i:xi)(t,e,i),a=e.colorStops,o=0;o<a.length;o++)n.addColorStop(a[o].offset,a[o].color);return n}},wi=0;wi<vi.length;wi++){var Si=vi[wi];Si[0]in bi||(bi[Si[0]]=Si[1])}yi.getGradient=bi.getGradient;var Mi=yi,Ii=function(t,e){this.image=t,this.repeat=e,this.type="pattern"};Ii.prototype.getCanvasPattern=function(t){return t.createPattern(this.image,this.repeat||"repeat")};var Ai=Ii,Ti=b,Ci=be.devicePixelRatio,Li=Mi,Di=Ai;function Pi(){return!1}function ki(t,e,i){var n=Ti.createCanvas(),a=e.getWidth(),o=e.getHeight(),r=n.style;return r.position="absolute",r.left=0,r.top=0,r.width=a+"px",r.height=o+"px",n.width=a*i,n.height=o*i,n.setAttribute("data-zr-dom-id",t),n}var Oi=function(t,e,i){var n;i=i||Ci,"string"==typeof t?n=ki(t,e,i):Ti.isObject(t)&&(t=(n=t).id),this.id=t,this.dom=n;var a=n.style;a&&(n.onselectstart=Pi,a["-webkit-user-select"]="none",a["user-select"]="none",a["-webkit-touch-callout"]="none",a["-webkit-tap-highlight-color"]="rgba(0,0,0,0)",a.padding=0,a.margin=0,a["border-width"]=0),this.domBack=null,this.ctxBack=null,this.painter=e,this.config=null,this.clearColor=0,this.motionBlur=!1,this.lastFrameAlpha=.7,this.dpr=i};Oi.prototype={constructor:Oi,elCount:0,__dirty:!0,initContext:function(){this.ctx=this.dom.getContext("2d"),this.ctx.__currentValues={},this.ctx.dpr=this.dpr},createBackBuffer:function(){var t=this.dpr;this.domBack=ki("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),this.ctxBack.__currentValues={},1!=t&&this.ctxBack.scale(t,t)},resize:function(t,e){var i=this.dpr,n=this.dom,a=n.style,o=this.domBack;a.width=t+"px",a.height=e+"px",n.width=t*i,n.height=e*i,o&&(o.width=t*i,o.height=e*i,1!=i&&this.ctxBack.scale(i,i))},clear:function(t){var e,i=this.dom,n=this.ctx,a=i.width,o=i.height,r=this.clearColor,s=this.motionBlur&&!t,l=this.lastFrameAlpha,h=this.dpr;(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(i,0,0,a/h,o/h)),n.clearRect(0,0,a,o),r)&&(r.colorStops?(e=r.__canvasGradient||Li.getGradient(n,r,{x:0,y:0,width:a,height:o}),r.__canvasGradient=e):r.image&&(e=Di.prototype.getCanvasPattern.call(r,n)),n.save(),n.fillStyle=e||r,n.fillRect(0,0,a,o),n.restore());if(s){var u=this.domBack;n.save(),n.globalAlpha=l,n.drawImage(u,0,0,a,o),n.restore()}}};var zi=Oi,Ei="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){setTimeout(t,16)},Ri={},Ni={},Vi={},Bi=new Nt(50);function Gi(){var t=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var e=0;e<t.pending.length;e++){var i=t.pending[e],n=i.cb;n&&n(this,i.cbPayload),i.hostEl.dirty()}t.pending.length=0}function Wi(t){return t&&t.width&&t.height}Vi.findExistImage=function(t){if("string"==typeof t){var e=Bi.get(t);return e&&e.image}return t},Vi.createOrUpdateImage=function(t,e,i,n,a){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!i)return e;var o=Bi.get(t),r={hostEl:i,cb:n,cbPayload:a};return o?!Wi(e=o.image)&&o.pending.push(r):(!e&&(e=new Image),e.onload=Gi,Bi.put(t,e.__cachedImgObj={image:e,pending:[r]}),e.src=e.__zrImageSrc=t),e}return t}return e},Vi.isImageReady=Wi;var Hi=Je,Fi=Vi,Zi=b,ji=Zi.getContext,Ui=Zi.extend,qi=Zi.retrieve2,Xi=Zi.retrieve3,Yi={},$i=0,Ki=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,Ji={};function Qi(t,e){var i=t+":"+(e=e||"12px sans-serif");if(Yi[i])return Yi[i];for(var n=(t+"").split("\n"),a=0,o=0,r=n.length;o<r;o++)a=Math.max(ln(n[o],e).width,a);return $i>5e3&&($i=0,Yi={}),$i++,Yi[i]=a,a}function tn(t,e,i){return"right"===i?t-=e:"center"===i&&(t-=e/2),t}function en(t,e,i){return"middle"===i?t-=e/2:"bottom"===i&&(t-=e),t}function nn(t,e,i,n,a){if(!e)return"";var o=(t+"").split("\n");a=an(e,i,n,a);for(var r=0,s=o.length;r<s;r++)o[r]=on(o[r],a);return o.join("\n")}function an(t,e,i,n){(n=Ui({},n)).font=e;i=qi(i,"...");n.maxIterations=qi(n.maxIterations,2);var a=n.minChar=qi(n.minChar,0);n.cnCharWidth=Qi("国",e);var o=n.ascCharWidth=Qi("a",e);n.placeholder=qi(n.placeholder,"");for(var r=t=Math.max(0,t-1),s=0;s<a&&r>=o;s++)r-=o;var l=Qi(i);return l>r&&(i="",l=0),r=t-l,n.ellipsis=i,n.ellipsisWidth=l,n.contentWidth=r,n.containerWidth=t,n}function on(t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i)return"";var o=Qi(t,n);if(o<=i)return t;for(var r=0;;r++){if(o<=a||r>=e.maxIterations){t+=e.ellipsis;break}var s=0===r?rn(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;o=Qi(t=t.substr(0,s),n)}return""===t&&(t=e.placeholder),t}function rn(t,e,i,n){for(var a=0,o=0,r=t.length;o<r&&a<e;o++){var s=t.charCodeAt(o);a+=0<=s&&s<=127?i:n}return o}function sn(t){return Qi("国",t)}function ln(t,e){return Ji.measureText(t,e)}function hn(t,e,i,n){null!=t&&(t+="");var a=sn(e),o=t?t.split("\n"):[],r=o.length*a,s=r;if(i&&(s+=i[0]+i[2]),t&&n){var l=n.outerHeight,h=n.outerWidth;if(null!=l&&s>l)t="",o=[];else if(null!=h)for(var u=an(h-(i?i[1]+i[3]:0),e,n.ellipsis,{minChar:n.minChar,placeholder:n.placeholder}),c=0,d=o.length;c<d;c++)o[c]=on(o[c],u)}return{lines:o,height:r,outerHeight:s,lineHeight:a}}function un(t,e){var i={lines:[],width:0,height:0};if(null!=t&&(t+=""),!t)return i;for(var n,a=Ki.lastIndex=0;null!=(n=Ki.exec(t));){var o=n.index;o>a&&cn(i,t.substring(a,o)),cn(i,n[2],n[1]),a=Ki.lastIndex}a<t.length&&cn(i,t.substring(a,t.length));var r=i.lines,s=0,l=0,h=[],u=e.textPadding,c=e.truncate,d=c&&c.outerWidth,p=c&&c.outerHeight;u&&(null!=d&&(d-=u[1]+u[3]),null!=p&&(p-=u[0]+u[2]));for(var f=0;f<r.length;f++){for(var g=r[f],m=0,v=0,y=0;y<g.tokens.length;y++){var x=(L=g.tokens[y]).styleName&&e.rich[L.styleName]||{},_=L.textPadding=x.textPadding,b=L.font=x.font||e.font,w=L.textHeight=qi(x.textHeight,sn(b));if(_&&(w+=_[0]+_[2]),L.height=w,L.lineHeight=Xi(x.textLineHeight,e.textLineHeight,w),L.textAlign=x&&x.textAlign||e.textAlign,L.textVerticalAlign=x&&x.textVerticalAlign||"middle",null!=p&&s+L.lineHeight>p)return{lines:[],width:0,height:0};L.textWidth=Qi(L.text,b);var S=x.textWidth,M=null==S||"auto"===S;if("string"==typeof S&&"%"===S.charAt(S.length-1))L.percentWidth=S,h.push(L),S=0;else{if(M){S=L.textWidth;var I=x.textBackgroundColor,A=I&&I.image;A&&(A=Fi.findExistImage(A),Fi.isImageReady(A)&&(S=Math.max(S,A.width*w/A.height)))}var T=_?_[1]+_[3]:0;S+=T;var C=null!=d?d-v:null;null!=C&&C<S&&(!M||C<T?(L.text="",L.textWidth=S=0):(L.text=nn(L.text,C-T,b,c.ellipsis,{minChar:c.minChar}),L.textWidth=Qi(L.text,b),S=L.textWidth+T))}v+=L.width=S,x&&(m=Math.max(m,L.lineHeight))}g.width=v,g.lineHeight=m,s+=m,l=Math.max(l,v)}i.outerWidth=i.width=qi(e.textWidth,l),i.outerHeight=i.height=qi(e.textHeight,s),u&&(i.outerWidth+=u[1]+u[3],i.outerHeight+=u[0]+u[2]);for(f=0;f<h.length;f++){var L,D=(L=h[f]).percentWidth;L.width=parseInt(D,10)/100*l}return i}function cn(t,e,i){for(var n=""===e,a=e.split("\n"),o=t.lines,r=0;r<a.length;r++){var s=a[r],l={styleName:i,text:s,isLineHolder:!s&&!n};if(r)o.push({tokens:[l]});else{var h=(o[o.length-1]||(o[0]={tokens:[]})).tokens,u=h.length;1===u&&h[0].isLineHolder?h[0]=l:(s||!u||n)&&h.push(l)}}}Ji.measureText=function(t,e){var i=ji();return i.font=e||"12px sans-serif",i.measureText(t)},Ni.DEFAULT_FONT="12px sans-serif",Ni.$override=function(t,e){Ji[t]=e},Ni.getWidth=Qi,Ni.getBoundingRect=function(t,e,i,n,a,o,r){return o?function(t,e,i,n,a,o,r){var s=un(t,{rich:o,truncate:r,font:e,textAlign:i,textPadding:a}),l=s.outerWidth,h=s.outerHeight,u=tn(0,l,i),c=en(0,h,n);return new Hi(u,c,l,h)}(t,e,i,n,a,o,r):function(t,e,i,n,a,o){var r=hn(t,e,a,o),s=Qi(t,e);a&&(s+=a[1]+a[3]);var l=r.outerHeight,h=tn(0,s,i),u=en(0,l,n),c=new Hi(h,u,s,l);return c.lineHeight=r.lineHeight,c}(t,e,i,n,a,r)},Ni.adjustTextX=tn,Ni.adjustTextY=en,Ni.adjustTextPositionOnRect=function(t,e,i){var n=e.x,a=e.y,o=e.height,r=e.width,s=o/2,l="left",h="top";switch(t){case"left":n-=i,a+=s,l="right",h="middle";break;case"right":n+=i+r,a+=s,h="middle";break;case"top":n+=r/2,a-=i,l="center",h="bottom";break;case"bottom":n+=r/2,a+=o+i,l="center";break;case"inside":n+=r/2,a+=s,l="center",h="middle";break;case"insideLeft":n+=i,a+=s,h="middle";break;case"insideRight":n+=r-i,a+=s,l="right",h="middle";break;case"insideTop":n+=r/2,a+=i,l="center";break;case"insideBottom":n+=r/2,a+=o-i,l="center",h="bottom";break;case"insideTopLeft":n+=i,a+=i;break;case"insideTopRight":n+=r-i,a+=i,l="right";break;case"insideBottomLeft":n+=i,a+=o-i,h="bottom";break;case"insideBottomRight":n+=r-i,a+=o-i,l="right",h="bottom"}return{x:n,y:a,textAlign:l,textVerticalAlign:h}},Ni.truncateText=nn,Ni.getLineHeight=sn,Ni.measureText=ln,Ni.parsePlainText=hn,Ni.parseRichText=un,Ni.makeFont=function(t){return(t.fontSize||t.fontFamily)&&[t.fontStyle,t.fontWeight,(t.fontSize||12)+"px",t.fontFamily||"sans-serif"].join(" ")||t.textFont||t.font};var dn={};dn.buildPath=function(t,e){var i,n,a,o,r,s=e.x,l=e.y,h=e.width,u=e.height,c=e.r;h<0&&(s+=h,h=-h),u<0&&(l+=u,u=-u),"number"==typeof c?i=n=a=o=c:c instanceof Array?1===c.length?i=n=a=o=c[0]:2===c.length?(i=a=c[0],n=o=c[1]):3===c.length?(i=c[0],n=o=c[1],a=c[2]):(i=c[0],n=c[1],a=c[2],o=c[3]):i=n=a=o=0,i+n>h&&(i*=h/(r=i+n),n*=h/r),a+o>h&&(a*=h/(r=a+o),o*=h/r),n+a>u&&(n*=u/(r=n+a),a*=u/r),i+o>u&&(i*=u/(r=i+o),o*=u/r),t.moveTo(s+i,l),t.lineTo(s+h-n,l),0!==n&&t.quadraticCurveTo(s+h,l,s+h,l+n),t.lineTo(s+h,l+u-a),0!==a&&t.quadraticCurveTo(s+h,l+u,s+h-a,l+u),t.lineTo(s+o,l+u),0!==o&&t.quadraticCurveTo(s,l+u,s,l+u-o),t.lineTo(s,l+i),0!==i&&t.quadraticCurveTo(s,l,s+i,l)};var pn=b,fn=pn.retrieve2,gn=pn.retrieve3,mn=pn.each,vn=pn.normalizeCssArray,yn=pn.isString,xn=pn.isObject,_n=Ni,bn=dn,wn=Vi,Sn={left:1,right:1,center:1},Mn={top:1,bottom:1,middle:1};function In(t){if(t){t.font=_n.makeFont(t);var e=t.textAlign;"middle"===e&&(e="center"),t.textAlign=null==e||Sn[e]?e:"left";var i=t.textVerticalAlign||t.textBaseline;"center"===i&&(i="middle"),t.textVerticalAlign=null==i||Mn[i]?i:"top",t.textPadding&&(t.textPadding=vn(t.textPadding))}}function An(t,e,i,n,a){if(i&&e.textRotation){var o=e.textOrigin;"center"===o?(n=i.width/2+i.x,a=i.height/2+i.y):o&&(n=o[0]+i.x,a=o[1]+i.y),t.translate(n,a),t.rotate(-e.textRotation),t.translate(-n,-a)}}function Tn(t,e,i,n,a,o,r,s){var l=n.rich[i.styleName]||{},h=i.textVerticalAlign,u=o+a/2;"top"===h?u=o+i.height/2:"bottom"===h&&(u=o+a-i.height/2),!i.isLineHolder&&Cn(l)&&Ln(t,e,l,"right"===s?r-i.width:"center"===s?r-i.width/2:r,u-i.height/2,i.width,i.height);var c=i.textPadding;c&&(r=Rn(r,s,c),u-=i.height/2-c[2]-i.textHeight/2),kn(e,"shadowBlur",gn(l.textShadowBlur,n.textShadowBlur,0)),kn(e,"shadowColor",l.textShadowColor||n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",gn(l.textShadowOffsetX,n.textShadowOffsetX,0)),kn(e,"shadowOffsetY",gn(l.textShadowOffsetY,n.textShadowOffsetY,0)),kn(e,"textAlign",s),kn(e,"textBaseline","middle"),kn(e,"font",i.font||_n.DEFAULT_FONT);var d=On(l.textStroke||n.textStroke,f),p=zn(l.textFill||n.textFill),f=fn(l.textStrokeWidth,n.textStrokeWidth);d&&(kn(e,"lineWidth",f),kn(e,"strokeStyle",d),e.strokeText(i.text,r,u)),p&&(kn(e,"fillStyle",p),e.fillText(i.text,r,u))}function Cn(t){return t.textBackgroundColor||t.textBorderWidth&&t.textBorderColor}function Ln(t,e,i,n,a,o,r){var s=i.textBackgroundColor,l=i.textBorderWidth,h=i.textBorderColor,u=yn(s);if(kn(e,"shadowBlur",i.textBoxShadowBlur||0),kn(e,"shadowColor",i.textBoxShadowColor||"transparent"),kn(e,"shadowOffsetX",i.textBoxShadowOffsetX||0),kn(e,"shadowOffsetY",i.textBoxShadowOffsetY||0),u||l&&h){e.beginPath();var c=i.textBorderRadius;c?bn.buildPath(e,{x:n,y:a,width:o,height:r,r:c}):e.rect(n,a,o,r),e.closePath()}if(u)kn(e,"fillStyle",s),e.fill();else if(xn(s)){var d=s.image;(d=wn.createOrUpdateImage(d,null,t,Dn,s))&&wn.isImageReady(d)&&e.drawImage(d,n,a,o,r)}l&&h&&(kn(e,"lineWidth",l),kn(e,"strokeStyle",h),e.stroke())}function Dn(t,e){e.image=t}function Pn(t,e,i){var n=e.x||0,a=e.y||0,o=e.textAlign,r=e.textVerticalAlign;if(i){var s=e.textPosition;if(s instanceof Array)n=i.x+En(s[0],i.width),a=i.y+En(s[1],i.height);else{var l=_n.adjustTextPositionOnRect(s,i,e.textDistance);n=l.x,a=l.y,o=o||l.textAlign,r=r||l.textVerticalAlign}var h=e.textOffset;h&&(n+=h[0],a+=h[1])}return{baseX:n,baseY:a,textAlign:o,textVerticalAlign:r}}function kn(t,e,i){return t[e]=i,t[e]}function On(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function zn(t){return null==t||"none"===t?null:t.image||t.colorStops?"#000":t}function En(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t}function Rn(t,e,i){return"right"===e?t-i[1]:"center"===e?t+i[3]/2-i[1]/2:t+i[3]}Ri.normalizeTextStyle=function(t){return In(t),mn(t.rich,In),t},Ri.renderText=function(t,e,i,n,a){n.rich?function(t,e,i,n,a){var o=t.__textCotentBlock;o&&!t.__dirty||(o=t.__textCotentBlock=_n.parseRichText(i,n));!function(t,e,i,n,a){var o=i.width,r=i.outerWidth,s=i.outerHeight,l=n.textPadding,h=Pn(s,n,a),u=h.baseX,c=h.baseY,d=h.textAlign,p=h.textVerticalAlign;An(e,n,a,u,c);var f=_n.adjustTextX(u,r,d),g=_n.adjustTextY(c,s,p),m=f,v=g;l&&(m+=l[3],v+=l[0]);var y=m+o;Cn(n)&&Ln(t,e,n,f,g,r,s);for(var x=0;x<i.lines.length;x++){for(var _,b=i.lines[x],w=b.tokens,S=w.length,M=b.lineHeight,I=b.width,A=0,T=m,C=y,L=S-1;A<S&&(!(_=w[A]).textAlign||"left"===_.textAlign);)Tn(t,e,_,n,M,v,T,"left"),I-=_.width,T+=_.width,A++;for(;L>=0&&"right"===(_=w[L]).textAlign;)Tn(t,e,_,n,M,v,C,"right"),I-=_.width,C-=_.width,L--;for(T+=(o-(T-m)-(y-C)-I)/2;A<=L;)Tn(t,e,_=w[A],n,M,v,T+_.width/2,"center"),T+=_.width,A++;v+=M}}(t,e,o,n,a)}(t,e,i,n,a):function(t,e,i,n,a){var o=kn(e,"font",n.font||_n.DEFAULT_FONT),r=n.textPadding,s=t.__textCotentBlock;s&&!t.__dirty||(s=t.__textCotentBlock=_n.parsePlainText(i,o,r,n.truncate));var l=s.outerHeight,h=s.lines,u=s.lineHeight,c=Pn(l,n,a),d=c.baseX,p=c.baseY,f=c.textAlign,g=c.textVerticalAlign;An(e,n,a,d,p);var m=_n.adjustTextY(p,l,g),v=d,y=m,x=Cn(n);if(x||r){var _=_n.getWidth(i,o);r&&(_+=r[1]+r[3]);var b=_n.adjustTextX(d,_,f);x&&Ln(t,e,n,b,m,_,l),r&&(v=Rn(d,f,r),y+=r[0])}kn(e,"textAlign",f||"left"),kn(e,"textBaseline","middle"),kn(e,"shadowBlur",n.textShadowBlur||0),kn(e,"shadowColor",n.textShadowColor||"transparent"),kn(e,"shadowOffsetX",n.textShadowOffsetX||0),kn(e,"shadowOffsetY",n.textShadowOffsetY||0),y+=u/2;var w=n.textStrokeWidth,S=On(n.textStroke,w),M=zn(n.textFill);S&&(kn(e,"lineWidth",w),kn(e,"strokeStyle",S));M&&kn(e,"fillStyle",M);for(var I=0;I<h.length;I++)S&&e.strokeText(h[I],v,y),M&&e.fillText(h[I],v,y),y+=u}(t,e,i,n,a)},Ri.getStroke=On,Ri.getFill=zn,Ri.needDrawText=function(t,e){return null!=t&&(t||e.textBackgroundColor||e.textBorderWidth&&e.textBorderColor||e.textPadding)};var Nn=Ri,Vn=new Je,Bn=function(){};Bn.prototype={constructor:Bn,drawRectText:function(t,e){var i=this.style;e=i.textRect||e,this.__dirty&&Nn.normalizeTextStyle(i,!0);var n=i.text;if(null!=n&&(n+=""),Nn.needDrawText(n,i)){t.save();var a=this.transform;i.transformText?this.setTransform(t):a&&(Vn.copy(e),Vn.applyTransform(a),e=Vn),Nn.renderText(this,t,n,i,e),t.restore()}}};var Gn=Bn,Wn=b,Hn=Mi,Fn=Ue,Zn=Gn;function jn(t){for(var e in t=t||{},Fn.call(this,t),t)t.hasOwnProperty(e)&&"style"!==e&&(this[e]=t[e]);this.style=new Hn(t.style,this),this._rect=null,this.__clipPaths=[]}jn.prototype={constructor:jn,type:"displayable",__dirty:!0,invisible:!1,z:0,z2:0,zlevel:0,draggable:!1,dragging:!1,silent:!1,culling:!1,cursor:"pointer",rectHover:!1,progressive:-1,beforeBrush:function(t){},afterBrush:function(t){},brush:function(t,e){},getBoundingRect:function(){},contain:function(t,e){return this.rectContain(t,e)},traverse:function(t,e){t.call(e,this)},rectContain:function(t,e){var i=this.transformCoordToLocal(t,e);return this.getBoundingRect().contain(i[0],i[1])},dirty:function(){this.__dirty=!0,this._rect=null,this.__zr&&this.__zr.refresh()},animateStyle:function(t){return this.animate("style",t)},attrKV:function(t,e){"style"!==t?Fn.prototype.attrKV.call(this,t,e):this.style.set(e)},setStyle:function(t,e){return this.style.set(t,e),this.dirty(!1),this},useStyle:function(t){return this.style=new Hn(t,this),this.dirty(!1),this}},Wn.inherits(jn,Fn),Wn.mixin(jn,Zn);var Un=jn,qn=Un,Xn=Je,Yn=b,$n=Vi;function Kn(t){qn.call(this,t)}Kn.prototype={constructor:Kn,type:"image",brush:function(t,e){var i=this.style,n=i.image;i.bind(t,this,e);var a=this._image=$n.createOrUpdateImage(n,this._image,this,this.onload);if(a&&$n.isImageReady(a)){var o=i.x||0,r=i.y||0,s=i.width,l=i.height,h=a.width/a.height;if(null==s&&null!=l?s=l*h:null==l&&null!=s?l=s/h:null==s&&null==l&&(s=a.width,l=a.height),this.setTransform(t),i.sWidth&&i.sHeight){var u=i.sx||0,c=i.sy||0;t.drawImage(a,u,c,i.sWidth,i.sHeight,o,r,s,l)}else if(i.sx&&i.sy){var d=s-(u=i.sx),p=l-(c=i.sy);t.drawImage(a,u,c,d,p,o,r,s,l)}else t.drawImage(a,o,r,s,l);this.restoreTransform(t),null!=i.text&&this.drawRectText(t,this.getBoundingRect())}},getBoundingRect:function(){var t=this.style;return this._rect||(this._rect=new Xn(t.x||0,t.y||0,t.width||0,t.height||0)),this._rect}},Yn.inherits(Kn,qn);var Jn=Kn,Qn=be.devicePixelRatio,ta=b,ea=Ae,ia=Je,na=hi,aa=zi,oa=Ei,ra=Jn;function sa(t){return parseInt(t,10)}function la(t){t.__unusedCount++}function ha(t){1==t.__unusedCount&&t.clear()}var ua=new ia(0,0,0,0),ca=new ia(0,0,0,0);var da=function(t,e,i){this.type="canvas";var n=!t.nodeName||"CANVAS"===t.nodeName.toUpperCase();this._opts=i=ta.extend({},i||{}),this.dpr=i.devicePixelRatio||Qn,this._singleCanvas=n,this.root=t;var a=t.style;a&&(a["-webkit-tap-highlight-color"]="transparent",a["-webkit-user-select"]=a["user-select"]=a["-webkit-touch-callout"]="none",t.innerHTML=""),this.storage=e;var o=this._zlevelList=[],r=this._layers={};if(this._layerConfig={},n){null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height);var s=t.width,l=t.height;this._width=s,this._height=l;var h=new aa(t,this,1);h.initContext(),r[0]=h,o.push(0),this._domRoot=t}else{this._width=this._getSize(0),this._height=this._getSize(1);var u=this._domRoot=function(t,e){var i=document.createElement("div");return i.style.cssText=["position:relative","overflow:hidden","width:"+t+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",i}(this._width,this._height);t.appendChild(u)}this._progressiveLayers=[],this._hoverlayer,this._hoverElements=[]};da.prototype={constructor:da,getType:function(){return"canvas"},isSingleCanvas:function(){return this._singleCanvas},getViewportRoot:function(){return this._domRoot},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(t){var e=this.storage.getDisplayList(!0),i=this._zlevelList;this._paintList(e,t);for(var n=0;n<i.length;n++){var a=i[n],o=this._layers[a];!o.__builtin__&&o.refresh&&o.refresh()}return this.refreshHover(),this._progressiveLayers.length&&this._startProgessive(),this},addHover:function(t,e){if(!t.__hoverMir){var i=new t.constructor({style:t.style,shape:t.shape});i.__from=t,t.__hoverMir=i,i.setStyle(e),this._hoverElements.push(i)}},removeHover:function(t){var e=t.__hoverMir,i=this._hoverElements,n=ta.indexOf(i,e);n>=0&&i.splice(n,1),t.__hoverMir=null},clearHover:function(t){for(var e=this._hoverElements,i=0;i<e.length;i++){var n=e[i].__from;n&&(n.__hoverMir=null)}e.length=0},refreshHover:function(){var t=this._hoverElements,e=t.length,i=this._hoverlayer;if(i&&i.clear(),e){na(t,this.storage.displayableSortFunc),i||(i=this._hoverlayer=this.getLayer(1e5));var n={};i.ctx.save();for(var a=0;a<e;){var o=t[a],r=o.__from;r&&r.__zr?(a++,r.invisible||(o.transform=r.transform,o.invTransform=r.invTransform,o.__clipPaths=r.__clipPaths,this._doPaintEl(o,i,!0,n))):(t.splice(a,1),r.__hoverMir=null,e--)}i.ctx.restore()}},_startProgessive:function(){var t=this;if(t._furtherProgressive){var e=t._progressiveToken=+new Date;t._progress++,oa((function i(){e===t._progressiveToken&&t.storage&&(t._doPaintList(t.storage.getDisplayList()),t._furtherProgressive?(t._progress++,oa(i)):t._progressiveToken=-1)}))}},_clearProgressive:function(){this._progressiveToken=-1,this._progress=0,ta.each(this._progressiveLayers,(function(t){t.__dirty&&t.clear()}))},_paintList:function(t,e){null==e&&(e=!1),this._updateLayerStatus(t),this._clearProgressive(),this.eachBuiltinLayer(la),this._doPaintList(t,e),this.eachBuiltinLayer(ha)},_doPaintList:function(t,e){var i,n,a,o,r,s,l=0,h=this._width,u=this._height,c=this._progress;function d(t){var e=a.dpr||1;a.save(),a.globalAlpha=1,a.shadowBlur=0,i.__dirty=!0,a.setTransform(1,0,0,1,0,0),a.drawImage(t.dom,0,0,h*e,u*e),a.restore()}for(var p=0,f=t.length;p<f;p++){var g=t[p],m=this._singleCanvas?0:g.zlevel,v=g.__frame;if(v<0&&r&&(d(r),r=null),n!==m&&(a&&a.restore(),o={},n=m,(i=this.getLayer(n)).__builtin__||ea("ZLevel "+n+" has been used by unkown layer "+i.id),(a=i.ctx).save(),i.__unusedCount=0,(i.__dirty||e)&&i.clear()),i.__dirty||e){if(v>=0){if(!r){if((r=this._progressiveLayers[Math.min(l++,4)]).ctx.save(),r.renderScope={},r&&r.__progress>r.__maxProgress){p=r.__nextIdxNotProg-1;continue}s=r.__progress,r.__dirty||(c=s),r.__progress=c+1}v===c&&this._doPaintEl(g,r,!0,r.renderScope)}else this._doPaintEl(g,i,e,o);g.__dirty=!1}}r&&d(r),a&&a.restore(),this._furtherProgressive=!1,ta.each(this._progressiveLayers,(function(t){t.__maxProgress>=t.__progress&&(this._furtherProgressive=!0)}),this)},_doPaintEl:function(t,e,i,n){var a=e.ctx,o=t.transform;if((e.__dirty||i)&&!t.invisible&&0!==t.style.opacity&&(!o||o[0]||o[3])&&(!t.culling||!function(t,e,i){return ua.copy(t.getBoundingRect()),t.transform&&ua.applyTransform(t.transform),ca.width=e,ca.height=i,!ua.intersect(ca)}(t,this._width,this._height))){var r=t.__clipPaths;(n.prevClipLayer!==e||function(t,e){if(t==e)return!1;if(!t||!e||t.length!==e.length)return!0;for(var i=0;i<t.length;i++)if(t[i]!==e[i])return!0}(r,n.prevElClipPaths))&&(n.prevElClipPaths&&(n.prevClipLayer.ctx.restore(),n.prevClipLayer=n.prevElClipPaths=null,n.prevEl=null),r&&(a.save(),function(t,e){for(var i=0;i<t.length;i++){var n=t[i];n.setTransform(e),e.beginPath(),n.buildPath(e,n.shape),e.clip(),n.restoreTransform(e)}}(r,a),n.prevClipLayer=e,n.prevElClipPaths=r)),t.beforeBrush&&t.beforeBrush(a),t.brush(a,n.prevEl||null),n.prevEl=t,t.afterBrush&&t.afterBrush(a)}},getLayer:function(t){if(this._singleCanvas)return this._layers[0];var e=this._layers[t];return e||((e=new aa("zr_"+t,this,this.dpr)).__builtin__=!0,this._layerConfig[t]&&ta.merge(e,this._layerConfig[t],!0),this.insertLayer(t,e),e.initContext()),e},insertLayer:function(t,e){var i=this._layers,n=this._zlevelList,a=n.length,o=null,r=-1,s=this._domRoot;if(i[t])ea("ZLevel "+t+" has been used already");else if(function(t){return!!t&&(!!t.__builtin__||"function"==typeof t.resize&&"function"==typeof t.refresh)}(e)){if(a>0&&t>n[0]){for(r=0;r<a-1&&!(n[r]<t&&n[r+1]>t);r++);o=i[n[r]]}if(n.splice(r+1,0,t),i[t]=e,!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 ea("Layer of zlevel "+t+" is not valid")},eachLayer:function(t,e){var i,n,a=this._zlevelList;for(n=0;n<a.length;n++)i=a[n],t.call(e,this._layers[i],i)},eachBuiltinLayer:function(t,e){var i,n,a,o=this._zlevelList;for(a=0;a<o.length;a++)n=o[a],(i=this._layers[n]).__builtin__&&t.call(e,i,n)},eachOtherLayer:function(t,e){var i,n,a,o=this._zlevelList;for(a=0;a<o.length;a++)n=o[a],(i=this._layers[n]).__builtin__||t.call(e,i,n)},getLayers:function(){return this._layers},_updateLayerStatus:function(t){var e=this._layers,i=this._progressiveLayers,n={},a={};this.eachBuiltinLayer((function(t,e){n[e]=t.elCount,t.elCount=0,t.__dirty=!1})),ta.each(i,(function(t,e){a[e]=t.elCount,t.elCount=0,t.__dirty=!1}));for(var o,r,s=0,l=0,h=0,u=t.length;h<u;h++){var c=t[h],d=e[this._singleCanvas?0:c.zlevel],p=c.progressive;if(d&&(d.elCount++,d.__dirty=d.__dirty||c.__dirty),p>=0){r!==p&&(r=p,l++);var f=c.__frame=l-1;if(!o){var g=Math.min(s,4);(o=i[g])||(o=i[g]=new aa("progressive",this,this.dpr)).initContext(),o.__maxProgress=0}o.__dirty=o.__dirty||c.__dirty,o.elCount++,o.__maxProgress=Math.max(o.__maxProgress,f),o.__maxProgress>=o.__progress&&(d.__dirty=!0)}else c.__frame=-1,o&&(o.__nextIdxNotProg=h,s++,o=null)}o&&(s++,o.__nextIdxNotProg=h),this.eachBuiltinLayer((function(t,e){n[e]!==t.elCount&&(t.__dirty=!0)})),i.length=Math.min(s,5),ta.each(i,(function(t,e){a[e]!==t.elCount&&(c.__dirty=!0),t.__dirty&&(t.__progress=0)}))},clear:function(){return this.eachBuiltinLayer(this._clearLayer),this},_clearLayer:function(t){t.clear()},configLayer:function(t,e){if(e){var i=this._layerConfig;i[t]?ta.merge(i[t],e,!0):i[t]=e;var n=this._layers[t];n&&ta.merge(n,i[t],!0)}},delLayer:function(t){var e=this._layers,i=this._zlevelList,n=e[t];n&&(n.dom.parentNode.removeChild(n.dom),delete e[t],i.splice(ta.indexOf(i,t),1))},resize:function(t,e){var i=this._domRoot;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!=t||e!=this._height){for(var a in i.style.width=t+"px",i.style.height=e+"px",this._layers)this._layers.hasOwnProperty(a)&&this._layers[a].resize(t,e);ta.each(this._progressiveLayers,(function(i){i.resize(t,e)})),this.refresh(!0)}return this._width=t,this._height=e,this},clearLayer:function(t){var e=this._layers[t];e&&e.clear()},dispose:function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},getRenderedCanvas:function(t){if(t=t||{},this._singleCanvas)return this._layers[0].dom;var e=new aa("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clearColor=t.backgroundColor,e.clear();var i,n=this.storage.getDisplayList(!0),a={},o=this;function r(t,i){var n,a=o._zlevelList;null==t&&(t=-1/0);for(var r=0;r<a.length;r++){var s=a[r],l=o._layers[s];if(!l.__builtin__&&s>t&&s<i){n=l;break}}n&&n.renderToCanvas&&(e.ctx.save(),n.renderToCanvas(e.ctx),e.ctx.restore())}for(var s=0;s<n.length;s++){var l=n[s];l.zlevel!==i&&(r(i,l.zlevel),i=l.zlevel),this._doPaintEl(l,e,!0,a)}return r(i,1/0),e.dom},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||sa(s[i])||sa(r.style[i]))-(sa(s[a])||0)-(sa(s[o])||0)|0},pathToImage:function(t,e){e=e||this.dpr;var i=document.createElement("canvas"),n=i.getContext("2d"),a=t.getBoundingRect(),o=t.style,r=o.shadowBlur,s=o.shadowOffsetX,l=o.shadowOffsetY,h=o.hasStroke()?o.lineWidth:0,u=Math.max(h/2,-s+r),c=Math.max(h/2,s+r),d=Math.max(h/2,-l+r),p=Math.max(h/2,l+r),f=a.width+u+c,g=a.height+d+p;i.width=f*e,i.height=g*e,n.scale(e,e),n.clearRect(0,0,f,g),n.dpr=e;var m={position:t.position,rotation:t.rotation,scale:t.scale};t.position=[u-a.x,d-a.y],t.rotation=0,t.scale=[1,1],t.updateTransform(),t&&t.brush(n);var v=new ra({style:{x:0,y:0,image:i}});return null!=m.position&&(v.position=t.position=m.position),null!=m.rotation&&(v.rotation=t.rotation=m.rotation),null!=m.scale&&(v.scale=t.scale=m.scale),v}};var pa=da,fa={},ga=rt;fa.Dispatcher=ga;var ma=_,va="undefined"!=typeof window&&!!window.addEventListener,ya=/^(?:mouse|pointer|contextmenu|drag|drop)|click/;function xa(t,e,i,n){return i=i||{},n||!ma.canvasSupported?_a(t,e,i):ma.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(i.zrX=e.layerX,i.zrY=e.layerY):null!=e.offsetX?(i.zrX=e.offsetX,i.zrY=e.offsetY):_a(t,e,i),i}function _a(t,e,i){var n=function(t){return t.getBoundingClientRect?t.getBoundingClientRect():{left:0,top:0}}(t);i.zrX=e.clientX-n.left,i.zrY=e.clientY-n.top}var ba=va?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};fa.clientToLocal=xa,fa.normalizeEvent=function(t,e,i){if(null!=(e=e||window.event).zrX)return e;var n=e.type;if(n&&n.indexOf("touch")>=0){var a="touchend"!=n?e.targetTouches[0]:e.changedTouches[0];a&&xa(t,a,e,i)}else xa(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&&ya.test(e.type)&&(e.which=1&o?1:2&o?3:4&o?2:0),e},fa.addEventListener=function(t,e,i){va?t.addEventListener(e,i):t.attachEvent("on"+e,i)},fa.removeEventListener=function(t,e,i){va?t.removeEventListener(e,i):t.detachEvent("on"+e,i)},fa.stop=ba,fa.notLeftMouse=function(t){return t.which>1};var wa=b,Sa=fa.Dispatcher,Ma=Ei,Ia=_e,Aa=function(t){t=t||{},this.stage=t.stage||{},this.onframe=t.onframe||function(){},this._clips=[],this._running=!1,this._time,this._pausedTime,this._pauseStart,this._paused=!1,Sa.call(this)};Aa.prototype={constructor:Aa,addClip:function(t){this._clips.push(t)},addAnimator:function(t){t.animation=this;for(var e=t.getClips(),i=0;i<e.length;i++)this.addClip(e[i])},removeClip:function(t){var e=wa.indexOf(this._clips,t);e>=0&&this._clips.splice(e,1)},removeAnimator:function(t){for(var e=t.getClips(),i=0;i<e.length;i++)this.removeClip(e[i]);t.animation=null},_update:function(){for(var t=(new Date).getTime()-this._pausedTime,e=t-this._time,i=this._clips,n=i.length,a=[],o=[],r=0;r<n;r++){var s=i[r],l=s.step(t,e);l&&(a.push(l),o.push(s))}for(r=0;r<n;)i[r]._needsRemove?(i[r]=i[n-1],i.pop(),n--):r++;n=a.length;for(r=0;r<n;r++)o[r].fire(a[r]);this._time=t,this.onframe(e),this.trigger("frame",e),this.stage.update&&this.stage.update()},_startLoop:function(){var t=this;this._running=!0,Ma((function e(){t._running&&(Ma(e),!t._paused&&t._update())}))},start:function(){this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop()},stop:function(){this._running=!1},pause:function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},resume:function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},clear:function(){this._clips=[]},animate:function(t,e){var i=new Ia(t,(e=e||{}).loop,e.getter,e.setter);return this.addAnimator(i),i}},wa.mixin(Aa,Sa);var Ta=Aa,Ca=fa,La=function(){this._track=[]};function Da(t){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1];return Math.sqrt(e*e+i*i)}La.prototype={constructor:La,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<r;o++){var s=n[o],l=Ca.clientToLocal(i,s,{});a.points.push([l.zrX,l.zrY]),a.touches.push(s)}this._track.push(a)}},_recognize:function(t){for(var e in Pa)if(Pa.hasOwnProperty(e)){var i=Pa[e](this._track,t);if(i)return i}}};var Pa={pinch:function(t,e){var i=t.length;if(i){var n,a=(t[i-1]||{}).points,o=(t[i-2]||{}).points||a;if(o&&o.length>1&&a&&a.length>1){var r=Da(a)/Da(o);!isFinite(r)&&(r=1),e.pinchScale=r;var s=[((n=a)[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ka=La,Oa=fa,za=Oa.addEventListener,Ea=Oa.removeEventListener,Ra=Oa.normalizeEvent,Na=b,Va=rt,Ba=_,Ga=ka,Wa=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Ha=["touchstart","touchend","touchmove"],Fa={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},Za=Na.map(Wa,(function(t){var e=t.replace("mouse","pointer");return Fa[e]?e:t}));function ja(t){return"mousewheel"===t&&Ba.browser.firefox?"DOMMouseScroll":t}function Ua(t,e,i){var n=t._gestureMgr;"start"===i&&n.clear();var a=n.recognize(e,t.handler.findHover(e.zrX,e.zrY,null).target,t.dom);if("end"===i&&n.clear(),a){var o=a.type;e.gestureEvent=o,t.handler.dispatchToElement({target:a.target},o,a.event)}}function qa(t){t._touching=!0,clearTimeout(t._touchTimer),t._touchTimer=setTimeout((function(){t._touching=!1}),700)}var Xa={mousemove:function(t){t=Ra(this.dom,t),this.trigger("mousemove",t)},mouseout:function(t){var e=(t=Ra(this.dom,t)).toElement||t.relatedTarget;if(e!=this.dom)for(;e&&9!=e.nodeType;){if(e===this.dom)return;e=e.parentNode}this.trigger("mouseout",t)},touchstart:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,this._lastTouchMoment=new Date,Ua(this,t,"start"),Xa.mousemove.call(this,t),Xa.mousedown.call(this,t),qa(this)},touchmove:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,Ua(this,t,"change"),Xa.mousemove.call(this,t),qa(this)},touchend:function(t){(t=Ra(this.dom,t)).zrByTouch=!0,Ua(this,t,"end"),Xa.mouseup.call(this,t),+new Date-this._lastTouchMoment<300&&Xa.click.call(this,t),qa(this)},pointerdown:function(t){Xa.mousedown.call(this,t)},pointermove:function(t){Ya(t)||Xa.mousemove.call(this,t)},pointerup:function(t){Xa.mouseup.call(this,t)},pointerout:function(t){Ya(t)||Xa.mouseout.call(this,t)}};function Ya(t){var e=t.pointerType;return"pen"===e||"touch"===e}function $a(t){var e;function i(e,i){Na.each(e,(function(e){za(t,ja(e),i._handlers[e])}),i)}Va.call(this),this.dom=t,this._touching=!1,this._touchTimer,this._gestureMgr=new Ga,this._handlers={},e=this,Na.each(Ha,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Za,(function(t){e._handlers[t]=Na.bind(Xa[t],e)})),Na.each(Wa,(function(t){var i,n;e._handlers[t]=(i=Xa[t],n=e,function(){if(!n._touching)return i.apply(n,arguments)})})),Ba.pointerEventsSupported?i(Za,this):(Ba.touchEventsSupported&&i(Ha,this),i(Wa,this))}Na.each(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Xa[t]=function(e){e=Ra(this.dom,e),this.trigger(t,e)}}));var Ka=$a.prototype;Ka.dispose=function(){for(var t=Wa.concat(Ha),e=0;e<t.length;e++){var i=t[e];Ea(this.dom,ja(i),this._handlers[i])}},Ka.setCursor=function(t){this.dom.style.cursor=t||"default"},Na.mixin($a,Va);var Ja=x,Qa=_,to=b,eo=gt,io=mi,no=pa,ao=Ta,oo=$a,ro=!Qa.canvasSupported,so={canvas:no},lo={};var ho=function(t,e,i){i=i||{},this.dom=e,this.id=t;var n=this,a=new io,o=i.renderer;if(ro){if(!so.vml)throw new Error("You need to require 'zrender/vml/vml' to support IE8");o="vml"}else o&&so[o]||(o="canvas");var r=new so[o](e,a,i);this.storage=a,this.painter=r;var s=Qa.node?null:new oo(r.getViewportRoot());this.handler=new eo(a,r,s,r.root),this.animation=new ao({stage:{update:to.bind(this.flush,this)}}),this.animation.start(),this._needsRefresh;var l=a.delFromStorage,h=a.addToStorage;a.delFromStorage=function(t){l.call(a,t),t&&t.removeSelfFromZr(n)},a.addToStorage=function(t){h.call(a,t),t.addSelfToZr(n)}};ho.prototype={constructor:ho,getId:function(){return this.id},add:function(t){this.storage.addRoot(t),this._needsRefresh=!0},remove:function(t){this.storage.delRoot(t),this._needsRefresh=!0},configLayer:function(t,e){this.painter.configLayer(t,e),this._needsRefresh=!0},refreshImmediately:function(){this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},refresh:function(){this._needsRefresh=!0},flush:function(){this._needsRefresh&&this.refreshImmediately(),this._needsRefreshHover&&this.refreshHoverImmediately()},addHover:function(t,e){this.painter.addHover&&(this.painter.addHover(t,e),this.refreshHover())},removeHover:function(t){this.painter.removeHover&&(this.painter.removeHover(t),this.refreshHover())},clearHover:function(){this.painter.clearHover&&(this.painter.clearHover(),this.refreshHover())},refreshHover:function(){this._needsRefreshHover=!0},refreshHoverImmediately:function(){this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.refreshHover()},resize:function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},clearAnimation:function(){this.animation.clear()},getWidth:function(){return this.painter.getWidth()},getHeight:function(){return this.painter.getHeight()},pathToImage:function(t,e){return this.painter.pathToImage(t,e)},setCursorStyle:function(t){this.handler.setCursorStyle(t)},findHover:function(t,e){return this.handler.findHover(t,e)},on:function(t,e,i){this.handler.on(t,e,i)},off:function(t,e){this.handler.off(t,e)},trigger:function(t,e){this.handler.trigger(t,e)},clear:function(){this.storage.delRoot(),this.painter.clear()},dispose:function(){var t;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,t=this.id,delete lo[t]}},v.version="3.7.4",v.init=function(t,e){var i=new ho(Ja(),t,e);return lo[i.id]=i,i},v.dispose=function(t){if(t)t.dispose();else{for(var e in lo)lo.hasOwnProperty(e)&&lo[e].dispose();lo={}}return this},v.getInstance=function(t){return lo[t]},v.registerPainter=function(t,e){so[t]=e};var uo={},co={},po={},fo=b;var go=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function mo(t){return Math.floor(Math.log(t)/Math.LN10)}po.linearMap=function(t,e,i,n){var a=e[1]-e[0],o=i[1]-i[0];if(0===a)return 0===o?i[0]:(i[0]+i[1])/2;if(n)if(a>0){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]}else{if(t===e[0])return i[0];if(t===e[1])return i[1]}return(t-e[0])/a*o+i[0]},po.parsePercent=function(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(i=t,i.replace(/^\s+/,"").replace(/\s+$/,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var i},po.round=function(t,e,i){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),i?t:+t},po.asc=function(t){return t.sort((function(t,e){return t-e})),t},po.getPrecision=function(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},po.getPrecisionSafe=function(t){var e=t.toString(),i=e.indexOf("e");if(i>0){var n=+e.slice(i+1);return n<0?-n:0}var a=e.indexOf(".");return a<0?0:e.length-1-a},po.getPixelPrecision=function(t,e){var i=Math.log,n=Math.LN10,a=Math.floor(i(t[1]-t[0])/n),o=Math.round(i(Math.abs(e[1]-e[0]))/n),r=Math.min(Math.max(-a+o,0),20);return isFinite(r)?r:20},po.getPercentWithPrecision=function(t,e,i){if(!t[e])return 0;var n=fo.reduce(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return 0;for(var a=Math.pow(10,i),o=fo.map(t,(function(t){return(isNaN(t)?0:t)/n*a*100})),r=100*a,s=fo.map(o,(function(t){return Math.floor(t)})),l=fo.reduce(s,(function(t,e){return t+e}),0),h=fo.map(o,(function(t,e){return t-s[e]}));l<r;){for(var u=Number.NEGATIVE_INFINITY,c=null,d=0,p=h.length;d<p;++d)h[d]>u&&(u=h[d],c=d);++s[c],h[c]=0,++l}return s[e]/a},po.MAX_SAFE_INTEGER=9007199254740991,po.remRadian=function(t){var e=2*Math.PI;return(t%e+e)%e},po.isRadianAroundZero=function(t){return t>-1e-4&&t<1e-4},po.parseDate=function(t){if(t instanceof Date)return t;if("string"==typeof t){var e=go.exec(t);if(!e)return new Date(NaN);if(e[8]){var i=+e[4]||0;return"Z"!==e[8].toUpperCase()&&(i-=e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,i,+(e[5]||0),+e[6]||0,+e[7]||0))}return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,+e[7]||0)}return null==t?new Date(NaN):new Date(Math.round(t))},po.quantity=function(t){return Math.pow(10,mo(t))},po.nice=function(t,e){var i=mo(t),n=Math.pow(10,i),a=t/n;return t=(e?a<1.5?1:a<2.5?2:a<4?3:a<7?5:10:a<1?1:a<2?2:a<3?3:a<5?5:10)*n,i>=-20?+t.toFixed(i<0?-i:0):t},po.reformIntervals=function(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,i=1,n=0;n<t.length;){for(var a=t[n].interval,o=t[n].close,r=0;r<2;r++)a[r]<=e&&(a[r]=e,o[r]=r?1:1-i),e=a[r],i=o[r];a[0]===a[1]&&o[0]*o[1]!=1?t.splice(n,1):n++}return t;function s(t,e,i){return t.interval[i]<e.interval[i]||t.interval[i]===e.interval[i]&&(t.close[i]-e.close[i]==(i?-1:1)||!i&&s(t,e,1))}},po.isNumeric=function(t){return t-parseFloat(t)>=0};var vo=b,yo=Ni,xo=po;var _o=vo.normalizeCssArray;function bo(t){return String(t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}var wo=["a","b","c","d","e","f","g"],So=function(t,e){return"{"+t+(null==e?"":e)+"}"};var Mo=function(t){return t<10?"0"+t:t};var Io=yo.truncateText,Ao=yo.getBoundingRect;co.addCommas=function(t){return isNaN(t)?"-":(t=(t+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")},co.toCamelCase=function(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t},co.normalizeCssArray=_o,co.encodeHTML=bo,co.formatTpl=function(t,e,i){vo.isArray(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],o=0;o<a.length;o++){var r=wo[o],s=So(r,0);t=t.replace(So(r),i?bo(s):s)}for(var l=0;l<n;l++)for(var h=0;h<a.length;h++){s=e[l][a[h]];t=t.replace(So(wo[h],l),i?bo(s):s)}return t},co.formatTplSimple=function(t,e,i){return vo.each(e,(function(e,n){t=t.replace("{"+n+"}",i?bo(e):e)})),t},co.getTooltipMarker=function(t,e){return t?'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:'+bo(t)+";"+(e||"")+'"></span>':""},co.formatTime=function(t,e,i){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var n=xo.parseDate(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"](),h=n["get"+a+"Minutes"](),u=n["get"+a+"Seconds"]();return t=t.replace("MM",Mo(r)).replace("M",r).replace("yyyy",o).replace("yy",o%100).replace("dd",Mo(s)).replace("d",s).replace("hh",Mo(l)).replace("h",l).replace("mm",Mo(h)).replace("m",h).replace("ss",Mo(u)).replace("s",u)},co.capitalFirst=function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},co.truncateText=Io,co.getTextRect=Ao;var To={},Co=b,Lo="___EC__COMPONENT__CONTAINER___";function Do(t){var e={main:"",sub:""};return t&&(t=t.split("."),e.main=t[0]||"",e.sub=t[1]||""),e}function Po(t,e){var i=Co.slice(arguments,2);return this.superClass.prototype[e].apply(t,i)}function ko(t,e,i){return this.superClass.prototype[e].apply(t,i)}To.set=function(t,e,i){return t["\0ec_\0"+e]=i},To.get=function(t,e){return t["\0ec_\0"+e]},To.hasOwn=function(t,e){return t.hasOwnProperty("\0ec_\0"+e)},To.parseClassType=Do,To.enableClassExtend=function(t,e){t.$constructor=t,t.extend=function(t){var e=this,i=function(){t.$constructor?t.$constructor.apply(this,arguments):e.apply(this,arguments)};return Co.extend(i.prototype,t),i.extend=this.extend,i.superCall=Po,i.superApply=ko,Co.inherits(i,this),i.superClass=e,i}},To.enableClassManagement=function(t,e){e=e||{};var i={};if(t.registerClass=function(t,e){if(e)if(function(t){Co.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t),'componentType "'+t+'" illegal')}(e),(e=Do(e)).sub){if(e.sub!==Lo){var n=function(t){var e=i[t.main];e&&e[Lo]||((e=i[t.main]={})[Lo]=!0);return e}(e);n[e.sub]=t}}else i[e.main]=t;return t},t.getClass=function(t,e,n){var a=i[t];if(a&&a[Lo]&&(a=e?a[e]:null),n&&!a)throw new Error(e?"Component "+t+"."+(e||"")+" not exists. Load it first.":t+".type should be specified.");return a},t.getClassesByMainType=function(t){t=Do(t);var e=[],n=i[t.main];return n&&n[Lo]?Co.each(n,(function(t,i){i!==Lo&&e.push(t)})):e.push(n),e},t.hasClass=function(t){return t=Do(t),!!i[t.main]},t.getAllClassMainTypes=function(){var t=[];return Co.each(i,(function(e,i){t.push(i)})),t},t.hasSubTypes=function(t){t=Do(t);var e=i[t.main];return e&&e[Lo]},t.parseClassType=Do,e.registerWhenExtend){var n=t.extend;n&&(t.extend=function(e){var i=n.call(this,e);return t.registerClass(i,e.type)})}return t},To.setReadOnly=function(t,e){};var Oo=b;var zo=function(t){for(var e=0;e<t.length;e++)t[e][1]||(t[e][1]=t[e][0]);return function(e,i,n){for(var a={},o=0;o<t.length;o++){var r=t[o][1];if(!(i&&Oo.indexOf(i,r)>=0||n&&Oo.indexOf(n,r)<0)){var s=e.getShallow(r);null!=s&&(a[t[o][0]]=s)}}return a}},Eo=zo([["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),Ro={getLineStyle:function(t){var e=Eo(this,t),i=this.getLineDash(e.lineWidth);return i&&(e.lineDash=i),e},getLineDash:function(t){null==t&&(t=1);var e=this.get("type"),i=Math.max(t,2),n=4*t;return"solid"===e||null==e?null:"dashed"===e?[n,n]:[i,i]}},No=zo([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),Vo={getAreaStyle:function(t,e){return No(this,t,e)}},Bo={},Go={},Wo={},Ho=j,Fo=Ho.create,Zo=Ho.distSquare,jo=Math.pow,Uo=Math.sqrt,qo=Uo(3),Xo=1/3,Yo=Fo(),$o=Fo(),Ko=Fo();function Jo(t){return t>-1e-8&&t<1e-8}function Qo(t){return t>1e-8||t<-1e-8}function tr(t,e,i,n,a){var o=1-a;return o*o*(o*t+3*a*e)+a*a*(a*n+3*o*i)}function er(t,e,i,n){var a=1-n;return a*(a*t+2*n*e)+n*n*i}Wo.cubicAt=tr,Wo.cubicDerivativeAt=function(t,e,i,n,a){var o=1-a;return 3*(((e-t)*o+2*(i-e)*a)*o+(n-i)*a*a)},Wo.cubicRootAt=function(t,e,i,n,a,o){var r=n+3*(e-i)-t,s=3*(i-2*e+t),l=3*(e-t),h=t-a,u=s*s-3*r*l,c=s*l-9*r*h,d=l*l-3*s*h,p=0;if(Jo(u)&&Jo(c)){if(Jo(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[p++]=M)}else{var f=c*c-4*u*d;if(Jo(f)){var g=c/u,m=-g/2;(M=-s/r+g)>=0&&M<=1&&(o[p++]=M),m>=0&&m<=1&&(o[p++]=m)}else if(f>0){var v=Uo(f),y=u*s+1.5*r*(-c+v),x=u*s+1.5*r*(-c-v);(M=(-s-((y=y<0?-jo(-y,Xo):jo(y,Xo))+(x=x<0?-jo(-x,Xo):jo(x,Xo))))/(3*r))>=0&&M<=1&&(o[p++]=M)}else{var _=(2*u*s-3*r*c)/(2*Uo(u*u*u)),b=Math.acos(_)/3,w=Uo(u),S=Math.cos(b),M=(-s-2*w*S)/(3*r),I=(m=(-s+w*(S+qo*Math.sin(b)))/(3*r),(-s+w*(S-qo*Math.sin(b)))/(3*r));M>=0&&M<=1&&(o[p++]=M),m>=0&&m<=1&&(o[p++]=m),I>=0&&I<=1&&(o[p++]=I)}}return p},Wo.cubicExtrema=function(t,e,i,n,a){var o=6*i-12*e+6*t,r=9*e+3*n-3*t-9*i,s=3*e-3*t,l=0;if(Jo(r)){if(Qo(o))(u=-s/o)>=0&&u<=1&&(a[l++]=u)}else{var h=o*o-4*r*s;if(Jo(h))a[0]=-o/(2*r);else if(h>0){var u,c=Uo(h),d=(-o-c)/(2*r);(u=(-o+c)/(2*r))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Wo.cubicSubdivide=function(t,e,i,n,a,o){var r=(e-t)*a+t,s=(i-e)*a+e,l=(n-i)*a+i,h=(s-r)*a+r,u=(l-s)*a+s,c=(u-h)*a+h;o[0]=t,o[1]=r,o[2]=h,o[3]=c,o[4]=c,o[5]=u,o[6]=l,o[7]=n},Wo.cubicProjectPoint=function(t,e,i,n,a,o,r,s,l,h,u){var c,d,p,f,g,m=.005,v=1/0;Yo[0]=l,Yo[1]=h;for(var y=0;y<1;y+=.05)$o[0]=tr(t,i,a,r,y),$o[1]=tr(e,n,o,s,y),(f=Zo(Yo,$o))<v&&(c=y,v=f);v=1/0;for(var x=0;x<32&&!(m<1e-4);x++)d=c-m,p=c+m,$o[0]=tr(t,i,a,r,d),$o[1]=tr(e,n,o,s,d),f=Zo($o,Yo),d>=0&&f<v?(c=d,v=f):(Ko[0]=tr(t,i,a,r,p),Ko[1]=tr(e,n,o,s,p),g=Zo(Ko,Yo),p<=1&&g<v?(c=p,v=g):m*=.5);return u&&(u[0]=tr(t,i,a,r,c),u[1]=tr(e,n,o,s,c)),Uo(v)},Wo.quadraticAt=er,Wo.quadraticDerivativeAt=function(t,e,i,n){return 2*((1-n)*(e-t)+n*(i-e))},Wo.quadraticRootAt=function(t,e,i,n,a){var o=t-2*e+i,r=2*(e-t),s=t-n,l=0;if(Jo(o)){if(Qo(r))(u=-s/r)>=0&&u<=1&&(a[l++]=u)}else{var h=r*r-4*o*s;if(Jo(h))(u=-r/(2*o))>=0&&u<=1&&(a[l++]=u);else if(h>0){var u,c=Uo(h),d=(-r-c)/(2*o);(u=(-r+c)/(2*o))>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l},Wo.quadraticExtremum=function(t,e,i){var n=t+i-2*e;return 0===n?.5:(t-e)/n},Wo.quadraticSubdivide=function(t,e,i,n,a){var o=(e-t)*n+t,r=(i-e)*n+e,s=(r-o)*n+o;a[0]=t,a[1]=o,a[2]=s,a[3]=s,a[4]=r,a[5]=i},Wo.quadraticProjectPoint=function(t,e,i,n,a,o,r,s,l){var h,u=.005,c=1/0;Yo[0]=r,Yo[1]=s;for(var d=0;d<1;d+=.05){$o[0]=er(t,i,a,d),$o[1]=er(e,n,o,d),(m=Zo(Yo,$o))<c&&(h=d,c=m)}c=1/0;for(var p=0;p<32&&!(u<1e-4);p++){var f=h-u,g=h+u;$o[0]=er(t,i,a,f),$o[1]=er(e,n,o,f);var m=Zo($o,Yo);if(f>=0&&m<c)h=f,c=m;else{Ko[0]=er(t,i,a,g),Ko[1]=er(e,n,o,g);var v=Zo(Ko,Yo);g<=1&&v<c?(h=g,c=v):u*=.5}}return l&&(l[0]=er(t,i,a,h),l[1]=er(e,n,o,h)),Uo(c)};var ir={},nr=j,ar=Wo,or=Math.min,rr=Math.max,sr=Math.sin,lr=Math.cos,hr=2*Math.PI,ur=nr.create(),cr=nr.create(),dr=nr.create();var pr=[],fr=[];ir.fromPoints=function(t,e,i){if(0!==t.length){var n,a=t[0],o=a[0],r=a[0],s=a[1],l=a[1];for(n=1;n<t.length;n++)a=t[n],o=or(o,a[0]),r=rr(r,a[0]),s=or(s,a[1]),l=rr(l,a[1]);e[0]=o,e[1]=s,i[0]=r,i[1]=l}},ir.fromLine=function(t,e,i,n,a,o){a[0]=or(t,i),a[1]=or(e,n),o[0]=rr(t,i),o[1]=rr(e,n)},ir.fromCubic=function(t,e,i,n,a,o,r,s,l,h){var u,c=ar.cubicExtrema,d=ar.cubicAt,p=c(t,i,a,r,pr);for(l[0]=1/0,l[1]=1/0,h[0]=-1/0,h[1]=-1/0,u=0;u<p;u++){var f=d(t,i,a,r,pr[u]);l[0]=or(f,l[0]),h[0]=rr(f,h[0])}for(p=c(e,n,o,s,fr),u=0;u<p;u++){var g=d(e,n,o,s,fr[u]);l[1]=or(g,l[1]),h[1]=rr(g,h[1])}l[0]=or(t,l[0]),h[0]=rr(t,h[0]),l[0]=or(r,l[0]),h[0]=rr(r,h[0]),l[1]=or(e,l[1]),h[1]=rr(e,h[1]),l[1]=or(s,l[1]),h[1]=rr(s,h[1])},ir.fromQuadratic=function(t,e,i,n,a,o,r,s){var l=ar.quadraticExtremum,h=ar.quadraticAt,u=rr(or(l(t,i,a),1),0),c=rr(or(l(e,n,o),1),0),d=h(t,i,a,u),p=h(e,n,o,c);r[0]=or(t,a,d),r[1]=or(e,o,p),s[0]=rr(t,a,d),s[1]=rr(e,o,p)},ir.fromArc=function(t,e,i,n,a,o,r,s,l){var h=nr.min,u=nr.max,c=Math.abs(a-o);if(c%hr<1e-4&&c>1e-4)return s[0]=t-i,s[1]=e-n,l[0]=t+i,void(l[1]=e+n);if(ur[0]=lr(a)*i+t,ur[1]=sr(a)*n+e,cr[0]=lr(o)*i+t,cr[1]=sr(o)*n+e,h(s,ur,cr),u(l,ur,cr),(a%=hr)<0&&(a+=hr),(o%=hr)<0&&(o+=hr),a>o&&!r?o+=hr:a<o&&r&&(a+=hr),r){var d=o;o=a,a=d}for(var p=0;p<o;p+=Math.PI/2)p>a&&(dr[0]=lr(p)*i+t,dr[1]=sr(p)*n+e,h(s,dr,s),u(l,dr,l))};var gr=Wo,mr=j,vr=ir,yr=Je,xr=be.devicePixelRatio,_r={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},br=[],wr=[],Sr=[],Mr=[],Ir=Math.min,Ar=Math.max,Tr=Math.cos,Cr=Math.sin,Lr=Math.sqrt,Dr=Math.abs,Pr="undefined"!=typeof Float32Array,kr=function(t){this._saveData=!t,this._saveData&&(this.data=[]),this._ctx=null};kr.prototype={constructor:kr,_xi:0,_yi:0,_x0:0,_y0:0,_ux:0,_uy:0,_len:0,_lineDash:null,_dashOffset:0,_dashIdx:0,_dashSum:0,setScale:function(t,e){this._ux=Dr(1/xr/t)||0,this._uy=Dr(1/xr/e)||0},getContext:function(){return this._ctx},beginPath:function(t){return this._ctx=t,t&&t.beginPath(),t&&(this.dpr=t.dpr),this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this},moveTo:function(t,e){return this.addData(_r.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},lineTo:function(t,e){var i=Dr(t-this._xi)>this._ux||Dr(e-this._yi)>this._uy||this._len<5;return this.addData(_r.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(_r.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(_r.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(_r.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=Tr(a)*i+t,this._yi=Cr(a)*i+t,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(_r.R,t,e,i,n),this},closePath:function(){this.addData(_r.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,this._dashIdx=0;for(var e=0,i=0;i<t.length;i++)e+=t[i];this._dashSum=e}return this},setLineDashOffset:function(t){return this._dashOffset=t,this},len:function(){return this._len},setData:function(t){var e=t.length;this.data&&this.data.length==e||!Pr||(this.data=new Float32Array(e));for(var i=0;i<e;i++)this.data[i]=t[i];this._len=e},appendPath:function(t){t instanceof Array||(t=[t]);for(var e=t.length,i=0,n=this._len,a=0;a<e;a++)i+=t[a].len();Pr&&this.data instanceof Float32Array&&(this.data=new Float32Array(n+i));for(a=0;a<e;a++)for(var o=t[a].data,r=0;r<o.length;r++)this.data[n++]=o[r];this._len=n},addData:function(t){if(this._saveData){var e=this.data;this._len+arguments.length>e.length&&(this._expandData(),e=this.data);for(var i=0;i<arguments.length;i++)e[this._len++]=arguments[i];this._prevCmd=t}},_expandData:function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},_needsDash:function(){return this._lineDash},_dashedLineTo:function(t,e){var i,n,a=this._dashSum,o=this._dashOffset,r=this._lineDash,s=this._ctx,l=this._xi,h=this._yi,u=t-l,c=e-h,d=Lr(u*u+c*c),p=l,f=h,g=r.length;for(o<0&&(o=a+o),p-=(o%=a)*(u/=d),f-=o*(c/=d);u>0&&p<=t||u<0&&p>=t||0==u&&(c>0&&f<=e||c<0&&f>=e);)p+=u*(i=r[n=this._dashIdx]),f+=c*i,this._dashIdx=(n+1)%g,u>0&&p<l||u<0&&p>l||c>0&&f<h||c<0&&f>h||s[n%2?"moveTo":"lineTo"](u>=0?Ir(p,t):Ar(p,t),c>=0?Ir(f,e):Ar(f,e));u=p-t,c=f-e,this._dashOffset=-Lr(u*u+c*c)},_dashedBezierTo:function(t,e,i,n,a,o){var r,s,l,h,u,c=this._dashSum,d=this._dashOffset,p=this._lineDash,f=this._ctx,g=this._xi,m=this._yi,v=gr.cubicAt,y=0,x=this._dashIdx,_=p.length,b=0;for(d<0&&(d=c+d),d%=c,r=0;r<1;r+=.1)s=v(g,t,i,a,r+.1)-v(g,t,i,a,r),l=v(m,e,n,o,r+.1)-v(m,e,n,o,r),y+=Lr(s*s+l*l);for(;x<_&&!((b+=p[x])>d);x++);for(r=(b-d)/y;r<=1;)h=v(g,t,i,a,r),u=v(m,e,n,o,r),x%2?f.moveTo(h,u):f.lineTo(h,u),r+=p[x]/y,x=(x+1)%_;x%2!=0&&f.lineTo(a,o),s=a-h,l=o-u,this._dashOffset=-Lr(s*s+l*l)},_dashedQuadraticTo:function(t,e,i,n){var a=i,o=n;i=(i+2*t)/3,n=(n+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,i,n,a,o)},toStatic:function(){var t=this.data;t instanceof Array&&(t.length=this._len,Pr&&(this.data=new Float32Array(t)))},getBoundingRect:function(){br[0]=br[1]=Sr[0]=Sr[1]=Number.MAX_VALUE,wr[0]=wr[1]=Mr[0]=Mr[1]=-Number.MAX_VALUE;for(var t=this.data,e=0,i=0,n=0,a=0,o=0;o<t.length;){var r=t[o++];switch(1==o&&(n=e=t[o],a=i=t[o+1]),r){case _r.M:e=n=t[o++],i=a=t[o++],Sr[0]=n,Sr[1]=a,Mr[0]=n,Mr[1]=a;break;case _r.L:vr.fromLine(e,i,t[o],t[o+1],Sr,Mr),e=t[o++],i=t[o++];break;case _r.C:vr.fromCubic(e,i,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Sr,Mr),e=t[o++],i=t[o++];break;case _r.Q:vr.fromQuadratic(e,i,t[o++],t[o++],t[o],t[o+1],Sr,Mr),e=t[o++],i=t[o++];break;case _r.A:var s=t[o++],l=t[o++],h=t[o++],u=t[o++],c=t[o++],d=t[o++]+c;t[o++];var p=1-t[o++];1==o&&(n=Tr(c)*h+s,a=Cr(c)*u+l),vr.fromArc(s,l,h,u,c,d,p,Sr,Mr),e=Tr(d)*h+s,i=Cr(d)*u+l;break;case _r.R:n=e=t[o++],a=i=t[o++];var f=t[o++],g=t[o++];vr.fromLine(n,a,n+f,a+g,Sr,Mr);break;case _r.Z:e=n,i=a}mr.min(br,br,Sr),mr.max(wr,wr,Mr)}return 0===o&&(br[0]=br[1]=wr[0]=wr[1]=0),new yr(br[0],br[1],wr[0]-br[0],wr[1]-br[1])},rebuildPath:function(t){for(var e,i,n,a,o,r,s=this.data,l=this._ux,h=this._uy,u=this._len,c=0;c<u;){var d=s[c++];switch(1==c&&(e=n=s[c],i=a=s[c+1]),d){case _r.M:e=n=s[c++],i=a=s[c++],t.moveTo(n,a);break;case _r.L:o=s[c++],r=s[c++],(Dr(o-n)>l||Dr(r-a)>h||c===u-1)&&(t.lineTo(o,r),n=o,a=r);break;case _r.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 _r.Q:t.quadraticCurveTo(s[c++],s[c++],s[c++],s[c++]),n=s[c-2],a=s[c-1];break;case _r.A:var p=s[c++],f=s[c++],g=s[c++],m=s[c++],v=s[c++],y=s[c++],x=s[c++],_=s[c++],b=g>m?g:m,w=g>m?1:g/m,S=g>m?m/g:1,M=v+y;Math.abs(g-m)>.001?(t.translate(p,f),t.rotate(x),t.scale(w,S),t.arc(0,0,b,v,M,1-_),t.scale(1/w,1/S),t.rotate(-x),t.translate(-p,-f)):t.arc(p,f,b,v,M,1-_),1==c&&(e=Tr(v)*g+p,i=Cr(v)*m+f),n=Tr(M)*g+p,a=Cr(M)*m+f;break;case _r.R:e=n=s[c],i=a=s[c+1],t.rect(s[c++],s[c++],s[c++],s[c++]);break;case _r.Z:t.closePath(),n=e,a=i}}}},kr.CMD=_r;var Or=kr,zr={},Er={};Er.containStroke=function(t,e,i,n,a,o,r){if(0===a)return!1;var s=a,l=0;if(r>e+s&&r>n+s||r<e-s&&r<n-s||o>t+s&&o>i+s||o<t-s&&o<i-s)return!1;if(t===i)return Math.abs(o-t)<=s/2;var h=(l=(e-n)/(t-i))*o-r+(t*n-i*e)/(t-i);return h*h/(l*l+1)<=s/2*s/2};var Rr={},Nr=Wo;Rr.containStroke=function(t,e,i,n,a,o,r,s,l,h,u){if(0===l)return!1;var c=l;return!(u>e+c&&u>n+c&&u>o+c&&u>s+c||u<e-c&&u<n-c&&u<o-c&&u<s-c||h>t+c&&h>i+c&&h>a+c&&h>r+c||h<t-c&&h<i-c&&h<a-c&&h<r-c)&&Nr.cubicProjectPoint(t,e,i,n,a,o,r,s,h,u,null)<=c/2};var Vr={},Br=Wo.quadraticProjectPoint;Vr.containStroke=function(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var h=r;return!(l>e+h&&l>n+h&&l>o+h||l<e-h&&l<n-h&&l<o-h||s>t+h&&s>i+h&&s>a+h||s<t-h&&s<i-h&&s<a-h)&&Br(t,e,i,n,a,o,s,l,null)<=h/2};var Gr={},Wr={},Hr=2*Math.PI;Wr.normalizeRadian=function(t){return(t%=Hr)<0&&(t+=Hr),t};var Fr=Wr.normalizeRadian,Zr=2*Math.PI;Gr.containStroke=function(t,e,i,n,a,o,r,s,l){if(0===r)return!1;var h=r;s-=t,l-=e;var u=Math.sqrt(s*s+l*l);if(u-h>i||u+h<i)return!1;if(Math.abs(n-a)%Zr<1e-4)return!0;if(o){var c=n;n=Fr(a),a=Fr(c)}else n=Fr(n),a=Fr(a);n>a&&(a+=Zr);var d=Math.atan2(l,s);return d<0&&(d+=Zr),d>=n&&d<=a||d+Zr>=n&&d+Zr<=a};var jr=function(t,e,i,n,a,o){if(o>e&&o>n||o<e&&o<n)return 0;if(n===e)return 0;var r=n<e?1:-1,s=(o-e)/(n-e);return 1!==s&&0!==s||(r=n<e?.5:-.5),s*(i-t)+t>a?r:0},Ur=Or,qr=Er,Xr=Rr,Yr=Vr,$r=Gr,Kr=Wr.normalizeRadian,Jr=Wo,Qr=jr,ts=Ur.CMD,es=2*Math.PI;var is=[-1,-1,-1],ns=[-1,-1];function as(t,e,i,n,a,o,r,s,l,h){if(h>e&&h>n&&h>o&&h>s||h<e&&h<n&&h<o&&h<s)return 0;var u,c=Jr.cubicRootAt(e,n,o,s,h,is);if(0===c)return 0;for(var d,p,f=0,g=-1,m=0;m<c;m++){var v=is[m],y=0===v||1===v?.5:1;Jr.cubicAt(t,i,a,r,v)<l||(g<0&&(g=Jr.cubicExtrema(e,n,o,s,ns),ns[1]<ns[0]&&g>1&&(u=void 0,u=ns[0],ns[0]=ns[1],ns[1]=u),d=Jr.cubicAt(e,n,o,s,ns[0]),g>1&&(p=Jr.cubicAt(e,n,o,s,ns[1]))),2==g?v<ns[0]?f+=d<e?y:-y:v<ns[1]?f+=p<d?y:-y:f+=s<p?y:-y:v<ns[0]?f+=d<e?y:-y:f+=s<d?y:-y)}return f}function os(t,e,i,n,a,o,r,s){if(s>e&&s>n&&s>o||s<e&&s<n&&s<o)return 0;var l=Jr.quadraticRootAt(e,n,o,s,is);if(0===l)return 0;var h=Jr.quadraticExtremum(e,n,o);if(h>=0&&h<=1){for(var u=0,c=Jr.quadraticAt(e,n,o,h),d=0;d<l;d++){var p=0===is[d]||1===is[d]?.5:1;Jr.quadraticAt(t,i,a,is[d])<r||(is[d]<h?u+=c<e?p:-p:u+=o<c?p:-p)}return u}p=0===is[0]||1===is[0]?.5:1;return Jr.quadraticAt(t,i,a,is[0])<r?0:o<e?p:-p}function rs(t,e,i,n,a,o,r,s){if((s-=e)>i||s<-i)return 0;var l=Math.sqrt(i*i-s*s);is[0]=-l,is[1]=l;var h=Math.abs(n-a);if(h<1e-4)return 0;if(h%es<1e-4){n=0,a=es;var u=o?1:-1;return r>=is[0]+t&&r<=is[1]+t?u:0}if(o){l=n;n=Kr(a),a=Kr(l)}else n=Kr(n),a=Kr(a);n>a&&(a+=es);for(var c=0,d=0;d<2;d++){var p=is[d];if(p+t>r){var f=Math.atan2(s,p);u=o?1:-1;f<0&&(f=es+f),(f>=n&&f<=a||f+es>=n&&f+es<=a)&&(f>Math.PI/2&&f<1.5*Math.PI&&(u=-u),c+=u)}}return c}function ss(t,e,i,n,a){for(var o,r,s=0,l=0,h=0,u=0,c=0,d=0;d<t.length;){var p=t[d++];switch(p===ts.M&&d>1&&(i||(s+=Qr(l,h,u,c,n,a))),1==d&&(u=l=t[d],c=h=t[d+1]),p){case ts.M:l=u=t[d++],h=c=t[d++];break;case ts.L:if(i){if(qr.containStroke(l,h,t[d],t[d+1],e,n,a))return!0}else s+=Qr(l,h,t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.C:if(i){if(Xr.containStroke(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=as(l,h,t[d++],t[d++],t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.Q:if(i){if(Yr.containStroke(l,h,t[d++],t[d++],t[d],t[d+1],e,n,a))return!0}else s+=os(l,h,t[d++],t[d++],t[d],t[d+1],n,a)||0;l=t[d++],h=t[d++];break;case ts.A:var f=t[d++],g=t[d++],m=t[d++],v=t[d++],y=t[d++],x=t[d++];t[d++];var _=1-t[d++],b=Math.cos(y)*m+f,w=Math.sin(y)*v+g;d>1?s+=Qr(l,h,b,w,n,a):(u=b,c=w);var S=(n-f)*v/m+f;if(i){if($r.containStroke(f,g,v,y,y+x,_,e,S,a))return!0}else s+=rs(f,g,v,y,y+x,_,S,a);l=Math.cos(y+x)*m+f,h=Math.sin(y+x)*v+g;break;case ts.R:u=l=t[d++],c=h=t[d++];b=u+t[d++],w=c+t[d++];if(i){if(qr.containStroke(u,c,b,c,e,n,a)||qr.containStroke(b,c,b,w,e,n,a)||qr.containStroke(b,w,u,w,e,n,a)||qr.containStroke(u,w,u,c,e,n,a))return!0}else s+=Qr(b,c,b,w,n,a),s+=Qr(u,w,u,c,n,a);break;case ts.Z:if(i){if(qr.containStroke(l,h,u,c,e,n,a))return!0}else s+=Qr(l,h,u,c,n,a);l=u,h=c}}return i||(o=h,r=c,Math.abs(o-r)<1e-4)||(s+=Qr(l,h,u,c,n,a)||0),0!==s}zr.contain=function(t,e,i){return ss(t,0,!1,e,i)},zr.containStroke=function(t,e,i,n){return ss(t,e,!0,i,n)};var ls=Un,hs=b,us=Or,cs=zr,ds=Ai.prototype.getCanvasPattern,ps=Math.abs,fs=new us(!0);function gs(t){ls.call(this,t),this.path=null}gs.prototype={constructor:gs,type:"path",__dirtyPath:!0,strokeContainThreshold:5,brush:function(t,e){var i,n=this.style,a=this.path||fs,o=n.hasStroke(),r=n.hasFill(),s=n.fill,l=n.stroke,h=r&&!!s.colorStops,u=o&&!!l.colorStops,c=r&&!!s.image,d=o&&!!l.image;(n.bind(t,this,e),this.setTransform(t),this.__dirty)&&(h&&(i=i||this.getBoundingRect(),this._fillGradient=n.getGradient(t,s,i)),u&&(i=i||this.getBoundingRect(),this._strokeGradient=n.getGradient(t,l,i)));h?t.fillStyle=this._fillGradient:c&&(t.fillStyle=ds.call(s,t)),u?t.strokeStyle=this._strokeGradient:d&&(t.strokeStyle=ds.call(l,t));var p=n.lineDash,f=n.lineDashOffset,g=!!t.setLineDash,m=this.getGlobalScale();a.setScale(m[0],m[1]),this.__dirtyPath||p&&!g&&o?(a.beginPath(t),p&&!g&&(a.setLineDash(p),a.setLineDashOffset(f)),this.buildPath(a,this.shape,!1),this.path&&(this.__dirtyPath=!1)):(t.beginPath(),this.path.rebuildPath(t)),r&&a.fill(t),p&&g&&(t.setLineDash(p),t.lineDashOffset=f),o&&a.stroke(t),p&&g&&t.setLineDash([]),this.restoreTransform(t),null!=n.text&&this.drawRectText(t,this.getBoundingRect())},buildPath:function(t,e,i){},createPathProxy:function(){this.path=new us},getBoundingRect:function(){var t=this._rect,e=this.style,i=!t;if(i){var n=this.path;n||(n=this.path=new us),this.__dirtyPath&&(n.beginPath(),this.buildPath(n,this.shape,!1)),t=n.getBoundingRect()}if(this._rect=t,e.hasStroke()){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var o=e.lineWidth,r=e.strokeNoScale?this.getLineScale():1;e.hasFill()||(o=Math.max(o,this.strokeContainThreshold||4)),r>1e-10&&(a.width+=o/r,a.height+=o/r,a.x-=o/r/2,a.y-=o/r/2)}return a}return t},contain:function(t,e){var i=this.transformCoordToLocal(t,e),n=this.getBoundingRect(),a=this.style;if(t=i[0],e=i[1],n.contain(t,e)){var o=this.path.data;if(a.hasStroke()){var r=a.lineWidth,s=a.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(a.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),cs.containStroke(o,r/s,t,e)))return!0}if(a.hasFill())return cs.contain(o,t,e)}return!1},dirty:function(t){null==t&&(t=!0),t&&(this.__dirtyPath=t,this._rect=null),this.__dirty=!0,this.__zr&&this.__zr.refresh(),this.__clipTarget&&this.__clipTarget.dirty()},animateShape:function(t){return this.animate("shape",t)},attrKV:function(t,e){"shape"===t?(this.setShape(e),this.__dirtyPath=!0,this._rect=null):ls.prototype.attrKV.call(this,t,e)},setShape:function(t,e){var i=this.shape;if(i){if(hs.isObject(t))for(var n in t)t.hasOwnProperty(n)&&(i[n]=t[n]);else i[t]=e;this.dirty(!0)}return this},getLineScale:function(){var t=this.transform;return t&&ps(t[0]-1)>1e-10&&ps(t[3]-1)>1e-10?Math.sqrt(ps(t[0]*t[3]-t[2]*t[1])):1}},gs.extend=function(t){var e=function(e){gs.call(this,e),t.style&&this.style.extendFrom(t.style,!1);var i=t.shape;if(i){this.shape=this.shape||{};var n=this.shape;for(var a in i)!n.hasOwnProperty(a)&&i.hasOwnProperty(a)&&(n[a]=i[a])}t.init&&t.init.call(this,e)};for(var i in hs.inherits(e,gs),t)"style"!==i&&"shape"!==i&&(e.prototype[i]=t[i]);return e},hs.inherits(gs,ls);var ms=gs,vs=Or,ys=j.applyTransform,xs=vs.CMD,_s=[[],[],[]],bs=Math.sqrt,ws=Math.atan2;var Ss=function(t,e){var i,n,a,o,r,s=t.data,l=xs.M,h=xs.C,u=xs.L,c=xs.R,d=xs.A,p=xs.Q;for(a=0,o=0;a<s.length;){switch(i=s[a++],o=a,n=0,i){case l:case u:n=1;break;case h:n=3;break;case p:n=2;break;case d:var f=e[4],g=e[5],m=bs(e[0]*e[0]+e[1]*e[1]),v=bs(e[2]*e[2]+e[3]*e[3]),y=ws(-e[1]/v,e[0]/m);s[a]*=m,s[a++]+=f,s[a]*=v,s[a++]+=g,s[a++]*=m,s[a++]*=v,s[a++]+=y,s[a++]+=y,o=a+=2;break;case c:x[0]=s[a++],x[1]=s[a++],ys(x,x,e),s[o++]=x[0],s[o++]=x[1],x[0]+=s[a++],x[1]+=s[a++],ys(x,x,e),s[o++]=x[0],s[o++]=x[1]}for(r=0;r<n;r++){var x;(x=_s[r])[0]=s[a++],x[1]=s[a++],ys(x,x,e),s[o++]=x[0],s[o++]=x[1]}}},Ms=ms,Is=Or,As=Ss,Ts=["m","M","l","L","v","V","h","H","z","Z","c","C","q","Q","t","T","s","S","a","A"],Cs=Math.sqrt,Ls=Math.sin,Ds=Math.cos,Ps=Math.PI,ks=function(t){return Math.sqrt(t[0]*t[0]+t[1]*t[1])},Os=function(t,e){return(t[0]*e[0]+t[1]*e[1])/(ks(t)*ks(e))},zs=function(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(Os(t,e))};function Es(t,e,i,n,a,o,r,s,l,h,u){var c=l*(Ps/180),d=Ds(c)*(t-i)/2+Ls(c)*(e-n)/2,p=-1*Ls(c)*(t-i)/2+Ds(c)*(e-n)/2,f=d*d/(r*r)+p*p/(s*s);f>1&&(r*=Cs(f),s*=Cs(f));var g=(a===o?-1:1)*Cs((r*r*(s*s)-r*r*(p*p)-s*s*(d*d))/(r*r*(p*p)+s*s*(d*d)))||0,m=g*r*p/s,v=g*-s*d/r,y=(t+i)/2+Ds(c)*m-Ls(c)*v,x=(e+n)/2+Ls(c)*m+Ds(c)*v,_=zs([1,0],[(d-m)/r,(p-v)/s]),b=[(d-m)/r,(p-v)/s],w=[(-1*d-m)/r,(-1*p-v)/s],S=zs(b,w);Os(b,w)<=-1&&(S=Ps),Os(b,w)>=1&&(S=0),0===o&&S>0&&(S-=2*Ps),1===o&&S<0&&(S+=2*Ps),u.addData(h,y,x,r,s,_,S,c,o)}function Rs(t,e){var i=function(t){if(!t)return[];var e,i=t.replace(/-/g," -").replace(/ /g," ").replace(/ /g,",").replace(/,,/g,",");for(e=0;e<Ts.length;e++)i=i.replace(new RegExp(Ts[e],"g"),"|"+Ts[e]);var n,a=i.split("|"),o=0,r=0,s=new Is,l=Is.CMD;for(e=1;e<a.length;e++){var h,u=a[e],c=u.charAt(0),d=0,p=u.slice(1).replace(/e,-/g,"e-").split(",");p.length>0&&""===p[0]&&p.shift();for(var f=0;f<p.length;f++)p[f]=parseFloat(p[f]);for(;d<p.length&&!isNaN(p[d])&&!isNaN(p[0]);){var g,m,v,y,x,_,b,w=o,S=r;switch(c){case"l":o+=p[d++],r+=p[d++],h=l.L,s.addData(h,o,r);break;case"L":o=p[d++],r=p[d++],h=l.L,s.addData(h,o,r);break;case"m":o+=p[d++],r+=p[d++],h=l.M,s.addData(h,o,r),c="l";break;case"M":o=p[d++],r=p[d++],h=l.M,s.addData(h,o,r),c="L";break;case"h":o+=p[d++],h=l.L,s.addData(h,o,r);break;case"H":o=p[d++],h=l.L,s.addData(h,o,r);break;case"v":r+=p[d++],h=l.L,s.addData(h,o,r);break;case"V":r=p[d++],h=l.L,s.addData(h,o,r);break;case"C":h=l.C,s.addData(h,p[d++],p[d++],p[d++],p[d++],p[d++],p[d++]),o=p[d-2],r=p[d-1];break;case"c":h=l.C,s.addData(h,p[d++]+o,p[d++]+r,p[d++]+o,p[d++]+r,p[d++]+o,p[d++]+r),o+=p[d-2],r+=p[d-1];break;case"S":g=o,m=r;var M=s.len(),I=s.data;n===l.C&&(g+=o-I[M-4],m+=r-I[M-3]),h=l.C,w=p[d++],S=p[d++],o=p[d++],r=p[d++],s.addData(h,g,m,w,S,o,r);break;case"s":g=o,m=r,M=s.len(),I=s.data,n===l.C&&(g+=o-I[M-4],m+=r-I[M-3]),h=l.C,w=o+p[d++],S=r+p[d++],o+=p[d++],r+=p[d++],s.addData(h,g,m,w,S,o,r);break;case"Q":w=p[d++],S=p[d++],o=p[d++],r=p[d++],h=l.Q,s.addData(h,w,S,o,r);break;case"q":w=p[d++]+o,S=p[d++]+r,o+=p[d++],r+=p[d++],h=l.Q,s.addData(h,w,S,o,r);break;case"T":g=o,m=r,M=s.len(),I=s.data,n===l.Q&&(g+=o-I[M-4],m+=r-I[M-3]),o=p[d++],r=p[d++],h=l.Q,s.addData(h,g,m,o,r);break;case"t":g=o,m=r,M=s.len(),I=s.data,n===l.Q&&(g+=o-I[M-4],m+=r-I[M-3]),o+=p[d++],r+=p[d++],h=l.Q,s.addData(h,g,m,o,r);break;case"A":v=p[d++],y=p[d++],x=p[d++],_=p[d++],b=p[d++],Es(w=o,S=r,o=p[d++],r=p[d++],_,b,v,y,x,h=l.A,s);break;case"a":v=p[d++],y=p[d++],x=p[d++],_=p[d++],b=p[d++],Es(w=o,S=r,o+=p[d++],r+=p[d++],_,b,v,y,x,h=l.A,s)}}"z"!==c&&"Z"!==c||(h=l.Z,s.addData(h)),n=h}return s.toStatic(),s}(t);return(e=e||{}).buildPath=function(t){if(t.setData){t.setData(i.data),(e=t.getContext())&&t.rebuildPath(e)}else{var e=t;i.rebuildPath(e)}},e.applyTransform=function(t){As(i,t),this.dirty(!0)},e}Go.createFromString=function(t,e){return new Ms(Rs(t,e))},Go.extendFromString=function(t,e){return Ms.extend(Rs(t,e))},Go.mergePath=function(t,e){for(var i=[],n=t.length,a=0;a<n;a++){var o=t[a];o.path||o.createPathProxy(),o.__dirtyPath&&o.buildPath(o.path,o.shape,!0),i.push(o.path)}var r=new Ms(e);return r.createPathProxy(),r.buildPath=function(t){t.appendPath(i);var e=t.getContext();e&&t.rebuildPath(e)},r};var Ns=Un,Vs=b,Bs=Ni,Gs=Ri,Ws=function(t){Ns.call(this,t)};Ws.prototype={constructor:Ws,type:"text",brush:function(t,e){var i=this.style;this.__dirty&&Gs.normalizeTextStyle(i,!0),i.fill=i.stroke=i.shadowBlur=i.shadowColor=i.shadowOffsetX=i.shadowOffsetY=null;var n=i.text;null!=n&&(n+=""),i.bind(t,this,e),Gs.needDrawText(n,i)&&(this.setTransform(t),Gs.renderText(this,t,n,i),this.restoreTransform(t))},getBoundingRect:function(){var t=this.style;if(this.__dirty&&Gs.normalizeTextStyle(t,!0),!this._rect){t.text;var e=Bs.getBoundingRect(t.text+"",t.font,t.textAlign,t.textVerticalAlign,t.textPadding,t.rich);if(e.x+=t.x||0,e.y+=t.y||0,Gs.getStroke(t.textStroke,t.textStrokeWidth)){var i=t.textStrokeWidth;e.x-=i/2,e.y-=i/2,e.width+=i,e.height+=i}this._rect=e}return this._rect}},Vs.inherits(Ws,Ns);var Hs=Ws,Fs=ms.extend({type:"circle",shape:{cx:0,cy:0,r:0},buildPath:function(t,e,i){i&&t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,2*Math.PI,!0)}}),Zs=_,js=[["shadowBlur",0],["shadowColor","#000"],["shadowOffsetX",0],["shadowOffsetY",0]];var Us=function(t){return Zs.browser.ie&&Zs.browser.version>=11?function(){var e,i=this.__clipPaths,n=this.style;if(i)for(var a=0;a<i.length;a++){var o=i[a],r=o&&o.shape,s=o&&o.type;if(r&&("sector"===s&&r.startAngle===r.endAngle||"rect"===s&&(!r.width||!r.height))){for(var l=0;l<js.length;l++)js[l][2]=n[js[l][0]],n[js[l][0]]=js[l][1];e=!0;break}}if(t.apply(this,arguments),e)for(l=0;l<js.length;l++)n[js[l][0]]=js[l][2]}:t},qs=ms,Xs=Us,Ys=qs.extend({type:"sector",shape:{cx:0,cy:0,r0:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},brush:Xs(qs.prototype.brush),buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r0||0,0),o=Math.max(e.r,0),r=e.startAngle,s=e.endAngle,l=e.clockwise,h=Math.cos(r),u=Math.sin(r);t.moveTo(h*a+i,u*a+n),t.lineTo(h*o+i,u*o+n),t.arc(i,n,o,r,s,!l),t.lineTo(Math.cos(s)*a+i,Math.sin(s)*a+n),0!==a&&t.arc(i,n,a,s,r,l),t.closePath()}}),$s=ms.extend({type:"ring",shape:{cx:0,cy:0,r:0,r0:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=2*Math.PI;t.moveTo(i+e.r,n),t.arc(i,n,e.r,0,a,!1),t.moveTo(i+e.r0,n),t.arc(i,n,e.r0,0,a,!0)}}),Ks={},Js=j.distance;function Qs(t,e,i,n,a,o,r){var s=.5*(i-t),l=.5*(n-e);return(2*(e-i)+s+l)*r+(-3*(e-i)-2*s-l)*o+s*a+e}var tl=function(t,e){for(var i=t.length,n=[],a=0,o=1;o<i;o++)a+=Js(t[o-1],t[o]);var r=a/2;for(r=r<i?i:r,o=0;o<r;o++){var s,l,h,u=o/(r-1)*(e?i:i-1),c=Math.floor(u),d=u-c,p=t[c%i];e?(s=t[(c-1+i)%i],l=t[(c+1)%i],h=t[(c+2)%i]):(s=t[0===c?c:c-1],l=t[c>i-2?i-1:c+1],h=t[c>i-3?i-1:c+2]);var f=d*d,g=d*f;n.push([Qs(s[0],p[0],l[0],h[0],d,f,g),Qs(s[1],p[1],l[1],h[1],d,f,g)])}return n},el=j,il=el.min,nl=el.max,al=el.scale,ol=el.distance,rl=el.add,sl=el.clone,ll=el.sub;var hl=function(t,e,i,n){var a,o,r,s,l=[],h=[],u=[],c=[];if(n){r=[1/0,1/0],s=[-1/0,-1/0];for(var d=0,p=t.length;d<p;d++)il(r,r,t[d]),nl(s,s,t[d]);il(r,r,n[0]),nl(s,s,n[1])}for(d=0,p=t.length;d<p;d++){var f=t[d];if(i)a=t[d?d-1:p-1],o=t[(d+1)%p];else{if(0===d||d===p-1){l.push(sl(t[d]));continue}a=t[d-1],o=t[d+1]}ll(h,o,a),al(h,h,e);var g=ol(f,a),m=ol(f,o),v=g+m;0!==v&&(g/=v,m/=v),al(u,h,-g),al(c,h,m);var y=rl([],f,u),x=rl([],f,c);n&&(nl(y,y,r),il(y,y,s),nl(x,x,r),il(x,x,s)),l.push(y),l.push(x)}return i&&l.push(l.shift()),l},ul=tl,cl=hl;Ks.buildPath=function(t,e,i){var n=e.points,a=e.smooth;if(n&&n.length>=2){if(a&&"spline"!==a){var o=cl(n,a,i,e.smoothConstraint);t.moveTo(n[0][0],n[0][1]);for(var r=n.length,s=0;s<(i?r:r-1);s++){var l=o[2*s],h=o[2*s+1],u=n[(s+1)%r];t.bezierCurveTo(l[0],l[1],h[0],h[1],u[0],u[1])}}else{"spline"===a&&(n=ul(n,i)),t.moveTo(n[0][0],n[0][1]);s=1;for(var c=n.length;s<c;s++)t.lineTo(n[s][0],n[s][1])}i&&t.closePath()}};var dl=Ks,pl=ms.extend({type:"polygon",shape:{points:null,smooth:!1,smoothConstraint:null},buildPath:function(t,e){dl.buildPath(t,e,!0)}}),fl=Ks,gl=ms.extend({type:"polyline",shape:{points:null,smooth:!1,smoothConstraint:null},style:{stroke:"#000",fill:null},buildPath:function(t,e){fl.buildPath(t,e,!1)}}),ml=dn,vl=ms.extend({type:"rect",shape:{r:0,x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width,o=e.height;e.r?ml.buildPath(t,e):t.rect(i,n,a,o),t.closePath()}}),yl=ms.extend({type:"line",shape:{x1:0,y1:0,x2:0,y2:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.percent;0!==r&&(t.moveTo(i,n),r<1&&(a=i*(1-r)+a*r,o=n*(1-r)+o*r),t.lineTo(a,o))},pointAt:function(t){var e=this.shape;return[e.x1*(1-t)+e.x2*t,e.y1*(1-t)+e.y2*t]}}),xl=ms,_l=j,bl=Wo,wl=bl.quadraticSubdivide,Sl=bl.cubicSubdivide,Ml=bl.quadraticAt,Il=bl.cubicAt,Al=bl.quadraticDerivativeAt,Tl=bl.cubicDerivativeAt,Cl=[];function Ll(t,e,i){var n=t.cpx2,a=t.cpy2;return null===n||null===a?[(i?Tl:Il)(t.x1,t.cpx1,t.cpx2,t.x2,e),(i?Tl:Il)(t.y1,t.cpy1,t.cpy2,t.y2,e)]:[(i?Al:Ml)(t.x1,t.cpx1,t.x2,e),(i?Al:Ml)(t.y1,t.cpy1,t.y2,e)]}var Dl=xl.extend({type:"bezier-curve",shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,percent:1},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.x1,n=e.y1,a=e.x2,o=e.y2,r=e.cpx1,s=e.cpy1,l=e.cpx2,h=e.cpy2,u=e.percent;0!==u&&(t.moveTo(i,n),null==l||null==h?(u<1&&(wl(i,r,a,u,Cl),r=Cl[1],a=Cl[2],wl(n,s,o,u,Cl),s=Cl[1],o=Cl[2]),t.quadraticCurveTo(r,s,a,o)):(u<1&&(Sl(i,r,l,a,u,Cl),r=Cl[1],l=Cl[2],a=Cl[3],Sl(n,s,h,o,u,Cl),s=Cl[1],h=Cl[2],o=Cl[3]),t.bezierCurveTo(r,s,l,h,a,o)))},pointAt:function(t){return Ll(this.shape,t,!1)},tangentAt:function(t){var e=Ll(this.shape,t,!0);return _l.normalize(e,e)}}),Pl=ms.extend({type:"arc",shape:{cx:0,cy:0,r:0,startAngle:0,endAngle:2*Math.PI,clockwise:!0},style:{stroke:"#000",fill:null},buildPath:function(t,e){var i=e.cx,n=e.cy,a=Math.max(e.r,0),o=e.startAngle,r=e.endAngle,s=e.clockwise,l=Math.cos(o),h=Math.sin(o);t.moveTo(l*a+i,h*a+n),t.arc(i,n,a,o,r,!s)}}),kl=ms,Ol=kl.extend({type:"compound",shape:{paths:null},_updatePathDirty:function(){for(var t=this.__dirtyPath,e=this.shape.paths,i=0;i<e.length;i++)t=t||e[i].__dirtyPath;this.__dirtyPath=t,this.__dirty=this.__dirty||t},beforeBrush:function(){this._updatePathDirty();for(var t=this.shape.paths||[],e=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(e[0],e[1])},buildPath:function(t,e){for(var i=e.paths||[],n=0;n<i.length;n++)i[n].buildPath(t,i[n].shape,!0)},afterBrush:function(){for(var t=this.shape.paths||[],e=0;e<t.length;e++)t[e].__dirtyPath=!1},getBoundingRect:function(){return this._updatePathDirty(),kl.prototype.getBoundingRect.call(this)}}),zl=Ol,El=function(t){this.colorStops=t||[]};El.prototype={constructor:El,addColorStop:function(t,e){this.colorStops.push({offset:t,color:e})}};var Rl=El,Nl=b,Vl=Rl,Bl=function(t,e,i,n,a,o){this.x=null==t?0:t,this.y=null==e?0:e,this.x2=null==i?1:i,this.y2=null==n?0:n,this.type="linear",this.global=o||!1,Vl.call(this,a)};Bl.prototype={constructor:Bl},Nl.inherits(Bl,Vl);var Gl=Bl,Wl=b,Hl=Rl,Fl=function(t,e,i,n,a){this.x=null==t?.5:t,this.y=null==e?.5:e,this.r=null==i?.5:i,this.type="radial",this.global=a||!1,Hl.call(this,n)};Fl.prototype={constructor:Fl},Wl.inherits(Fl,Hl);var Zl=Fl,jl=b,Ul=Go,ql=Pt,Xl=mt,Yl=j,$l=ms,Kl=At,Jl=Jn;Bo.Image=Jl;var Ql=ni;Bo.Group=Ql;var th=Hs;Bo.Text=th;var eh=Fs;Bo.Circle=eh;var ih=Ys;Bo.Sector=ih;var nh=$s;Bo.Ring=nh;var ah=pl;Bo.Polygon=ah;var oh=gl;Bo.Polyline=oh;var rh=vl;Bo.Rect=rh;var sh=yl;Bo.Line=sh;var lh=Dl;Bo.BezierCurve=lh;var hh=Pl;Bo.Arc=hh;var uh=zl;Bo.CompoundPath=uh;var ch=Gl;Bo.LinearGradient=ch;var dh=Zl;Bo.RadialGradient=dh;var ph=Je;Bo.BoundingRect=ph;var fh=Math.round,gh=Math.max,mh=Math.min,vh={};function yh(t,e,i,n){var a=Ul.createFromString(t,e),o=a.getBoundingRect();return i&&("center"===n&&(i=xh(i,o)),bh(a,i)),a}function xh(t,e){var i,n=e.width/e.height,a=t.height*n;return i=a<=t.width?t.height:(a=t.width)/n,{x:t.x+t.width/2-a/2,y:t.y+t.height/2-i/2,width:a,height:i}}var _h=Ul.mergePath;function bh(t,e){if(t.applyTransform){var i=t.getBoundingRect().calculateTransform(e);t.applyTransform(i)}}function wh(t,e,i){var n=fh(2*t);return(n+fh(e))%2==0?n/2:(n+(i?1:-1))/2}function Sh(t){return null!=t&&"none"!=t}function Mh(t){return"string"==typeof t?ql.lift(t,-.1):t}function Ih(t){if(t.__hoverStlDirty){var e=t.style.stroke,i=t.style.fill,n=t.__hoverStl;n.fill=n.fill||(Sh(i)?Mh(i):null),n.stroke=n.stroke||(Sh(e)?Mh(e):null);var a={};for(var o in n)null!=n[o]&&(a[o]=t.style[o]);t.__normalStl=a,t.__hoverStlDirty=!1}}function Ah(t){if(!t.__isHover){if(Ih(t),t.useHoverLayer)t.__zr&&t.__zr.addHover(t,t.__hoverStl);else{var e=t.style,i=e.insideRollbackOpt;i&&function(t){var e=t.insideRollback;e&&(t.textFill=e.textFill,t.textStroke=e.textStroke,t.textStrokeWidth=e.textStrokeWidth)}(e),e.extendFrom(t.__hoverStl),i&&(Bh(e,e.insideOriginalTextPosition,i),null==e.textFill&&(e.textFill=i.autoColor)),t.dirty(!1),t.z2+=1}t.__isHover=!0}}function Th(t){if(t.__isHover){var e=t.__normalStl;t.useHoverLayer?t.__zr&&t.__zr.removeHover(t):(e&&t.setStyle(e),t.z2-=1),t.__isHover=!1}}function Ch(t){"group"===t.type?t.traverse((function(t){"group"!==t.type&&Ah(t)})):Ah(t)}function Lh(t){"group"===t.type?t.traverse((function(t){"group"!==t.type&&Th(t)})):Th(t)}function Dh(t,e){t.__hoverStl=t.hoverStyle||e||{},t.__hoverStlDirty=!0,t.__isHover&&Ih(t)}function Ph(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&Ch(this)}function kh(t){this.__hoverSilentOnTouch&&t.zrByTouch||!this.__isEmphasis&&Lh(this)}function Oh(){this.__isEmphasis=!0,Ch(this)}function zh(){this.__isEmphasis=!1,Lh(this)}function Eh(t,e,i,n,a){return Rh(t,e,n,a),i&&jl.extend(t,i),t.host&&t.host.dirty&&t.host.dirty(!1),t}function Rh(t,e,i,n){if((i=i||vh).isRectText){var a=e.getShallow("position")||(n?null:"inside");"outside"===a&&(a="top"),t.textPosition=a,t.textOffset=e.getShallow("offset");var o=e.getShallow("rotate");null!=o&&(o*=Math.PI/180),t.textRotation=o,t.textDistance=jl.retrieve2(e.getShallow("distance"),n?null:5)}var r,s=e.ecModel,l=s&&s.option.textStyle,h=function(t){var e;for(;t&&t!==t.ecModel;){var i=(t.option||vh).rich;if(i)for(var n in e=e||{},i)i.hasOwnProperty(n)&&(e[n]=1);t=t.parentModel}return e}(e);if(h)for(var u in r={},h)if(h.hasOwnProperty(u)){var c=e.getModel(["rich",u]);Nh(r[u]={},c,l,i,n)}return t.rich=r,Nh(t,e,l,i,n,!0),i.forceRich&&!i.textStyle&&(i.textStyle={}),t}function Nh(t,e,i,n,a,o){if(i=!a&&i||vh,t.textFill=Vh(e.getShallow("color"),n)||i.color,t.textStroke=Vh(e.getShallow("textBorderColor"),n)||i.textBorderColor,t.textStrokeWidth=jl.retrieve2(e.getShallow("textBorderWidth"),i.textBorderWidth),!a){if(o){var r=t.textPosition;t.insideRollback=Bh(t,r,n),t.insideOriginalTextPosition=r,t.insideRollbackOpt=n}null==t.textFill&&(t.textFill=n.autoColor)}t.fontStyle=e.getShallow("fontStyle")||i.fontStyle,t.fontWeight=e.getShallow("fontWeight")||i.fontWeight,t.fontSize=e.getShallow("fontSize")||i.fontSize,t.fontFamily=e.getShallow("fontFamily")||i.fontFamily,t.textAlign=e.getShallow("align"),t.textVerticalAlign=e.getShallow("verticalAlign")||e.getShallow("baseline"),t.textLineHeight=e.getShallow("lineHeight"),t.textWidth=e.getShallow("width"),t.textHeight=e.getShallow("height"),t.textTag=e.getShallow("tag"),o&&n.disableBox||(t.textBackgroundColor=Vh(e.getShallow("backgroundColor"),n),t.textPadding=e.getShallow("padding"),t.textBorderColor=Vh(e.getShallow("borderColor"),n),t.textBorderWidth=e.getShallow("borderWidth"),t.textBorderRadius=e.getShallow("borderRadius"),t.textBoxShadowColor=e.getShallow("shadowColor"),t.textBoxShadowBlur=e.getShallow("shadowBlur"),t.textBoxShadowOffsetX=e.getShallow("shadowOffsetX"),t.textBoxShadowOffsetY=e.getShallow("shadowOffsetY")),t.textShadowColor=e.getShallow("textShadowColor")||i.textShadowColor,t.textShadowBlur=e.getShallow("textShadowBlur")||i.textShadowBlur,t.textShadowOffsetX=e.getShallow("textShadowOffsetX")||i.textShadowOffsetX,t.textShadowOffsetY=e.getShallow("textShadowOffsetY")||i.textShadowOffsetY}function Vh(t,e){return"auto"!==t?t:e&&e.autoColor?e.autoColor:null}function Bh(t,e,i){var n,a=i.useInsideStyle;return null==t.textFill&&!1!==a&&(!0===a||i.isRectText&&e&&"string"==typeof e&&e.indexOf("inside")>=0)&&(n={textFill:null,textStroke:t.textStroke,textStrokeWidth:t.textStrokeWidth},t.textFill="#fff",null==t.textStroke&&(t.textStroke=i.autoColor,null==t.textStrokeWidth&&(t.textStrokeWidth=2))),n}function Gh(t,e,i,n,a,o){if("function"==typeof a&&(o=a,a=null),n&&n.isAnimationEnabled()){var r=t?"Update":"",s=n.getShallow("animationDuration"+r),l=n.getShallow("animationEasing"+r),h=n.getShallow("animationDelay"+r);"function"==typeof h&&(h=h(a,n.getAnimationDelayParams?n.getAnimationDelayParams(e,a):null)),"function"==typeof s&&(s=s(a)),s>0?e.animateTo(i,s,h||0,l,o,!!o):(e.stopAnimation(),e.attr(i),o&&o())}else e.stopAnimation(),e.attr(i),o&&o()}function Wh(t,e,i,n,a){Gh(!0,t,e,i,n,a)}function Hh(t,e,i){return e&&!jl.isArrayLike(e)&&(e=Kl.getLocalTransform(e)),i&&(e=Xl.invert([],e)),Yl.applyTransform([],t,e)}Bo.extendShape=function(t){return $l.extend(t)},Bo.extendPath=function(t,e){return Ul.extendFromString(t,e)},Bo.makePath=yh,Bo.makeImage=function(t,e,i){var n=new Jl({style:{image:t,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(t){if("center"===i){var a={width:t.width,height:t.height};n.setStyle(xh(e,a))}}});return n},Bo.mergePath=_h,Bo.resizePath=bh,Bo.subPixelOptimizeLine=function(t){var e=t.shape,i=t.style.lineWidth;return fh(2*e.x1)===fh(2*e.x2)&&(e.x1=e.x2=wh(e.x1,i,!0)),fh(2*e.y1)===fh(2*e.y2)&&(e.y1=e.y2=wh(e.y1,i,!0)),t},Bo.subPixelOptimizeRect=function(t){var e=t.shape,i=t.style.lineWidth,n=e.x,a=e.y,o=e.width,r=e.height;return e.x=wh(e.x,i,!0),e.y=wh(e.y,i,!0),e.width=Math.max(wh(n+o,i,!1)-e.x,0===o?0:1),e.height=Math.max(wh(a+r,i,!1)-e.y,0===r?0:1),t},Bo.subPixelOptimize=wh,Bo.setHoverStyle=function(t,e,i){t.__hoverSilentOnTouch=i&&i.hoverSilentOnTouch,"group"===t.type?t.traverse((function(t){"group"!==t.type&&Dh(t,e)})):Dh(t,e),t.on("mouseover",Ph).on("mouseout",kh),t.on("emphasis",Oh).on("normal",zh)},Bo.setLabelStyle=function(t,e,i,n,a,o,r){var s=(a=a||vh).labelFetcher,l=a.labelDataIndex,h=a.labelDimIndex,u=i.getShallow("show"),c=n.getShallow("show"),d=u||c?jl.retrieve2(s?s.getFormattedLabel(l,"normal",null,h):null,a.defaultText):null,p=u?d:null,f=c?jl.retrieve2(s?s.getFormattedLabel(l,"emphasis",null,h):null,d):null;null==p&&null==f||(Eh(t,i,o,a),Eh(e,n,r,a,!0)),t.text=p,e.text=f},Bo.setTextStyle=Eh,Bo.setText=function(t,e,i){var n,a={isRectText:!0};!1===i?n=!0:a.autoColor=i,Rh(t,e,a,n),t.host&&t.host.dirty&&t.host.dirty(!1)},Bo.getFont=function(t,e){var i=e||e.getModel("textStyle");return[t.fontStyle||i&&i.getShallow("fontStyle")||"",t.fontWeight||i&&i.getShallow("fontWeight")||"",(t.fontSize||i&&i.getShallow("fontSize")||12)+"px",t.fontFamily||i&&i.getShallow("fontFamily")||"sans-serif"].join(" ")},Bo.updateProps=Wh,Bo.initProps=function(t,e,i,n,a){Gh(!1,t,e,i,n,a)},Bo.getTransform=function(t,e){for(var i=Xl.identity([]);t&&t!==e;)Xl.mul(i,t.getLocalTransform(),i),t=t.parent;return i},Bo.applyTransform=Hh,Bo.transformDirection=function(t,e,i){var n=0===e[4]||0===e[5]||0===e[0]?1:Math.abs(2*e[4]/e[0]),a=0===e[4]||0===e[5]||0===e[2]?1:Math.abs(2*e[4]/e[2]),o=["left"===t?-n:"right"===t?n:0,"top"===t?-a:"bottom"===t?a:0];return o=Hh(o,e,i),Math.abs(o[0])>Math.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"},Bo.groupTransition=function(t,e,i,n){if(t&&e){var a,o=(a={},t.traverse((function(t){!t.isGroup&&t.anid&&(a[t.anid]=t)})),a);e.traverse((function(t){if(!t.isGroup&&t.anid){var e=o[t.anid];if(e){var n=r(t);t.attr(r(e)),Wh(t,n,i,t.dataIndex)}}}))}function r(t){var e={position:Yl.clone(t.position),rotation:t.rotation};return t.shape&&(e.shape=jl.extend({},t.shape)),e}},Bo.clipPointsByRect=function(t,e){return jl.map(t,(function(t){var i=t[0];i=gh(i,e.x),i=mh(i,e.x+e.width);var n=t[1];return n=gh(n,e.y),[i,n=mh(n,e.y+e.height)]}))},Bo.clipRectByRect=function(t,e){var i=gh(t.x,e.x),n=mh(t.x+t.width,e.x+e.width),a=gh(t.y,e.y),o=mh(t.y+t.height,e.y+e.height);if(n>=i&&o>=a)return{x:i,y:a,width:n-i,height:o-a}},Bo.createIcon=function(t,e,i){var n=(e=jl.extend({rectHover:!0},e)).style={strokeNoScale:!0};if(i=i||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(n.image=t.slice(8),jl.defaults(n,i),new Jl(e)):yh(t.replace("path://",""),e,i,"center")};var Fh=Ni,Zh=Bo,jh=["textStyle","color"],Uh={getTextColor:function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(jh):null)},getFont:function(){return Zh.getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},getTextRect:function(t){return Fh.getBoundingRect(t,this.getFont(),this.getShallow("align"),this.getShallow("verticalAlign")||this.getShallow("baseline"),this.getShallow("padding"),this.getShallow("rich"),this.getShallow("truncateText"))}},qh=zo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["textPosition"],["textAlign"]]),Xh=b,Yh=_,$h=To,Kh=Ro,Jh=Vo,Qh=Uh,tu={getItemStyle:function(t,e){var i=qh(this,t,e),n=this.getBorderLineDash();return n&&(i.lineDash=n),i},getBorderLineDash:function(){var t=this.get("borderType");return"solid"===t||null==t?null:"dashed"===t?[5,5]:[1,1]}},eu=Xh.mixin;function iu(t,e,i){this.parentModel=e,this.ecModel=i,this.option=t}function nu(t,e,i){for(var n=0;n<e.length&&(!e[n]||null!=(t=t&&"object"==typeof t?t[e[n]]:null));n++);return null==t&&i&&(t=i.get(e)),t}function au(t,e){var i=$h.get(t,"getParent");return i?i.call(t,e):t.parentModel}iu.prototype={constructor:iu,init:null,mergeOption:function(t){Xh.merge(this.option,t,!0)},get:function(t,e){return null==t?this.option:nu(this.option,this.parsePath(t),!e&&au(this,t))},getShallow:function(t,e){var i=this.option,n=null==i?i:i[t],a=!e&&au(this,t);return null==n&&a&&(n=a.getShallow(t)),n},getModel:function(t,e){var i;return new iu(null==t?this.option:nu(this.option,t=this.parsePath(t)),e=e||(i=au(this,t))&&i.getModel(t),this.ecModel)},isEmpty:function(){return null==this.option},restoreData:function(){},clone:function(){return new(0,this.constructor)(Xh.clone(this.option))},setReadOnly:function(t){$h.setReadOnly(this,t)},parsePath:function(t){return"string"==typeof t&&(t=t.split(".")),t},customizeGetParent:function(t){$h.set(this,"getParent",t)},isAnimationEnabled:function(){if(!Yh.node){if(null!=this.option.animation)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}}},$h.enableClassExtend(iu),eu(iu,Kh),eu(iu,Jh),eu(iu,Qh),eu(iu,tu);var ou=iu,ru=b,su=co,lu=po,hu=ou,uu=ru.each,cu=ru.isObject;function du(t){return t instanceof Array?t:null==t?[]:[t]}var pu={getDataParams:function(t,e){var i=this.getData(e),n=this.getRawValue(t,e),a=i.getRawIndex(t),o=i.getName(t,!0),r=i.getRawDataItem(t),s=i.getItemVisual(t,"color");return{componentType:this.mainType,componentSubType:this.subType,seriesType:"series"===this.mainType?this.subType:null,seriesIndex:this.seriesIndex,seriesId:this.id,seriesName:this.name,name:o,dataIndex:a,data:r,dataType:e,value:n,color:s,marker:su.getTooltipMarker(s),$vars:["seriesName","name","value"]}},getFormattedLabel:function(t,e,i,n,a){e=e||"normal";var o=this.getData(i).getItemModel(t),r=this.getDataParams(t,i);null!=n&&r.value instanceof Array&&(r.value=r.value[n]);var s=o.get([a||"label",e,"formatter"]);return"function"==typeof s?(r.status=e,s(r)):"string"==typeof s?su.formatTpl(s,r):void 0},getRawValue:function(t,e){var i=this.getData(e).getRawDataItem(t);if(null!=i)return!cu(i)||i instanceof Array?i:i.value},formatTooltip:ru.noop};function fu(t){return cu(t)&&t.id&&0===(t.id+"").indexOf("\0_ec_\0")}var gu,mu=(gu=0,function(){var t="\0__ec_prop_getter_"+gu++;return function(e){return e[t]||(e[t]={})}});function vu(t,e){return t&&t.hasOwnProperty(e)}uo.normalizeToArray=du,uo.defaultEmphasis=function(t,e){if(t)for(var i=t.emphasis=t.emphasis||{},n=t.normal=t.normal||{},a=0,o=e.length;a<o;a++){var r=e[a];!i.hasOwnProperty(r)&&n.hasOwnProperty(r)&&(i[r]=n[r])}},uo.TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"],uo.getDataItemValue=function(t){return t&&(null==t.value?t:t.value)},uo.isDataItemOption=function(t){return cu(t)&&!(t instanceof Array)},uo.converDataValue=function(t,e){var i=e&&e.type;return"ordinal"===i?t:("time"===i&&"number"!=typeof t&&null!=t&&"-"!==t&&(t=+lu.parseDate(t)),null==t||""===t?NaN:+t)},uo.createDataFormatModel=function(t,e){var i=new hu;return ru.mixin(i,pu),i.seriesIndex=e.seriesIndex,i.name=e.name||"",i.mainType=e.mainType,i.subType=e.subType,i.getData=function(){return t},i},uo.dataFormatMixin=pu,uo.mappingToExists=function(t,e){e=(e||[]).slice();var i=ru.map(t||[],(function(t,e){return{exist:t}}));return uu(e,(function(t,n){if(cu(t)){for(var a=0;a<i.length;a++)if(!i[a].option&&null!=t.id&&i[a].exist.id===t.id+"")return i[a].option=t,void(e[n]=null);for(a=0;a<i.length;a++){var o=i[a].exist;if(!(i[a].option||null!=o.id&&null!=t.id||null==t.name||fu(t)||fu(o)||o.name!==t.name+""))return i[a].option=t,void(e[n]=null)}}})),uu(e,(function(t,e){if(cu(t)){for(var n=0;n<i.length;n++){var a=i[n].exist;if(!i[n].option&&!fu(a)&&null==t.id){i[n].option=t;break}}n>=i.length&&i.push({option:t})}})),i},uo.makeIdAndName=function(t){var e=ru.createHashMap();uu(t,(function(t,i){var n=t.exist;n&&e.set(n.id,t)})),uu(t,(function(t,i){var n=t.option;ru.assert(!n||null==n.id||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&null!=n.id&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})})),uu(t,(function(t,i){var n=t.exist,a=t.option,o=t.keyInfo;if(cu(a)){if(o.name=null!=a.name?a.name+"":n?n.name:"\0-",n)o.id=n.id;else if(null!=a.id)o.id=a.id+"";else{var r=0;do{o.id="\0"+o.name+"\0"+r++}while(e.get(o.id))}e.set(o.id,t)}}))},uo.isIdInner=fu,uo.compressBatches=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;n<a;n++)for(var o=t[n].seriesId,r=du(t[n].dataIndex),s=i&&i[o],l=0,h=r.length;l<h;l++){var u=r[l];s&&s[u]?s[u]=null:(e[o]||(e[o]={}))[u]=1}}function o(t,e){var i=[];for(var n in t)if(t.hasOwnProperty(n)&&null!=t[n])if(e)i.push(+n);else{var a=o(t[n],!0);a.length&&i.push({seriesId:n,dataIndex:a})}return i}},uo.queryDataIndex=function(t,e){return null!=e.dataIndexInside?e.dataIndexInside:null!=e.dataIndex?ru.isArray(e.dataIndex)?ru.map(e.dataIndex,(function(e){return t.indexOfRawIndex(e)})):t.indexOfRawIndex(e.dataIndex):null!=e.name?ru.isArray(e.name)?ru.map(e.name,(function(e){return t.indexOfName(e)})):t.indexOfName(e.name):void 0},uo.makeGetter=mu,uo.parseFinder=function(t,e,i){if(ru.isString(e)){var n={};n[e+"Index"]=0,e=n}var a=i&&i.defaultMainType;!a||vu(e,a+"Index")||vu(e,a+"Id")||vu(e,a+"Name")||(e[a+"Index"]=0);var o={};return uu(e,(function(n,a){n=e[a];if("dataIndex"!==a&&"dataIndexInside"!==a){var r=a.match(/^(\w+)(Index|Id|Name)$/)||[],s=r[1],l=(r[2]||"").toLowerCase();if(!(!s||!l||null==n||"index"===l&&"none"===n||i&&i.includeMainTypes&&ru.indexOf(i.includeMainTypes,s)<0)){var h={mainType:s};"index"===l&&"all"===n||(h[l]=n);var u=t.queryComponents(h);o[s+"Models"]=u,o[s+"Model"]=u[0]}}else o[a]=n})),o},uo.dataDimToCoordDim=function(t,e){var i=t.dimensions;e=t.getDimension(e);for(var n=0;n<i.length;n++){var a=t.getDimensionInfo(i[n]);if(a.name===e)return a.coordDim}},uo.coordDimToDataDim=function(t,e){var i=[];return uu(t.dimensions,(function(n){var a=t.getDimensionInfo(n);a.coordDim===e&&(i[a.coordDimIndex]=a.name)})),i},uo.otherDimToDataDim=function(t,e){var i=[];return uu(t.dimensions,(function(n){var a=t.getDimensionInfo(n),o=a.otherDims[e];null!=o&&!1!==o&&(i[o]=a.name)})),i};var yu={},xu=b,_u=To.parseClassType,bu=0;yu.getUID=function(t){return[t||"",bu++,Math.random()].join("_")},yu.enableSubTypeDefaulter=function(t){var e={};return t.registerSubTypeDefaulter=function(t,i){t=_u(t),e[t.main]=i},t.determineSubType=function(i,n){var a=n.type;if(!a){var o=_u(i).main;t.hasSubTypes(i)&&e[o]&&(a=e[o](n))}return a},t},yu.enableTopologicalTravel=function(t,e){function i(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,n,a,o){if(t.length){var r=function(t){var n={},a=[];return xu.each(t,(function(o){var r=i(n,o),s=function(t,e){var i=[];return xu.each(t,(function(t){xu.indexOf(e,t)>=0&&i.push(t)})),i}(r.originalDeps=e(o),t);r.entryCount=s.length,0===r.entryCount&&a.push(o),xu.each(s,(function(t){xu.indexOf(r.predecessor,t)<0&&r.predecessor.push(t);var e=i(n,t);xu.indexOf(e.successor,t)<0&&e.successor.push(o)}))})),{graph:n,noEntryList:a}}(n),s=r.graph,l=r.noEntryList,h={};for(xu.each(t,(function(t){h[t]=!0}));l.length;){var u=l.pop(),c=s[u],d=!!h[u];d&&(a.call(o,u,c.originalDeps.slice()),delete h[u]),xu.each(c.successor,d?f:p)}xu.each(h,(function(){throw new Error("Circle dependency may exists")}))}function p(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){h[t]=!0,p(t)}}};var wu={},Su=b,Mu=Je,Iu=po.parsePercent,Au=co,Tu=Su.each,Cu=["left","right","top","bottom","width","height"],Lu=[["width","left","right"],["height","top","bottom"]];function Du(t,e,i,n,a){var o=0,r=0;null==n&&(n=1/0),null==a&&(a=1/0);var s=0;e.eachChild((function(l,h){var u,c,d=l.position,p=l.getBoundingRect(),f=e.childAt(h+1),g=f&&f.getBoundingRect();if("horizontal"===t){var m=p.width+(g?-g.x+p.x:0);(u=o+m)>n||l.newline?(o=0,u=m,r+=s+i,s=p.height):s=Math.max(s,p.height)}else{var v=p.height+(g?-g.y+p.y:0);(c=r+v)>a||l.newline?(o+=s+i,r=0,c=v,s=p.width):s=Math.max(s,p.width)}l.newline||(d[0]=o,d[1]=r,"horizontal"===t?o=u+i:r=c+i)}))}var Pu=Du,ku=Su.curry(Du,"vertical"),Ou=Su.curry(Du,"horizontal");function zu(t,e,i){i=Au.normalizeCssArray(i||0);var n=e.width,a=e.height,o=Iu(t.left,n),r=Iu(t.top,a),s=Iu(t.right,n),l=Iu(t.bottom,a),h=Iu(t.width,n),u=Iu(t.height,a),c=i[2]+i[0],d=i[1]+i[3],p=t.aspect;switch(isNaN(h)&&(h=n-s-d-o),isNaN(u)&&(u=a-l-c-r),null!=p&&(isNaN(h)&&isNaN(u)&&(p>n/a?h=.8*n:u=.8*a),isNaN(h)&&(h=p*u),isNaN(u)&&(u=h/p)),isNaN(o)&&(o=n-s-h-d),isNaN(r)&&(r=a-l-u-c),t.left||t.right){case"center":o=n/2-h/2-i[3];break;case"right":o=n-h-d}switch(t.top||t.bottom){case"middle":case"center":r=a/2-u/2-i[0];break;case"bottom":r=a-u-c}o=o||0,r=r||0,isNaN(h)&&(h=n-d-o-(s||0)),isNaN(u)&&(u=a-c-r-(l||0));var f=new Mu(o+i[3],r+i[0],h,u);return f.margin=i,f}function Eu(t,e){return e&&t&&Tu(Cu,(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t}wu.LOCATION_PARAMS=Cu,wu.HV_NAMES=Lu,wu.box=Pu,wu.vbox=ku,wu.hbox=Ou,wu.getAvailableSize=function(t,e,i){var n=e.width,a=e.height,o=Iu(t.x,n),r=Iu(t.y,a),s=Iu(t.x2,n),l=Iu(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=Au.normalizeCssArray(i||0),{width:Math.max(s-o-i[1]-i[3],0),height:Math.max(l-r-i[0]-i[2],0)}},wu.getLayoutRect=zu,wu.positionElement=function(t,e,i,n,a){var o=!a||!a.hv||a.hv[0],r=!a||!a.hv||a.hv[1],s=a&&a.boundingMode||"all";if(o||r){var l;if("raw"===s)l="group"===t.type?new Mu(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(l=l.clone()).applyTransform(h)}e=zu(Su.defaults({width:l.width,height:l.height},e),i,n);var u=t.position,c=o?e.x-l.x:0,d=r?e.y-l.y:0;t.attr("position","raw"===s?[c,d]:[u[0]+c,u[1]+d])}},wu.sizeCalculable=function(t,e){return null!=t[Lu[e][0]]||null!=t[Lu[e][1]]&&null!=t[Lu[e][2]]},wu.mergeLayoutParam=function(t,e,i){!Su.isObject(i)&&(i={});var n=i.ignoreSize;!Su.isArray(n)&&(n=[n,n]);var a=r(Lu[0],0),o=r(Lu[1],1);function r(i,a){var o={},r=0,h={},u=0;if(Tu(i,(function(e){h[e]=t[e]})),Tu(i,(function(t){s(e,t)&&(o[t]=h[t]=e[t]),l(o,t)&&r++,l(h,t)&&u++})),n[a])return l(e,i[1])?h[i[2]]=null:l(e,i[2])&&(h[i[1]]=null),h;if(2!==u&&r){if(r>=2)return o;for(var c=0;c<i.length;c++){var d=i[c];if(!s(o,d)&&s(t,d)){o[d]=t[d];break}}return o}return h}function s(t,e){return t.hasOwnProperty(e)}function l(t,e){return null!=t[e]&&"auto"!==t[e]}function h(t,e,i){Tu(t,(function(t){e[t]=i[t]}))}h(Lu[0],t,a),h(Lu[1],t,o)},wu.getLayoutParams=function(t){return Eu({},t)},wu.copyLayoutParams=Eu;var Ru=b,Nu=ou,Vu=yu,Bu=To,Gu=wu,Wu={getBoxLayoutParams:function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}}},Hu=Array.prototype.push,Fu=Nu.extend({type:"component",id:"",name:"",mainType:"",subType:"",componentIndex:0,defaultOption:null,ecModel:null,dependentModels:[],uid:null,layoutMode:null,$constructor:function(t,e,i,n){Nu.call(this,t,e,i,n),this.uid=Vu.getUID("componentModel")},init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i)},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?Gu.getLayoutParams(t):{},a=e.getTheme();Ru.merge(t,a.get(this.mainType)),Ru.merge(t,this.getDefaultOption()),i&&Gu.mergeLayoutParam(t,n,i)},mergeOption:function(t,e){Ru.merge(this.option,t,!0);var i=this.layoutMode;i&&Gu.mergeLayoutParam(this.option,t,i)},optionUpdated:function(t,e){},getDefaultOption:function(){if(!Bu.hasOwn(this,"__defaultOption")){for(var t=[],e=this.constructor;e;){var i=e.prototype.defaultOption;i&&t.push(i),e=e.superClass}for(var n={},a=t.length-1;a>=0;a--)n=Ru.merge(n,t[a],!0);Bu.set(this,"__defaultOption",n)}return Bu.get(this,"__defaultOption")},getReferringComponents:function(t){return this.ecModel.queryComponents({mainType:t,index:this.get(t+"Index",!0),id:this.get(t+"Id",!0)})}});Bu.enableClassManagement(Fu,{registerWhenExtend:!0}),Vu.enableSubTypeDefaulter(Fu),Vu.enableTopologicalTravel(Fu,(function(t){var e=[];return Ru.each(Fu.getClassesByMainType(t),(function(t){Hu.apply(e,t.prototype.dependencies||[])})),Ru.map(e,(function(t){return Bu.parseClassType(t).main}))})),Ru.mixin(Fu,Wu);var Zu=Fu,ju="";"undefined"!=typeof navigator&&(ju=navigator.platform||"");var Uu={color:["#c23531","#2f4554","#61a0a8","#d48265","#91c7ae","#749f83","#ca8622","#bda29a","#6e7074","#546570","#c4ccd3"],textStyle:{fontFamily:ju.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,animation:"auto",animationDuration:1e3,animationDurationUpdate:300,animationEasing:"exponentialOut",animationEasingUpdate:"cubicOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},qu=To,Xu=qu.set,Yu=qu.get,$u={clearColorPalette:function(){Xu(this,"colorIdx",0),Xu(this,"colorNameMap",{})},getColorFromPalette:function(t,e){var i=Yu(e=e||this,"colorIdx")||0,n=Yu(e,"colorNameMap")||Xu(e,"colorNameMap",{});if(n.hasOwnProperty(t))return n[t];var a=this.get("color",!0)||[];if(a.length){var o=a[i];return t&&(n[t]=o),Xu(e,"colorIdx",(i+1)%a.length),o}}},Ku=b,Ju=uo,Qu=ou,tc=Zu,ec=Uu,ic=$u,nc=Ku.each,ac=Ku.filter,oc=Ku.map,rc=Ku.isArray,sc=Ku.indexOf,lc=Ku.isObject,hc=Qu.extend({constructor:hc,init:function(t,e,i,n){i=i||{},this.option=null,this._theme=new Qu(i),this._optionManager=n},setOption:function(t,e){Ku.assert(!("\0_ec_inner"in t),"please use chart.getOption()"),this._optionManager.setOption(t,e),this.resetOption(null)},resetOption:function(t){var e=!1,i=this._optionManager;if(!t||"recreate"===t){var n=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this.mergeOption(n)):uc.call(this,n),e=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var a=i.getTimelineOption(this);a&&(this.mergeOption(a),e=!0)}if(!t||"recreate"===t||"media"===t){var o=i.getMediaOption(this,this._api);o.length&&nc(o,(function(t){this.mergeOption(t,e=!0)}),this)}return e},mergeOption:function(t){var e=this.option,i=this._componentsMap,n=[];nc(t,(function(t,i){null!=t&&(tc.hasClass(i)?n.push(i):e[i]=null==e[i]?Ku.clone(t):Ku.merge(e[i],t,!0))})),tc.topologicalTravel(n,tc.getAllClassMainTypes(),(function(n,a){var o=Ju.normalizeToArray(t[n]),r=Ju.mappingToExists(i.get(n),o);Ju.makeIdAndName(r),nc(r,(function(t,e){var i=t.option;lc(i)&&(t.keyInfo.mainType=n,t.keyInfo.subType=function(t,e,i){return e.type?e.type:i?i.subType:tc.determineSubType(t,e)}(n,i,t.exist))}));var s=function(t,e){Ku.isArray(e)||(e=e?[e]:[]);var i={};return nc(e,(function(e){i[e]=(t.get(e)||[]).slice()})),i}(i,a);e[n]=[],i.set(n,[]),nc(r,(function(t,a){var o=t.exist,r=t.option;if(Ku.assert(lc(r)||o,"Empty component definition"),r){var l=tc.getClass(n,t.keyInfo.subType,!0);if(o&&o instanceof l)o.name=t.keyInfo.name,o.mergeOption(r,this),o.optionUpdated(r,!1);else{var h=Ku.extend({dependentModels:s,componentIndex:a},t.keyInfo);o=new l(r,this,this,h),Ku.extend(o,h),o.init(r,this,this,h),o.optionUpdated(null,!0)}}else o.mergeOption({},this),o.optionUpdated({},!1);i.get(n)[a]=o,e[n][a]=o.option}),this),"series"===n&&(this._seriesIndices=cc(i.get("series")))}),this),this._seriesIndices=this._seriesIndices||[]},getOption:function(){var t=Ku.clone(this.option);return nc(t,(function(e,i){if(tc.hasClass(i)){for(var n=(e=Ju.normalizeToArray(e)).length-1;n>=0;n--)Ju.isIdInner(e[n])&&e.splice(n,1);t[i]=e}})),delete t["\0_ec_inner"],t},getTheme:function(){return this._theme},getComponent:function(t,e){var i=this._componentsMap.get(t);if(i)return i[e||0]},queryComponents:function(t){var e=t.mainType;if(!e)return[];var i,n=t.index,a=t.id,o=t.name,r=this._componentsMap.get(e);if(!r||!r.length)return[];if(null!=n)rc(n)||(n=[n]),i=ac(oc(n,(function(t){return r[t]})),(function(t){return!!t}));else if(null!=a){var s=rc(a);i=ac(r,(function(t){return s&&sc(a,t.id)>=0||!s&&t.id===a}))}else if(null!=o){var l=rc(o);i=ac(r,(function(t){return l&&sc(o,t.name)>=0||!l&&t.name===o}))}else i=r.slice();return dc(i,t)},findComponents:function(t){var e,i,n,a,o,r=t.query,s=t.mainType,l=(i=s+"Index",n=s+"Id",a=s+"Name",!(e=r)||null==e[i]&&null==e[n]&&null==e[a]?null:{mainType:s,index:e[i],id:e[n],name:e[a]}),h=l?this.queryComponents(l):this._componentsMap.get(s);return o=dc(h,t),t.filter?ac(o,t.filter):o},eachComponent:function(t,e,i){var n=this._componentsMap;if("function"==typeof t)i=e,e=t,n.each((function(t,n){nc(t,(function(t,a){e.call(i,n,t,a)}))}));else if(Ku.isString(t))nc(n.get(t),e,i);else if(lc(t)){var a=this.findComponents(t);nc(a,e,i)}},getSeriesByName:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.name===t}))},getSeriesByIndex:function(t){return this._componentsMap.get("series")[t]},getSeriesByType:function(t){var e=this._componentsMap.get("series");return ac(e,(function(e){return e.subType===t}))},getSeries:function(){return this._componentsMap.get("series").slice()},eachSeries:function(t,e){nc(this._seriesIndices,(function(i){var n=this._componentsMap.get("series")[i];t.call(e,n,i)}),this)},eachRawSeries:function(t,e){nc(this._componentsMap.get("series"),t,e)},eachSeriesByType:function(t,e,i){nc(this._seriesIndices,(function(n){var a=this._componentsMap.get("series")[n];a.subType===t&&e.call(i,a,n)}),this)},eachRawSeriesByType:function(t,e,i){return nc(this.getSeriesByType(t),e,i)},isSeriesFiltered:function(t){return Ku.indexOf(this._seriesIndices,t.componentIndex)<0},getCurrentSeriesIndices:function(){return(this._seriesIndices||[]).slice()},filterSeries:function(t,e){var i=ac(this._componentsMap.get("series"),t,e);this._seriesIndices=cc(i)},restoreData:function(){var t=this._componentsMap;this._seriesIndices=cc(t.get("series"));var e=[];t.each((function(t,i){e.push(i)})),tc.topologicalTravel(e,tc.getAllClassMainTypes(),(function(e,i){nc(t.get(e),(function(t){t.restoreData()}))}))}});function uc(t){var e,i;this.option={},this.option["\0_ec_inner"]=1,this._componentsMap=Ku.createHashMap({series:[]}),this._seriesIndices=null,e=t,i=this._theme.option,Ku.each(i,(function(t,i){tc.hasClass(i)||("object"==typeof t?e[i]=e[i]?Ku.merge(e[i],t,!1):Ku.clone(t):null==e[i]&&(e[i]=t))})),Ku.merge(t,ec,!1),this.mergeOption(t)}function cc(t){return oc(t,(function(t){return t.componentIndex}))||[]}function dc(t,e){return e.hasOwnProperty("subType")?ac(t,(function(t){return t.subType===e.subType})):t}Ku.mixin(hc,ic);var pc=hc,fc=b,gc=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isDisposed","on","off","getDataURL","getConnectedDataURL","getModel","getOption","getViewOfComponentModel","getViewOfSeriesModel"];var mc=function(t){fc.each(gc,(function(e){this[e]=fc.bind(t[e],t)}),this)},vc=b,yc={};function xc(){this._coordinateSystems=[]}xc.prototype={constructor:xc,create:function(t,e){var i=[];vc.each(yc,(function(n,a){var o=n.create(t,e);i=i.concat(o||[])})),this._coordinateSystems=i},update:function(t,e){vc.each(this._coordinateSystems,(function(i){i.update&&i.update(t,e)}))},getCoordinateSystems:function(){return this._coordinateSystems.slice()}},xc.register=function(t,e){yc[t]=e},xc.get=function(t){return yc[t]};var _c=xc,bc=b,wc=uo,Sc=Zu,Mc=bc.each,Ic=bc.clone,Ac=bc.map,Tc=bc.merge,Cc=/^(min|max)?(.+)$/;function Lc(t){this._api=t,this._timelineOptions=[],this._mediaList=[],this._mediaDefault,this._currentMediaIndices=[],this._optionBackup,this._newBaseOption}function Dc(t,e,i){var n,a,o=[],r=[],s=t.timeline;if(t.baseOption&&(a=t.baseOption),(s||t.options)&&(a=a||{},o=(t.options||[]).slice()),t.media){a=a||{};var l=t.media;Mc(l,(function(t){t&&t.option&&(t.query?r.push(t):n||(n=t))}))}return a||(a=t),a.timeline||(a.timeline=s),Mc([a].concat(o).concat(bc.map(r,(function(t){return t.option}))),(function(t){Mc(e,(function(e){e(t,i)}))})),{baseOption:a,timelineOptions:o,mediaDefault:n,mediaList:r}}function Pc(t,e,i){var n={width:e,height:i,aspectratio:e/i},a=!0;return bc.each(t,(function(t,e){var i=e.match(Cc);if(i&&i[1]&&i[2]){var o=i[1],r=i[2].toLowerCase();(function(t,e,i){return"min"===i?t>=e:"max"===i?t<=e:t===e})(n[r],t,o)||(a=!1)}})),a}Lc.prototype={constructor:Lc,setOption:function(t,e){t=Ic(t,!0);var i,n,a=this._optionBackup,o=Dc.call(this,t,e,!a);this._newBaseOption=o.baseOption,a?(i=a.baseOption,n=o.baseOption,Mc(n=n||{},(function(t,e){if(null!=t){var n=i[e];if(Sc.hasClass(e)){t=wc.normalizeToArray(t),n=wc.normalizeToArray(n);var a=wc.mappingToExists(n,t);i[e]=Ac(a,(function(t){return t.option&&t.exist?Tc(t.exist,t.option,!0):t.exist||t.option}))}else i[e]=Tc(n,t,!0)}})),o.timelineOptions.length&&(a.timelineOptions=o.timelineOptions),o.mediaList.length&&(a.mediaList=o.mediaList),o.mediaDefault&&(a.mediaDefault=o.mediaDefault)):this._optionBackup=o},mountOption:function(t){var e=this._optionBackup;return this._timelineOptions=Ac(e.timelineOptions,Ic),this._mediaList=Ac(e.mediaList,Ic),this._mediaDefault=Ic(e.mediaDefault),this._currentMediaIndices=[],Ic(t?e.baseOption:this._newBaseOption)},getTimelineOption:function(t){var e,i=this._timelineOptions;if(i.length){var n=t.getComponent("timeline");n&&(e=Ic(i[n.getCurrentIndex()],!0))}return e},getMediaOption:function(t){var e,i,n=this._api.getWidth(),a=this._api.getHeight(),o=this._mediaList,r=this._mediaDefault,s=[],l=[];if(!o.length&&!r)return l;for(var h=0,u=o.length;h<u;h++)Pc(o[h].query,n,a)&&s.push(h);return!s.length&&r&&(s=[-1]),s.length&&(e=s,i=this._currentMediaIndices,e.join(",")!==i.join(","))&&(l=Ac(s,(function(t){return Ic(-1===t?r.option:o[t].option)}))),this._currentMediaIndices=s,l}};var kc=Lc,Oc=b,zc=uo,Ec=Oc.each,Rc=Oc.isObject,Nc=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Vc(t){var e=t&&t.itemStyle;if(e)for(var i=0,n=Nc.length;i<n;i++){var a=Nc[i],o=e.normal,r=e.emphasis;o&&o[a]&&(t[a]=t[a]||{},t[a].normal?Oc.merge(t[a].normal,o[a]):t[a].normal=o[a],o[a]=null),r&&r[a]&&(t[a]=t[a]||{},t[a].emphasis?Oc.merge(t[a].emphasis,r[a]):t[a].emphasis=r[a],r[a]=null)}}function Bc(t,e){var i=Rc(t)&&t[e],n=Rc(i)&&i.textStyle;if(n)for(var a=0,o=zc.TEXT_STYLE_OPTIONS.length;a<o;a++){e=zc.TEXT_STYLE_OPTIONS[a];n.hasOwnProperty(e)&&(i[e]=n[e])}}function Gc(t){Rc(t)&&(Bc(t,"normal"),Bc(t,"emphasis"))}function Wc(t){return Oc.isArray(t)?t:t?[t]:[]}function Hc(t){return(Oc.isArray(t)?t[0]:t)||{}}var Fc=function(t,e){Ec(Wc(t.series),(function(t){Rc(t)&&function(t){if(Rc(t)){Vc(t),Gc(t.label),Gc(t.upperLabel),Gc(t.edgeLabel),Vc(n=t.markPoint),Gc(n&&n.label);var e=t.markLine;Vc(t.markLine),Gc(e&&e.label);var i=t.markArea;Gc(i&&i.label),Bc(t,"axisLabel"),Bc(t,"title"),Bc(t,"detail");var n,a=t.data;if(a)for(var o=0;o<a.length;o++)Vc(a[o]),Gc(a[o]&&a[o].label);if((n=t.markPoint)&&n.data){var r=n.data;for(o=0;o<r.length;o++)Vc(r[o]),Gc(r[o]&&r[o].label)}if((e=t.markLine)&&e.data){var s=e.data;for(o=0;o<s.length;o++)Oc.isArray(s[o])?(Vc(s[o][0]),Gc(s[o][0]&&s[o][0].label),Vc(s[o][1]),Gc(s[o][1]&&s[o][1].label)):(Vc(s[o]),Gc(s[o]&&s[o].label))}}}(t)}));var i=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&i.push("valueAxis","categoryAxis","logAxis","timeAxis"),Ec(i,(function(e){Ec(Wc(t[e]),(function(t){t&&(Bc(t,"axisLabel"),Bc(t.axisPointer,"label"))}))})),Ec(Wc(t.parallel),(function(t){var e=t&&t.parallelAxisDefault;Bc(e,"axisLabel"),Bc(e&&e.axisPointer,"label")})),Ec(Wc(t.calendar),(function(t){Bc(t,"dayLabel"),Bc(t,"monthLabel"),Bc(t,"yearLabel")})),Ec(Wc(t.radar),(function(t){Bc(t,"name")})),Ec(Wc(t.geo),(function(t){Rc(t)&&(Gc(t.label),Ec(Wc(t.regions),(function(t){Gc(t.label)})))})),Gc(Hc(t.timeline).label),Bc(Hc(t.axisPointer),"label"),Bc(Hc(t.tooltip).axisPointer,"label")},Zc=b,jc=Zc.each,Uc=Zc.isArray,qc=Zc.isObject,Xc=Fc,Yc=uo.normalizeToArray;function $c(t){jc(Kc,(function(e){e[0]in t&&!(e[1]in t)&&(t[e[1]]=t[e[0]])}))}var Kc=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Jc=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],Qc=["bar","boxplot","candlestick","chord","effectScatter","funnel","gauge","lines","graph","heatmap","line","map","parallel","pie","radar","sankey","scatter","treemap"];var td=function(t,e){Xc(t,e),t.series=Yc(t.series),jc(t.series,(function(t){if(qc(t)){var e=t.type;if("pie"!==e&&"gauge"!==e||null!=t.clockWise&&(t.clockwise=t.clockWise),"gauge"===e){var i=function(t,e){e=e.split(",");for(var i=t,n=0;n<e.length&&null!=(i=i&&i[e[n]]);n++);return i}(t,"pointer.color");null!=i&&function(t,e,i,n){e=e.split(",");for(var a,o=t,r=0;r<e.length-1;r++)null==o[a=e[r]]&&(o[a]={}),o=o[a];(n||null==o[e[r]])&&(o[e[r]]=i)}(t,"itemStyle.normal.color",i)}for(var n=0;n<Qc.length;n++)if(Qc[n]===t.type){$c(t);break}}})),t.dataRange&&(t.visualMap=t.dataRange),jc(Jc,(function(e){var i=t[e];i&&(Uc(i)||(i=[i]),jc(i,(function(t){$c(t)})))}))},ed=b,id=_,nd=co,ad=nd.formatTime,od=nd.encodeHTML,rd=nd.addCommas,sd=nd.getTooltipMarker,ld=To,hd=ld.set,ud=ld.get,cd=uo,dd=Zu,pd=$u,fd=wu,gd=fd.getLayoutParams,md=fd.mergeLayoutParam,vd=dd.extend({type:"series.__base__",seriesIndex:0,coordinateSystem:null,defaultOption:null,legendDataProvider:null,visualColorAccessPath:"itemStyle.normal.color",layoutMode:null,init:function(t,e,i,n){this.seriesIndex=this.componentIndex,this.mergeDefaultAndTheme(t,i);var a=this.getInitialData(t,i);hd(this,"dataBeforeProcessed",a),this.restoreData()},mergeDefaultAndTheme:function(t,e){var i=this.layoutMode,n=i?gd(t):{},a=this.subType;dd.hasClass(a)&&(a+="Series"),ed.merge(t,e.getTheme().get(this.subType)),ed.merge(t,this.getDefaultOption()),cd.defaultEmphasis(t.label,["show"]),this.fillDataTextStyle(t.data),i&&md(t,n,i)},mergeOption:function(t,e){t=ed.merge(this.option,t,!0),this.fillDataTextStyle(t.data);var i=this.layoutMode;i&&md(this.option,t,i);var n=this.getInitialData(t,e);n&&(hd(this,"data",n),hd(this,"dataBeforeProcessed",n.cloneShallow()))},fillDataTextStyle:function(t){if(t)for(var e=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&cd.defaultEmphasis(t[i].label,e)},getInitialData:function(){},getData:function(t){var e=ud(this,"data");return null==t?e:e.getLinkedData(t)},setData:function(t){hd(this,"data",t)},getRawData:function(){return ud(this,"dataBeforeProcessed")},coordDimToDataDim:function(t){return cd.coordDimToDataDim(this.getData(),t)},dataDimToCoordDim:function(t){return cd.dataDimToCoordDim(this.getData(),t)},getBaseAxis:function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},formatTooltip:function(t,e,i){var n=ud(this,"data"),a=this.getRawValue(t),o=ed.isArray(a)?function(i){var a=ed.reduce(i,(function(t,e,i){var a=n.getDimensionInfo(i);return t|(a&&!1!==a.tooltip&&null!=a.tooltipName)}),0),o=[],r=cd.otherDimToDataDim(n,"tooltip");function s(t,i){var r=n.getDimensionInfo(i);if(r&&!1!==r.otherDims.tooltip){var s=r.type,l=(a?"- "+(r.tooltipName||r.name)+": ":"")+("ordinal"===s?t+"":"time"===s?e?"":ad("yyyy/MM/dd hh:mm:ss",t):rd(t));l&&o.push(od(l))}}return r.length?ed.each(r,(function(e){s(n.get(e,t),e)})):ed.each(i,s),(a?"<br/>":"")+o.join(a?"<br/>":", ")}(a):od(rd(a)),r=n.getName(t),s=n.getItemVisual(t,"color");ed.isObject(s)&&s.colorStops&&(s=(s.colorStops[0]||{}).color);var l=sd(s=s||"transparent"),h=this.name;return"\0-"===h&&(h=""),h=h?od(h)+(e?": ":"<br/>"):"",e?l+h+o:h+l+(r?od(r)+": "+o:o)},isAnimationEnabled:function(){if(id.node)return!1;var t=this.getShallow("animation");return t&&this.getData().count()>this.getShallow("animationThreshold")&&(t=!1),t},restoreData:function(){hd(this,"data",ud(this,"dataBeforeProcessed").cloneShallow())},getColorFromPalette:function(t,e){var i=this.ecModel,n=pd.getColorFromPalette.call(this,t,e);return n||(n=i.getColorFromPalette(t,e)),n},getAxisTooltipData:null,getTooltipPosition:null});ed.mixin(vd,cd.dataFormatMixin),ed.mixin(vd,pd);var yd=vd,xd=ni,_d=yu,bd=To,wd=function(){this.group=new xd,this.uid=_d.getUID("viewComponent")},Sd=wd.prototype={constructor:wd,init:function(t,e){},render:function(t,e,i,n){},dispose:function(){}};Sd.updateView=Sd.updateLayout=Sd.updateVisual=function(t,e,i,n){},bd.enableClassExtend(wd),bd.enableClassManagement(wd,{registerWhenExtend:!0});var Md=wd,Id=b,Ad=ni,Td=yu,Cd=To,Ld=uo;function Dd(){this.group=new Ad,this.uid=Td.getUID("viewChart")}Dd.prototype={type:"chart",init:function(t,e){},render:function(t,e,i,n){},highlight:function(t,e,i,n){Od(t.getData(),n,"emphasis")},downplay:function(t,e,i,n){Od(t.getData(),n,"normal")},remove:function(t,e){this.group.removeAll()},dispose:function(){}};var Pd=Dd.prototype;function kd(t,e){if(t&&(t.trigger(e),"group"===t.type))for(var i=0;i<t.childCount();i++)kd(t.childAt(i),e)}function Od(t,e,i){var n=Ld.queryDataIndex(t,e);null!=n?Id.each(Ld.normalizeToArray(n),(function(e){kd(t.getItemGraphicEl(e),i)})):t.eachItemGraphicEl((function(t){kd(t,i)}))}Pd.updateView=Pd.updateLayout=Pd.updateVisual=function(t,e,i,n){this.render(t,e,i,n)},Cd.enableClassExtend(Dd,["dispose"]),Cd.enableClassManagement(Dd,{registerWhenExtend:!0});var zd=Dd,Ed={},Rd="\0__throttleOriginMethod",Nd="\0__throttleRate";function Vd(t,e,i){var n,a,o,r,s,l=0,h=0,u=null;function c(){h=(new Date).getTime(),u=null,t.apply(o,r||[])}e=e||0;var d=function(){n=(new Date).getTime(),o=this,r=arguments;var t=s||e,d=s||i;s=null,a=n-(d?l:h)-t,clearTimeout(u),d?u=setTimeout(c,t):a>=0?c():u=setTimeout(c,-a),l=n};return d.clear=function(){u&&(clearTimeout(u),u=null)},d.debounceNextCall=function(t){s=t},d}Ed.throttle=Vd,Ed.createOrUpdate=function(t,e,i,n){var a=t[e];if(a){var o=a[Rd]||a,r=a["\0__throttleType"];if(a[Nd]!==i||r!==n){if(null==i||!n)return t[e]=o;(a=t[e]=Vd(o,i,"debounce"===n))[Rd]=o,a["\0__throttleType"]=n,a[Nd]=i}return a}},Ed.clear=function(t,e){var i=t[e];i&&i[Rd]&&(t[e]=i[Rd])};var Bd=Rl;var Gd=function(t){t.eachRawSeries((function(e){var i=(e.visualColorAccessPath||"itemStyle.normal.color").split("."),n=e.getData(),a=e.get(i)||e.getColorFromPalette(e.get("name"));n.setVisual("color",a),t.isSeriesFiltered(e)||("function"!=typeof a||a instanceof Bd||n.each((function(t){n.setItemVisual(t,"color",a(e.getDataParams(t)))})),n.each((function(t){var e=n.getItemModel(t).get(i,!0);null!=e&&n.setItemVisual(t,"color",e)})))}))},Wd=b,Hd=Bo,Fd=Math.PI;var Zd=function(t,e){e=e||{},Wd.defaults(e,{text:"loading",color:"#c23531",textColor:"#000",maskColor:"rgba(255, 255, 255, 0.8)",zlevel:0});var i=new Hd.Rect({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4}),n=new Hd.Arc({shape:{startAngle:-Fd/2,endAngle:-Fd/2+.1,r:10},style:{stroke:e.color,lineCap:"round",lineWidth:5},zlevel:e.zlevel,z:10001}),a=new Hd.Rect({style:{fill:"none",text:e.text,textPosition:"right",textDistance:10,textFill:e.textColor},zlevel:e.zlevel,z:10001});n.animateShape(!0).when(1e3,{endAngle:3*Fd/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*Fd/2}).delay(300).start("circularInOut");var o=new Hd.Group;return o.add(n),o.add(a),o.add(i),o.resize=function(){var e=t.getWidth()/2,o=t.getHeight()/2;n.setShape({cx:e,cy:o});var r=n.shape.r;a.setShape({x:e-r,y:o-r,width:2*r,height:2*r}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},o.resize(),o},jd={},Ud={};function qd(t){return t}function Xd(t,e,i,n,a){this._old=t,this._new=e,this._oldKeyGetter=i||qd,this._newKeyGetter=n||qd,this.context=a}function Yd(t,e,i,n,a){for(var o=0;o<t.length;o++){var r="_ec_"+a[n](t[o],o),s=e[r];null==s?(i.push(r),e[r]=o):(s.length||(e[r]=s=[s]),s.push(o))}}Xd.prototype={constructor:Xd,add:function(t){return this._add=t,this},update:function(t){return this._update=t,this},remove:function(t){return this._remove=t,this},execute:function(){var t=this._old,e=this._new,i={},n=[],a=[];for(Yd(t,{},n,"_oldKeyGetter",this),Yd(e,i,a,"_newKeyGetter",this),o=0;o<t.length;o++){if(null!=(s=i[r=n[o]]))(h=s.length)?(1===h&&(i[r]=null),s=s.unshift()):i[r]=null,this._update&&this._update(s,o);else this._remove&&this._remove(o)}for(var o=0;o<a.length;o++){var r=a[o];if(i.hasOwnProperty(r)){var s;if(null==(s=i[r]))continue;if(s.length)for(var l=0,h=s.length;l<h;l++)this._add&&this._add(s[l]);else this._add&&this._add(s)}}}};var $d=Xd,Kd=b,Jd=ou,Qd=$d,tp=uo,ep=Kd.isObject,ip="undefined"==typeof window?t:window,np={float:void 0===ip.Float64Array?Array:ip.Float64Array,int:void 0===ip.Int32Array?Array:ip.Int32Array,ordinal:Array,number:Array,time:Array},ap=["stackedOn","hasItemOption","_nameList","_idList","_rawData"];function op(t,e){Kd.each(ap.concat(e.__wrappedMethods||[]),(function(i){e.hasOwnProperty(i)&&(t[i]=e[i])})),t.__wrappedMethods=e.__wrappedMethods}function rp(t){this._array=t||[]}rp.prototype.pure=!1,rp.prototype.count=function(){return this._array.length},rp.prototype.getItem=function(t){return this._array[t]};var sp=function(t,e){t=t||["x","y"];for(var i={},n=[],a=0;a<t.length;a++){var o,r={};"string"==typeof t[a]?r={name:o=t[a],coordDim:o,coordDimIndex:0,stackable:!1,type:"number"}:(o=(r=t[a]).name,r.type=r.type||"number",r.coordDim||(r.coordDim=o,r.coordDimIndex=0)),r.otherDims=r.otherDims||{},n.push(o),i[o]=r}this.dimensions=n,this._dimensionInfos=i,this.hostModel=e,this.dataType,this.indices=[],this._storage={},this._nameList=[],this._idList=[],this._optionModels=[],this.stackedOn=null,this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._rawData,this._extent},lp=sp.prototype;function hp(t){return Kd.isArray(t)||(t=[t]),t}function up(t,e){var i=t.dimensions,n=new sp(Kd.map(i,t.getDimensionInfo,t),t.hostModel);op(n,t);for(var a=n._storage={},o=t._storage,r=0;r<i.length;r++){var s=i[r],l=o[s];Kd.indexOf(e,s)>=0?a[s]=new l.constructor(o[s].length):a[s]=o[s]}return n}lp.type="list",lp.hasItemOption=!0,lp.getDimension=function(t){return isNaN(t)||(t=this.dimensions[t]||t),t},lp.getDimensionInfo=function(t){return Kd.clone(this._dimensionInfos[this.getDimension(t)])},lp.initData=function(t,e,i){t=t||[],Kd.isArray(t)&&(t=new rp(t)),this._rawData=t;var n,a=this._storage={},o=this.indices=[],r=this.dimensions,s=this._dimensionInfos,l=t.count(),h=[],u={};e=e||[];for(var c=0;c<r.length;c++){var d=s[r[c]];0===d.otherDims.itemName&&(n=c);var p=np[d.type];a[r[c]]=new p(l)}var f=this;i||(f.hasItemOption=!1),i=i||function(t,e,i,n){var a=tp.getDataItemValue(t);return tp.isDataItemOption(t)&&(f.hasItemOption=!0),tp.converDataValue(a instanceof Array?a[n]:a,s[e])};for(c=0;c<l;c++){for(var g=t.getItem(c),m=0;m<r.length;m++){var v=r[m];a[v][c]=i(g,v,c,m)}o.push(c)}for(c=0;c<l;c++){g=t.getItem(c);!e[c]&&g&&(null!=g.name?e[c]=g.name:null!=n&&(e[c]=a[r[n]][c]));var y=e[c]||"",x=g&&g.id;!x&&y&&(u[y]=u[y]||0,x=y,u[y]>0&&(x+="__ec__"+u[y]),u[y]++),x&&(h[c]=x)}this._nameList=e,this._idList=h},lp.count=function(){return this.indices.length},lp.get=function(t,e,i){var n=this._storage,a=this.indices[e];if(null==a||!n[t])return NaN;var o=n[t][a];if(i){var r=this._dimensionInfos[t];if(r&&r.stackable)for(var s=this.stackedOn;s;){var l=s.get(t,e);(o>=0&&l>0||o<=0&&l<0)&&(o+=l),s=s.stackedOn}}return o},lp.getValues=function(t,e,i){var n=[];Kd.isArray(t)||(i=e,e=t,t=this.dimensions);for(var a=0,o=t.length;a<o;a++)n.push(this.get(t[a],e,i));return n},lp.hasValue=function(t){for(var e=this.dimensions,i=this._dimensionInfos,n=0,a=e.length;n<a;n++)if("ordinal"!==i[e[n]].type&&isNaN(this.get(e[n],t)))return!1;return!0},lp.getDataExtent=function(t,e,i){t=this.getDimension(t);var n=this._storage[t],a=this.getDimensionInfo(t);e=a&&a.stackable&&e;var o,r=(this._extent||(this._extent={}))[t+!!e];if(r)return r;if(n){for(var s=1/0,l=-1/0,h=0,u=this.count();h<u;h++)o=this.get(t,h,e),i&&!i(o,t,h)||(o<s&&(s=o),o>l&&(l=o));return this._extent[t+!!e]=[s,l]}return[1/0,-1/0]},lp.getSum=function(t,e){var i=0;if(this._storage[t])for(var n=0,a=this.count();n<a;n++){var o=this.get(t,n,e);isNaN(o)||(i+=o)}return i},lp.indexOf=function(t,e){var i=this._storage[t],n=this.indices;if(i)for(var a=0,o=n.length;a<o;a++){if(i[n[a]]===e)return a}return-1},lp.indexOfName=function(t){for(var e=this.indices,i=this._nameList,n=0,a=e.length;n<a;n++){if(i[e[n]]===t)return n}return-1},lp.indexOfRawIndex=function(t){var e=this.indices,i=e[t];if(null!=i&&i===t)return t;for(var n=0,a=e.length-1;n<=a;){var o=(n+a)/2|0;if(e[o]<t)n=o+1;else{if(!(e[o]>t))return o;a=o-1}}return-1},lp.indicesOfNearest=function(t,e,i,n){var a=[];if(!this._storage[t])return a;null==n&&(n=1/0);for(var o=Number.MAX_VALUE,r=-1,s=0,l=this.count();s<l;s++){var h=e-this.get(t,s,i),u=Math.abs(h);h<=n&&u<=o&&((u<o||h>=0&&r<0)&&(o=u,r=h,a.length=0),a.push(s))}return a},lp.getRawIndex=function(t){var e=this.indices[t];return null==e?-1:e},lp.getRawDataItem=function(t){return this._rawData.getItem(this.getRawIndex(t))},lp.getName=function(t){return this._nameList[this.indices[t]]||""},lp.getId=function(t){return this._idList[this.indices[t]]||this.getRawIndex(t)+""},lp.each=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],o=(t=Kd.map(hp(t),this.getDimension,this)).length,r=this.indices;n=n||this;for(var s=0;s<r.length;s++)switch(o){case 0:e.call(n,s);break;case 1:e.call(n,this.get(t[0],s,i),s);break;case 2:e.call(n,this.get(t[0],s,i),this.get(t[1],s,i),s);break;default:for(var l=0;l<o;l++)a[l]=this.get(t[l],s,i);a[l]=s,e.apply(n,a)}},lp.filterSelf=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[],o=[],r=(t=Kd.map(hp(t),this.getDimension,this)).length,s=this.indices;n=n||this;for(var l=0;l<s.length;l++){var h;if(r)if(1===r)h=e.call(n,this.get(t[0],l,i),l);else{for(var u=0;u<r;u++)o[u]=this.get(t[u],l,i);o[u]=l,h=e.apply(n,o)}else h=e.call(n,l);h&&a.push(s[l])}return this.indices=a,this._extent={},this},lp.mapArray=function(t,e,i,n){"function"==typeof t&&(n=i,i=e,e=t,t=[]);var a=[];return this.each(t,(function(){a.push(e&&e.apply(this,arguments))}),i,n),a},lp.map=function(t,e,i,n){var a=up(this,t=Kd.map(hp(t),this.getDimension,this)),o=a.indices=this.indices,r=a._storage,s=[];return this.each(t,(function(){var i=arguments[arguments.length-1],n=e&&e.apply(this,arguments);if(null!=n){"number"==typeof n&&(s[0]=n,n=s);for(var a=0;a<n.length;a++){var l=t[a],h=r[l],u=o[i];h&&(h[u]=n[a])}}}),i,n),a},lp.downSample=function(t,e,i,n){for(var a=up(this,[t]),o=this._storage,r=a._storage,s=this.indices,l=a.indices=[],h=[],u=[],c=Math.floor(1/e),d=r[t],p=this.count(),f=0;f<o[t].length;f++)r[t][f]=o[t][f];for(f=0;f<p;f+=c){c>p-f&&(c=p-f,h.length=c);for(var g=0;g<c;g++){var m=s[f+g];h[g]=d[m],u[g]=m}var v=i(h);d[m=u[n(h,v)||0]]=v,l.push(m)}return a},lp.getItemModel=function(t){var e=this.hostModel;return t=this.indices[t],new Jd(this._rawData.getItem(t),e,e&&e.ecModel)},lp.diff=function(t){var e,i=this._idList,n=t&&t._idList;return new Qd(t?t.indices:[],this.indices,(function(t){return null!=(e=n[t])?e:"e\0\0"+t}),(function(t){return null!=(e=i[t])?e:"e\0\0"+t}))},lp.getVisual=function(t){var e=this._visual;return e&&e[t]},lp.setVisual=function(t,e){if(ep(t))for(var i in t)t.hasOwnProperty(i)&&this.setVisual(i,t[i]);else this._visual=this._visual||{},this._visual[t]=e},lp.setLayout=function(t,e){if(ep(t))for(var i in t)t.hasOwnProperty(i)&&this.setLayout(i,t[i]);else this._layout[t]=e},lp.getLayout=function(t){return this._layout[t]},lp.getItemLayout=function(t){return this._itemLayouts[t]},lp.setItemLayout=function(t,e,i){this._itemLayouts[t]=i?Kd.extend(this._itemLayouts[t]||{},e):e},lp.clearItemLayouts=function(){this._itemLayouts.length=0},lp.getItemVisual=function(t,e,i){var n=this._itemVisuals[t],a=n&&n[e];return null!=a||i?a:this.getVisual(e)},lp.setItemVisual=function(t,e,i){var n=this._itemVisuals[t]||{};if(this._itemVisuals[t]=n,ep(e))for(var a in e)e.hasOwnProperty(a)&&(n[a]=e[a]);else n[e]=i},lp.clearAllVisual=function(){this._visual={},this._itemVisuals=[]};var cp=function(t){t.seriesIndex=this.seriesIndex,t.dataIndex=this.dataIndex,t.dataType=this.dataType};lp.setItemGraphicEl=function(t,e){var i=this.hostModel;e&&(e.dataIndex=t,e.dataType=this.dataType,e.seriesIndex=i&&i.seriesIndex,"group"===e.type&&e.traverse(cp,e)),this._graphicEls[t]=e},lp.getItemGraphicEl=function(t){return this._graphicEls[t]},lp.eachItemGraphicEl=function(t,e){Kd.each(this._graphicEls,(function(i,n){i&&t&&t.call(e,i,n)}))},lp.cloneShallow=function(){var t=Kd.map(this.dimensions,this.getDimensionInfo,this),e=new sp(t,this.hostModel);return e._storage=this._storage,op(e,this),e.indices=this.indices.slice(),this._extent&&(e._extent=Kd.extend({},this._extent)),e},lp.wrapMethod=function(t,e){var i=this[t];"function"==typeof i&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=i.apply(this,arguments);return e.apply(this,[t].concat(Kd.slice(arguments)))})},lp.TRANSFERABLE_METHODS=["cloneShallow","downSample","map"],lp.CHANGABLE_METHODS=["filterSelf"];var dp=sp,pp=b,fp=uo.normalizeToArray,gp=pp.each,mp=pp.isString,vp=pp.defaults,yp={tooltip:1,label:1,itemName:1};function xp(t,e,i){e=e||[],i=i||{},t=(t||[]).slice();var n=(i.dimsDef||[]).slice(),a=pp.createHashMap(i.encodeDef),o=pp.createHashMap(),r=pp.createHashMap(),s=[],l=i.dimCount;if(null==l){var h=bp(e[0]);l=Math.max(pp.isArray(h)&&h.length||1,t.length,n.length),gp(t,(function(t){var e=t.dimsDef;e&&(l=Math.max(l,e.length))}))}for(var u=0;u<l;u++){var c=mp(n[u])?{name:n[u]}:n[u]||{},d=c.name,p=s[u]={otherDims:{}};null!=d&&null==o.get(d)&&(p.name=p.tooltipName=d,o.set(d,u)),null!=c.type&&(p.type=c.type)}a.each((function(t,e){t=a.set(e,fp(t).slice()),gp(t,(function(i,n){mp(i)&&(i=o.get(i)),null!=i&&i<l&&(t[n]=i,v(s[i],e,n))}))}));var f=0;gp(t,(function(t,e){var i,n,o;mp(t)?(i=t,t={}):(i=t.name,t=pp.clone(t),n=t.dimsDef,o=t.otherDims,t.name=t.coordDim=t.coordDimIndex=t.dimsDef=t.otherDims=null);var r=fp(a.get(i));if(!r.length)for(var l=0;l<(n&&n.length||1);l++){for(;f<s.length&&null!=s[f].coordDim;)f++;f<s.length&&r.push(f++)}gp(r,(function(e,a){var r=s[e];v(vp(r,t),i,a),null==r.name&&n&&(r.name=r.tooltipName=n[a]),o&&vp(r.otherDims,o)}))}));for(var g=i.extraPrefix||"value",m=0;m<l;m++){null==(p=s[m]=s[m]||{}).coordDim&&(p.coordDim=y(g,r,i.extraFromZero),p.coordDimIndex=0,p.isExtraCoord=!0),null==p.name&&(p.name=y(p.coordDim,o)),null==p.type&&_p(e,m)&&(p.type="ordinal")}return s;function v(t,e,i){yp[e]?t.otherDims[e]=i:(t.coordDim=e,t.coordDimIndex=i,r.set(e,!0))}function y(t,e,i){if(i||null!=e.get(t)){for(var n=0;null!=e.get(t+n);)n++;t+=n}return e.set(t,!0),t}}var _p=xp.guessOrdinal=function(t,e){for(var i=0,n=t.length;i<n;i++){var a=bp(t[i]);if(!pp.isArray(a))return!1;if(null!=(a=a[e])&&isFinite(a)&&""!==a)return!1;if(mp(a)&&"-"!==a)return!0}return!1};function bp(t){return pp.isArray(t)?t:pp.isObject(t)?t.value:t}var wp=xp,Sp=b,Mp=dp,Ip=wp,Ap=uo,Tp=Ap.getDataItemValue,Cp=Ap.converDataValue,Lp=Ap.isDataItemOption,Dp=_c;function Pp(t){return"category"!==t&&"time"!==t}function kp(t){return"category"===t?"ordinal":"time"===t?"time":"float"}var Op={cartesian2d:function(t,e,i,n){var a=Sp.map(["xAxis","yAxis"],(function(t){return i.queryComponents({mainType:t,index:e.get(t+"Index"),id:e.get(t+"Id")})[0]})),o=a[0],r=a[1],s=o.get("type"),l=r.get("type"),h=[{name:"x",type:kp(s),stackable:Pp(s)},{name:"y",type:kp(l),stackable:Pp(l)}],u="category"===s,c="category"===l;h=Ip(h,t,n);var d={};return u&&(d.x=o),c&&(d.y=r),{dimensions:h,categoryIndex:u?0:c?1:-1,categoryAxesModels:d}},singleAxis:function(t,e,i,n){var a=i.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0],o=a.get("type"),r="category"===o,s=[{name:"single",type:kp(o),stackable:Pp(o)}];s=Ip(s,t,n);var l={};return r&&(l.single=a),{dimensions:s,categoryIndex:r?0:-1,categoryAxesModels:l}},polar:function(t,e,i,n){var a=i.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0],o=a.findAxisModel("angleAxis"),r=a.findAxisModel("radiusAxis"),s=r.get("type"),l=o.get("type"),h=[{name:"radius",type:kp(s),stackable:Pp(s)},{name:"angle",type:kp(l),stackable:Pp(l)}],u="category"===l,c="category"===s;h=Ip(h,t,n);var d={};return c&&(d.radius=r),u&&(d.angle=o),{dimensions:h,categoryIndex:u?1:c?0:-1,categoryAxesModels:d}},geo:function(t,e,i,n){return{dimensions:Ip([{name:"lng"},{name:"lat"}],t,n)}}};var zp=function(t,e,i){t=t||[];var n=e.get("coordinateSystem"),a=Op[n],o=Dp.get(n),r={encodeDef:e.get("encode"),dimsDef:e.get("dimensions")},s=a&&a(t,e,i,r),l=s&&s.dimensions;l||(l=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"],l=Ip(l,t,r));var h=s?s.categoryIndex:-1,u=new Mp(l,e),c=function(t,e){var i,n=[],a=t&&t.dimensions[t.categoryIndex];a&&(i=t.categoryAxesModels[a.name]);if(i){var o=i.getCategories();if(o){var r=e.length;if(Sp.isArray(e[0])&&e[0].length>1){n=[];for(var s=0;s<r;s++)n[s]=o[e[s][t.categoryIndex||0]]}else n=o.slice(0)}}return n}(s,t),d={},p=h>=0&&function(t){var e=function(t){for(var e=0;e<t.length&&null==t[e];)e++;return t[e]}(t);return null!=e&&!Sp.isArray(Tp(e))}(t)?function(t,e,i,n){return Lp(t)&&(u.hasItemOption=!0),n===h?i:Cp(Tp(t),l[n])}:function(t,e,i,n){var a=Tp(t),o=Cp(a&&a[n],l[n]);Lp(t)&&(u.hasItemOption=!0);var r=s&&s.categoryAxesModels;return r&&r[e]&&"string"==typeof o&&(d[e]=d[e]||r[e].getCategories(),(o=Sp.indexOf(d[e],o))<0&&!isNaN(o)&&(o=+o)),o};return u.hasItemOption=!1,u.initData(t,c,p),u},Ep=zp,Rp={},Np=To;function Vp(t){this._setting=t||{},this._extent=[1/0,-1/0],this._interval=0,this.init&&this.init.apply(this,arguments)}Vp.prototype.parse=function(t){return t},Vp.prototype.getSetting=function(t){return this._setting[t]},Vp.prototype.contain=function(t){var e=this._extent;return t>=e[0]&&t<=e[1]},Vp.prototype.normalize=function(t){var e=this._extent;return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])},Vp.prototype.scale=function(t){var e=this._extent;return t*(e[1]-e[0])+e[0]},Vp.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},Vp.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getDataExtent(e,!0))},Vp.prototype.getExtent=function(){return this._extent.slice()},Vp.prototype.setExtent=function(t,e){var i=this._extent;isNaN(t)||(i[0]=t),isNaN(e)||(i[1]=e)},Vp.prototype.getTicksLabels=function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},Vp.prototype.isBlank=function(){return this._isBlank},Vp.prototype.setBlank=function(t){this._isBlank=t},Np.enableClassExtend(Vp),Np.enableClassManagement(Vp,{registerWhenExtend:!0});var Bp=Vp,Gp=b,Wp=Bp,Hp=Wp.prototype,Fp=Wp.extend({type:"ordinal",init:function(t,e){this._data=t,this._extent=e||[0,t.length-1]},parse:function(t){return"string"==typeof t?Gp.indexOf(this._data,t):Math.round(t)},contain:function(t){return t=this.parse(t),Hp.contain.call(this,t)&&null!=this._data[t]},normalize:function(t){return Hp.normalize.call(this,this.parse(t))},scale:function(t){return Math.round(Hp.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){return this._data[t]},count:function(){return this._extent[1]-this._extent[0]+1},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!1))},niceTicks:Gp.noop,niceExtent:Gp.noop});Fp.create=function(){return new Fp};var Zp=Fp,jp={},Up=po,qp=Up.round;function Xp(t){return Up.getPrecisionSafe(t)+2}function Yp(t,e,i){t[e]=Math.max(Math.min(t[e],i[1]),i[0])}function $p(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),Yp(t,0,e),Yp(t,1,e),t[0]>t[1]&&(t[0]=t[1])}jp.intervalScaleNiceTicks=function(t,e,i,n){var a={},o=t[1]-t[0],r=a.interval=Up.nice(o/e,!0);null!=i&&r<i&&(r=a.interval=i),null!=n&&r>n&&(r=a.interval=n);var s=a.intervalPrecision=Xp(r);return $p(a.niceTickExtent=[qp(Math.ceil(t[0]/r)*r,s),qp(Math.floor(t[1]/r)*r,s)],t),a},jp.getIntervalPrecision=Xp,jp.fixExtent=$p,jp.intervalScaleGetTicks=function(t,e,i,n){var a=[];if(!t)return a;e[0]<i[0]&&a.push(e[0]);for(var o=i[0];o<=i[1]&&(a.push(o),(o=qp(o+t,n))!==a[a.length-1]);)if(a.length>1e4)return[];return e[1]>(a.length?a[a.length-1]:i[1])&&a.push(e[1]),a};var Kp=po,Jp=co,Qp=Bp,tf=jp,ef=Kp.round,nf=Qp.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[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1]),nf.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=tf.getIntervalPrecision(t)},getTicks:function(){return tf.intervalScaleGetTicks(this._interval,this._extent,this._niceExtent,this._intervalPrecision)},getTicksLabels:function(){for(var t=[],e=this.getTicks(),i=0;i<e.length;i++)t.push(this.getLabel(e[i]));return t},getLabel:function(t,e){if(null==t)return"";var i=e&&e.precision;return null==i?i=Kp.getPrecisionSafe(t)||0:"auto"===i&&(i=this._intervalPrecision),t=ef(t,i,!0),Jp.addCommas(t)},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=tf.intervalScaleNiceTicks(n,t,e,i);this._intervalPrecision=o.intervalPrecision,this._interval=o.interval,this._niceExtent=o.niceTickExtent}},niceExtent:function(t){var e=this._extent;if(e[0]===e[1])if(0!==e[0]){var i=e[0];t.fixMax||(e[1]+=i/2),e[0]-=i/2}else e[1]=1;var n=e[1]-e[0];isFinite(n)||(e[0]=0,e[1]=1),this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var a=this._interval;t.fixMin||(e[0]=ef(Math.floor(e[0]/a)*a)),t.fixMax||(e[1]=ef(Math.ceil(e[1]/a)*a))}});nf.create=function(){return new nf};var af=nf,of=b,rf=po,sf=co,lf=jp,hf=af,uf=hf.prototype,cf=Math.ceil,df=Math.floor,pf=864e5,ff=hf.extend({type:"time",getLabel:function(t){var e=this._stepLvl,i=new Date(t);return sf.formatTime(e[0],i,this.getSetting("useUTC"))},niceExtent:function(t){var e=this._extent;if(e[0]===e[1]&&(e[0]-=pf,e[1]+=pf),e[1]===-1/0&&e[0]===1/0){var i=new Date;e[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),e[0]=e[1]-pf}this.niceTicks(t.splitNumber,t.minInterval,t.maxInterval);var n=this._interval;t.fixMin||(e[0]=rf.round(df(e[0]/n)*n)),t.fixMax||(e[1]=rf.round(cf(e[1]/n)*n))},niceTicks:function(t,e,i){t=t||10;var n=this._extent,a=n[1]-n[0],o=a/t;null!=e&&o<e&&(o=e),null!=i&&o>i&&(o=i);var r=gf.length,s=function(t,e,i,n){for(;i<n;){var a=i+n>>>1;t[a][1]<e?i=a+1:n=a}return i}(gf,o,0,r),l=gf[Math.min(s,r-1)],h=l[1];if("year"===l[0]){var u=a/h;h*=rf.nice(u/t,!0)}var c=this.getSetting("useUTC")?0:60*new Date(+n[0]||+n[1]).getTimezoneOffset()*1e3,d=[Math.round(cf((n[0]-c)/h)*h+c),Math.round(df((n[1]-c)/h)*h+c)];lf.fixExtent(d,n),this._stepLvl=l,this._interval=h,this._niceExtent=d},parse:function(t){return+rf.parseDate(t)}});of.each(["contain","normalize"],(function(t){ff.prototype[t]=function(e){return uf[t].call(this,this.parse(e))}}));var gf=[["hh:mm:ss",1e3],["hh:mm:ss",5e3],["hh:mm:ss",1e4],["hh:mm:ss",15e3],["hh:mm:ss",3e4],["hh:mm\nMM-dd",6e4],["hh:mm\nMM-dd",3e5],["hh:mm\nMM-dd",6e5],["hh:mm\nMM-dd",9e5],["hh:mm\nMM-dd",18e5],["hh:mm\nMM-dd",36e5],["hh:mm\nMM-dd",72e5],["hh:mm\nMM-dd",216e5],["hh:mm\nMM-dd",432e5],["MM-dd\nyyyy",pf],["MM-dd\nyyyy",1728e5],["MM-dd\nyyyy",2592e5],["MM-dd\nyyyy",3456e5],["MM-dd\nyyyy",432e6],["MM-dd\nyyyy",5184e5],["week",6048e5],["MM-dd\nyyyy",864e6],["week",12096e5],["week",18144e5],["month",26784e5],["week",36288e5],["month",53568e5],["week",36288e5],["quarter",8208e6],["month",107136e5],["month",13392e6],["half-year",16416e6],["month",214272e5],["month",26784e6],["year",32832e6]];ff.create=function(t){return new ff({useUTC:t.ecModel.get("useUTC")})};var mf=b,vf=Bp,yf=po,xf=af,_f=vf.prototype,bf=xf.prototype,wf=yf.getPrecisionSafe,Sf=yf.round,Mf=Math.floor,If=Math.ceil,Af=Math.pow,Tf=Math.log,Cf=vf.extend({type:"log",base:10,$constructor:function(){vf.apply(this,arguments),this._originalScale=new xf},getTicks:function(){var t=this._originalScale,e=this._extent,i=t.getExtent();return mf.map(bf.getTicks.call(this),(function(n){var a=yf.round(Af(this.base,n));return a=n===e[0]&&t.__fixMin?Lf(a,i[0]):a,a=n===e[1]&&t.__fixMax?Lf(a,i[1]):a}),this)},getLabel:bf.getLabel,scale:function(t){return t=_f.scale.call(this,t),Af(this.base,t)},setExtent:function(t,e){var i=this.base;t=Tf(t)/Tf(i),e=Tf(e)/Tf(i),bf.setExtent.call(this,t,e)},getExtent:function(){var t=this.base,e=_f.getExtent.call(this);e[0]=Af(t,e[0]),e[1]=Af(t,e[1]);var i=this._originalScale,n=i.getExtent();return i.__fixMin&&(e[0]=Lf(e[0],n[0])),i.__fixMax&&(e[1]=Lf(e[1],n[1])),e},unionExtent:function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=Tf(t[0])/Tf(e),t[1]=Tf(t[1])/Tf(e),_f.unionExtent.call(this,t)},unionExtentFromData:function(t,e){this.unionExtent(t.getDataExtent(e,!0,(function(t){return t>0})))},niceTicks:function(t){t=t||10;var e=this._extent,i=e[1]-e[0];if(!(i===1/0||i<=0)){var n=yf.quantity(i);for(t/i*n<=.5&&(n*=10);!isNaN(n)&&Math.abs(n)<1&&Math.abs(n)>0;)n*=10;var a=[yf.round(If(e[0]/n)*n),yf.round(Mf(e[1]/n)*n)];this._interval=n,this._niceExtent=a}},niceExtent:function(t){bf.niceExtent.call(this,t);var e=this._originalScale;e.__fixMin=t.fixMin,e.__fixMax=t.fixMax}});function Lf(t,e){return Sf(t,wf(e))}mf.each(["contain","normalize"],(function(t){Cf.prototype[t]=function(e){return e=Tf(e)/Tf(this.base),_f[t].call(this,e)}})),Cf.create=function(){return new Cf};var Df=b,Pf=Ni,kf=Zp,Of=af,zf=Bp,Ef=po;function Rf(t,e){var i,n,a,o=t.type,r=e.getMin(),s=e.getMax(),l=null!=r,h=null!=s,u=t.getExtent();return"ordinal"===o?i=(e.get("data")||[]).length:(n=e.get("boundaryGap"),Df.isArray(n)||(n=[n||0,n||0]),"boolean"==typeof n[0]&&(n=[0,0]),n[0]=Ef.parsePercent(n[0],1),n[1]=Ef.parsePercent(n[1],1),a=u[1]-u[0]||Math.abs(u[0])),null==r&&(r="ordinal"===o?i?0:NaN:u[0]-n[0]*a),null==s&&(s="ordinal"===o?i?i-1:NaN:u[1]+n[1]*a),"dataMin"===r?r=u[0]:"function"==typeof r&&(r=r({min:u[0],max:u[1]})),"dataMax"===s?s=u[1]:"function"==typeof s&&(s=s({min:u[0],max:u[1]})),(null==r||!isFinite(r))&&(r=NaN),(null==s||!isFinite(s))&&(s=NaN),t.setBlank(Df.eqNaN(r)||Df.eqNaN(s)),e.getNeedCrossZero()&&(r>0&&s>0&&!l&&(r=0),r<0&&s<0&&!h&&(s=0)),[r,s]}function Nf(t,e){return"category"===t.type?t.scale.getLabel(e):e}Rp.getScaleExtent=Rf,Rp.niceScaleExtent=function(t,e){var i=Rf(t,e),n=null!=e.getMin(),a=null!=e.getMax(),o=e.get("splitNumber");"log"===t.type&&(t.base=e.get("logBase"));var r=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:o,fixMin:n,fixMax:a,minInterval:"interval"===r||"time"===r?e.get("minInterval"):null,maxInterval:"interval"===r||"time"===r?e.get("maxInterval"):null});var s=e.get("interval");null!=s&&t.setInterval&&t.setInterval(s)},Rp.createScaleByModel=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new kf(t.getCategories(),[1/0,-1/0]);case"value":return new Of;default:return(zf.getClass(e)||Of).create(t)}},Rp.ifAxisCrossZero=function(t){var e=t.scale.getExtent(),i=e[0],n=e[1];return!(i>0&&n>0||i<0&&n<0)},Rp.getAxisLabelInterval=function(t,e,i,n,a){var o,r=0,s=0,l=(n-a)/180*Math.PI,h=1;e.length>40&&(h=Math.floor(e.length/40));for(var u=0;u<t.length;u+=h){var c=t[u],d=Pf.getBoundingRect(e[u],i,"center","top");d.x+=c*Math.cos(l),d.y+=c*Math.sin(l),d.width*=1.3,d.height*=1.3,o?o.intersect(d)?(s++,r=Math.max(r,s)):(o.union(d),s=0):o=d.clone()}return 0===r&&h>1?h:(r+1)*h-1},Rp.getFormattedLabels=function(t,e){var i,n=t.scale,a=n.getTicksLabels(),o=n.getTicks();return"string"==typeof e?(i=e,e=function(t){return i.replace("{value}",null!=t?t:"")},Df.map(a,e)):"function"==typeof e?Df.map(o,(function(i,n){return e(Nf(t,i),n)}),this):a},Rp.getAxisRawValue=Nf;var Vf=b,Bf=Rp;function Gf(t){return Vf.isObject(t)&&null!=t.value?t.value:t+""}var Wf={getFormattedLabels:function(){return Bf.getFormattedLabels(this.axis,this.get("axisLabel.formatter"))},getCategories:function(){return"category"===this.get("type")&&Vf.map(this.get("data"),Gf)},getMin:function(t){var e=this.option,i=t||null==e.rangeStart?e.min:e.rangeStart;return this.axis&&null!=i&&"dataMin"!==i&&"function"!=typeof i&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getMax:function(t){var e=this.option,i=t||null==e.rangeEnd?e.max:e.rangeEnd;return this.axis&&null!=i&&"dataMax"!==i&&"function"!=typeof i&&!Vf.eqNaN(i)&&(i=this.axis.scale.parse(i)),i},getNeedCrossZero:function(){var t=this.option;return null==t.rangeStart&&null==t.rangeEnd&&!t.scale},getCoordSysModel:Vf.noop,setRange:function(t,e){this.option.rangeStart=t,this.option.rangeEnd=e},resetRange:function(){this.option.rangeStart=this.option.rangeEnd=null}},Hf={},Ff=b,Zf=Bo,jf=Je,Uf=Zf.extendShape({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n+o),t.lineTo(i-a,n+o),t.closePath()}}),qf=Zf.extendShape({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(t,e){var i=e.cx,n=e.cy,a=e.width/2,o=e.height/2;t.moveTo(i,n-o),t.lineTo(i+a,n),t.lineTo(i,n+o),t.lineTo(i-a,n),t.closePath()}}),Xf=Zf.extendShape({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.x,n=e.y,a=e.width/5*3,o=Math.max(a,e.height),r=a/2,s=r*r/(o-r),l=n-o+r+s,h=Math.asin(s/r),u=Math.cos(h)*r,c=Math.sin(h),d=Math.cos(h),p=.6*r,f=.7*r;t.moveTo(i-u,l+s),t.arc(i,l,r,Math.PI-h,2*Math.PI+h),t.bezierCurveTo(i+u-c*p,l+s+d*p,i,n-f,i,n),t.bezierCurveTo(i,n-f,i-u+c*p,l+s+d*p,i-u,l+s),t.closePath()}}),Yf=Zf.extendShape({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(t,e){var i=e.height,n=e.width,a=e.x,o=e.y,r=n/3*2;t.moveTo(a,o),t.lineTo(a+r,o+i),t.lineTo(a,o+i/4*3),t.lineTo(a-r,o+i),t.lineTo(a,o),t.closePath()}}),$f={line:Zf.Line,rect:Zf.Rect,roundRect:Zf.Rect,square:Zf.Rect,circle:Zf.Circle,diamond:qf,pin:Xf,arrow:Yf,triangle:Uf},Kf={line:function(t,e,i,n,a){a.x1=t,a.y1=e+n/2,a.x2=t+i,a.y2=e+n/2},rect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n},roundRect:function(t,e,i,n,a){a.x=t,a.y=e,a.width=i,a.height=n,a.r=Math.min(i,n)/4},square:function(t,e,i,n,a){var o=Math.min(i,n);a.x=t,a.y=e,a.width=o,a.height=o},circle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.r=Math.min(i,n)/2},diamond:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n},pin:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},arrow:function(t,e,i,n,a){a.x=t+i/2,a.y=e+n/2,a.width=i,a.height=n},triangle:function(t,e,i,n,a){a.cx=t+i/2,a.cy=e+n/2,a.width=i,a.height=n}},Jf={};Ff.each($f,(function(t,e){Jf[e]=new t}));var Qf=Zf.extendShape({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},beforeBrush:function(){var t=this.style;"pin"===this.shape.symbolType&&"inside"===t.textPosition&&(t.textPosition=["50%","40%"],t.textAlign="center",t.textVerticalAlign="middle")},buildPath:function(t,e,i){var n=e.symbolType,a=Jf[n];"none"!==e.symbolType&&(a||(a=Jf[n="rect"]),Kf[n](e.x,e.y,e.width,e.height,a.shape),a.buildPath(t,a.shape,i))}});function tg(t,e){if("image"!==this.type){var i=this.style,n=this.shape;n&&"line"===n.symbolType?i.stroke=t:this.__isEmptyBrush?(i.stroke=t,i.fill=e||"#fff"):(i.fill&&(i.fill=t),i.stroke&&(i.stroke=t)),this.dirty(!1)}}Hf.createSymbol=function(t,e,i,n,a,o,r){var s,l=0===t.indexOf("empty");return l&&(t=t.substr(5,1).toLowerCase()+t.substr(6)),(s=0===t.indexOf("image://")?Zf.makeImage(t.slice(8),new jf(e,i,n,a),r?"center":"cover"):0===t.indexOf("path://")?Zf.makePath(t.slice(7),{},new jf(e,i,n,a),r?"center":"cover"):new Qf({shape:{symbolType:t,x:e,y:i,width:n,height:a}})).__isEmptyBrush=l,s.setColor=tg,s.setColor(o),s};var eg=b,ig=Ep,ng=Rp,ag=Wf,og=ou,rg=wp;Ud.completeDimensions=rg;var sg=Hf;Ud.createSymbol=sg.createSymbol,Ud.createList=function(t){var e=t.get("data");return ig(e,t,t.ecModel)},Ud.createScale=function(t,e){var i=e;e instanceof og||(i=new og(e),eg.mixin(i,ag));var n=ng.createScaleByModel(i);return n.setExtent(t[0],t[1]),ng.niceScaleExtent(n,i),n},Ud.mixinAxisModelCommonMethods=function(t){eg.mixin(t,ag)};var lg=b,hg=po,ug=Rp,cg=hg.linearMap;function dg(t,e){var i=(t[1]-t[0])/e/2;t[0]+=i,t[1]-=i}var pg=[0,1],fg=function(t,e,i){this.dim=t,this.scale=e,this._extent=i||[0,0],this.inverse=!1,this.onBand=!1,this._labelInterval};fg.prototype={constructor:fg,contain:function(t){var e=this._extent,i=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=i&&t<=n},containData:function(t){return this.contain(this.dataToCoord(t))},getExtent:function(){return this._extent.slice()},getPixelPrecision:function(t){return hg.getPixelPrecision(t||this.scale.getExtent(),this._extent)},setExtent:function(t,e){var i=this._extent;i[0]=t,i[1]=e},dataToCoord:function(t,e){var i=this._extent,n=this.scale;return t=n.normalize(t),this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count()),cg(t,pg,i,e)},coordToData:function(t,e){var i=this._extent,n=this.scale;this.onBand&&"ordinal"===n.type&&dg(i=i.slice(),n.count());var a=cg(t,i,pg,e);return this.scale.scale(a)},pointToData:function(t,e){},getTicksCoords:function(t){if(this.onBand&&!t){for(var e=this.getBands(),i=[],n=0;n<e.length;n++)i.push(e[n][0]);return e[n-1]&&i.push(e[n-1][1]),i}return lg.map(this.scale.getTicks(),this.dataToCoord,this)},getLabelsCoords:function(){return lg.map(this.scale.getTicks(),this.dataToCoord,this)},getBands:function(){for(var t=this.getExtent(),e=[],i=this.scale.count(),n=t[0],a=t[1]-n,o=0;o<i;o++)e.push([a*o/i+n,a*(o+1)/i+n]);return e},getBandWidth:function(){var t=this._extent,e=this.scale.getExtent(),i=e[1]-e[0]+(this.onBand?1:0);0===i&&(i=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/i},isHorizontal:null,getRotate:null,getLabelInterval:function(){var t=this._labelInterval;if(!t){var e=this.model,i=e.getModel("axisLabel");t=i.get("interval"),"category"!==this.type||null!=t&&"auto"!==t||(t=ug.getAxisLabelInterval(lg.map(this.scale.getTicks(),this.dataToCoord,this),e.getFormattedLabels(),i.getFont(),this.getRotate?this.getRotate():this.isHorizontal&&!this.isHorizontal()?90:0,i.get("rotate"))),this._labelInterval=t}return t}};var gg=fg,mg={},vg=jr;function yg(t,e){return Math.abs(t-e)<1e-8}mg.contain=function(t,e,i){var n=0,a=t[0];if(!a)return!1;for(var o=1;o<t.length;o++){var r=t[o];n+=vg(a[0],a[1],r[0],r[1],e,i),a=r}var s=t[0];return yg(a[0],s[0])&&yg(a[1],s[1])||(n+=vg(a[0],a[1],s[0],s[1],e,i)),0!==n};var xg=Je,_g=ir,bg=j,wg=mg;function Sg(t,e,i){if(this.name=t,this.geometries=e,i)i=[i[0],i[1]];else{var n=this.getBoundingRect();i=[n.x+n.width/2,n.y+n.height/2]}this.center=i}Sg.prototype={constructor:Sg,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;s<r.length;s++)if("polygon"===r[s].type){var l=r[s].exterior;_g.fromPoints(l,a,o),bg.min(i,i,a),bg.max(n,n,o)}return 0===s&&(i[0]=i[1]=n[0]=n[1]=0),this._rect=new xg(i[0],i[1],n[0]-i[0],n[1]-i[1])},contain:function(t){var e=this.getBoundingRect(),i=this.geometries;if(!e.contain(t[0],t[1]))return!1;t:for(var n=0,a=i.length;n<a;n++)if("polygon"===i[n].type){var o=i[n].exterior,r=i[n].interiors;if(wg.contain(o,t[0],t[1])){for(var s=0;s<(r?r.length:0);s++)if(wg.contain(r[s]))continue t;return!0}}return!1},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=a.width/a.height;i?n||(n=i/o):i=o*n;for(var r=new xg(t,e,i,n),s=a.calculateTransform(r),l=this.geometries,h=0;h<l.length;h++)if("polygon"===l[h].type){for(var u=l[h].exterior,c=l[h].interiors,d=0;d<u.length;d++)bg.applyTransform(u[d],u[d],s);for(var p=0;p<(c?c.length:0);p++)for(d=0;d<c[p].length;d++)bg.applyTransform(c[p][d],c[p][d],s)}(a=this._rect).copy(r),this.center=[a.x+a.width/2,a.y+a.height/2]}};var Mg=Sg,Ig=b,Ag=Mg;function Tg(t,e,i){for(var n=[],a=e[0],o=e[1],r=0;r<t.length;r+=2){var s=t.charCodeAt(r)-64,l=t.charCodeAt(r+1)-64;s=s>>1^-(1&s),l=l>>1^-(1&l),a=s+=a,o=l+=o,n.push([s/i,l/i])}return n}var Cg=function(t){return function(t){if(!t.UTF8Encoding)return t;var e=t.UTF8Scale;null==e&&(e=1024);for(var i=t.features,n=0;n<i.length;n++)for(var a=i[n].geometry,o=a.coordinates,r=a.encodeOffsets,s=0;s<o.length;s++){var l=o[s];if("Polygon"===a.type)o[s]=Tg(l,r[s],e);else if("MultiPolygon"===a.type)for(var h=0;h<l.length;h++){var u=l[h];l[h]=Tg(u,r[s][h],e)}}t.UTF8Encoding=!1}(t),Ig.map(Ig.filter(t.features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var e=t.properties,i=t.geometry,n=i.coordinates,a=[];"Polygon"===i.type&&a.push({type:"polygon",exterior:n[0],interiors:n.slice(1)}),"MultiPolygon"===i.type&&Ig.each(n,(function(t){t[0]&&a.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var o=new Ag(e.name,a,e.cp);return o.properties=e,o}))},Lg=v;jd.zrender=Lg;var Dg=mt;jd.matrix=Dg;var Pg=j;jd.vector=Pg;var kg=b,Og=Pt;jd.color=Og;var zg=Bo;jd.graphic=zg;var Eg=po;jd.number=Eg;var Rg=co;jd.format=Rg;var Ng=Ed;Ng.throttle,jd.throttle=Ng.throttle;var Vg=Ud;jd.helper=Vg;var Bg=dp;jd.List=Bg;var Gg=ou;jd.Model=Gg;var Wg=gg;jd.Axis=Wg;var Hg=_;jd.env=Hg;var Fg=Cg;jd.parseGeoJson=Fg;var Zg={};kg.each(["map","each","filter","indexOf","inherits","reduce","filter","bind","curry","isArray","isString","isObject","isFunction","extend","defaults","clone","merge"],(function(t){Zg[t]=kg[t]})),jd.util=Zg,function(t){var e=v,i=b,n=Pt,a=_,o=hi,r=rt,s=pc,l=mc,h=_c,u=kc,c=td,d=Zu,p=yd,f=Md,g=zd,m=Bo,y=uo,x=Ed.throttle,w=Gd,S=Zd,M=i.each,I=d.parseClassType,A={PROCESSOR:{FILTER:1e3,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,GLOBAL:2e3,CHART:3e3,COMPONENT:4e3,BRUSH:5e3}},T="__flagInMainProcess",C=/^[a-zA-Z0-9_]+$/;function L(t){return function(e,i,n){e=e&&e.toLowerCase(),r.prototype[t].call(this,e,i,n)}}function D(){r.call(this)}function P(t,n,a){a=a||{},"string"==typeof n&&(n=it[n]),this.id,this.group,this._dom=t;var s,u,d=this._zr=e.init(t,{renderer:a.renderer||"canvas",devicePixelRatio:a.devicePixelRatio,width:a.width,height:a.height});function p(t,e){return t.prio-e.prio}this._throttledZrFlush=x(i.bind(d.flush,d),17),(n=i.clone(n))&&c(n,!0),this._theme=n,this._chartsViews=[],this._chartsMap={},this._componentsViews=[],this._componentsMap={},this._coordSysMgr=new h,this._api=(u=(s=this)._coordSysMgr,i.extend(new l(s),{getCoordinateSystems:i.bind(u.getCoordinateSystems,u),getComponentByElement:function(t){for(;t;){var e=t.__ecComponentInfo;if(null!=e)return s._model.getComponent(e.mainType,e.index);t=t.parent}}})),r.call(this),this._messageCenter=new D,this._initEvents(),this.resize=i.bind(this.resize,this),this._pendingActions=[],o(et,p),o(J,p),d.animation.on("frame",this._onframe,this),i.setAsPrimitive(this)}D.prototype.on=L("on"),D.prototype.off=L("off"),D.prototype.one=L("one"),i.mixin(D,r);var k=P.prototype;function O(t,e,i){var n,a=this._model,o=this._coordSysMgr.getCoordinateSystems();e=y.parseFinder(a,e);for(var r=0;r<o.length;r++){var s=o[r];if(s[t]&&null!=(n=s[t](a,e,i)))return n}}k._onframe=function(){if(this.__optionUpdated){var t=this.__optionUpdated.silent;this[T]=!0,z.prepareAndUpdate.call(this),this[T]=!1,this.__optionUpdated=!1,N.call(this,t),V.call(this,t)}},k.getDom=function(){return this._dom},k.getZr=function(){return this._zr},k.setOption=function(t,e,n){var a;if(i.isObject(e)&&(n=e.lazyUpdate,a=e.silent,e=e.notMerge),this[T]=!0,!this._model||e){var o=new u(this._api),r=this._theme;(this._model=new s(null,null,r,o)).init(null,null,r,o)}this._model.setOption(t,Q),n?(this.__optionUpdated={silent:a},this[T]=!1):(z.prepareAndUpdate.call(this),this._zr.flush(),this.__optionUpdated=!1,this[T]=!1,N.call(this,a),V.call(this,a))},k.setTheme=function(){},k.getModel=function(){return this._model},k.getOption=function(){return this._model&&this._model.getOption()},k.getWidth=function(){return this._zr.getWidth()},k.getHeight=function(){return this._zr.getHeight()},k.getDevicePixelRatio=function(){return this._zr.painter.dpr||window.devicePixelRatio||1},k.getRenderedCanvas=function(t){if(a.canvasSupported){(t=t||{}).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor");var e=this._zr,n=e.storage.getDisplayList();return i.each(n,(function(t){t.stopAnimation(!0)})),e.painter.getRenderedCanvas(t)}},k.getSvgDataUrl=function(){if(a.svgSupported){var t=this._zr,e=t.storage.getDisplayList();return i.each(e,(function(t){t.stopAnimation(!0)})),t.painter.pathToSvg()}},k.getDataURL=function(t){var e=(t=t||{}).excludeComponents,i=this._model,n=[],a=this;M(e,(function(t){i.eachComponent({mainType:t},(function(t){var e=a._componentsMap[t.__viewId];e.group.ignore||(n.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataUrl():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return M(n,(function(t){t.group.ignore=!1})),o},k.getConnectedDataURL=function(t){if(a.canvasSupported){var n=this.group,o=Math.min,r=Math.max,s=1/0;if(ot[n]){var l=s,h=s,u=-1/0,c=-1/0,d=[],p=t&&t.pixelRatio||1;i.each(at,(function(e,a){if(e.group===n){var s=e.getRenderedCanvas(i.clone(t)),p=e.getDom().getBoundingClientRect();l=o(p.left,l),h=o(p.top,h),u=r(p.right,u),c=r(p.bottom,c),d.push({dom:s,left:p.left,top:p.top})}}));var f=(u*=p)-(l*=p),g=(c*=p)-(h*=p),v=i.createCanvas();v.width=f,v.height=g;var y=e.init(v);return M(d,(function(t){var e=new m.Image({style:{x:t.left*p-l,y:t.top*p-h,image:t.dom}});y.add(e)})),y.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},k.convertToPixel=i.curry(O,"convertToPixel"),k.convertFromPixel=i.curry(O,"convertFromPixel"),k.containPixel=function(t,e){var n,a=this._model;return t=y.parseFinder(a,t),i.each(t,(function(t,a){a.indexOf("Models")>=0&&i.each(t,(function(t){var i=t.coordinateSystem;if(i&&i.containPoint)n|=!!i.containPoint(e);else if("seriesModels"===a){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n|=o.containPoint(e,t))}}),this)}),this),!!n},k.getVisual=function(t,e){var i=this._model,n=(t=y.parseFinder(i,t,{defaultMainType:"series"})).seriesModel.getData(),a=t.hasOwnProperty("dataIndexInside")?t.dataIndexInside:t.hasOwnProperty("dataIndex")?n.indexOfRawIndex(t.dataIndex):null;return null!=a?n.getItemVisual(a,e):n.getVisual(e)},k.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},k.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]};var z={update:function(t){var e=this._model,i=this._api,o=this._coordSysMgr,r=this._zr;if(e){e.restoreData(),o.create(this._model,this._api),W.call(this,e,i),H.call(this,e),o.update(e,i),Z.call(this,e,t),j.call(this,e,t);var s=e.get("backgroundColor")||"transparent",l=r.painter;if(l.isSingleCanvas&&l.isSingleCanvas())r.configLayer(0,{clearColor:s});else{if(!a.canvasSupported){var h=n.parse(s);s=n.stringify(h,"rgb"),0===h[3]&&(s="transparent")}s.colorStops||s.image?(r.configLayer(0,{clearColor:s}),this.__hasGradientOrPatternBg=!0,this._dom.style.background="transparent"):(this.__hasGradientOrPatternBg&&r.configLayer(0,{clearColor:null}),this.__hasGradientOrPatternBg=!1,this._dom.style.background=s)}M(tt,(function(t){t(e,i)}))}},updateView:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t),B.call(this,"updateView",e,t))},updateVisual:function(t){var e=this._model;e&&(e.eachSeries((function(t){t.getData().clearAllVisual()})),Z.call(this,e,t,!0),B.call(this,"updateVisual",e,t))},updateLayout:function(t){var e=this._model;e&&(F.call(this,e,t),B.call(this,"updateLayout",e,t))},prepareAndUpdate:function(t){var e=this._model;G.call(this,"component",e),G.call(this,"chart",e),z.update.call(this,t)}};function E(t,e,i,n,a){var o=t._model;if(n){var r={};r[n+"Id"]=i[n+"Id"],r[n+"Index"]=i[n+"Index"],r[n+"Name"]=i[n+"Name"];var s={mainType:n,query:r};a&&(s.subType=a),o&&o.eachComponent(s,(function(e,i){l(t["series"===n?"_chartsMap":"_componentsMap"][e.__viewId])}),t)}else M(t._componentsViews.concat(t._chartsViews),l);function l(n){n&&n.__alive&&n[e]&&n[e](n.__model,o,t._api,i)}}function R(t,e){var n=t.type,a=t.escapeConnect,o=$[n],r=o.actionInfo,s=(r.update||"update").split(":"),l=s.pop();s=null!=s[0]&&I(s[0]),this[T]=!0;var h=[t],u=!1;t.batch&&(u=!0,h=i.map(t.batch,(function(e){return(e=i.defaults(i.extend({},e),t)).batch=null,e})));var c,d=[],p="highlight"===n||"downplay"===n;M(h,(function(t){(c=(c=o.action(t,this._model,this._api))||i.extend({},t)).type=r.event||c.type,d.push(c),p?E(this,l,t,"series"):s&&E(this,l,t,s.main,s.sub)}),this),"none"===l||p||s||(this.__optionUpdated?(z.prepareAndUpdate.call(this,t),this.__optionUpdated=!1):z[l].call(this,t)),c=u?{type:r.event||n,escapeConnect:a,batch:d}:d[0],this[T]=!1,!e&&this._messageCenter.trigger(c.type,c)}function N(t){for(var e=this._pendingActions;e.length;){var i=e.shift();R.call(this,i,t)}}function V(t){!t&&this.trigger("updated")}function B(t,e,i){var n=this._api;M(this._componentsViews,(function(a){var o=a.__model;a[t](o,e,n,i),Y(o,a)}),this),e.eachSeries((function(a,o){var r=this._chartsMap[a.__viewId];r[t](a,e,n,i),Y(a,r),X(a,r)}),this),q(this._zr,e),M(tt,(function(t){t(e,n)}))}function G(t,e){for(var i="component"===t,n=i?this._componentsViews:this._chartsViews,a=i?this._componentsMap:this._chartsMap,o=this._zr,r=0;r<n.length;r++)n[r].__alive=!1;e[i?"eachComponent":"eachSeries"]((function(t,r){if(i){if("series"===t)return}else r=t;var s="_ec_"+r.id+"_"+r.type,l=a[s];if(!l){var h=I(r.type),u=i?f.getClass(h.main,h.sub):g.getClass(h.sub);if(!u)return;(l=new u).init(e,this._api),a[s]=l,n.push(l),o.add(l.group)}r.__viewId=l.__id=s,l.__alive=!0,l.__model=r,l.group.__ecComponentInfo={mainType:r.mainType,index:r.componentIndex}}),this);for(r=0;r<n.length;){var s=n[r];s.__alive?r++:(o.remove(s.group),s.dispose(e,this._api),n.splice(r,1),delete a[s.__id],s.__id=s.group.__ecComponentInfo=null)}}function W(t,e){M(J,(function(i){i.func(t,e)}))}function H(t){var e={};t.eachSeries((function(t){var i=t.get("stack"),n=t.getData();if(i&&"list"===n.type){var a=e[i];e.hasOwnProperty(i)&&a&&(n.stackedOn=a),e[i]=n}}))}function F(t,e){var i=this._api;M(et,(function(n){n.isLayout&&n.func(t,i,e)}))}function Z(t,e,i){var n=this._api;t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()})),M(et,(function(a){(!i||!a.isLayout)&&a.func(t,n,e)}))}function j(t,e){var i=this._api;M(this._componentsViews,(function(n){var a=n.__model;n.render(a,t,i,e),Y(a,n)}),this),M(this._chartsViews,(function(t){t.__alive=!1}),this),t.eachSeries((function(n,a){var o=this._chartsMap[n.__viewId];o.__alive=!0,o.render(n,t,i,e),o.group.silent=!!n.get("silent"),Y(n,o),X(n,o)}),this),q(this._zr,t),M(this._chartsViews,(function(e){e.__alive||e.remove(t,i)}),this)}k.resize=function(t){this[T]=!0,this._zr.resize(t);var e=this._model&&this._model.resetOption("media");z[e?"prepareAndUpdate":"update"].call(this),this._loadingFX&&this._loadingFX.resize(),this[T]=!1;var i=t&&t.silent;N.call(this,i),V.call(this,i)},k.showLoading=function(t,e){if(i.isObject(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),nt[t]){var n=nt[t](this._api,e),a=this._zr;this._loadingFX=n,a.add(n)}},k.hideLoading=function(){this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},k.makeActionFromEvent=function(t){var e=i.extend({},t);return e.type=K[t.type],e},k.dispatchAction=function(t,e){i.isObject(e)||(e={silent:!!e}),$[t.type]&&this._model&&(this[T]?this._pendingActions.push(t):(R.call(this,t,e.silent),e.flush?this._zr.flush(!0):!1!==e.flush&&a.browser.weChat&&this._throttledZrFlush(),N.call(this,e.silent),V.call(this,e.silent)))},k.on=L("on"),k.off=L("off"),k.one=L("one");var U=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function q(t,e){var i=t.storage,n=0;i.traverse((function(t){t.isGroup||n++})),n>e.get("hoverLayerThreshold")&&!a.node&&i.traverse((function(t){t.isGroup||(t.useHoverLayer=!0)}))}function X(t,e){var i=0;e.group.traverse((function(t){"group"===t.type||t.ignore||i++}));var n=+t.get("progressive"),o=i>t.get("progressiveThreshold")&&n&&!a.node;o&&e.group.traverse((function(t){t.isGroup||(t.progressive=o?Math.floor(i++/n):-1,o&&t.stopAnimation(!0))}));var r=t.get("blendMode")||null;e.group.traverse((function(t){t.isGroup||t.setStyle("blend",r)}))}function Y(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))}))}k._initEvents=function(){M(U,(function(t){this._zr.on(t,(function(e){var n,a=this.getModel(),o=e.target;if("globalout"===t)n={};else if(o&&null!=o.dataIndex){var r=o.dataModel||a.getSeriesByIndex(o.seriesIndex);n=r&&r.getDataParams(o.dataIndex,o.dataType)||{}}else o&&o.eventData&&(n=i.extend({},o.eventData));n&&(n.event=e,n.type=t,this.trigger(t,n))}),this)}),this),M(K,(function(t,e){this._messageCenter.on(e,(function(t){this.trigger(e,t)}),this)}),this)},k.isDisposed=function(){return this._disposed},k.clear=function(){this.setOption({series:[]},!0)},k.dispose=function(){if(!this._disposed){this._disposed=!0;var t=this._api,e=this._model;M(this._componentsViews,(function(i){i.dispose(e,t)})),M(this._chartsViews,(function(i){i.dispose(e,t)})),this._zr.dispose(),delete at[this.id]}},i.mixin(P,r);var $={},K={},J=[],Q=[],tt=[],et=[],it={},nt={},at={},ot={},st=new Date-0,lt=new Date-0,ht="_echarts_instance_",ut={};function ct(t){ot[t]=!1}var dt=ct;function pt(t){var e;return e=t.getAttribute?t.getAttribute(ht):t._echarts_instance_,at[e]}function ft(t){Q.push(t)}function gt(t,e,n){"function"==typeof e&&(n=e,e="");var a=i.isObject(t)?t.type:[t,t={event:e}][0];t.event=(t.event||a).toLowerCase(),e=t.event,i.assert(C.test(a)&&C.test(e)),$[a]||($[a]={action:n,actionInfo:t}),K[e]=a}function mt(t,e){"function"==typeof t&&(e=t,t=3e3),et.push({prio:t,func:e})}function vt(t,e){nt[t]=e}mt(2e3,w),ft(c),vt("default",S),gt({type:"highlight",event:"highlight",update:"highlight"},i.noop),gt({type:"downplay",event:"downplay",update:"downplay"},i.noop);t.version="3.8.5",t.dependencies={zrender:"3.7.4"},t.PRIORITY=A,t.init=function(t,e,n){var a=pt(t);if(a)return a;var o=new P(t,e,n);return o.id="ec_"+st++,at[o.id]=o,t.setAttribute?t.setAttribute(ht,o.id):t._echarts_instance_=o.id,function(t){var e="__connectUpdateStatus";function n(t,i){for(var n=0;n<t.length;n++)t[n][e]=i}i.each(K,(function(a,o){t._messageCenter.on(o,(function(a){if(ot[t.group]&&0!==t[e]){if(a&&a.escapeConnect)return;var o=t.makeActionFromEvent(a),r=[];i.each(at,(function(e){e!==t&&e.group===t.group&&r.push(e)})),n(r,0),M(r,(function(t){1!==t[e]&&t.dispatchAction(o)})),n(r,2)}}))}))}(o),o},t.connect=function(t){if(i.isArray(t)){var e=t;t=null,i.each(e,(function(e){null!=e.group&&(t=e.group)})),t=t||"g_"+lt++,i.each(e,(function(e){e.group=t}))}return ot[t]=!0,t},t.disConnect=ct,t.disconnect=dt,t.dispose=function(t){"string"==typeof t?t=at[t]:t instanceof P||(t=pt(t)),t instanceof P&&!t.isDisposed()&&t.dispose()},t.getInstanceByDom=pt,t.getInstanceById=function(t){return at[t]},t.registerTheme=function(t,e){it[t]=e},t.registerPreprocessor=ft,t.registerProcessor=function(t,e){"function"==typeof t&&(e=t,t=1e3),J.push({prio:t,func:e})},t.registerPostUpdate=function(t){tt.push(t)},t.registerAction=gt,t.registerCoordinateSystem=function(t,e){h.register(t,e)},t.getCoordinateSystemDimensions=function(t){var e=h.get(t);if(e)return e.getDimensionsInfo?e.getDimensionsInfo():e.dimensions.slice()},t.registerLayout=function(t,e){"function"==typeof t&&(e=t,t=1e3),et.push({prio:t,func:e,isLayout:!0})},t.registerVisual=mt,t.registerLoading=vt,t.extendComponentModel=function(t){return d.extend(t)},t.extendComponentView=function(t){return f.extend(t)},t.extendSeriesModel=function(t){return p.extend(t)},t.extendChartView=function(t){return g.extend(t)},t.setCanvasCreator=function(t){i.$override("createCanvas",t)},t.registerMap=function(t,e,i){e.geoJson&&!e.features&&(i=e.specialAreas,e=e.geoJson),"string"==typeof e&&(e="undefined"!=typeof JSON&&JSON.parse?JSON.parse(e):new Function("return ("+e+");")()),ut[t]={geoJson:e,specialAreas:i}},t.getMap=function(t){return ut[t]},t.dataTool={};var yt=jd;!function(){for(var e in yt)yt.hasOwnProperty(e)&&(t[e]=yt[e])}()}(m);var jg=Ep;yd.extend({type:"series.line",dependencies:["grid","polar"],getInitialData:function(t,e){return jg(t.data,this,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,clipOverflow:!0,label:{normal:{position:"top"}},lineStyle:{normal:{width:2,type:"solid"}},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:!1,connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0}});var Ug={},qg=uo.otherDimToDataDim;Ug.findLabelValueDim=function(t){var e,i=qg(t,"label");if(i.length)e=i[0];else for(var n,a=t.dimensions.slice();a.length&&(e=a.pop(),"ordinal"===(n=t.getDimensionInfo(e).type)||"time"===n););return e};var Xg=b,Yg=Hf.createSymbol,$g=Bo,Kg=po.parsePercent,Jg=Ug.findLabelValueDim;function Qg(t){return[t[0]/2,t[1]/2]}function tm(t,e,i){$g.Group.call(this),this.updateData(t,e,i)}var em=tm.prototype;function im(t,e){this.parent.drift(t,e)}em._createSymbol=function(t,e,i,n){this.removeAll();var a=e.getItemVisual(i,"color"),o=Yg(t,-1,-1,2,2,a);o.attr({z2:100,culling:!0,scale:Qg(n)}),o.drift=im,this._symbolType=t,this.add(o)},em.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(t)},em.getSymbolPath=function(){return this.childAt(0)},em.getScale=function(){return this.childAt(0).scale},em.highlight=function(){this.childAt(0).trigger("emphasis")},em.downplay=function(){this.childAt(0).trigger("normal")},em.setZ=function(t,e){var i=this.childAt(0);i.zlevel=t,i.z=e},em.setDraggable=function(t){var e=this.childAt(0);e.draggable=t,e.cursor=t?"move":"pointer"},em.updateData=function(t,e,i){this.silent=!1;var n=t.getItemVisual(e,"symbol")||"circle",a=t.hostModel,o=function(t,e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array?i.slice():[+i,+i]}(t,e),r=n!==this._symbolType;r?this._createSymbol(n,t,e,o):((s=this.childAt(0)).silent=!1,$g.updateProps(s,{scale:Qg(o)},a,e));if(this._updateCommon(t,e,o,i),r){var s=this.childAt(0),l=i&&i.fadeIn,h={scale:s.scale.slice()};l&&(h.style={opacity:s.style.opacity}),s.scale=[0,0],l&&(s.style.opacity=0),$g.initProps(s,h,a,e)}this._seriesModel=a};var nm=["itemStyle","normal"],am=["itemStyle","emphasis"],om=["label","normal"],rm=["label","emphasis"];em._updateCommon=function(t,e,i,n){var a=this.childAt(0),o=t.hostModel,r=t.getItemVisual(e,"color");"image"!==a.type&&a.useStyle({strokeNoScale:!0});var s=n&&n.itemStyle,l=n&&n.hoverItemStyle,h=n&&n.symbolRotate,u=n&&n.symbolOffset,c=n&&n.labelModel,d=n&&n.hoverLabelModel,p=n&&n.hoverAnimation,f=n&&n.cursorStyle;if(!n||t.hasItemOption){var g=n&&n.itemModel?n.itemModel:t.getItemModel(e);s=g.getModel(nm).getItemStyle(["color"]),l=g.getModel(am).getItemStyle(),h=g.getShallow("symbolRotate"),u=g.getShallow("symbolOffset"),c=g.getModel(om),d=g.getModel(rm),p=g.getShallow("hoverAnimation"),f=g.getShallow("cursor")}else l=Xg.extend({},l);var m=a.style;a.attr("rotation",(h||0)*Math.PI/180||0),u&&a.attr("position",[Kg(u[0],i[0]),Kg(u[1],i[1])]),f&&a.attr("cursor",f),a.setColor(r,n&&n.symbolInnerColor),a.setStyle(s);var v=t.getItemVisual(e,"opacity");null!=v&&(m.opacity=v);var y=n&&n.useNameLabel,x=!y&&Jg(t);(y||null!=x)&&$g.setLabelStyle(m,l,c,d,{labelFetcher:o,labelDataIndex:e,defaultText:y?t.getName(e):t.get(x,e),isRectText:!0,autoColor:r}),a.off("mouseover").off("mouseout").off("emphasis").off("normal"),a.hoverStyle=l,$g.setHoverStyle(a);var _=Qg(i);if(p&&o.isAnimationEnabled()){var b=function(){var t=_[1]/_[0];this.animateTo({scale:[Math.max(1.1*_[0],_[0]+3),Math.max(1.1*_[1],_[1]+3*t)]},400,"elasticOut")},w=function(){this.animateTo({scale:_},400,"elasticOut")};a.on("mouseover",b).on("mouseout",w).on("emphasis",b).on("normal",w)}},em.fadeOut=function(t,e){var i=this.childAt(0);this.silent=i.silent=!0,(!e||!e.keepLabel)&&(i.style.text=null),$g.updateProps(i,{style:{opacity:0},scale:[0,0]},this._seriesModel,this.dataIndex,t)},Xg.inherits(tm,$g.Group);var sm=tm,lm=Bo,hm=sm;function um(t){this.group=new lm.Group,this._symbolCtor=t||hm}var cm=um.prototype;function dm(t,e,i){var n=t.getItemLayout(e);return n&&!isNaN(n[0])&&!isNaN(n[1])&&!(i&&i(e))&&"none"!==t.getItemVisual(e,"symbol")}cm.updateData=function(t,e){var i=this.group,n=t.hostModel,a=this._data,o=this._symbolCtor,r={itemStyle:n.getModel("itemStyle.normal").getItemStyle(["color"]),hoverItemStyle:n.getModel("itemStyle.emphasis").getItemStyle(),symbolRotate:n.get("symbolRotate"),symbolOffset:n.get("symbolOffset"),hoverAnimation:n.get("hoverAnimation"),labelModel:n.getModel("label.normal"),hoverLabelModel:n.getModel("label.emphasis"),cursorStyle:n.get("cursor")};t.diff(a).add((function(n){var a=t.getItemLayout(n);if(dm(t,n,e)){var s=new o(t,n,r);s.attr("position",a),t.setItemGraphicEl(n,s),i.add(s)}})).update((function(s,l){var h=a.getItemGraphicEl(l),u=t.getItemLayout(s);dm(t,s,e)?(h?(h.updateData(t,s,r),lm.updateProps(h,{position:u},n)):(h=new o(t,s)).attr("position",u),i.add(h),t.setItemGraphicEl(s,h)):i.remove(h)})).remove((function(t){var e=a.getItemGraphicEl(t);e&&e.fadeOut((function(){i.remove(e)}))})).execute(),this._data=t},cm.updateLayout=function(){var t=this._data;t&&t.eachItemGraphicEl((function(e,i){var n=t.getItemLayout(i);e.attr("position",n)}))},cm.remove=function(t){var e=this.group,i=this._data;i&&(t?i.eachItemGraphicEl((function(t){t.fadeOut((function(){e.remove(t)}))})):e.removeAll())};var pm=um;function fm(t){return t>=0?1:-1}function gm(t,e,i){for(var n,a=t.getBaseAxis(),o=t.getOtherAxis(a),r=a.onZero?0:o.scale.getExtent()[0],s=o.dim,l="x"===s||"radius"===s?1:0,h=e.stackedOn,u=e.get(s,i);h&&fm(h.get(s,i))===fm(u);){n=h;break}var c=[];return c[l]=e.get(a.dim,i),c[1-l]=n?n.get(s,i,!0):r,t.dataToPoint(c)}var mm=function(t,e,i,n,a,o){for(var r=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),s=[],l=[],h=[],u=[],c=[],d=[],p=[],f=o.dimensions,g=0;g<r.length;g++){var m=r[g],v=!0;switch(m.cmd){case"=":var y=t.getItemLayout(m.idx),x=e.getItemLayout(m.idx1);(isNaN(y[0])||isNaN(y[1]))&&(y=x.slice()),s.push(y),l.push(x),h.push(i[m.idx]),u.push(n[m.idx1]),p.push(e.getRawIndex(m.idx1));break;case"+":var _=m.idx;s.push(a.dataToPoint([e.get(f[0],_,!0),e.get(f[1],_,!0)])),l.push(e.getItemLayout(_).slice()),h.push(gm(a,e,_)),u.push(n[_]),p.push(e.getRawIndex(_));break;case"-":_=m.idx;var b=t.getRawIndex(_);b!==_?(s.push(t.getItemLayout(_)),l.push(o.dataToPoint([t.get(f[0],_,!0),t.get(f[1],_,!0)])),h.push(i[_]),u.push(gm(o,t,_)),p.push(b)):v=!1}v&&(c.push(m),d.push(d.length))}d.sort((function(t,e){return p[t]-p[e]}));var w=[],S=[],M=[],I=[],A=[];for(g=0;g<d.length;g++){_=d[g];w[g]=s[_],S[g]=l[_],M[g]=h[_],I[g]=u[_],A[g]=c[_]}return{current:w,next:S,stackedOnCurrent:M,stackedOnNext:I,status:A}},vm={},ym=ms,xm=j,_m=Us,bm=xm.min,wm=xm.max,Sm=xm.scaleAndAdd,Mm=xm.copy,Im=[],Am=[],Tm=[];function Cm(t){return isNaN(t[0])||isNaN(t[1])}function Lm(t,e,i,n,a,o,r,s,l,h,u){for(var c=0,d=i,p=0;p<n;p++){var f=e[d];if(d>=a||d<0)break;if(Cm(f)){if(u){d+=o;continue}break}if(d===i)t[o>0?"moveTo":"lineTo"](f[0],f[1]),Mm(Am,f);else if(l>0){var g=d+o,m=e[g];if(u)for(;m&&Cm(e[g]);)m=e[g+=o];var v=.5,y=e[c];if(!(m=e[g])||Cm(m))Mm(Tm,f);else{var x,_;if(Cm(m)&&!u&&(m=f),xm.sub(Im,m,y),"x"===h||"y"===h){var b="x"===h?0:1;x=Math.abs(f[b]-y[b]),_=Math.abs(f[b]-m[b])}else x=xm.dist(f,y),_=xm.dist(f,m);Sm(Tm,f,Im,-l*(1-(v=_/(_+x))))}bm(Am,Am,s),wm(Am,Am,r),bm(Tm,Tm,s),wm(Tm,Tm,r),t.bezierCurveTo(Am[0],Am[1],Tm[0],Tm[1],f[0],f[1]),Sm(Am,f,Im,l*v)}else t.lineTo(f[0],f[1]);c=d,d+=o}return p}function Dm(t,e){var i=[1/0,1/0],n=[-1/0,-1/0];if(e)for(var a=0;a<t.length;a++){var o=t[a];o[0]<i[0]&&(i[0]=o[0]),o[1]<i[1]&&(i[1]=o[1]),o[0]>n[0]&&(n[0]=o[0]),o[1]>n[1]&&(n[1]=o[1])}return{min:e?i:n,max:e?n:i}}var Pm=ym.extend({type:"ec-polyline",shape:{points:[],smooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},style:{fill:null,stroke:"#000"},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=0,a=i.length,o=Dm(i,e.smoothConstraint);if(e.connectNulls){for(;a>0&&Cm(i[a-1]);a--);for(;n<a&&Cm(i[n]);n++);}for(;n<a;)n+=Lm(t,i,n,a,a,1,o.min,o.max,e.smooth,e.smoothMonotone,e.connectNulls)+1}}),km=ym.extend({type:"ec-polygon",shape:{points:[],stackedOnPoints:[],smooth:0,stackedOnSmooth:0,smoothConstraint:!0,smoothMonotone:null,connectNulls:!1},brush:_m(ym.prototype.brush),buildPath:function(t,e){var i=e.points,n=e.stackedOnPoints,a=0,o=i.length,r=e.smoothMonotone,s=Dm(i,e.smoothConstraint),l=Dm(n,e.smoothConstraint);if(e.connectNulls){for(;o>0&&Cm(i[o-1]);o--);for(;a<o&&Cm(i[a]);a++);}for(;a<o;){var h=Lm(t,i,a,o,o,1,s.min,s.max,e.smooth,r,e.connectNulls);Lm(t,n,a+h-1,h,o,-1,l.min,l.max,e.stackedOnSmooth,r,e.connectNulls),a+=h+1,t.closePath()}}});vm.Polyline=Pm,vm.Polygon=km;var Om=b,zm=pm,Em=sm,Rm=mm,Nm=Bo,Vm=uo,Bm=vm,Gm=Bm.Polyline,Wm=Bm.Polygon,Hm=zd;function Fm(t,e){if(t.length===e.length){for(var i=0;i<t.length;i++){var n=t[i],a=e[i];if(n[0]!==a[0]||n[1]!==a[1])return}return!0}}function Zm(t){return"number"==typeof t?t:t?.3:0}function jm(t){var e=t.getGlobalExtent();if(t.onBand){var i=t.getBandWidth()/2-1,n=e[1]>e[0]?1:-1;e[0]+=n*i,e[1]-=n*i}return e}function Um(t){return t>=0?1:-1}function qm(t,e,i){return"polar"===t.type?function(t,e,i){var n=t.getAngleAxis(),a=t.getRadiusAxis().getExtent(),o=n.getExtent(),r=Math.PI/180,s=new Nm.Sector({shape:{cx:t.cx,cy:t.cy,r0:a[0],r:a[1],startAngle:-o[0]*r,endAngle:-o[1]*r,clockwise:n.inverse}});return e&&(s.shape.endAngle=-o[0]*r,Nm.initProps(s,{shape:{endAngle:-o[1]*r}},i)),s}(t,e,i):function(t,e,i){var n=jm(t.getAxis("x")),a=jm(t.getAxis("y")),o=t.getBaseAxis().isHorizontal(),r=Math.min(n[0],n[1]),s=Math.min(a[0],a[1]),l=Math.max(n[0],n[1])-r,h=Math.max(a[0],a[1])-s,u=i.get("lineStyle.normal.width")||2,c=i.get("clipOverflow")?u/2:Math.max(l,h);o?(s-=c,h+=2*c):(r-=c,l+=2*c);var d=new Nm.Rect({shape:{x:r,y:s,width:l,height:h}});return e&&(d.shape[o?"width":"height"]=0,Nm.initProps(d,{shape:{width:l,height:h}},i)),d}(t,e,i)}function Xm(t,e,i){for(var n=e.getBaseAxis(),a="x"===n.dim||"radius"===n.dim?0:1,o=[],r=0;r<t.length-1;r++){var s=t[r+1],l=t[r];o.push(l);var h=[];switch(i){case"end":h[a]=s[a],h[1-a]=l[1-a],o.push(h);break;case"middle":var u=(l[a]+s[a])/2,c=[];h[a]=c[a]=u,h[1-a]=l[1-a],c[1-a]=s[1-a],o.push(h),o.push(c);break;default:h[a]=l[a],h[1-a]=s[1-a],o.push(h)}}return t[r]&&o.push(t[r]),o}Hm.extend({type:"line",init:function(){var t=new Nm.Group,e=new zm;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.normal"),s=t.getModel("areaStyle.normal"),l=o.mapArray(o.getItemLayout,!0),h="polar"===n.type,u=this._coordSys,c=this._symbolDraw,d=this._polyline,p=this._polygon,f=this._lineGroup,g=t.get("animation"),m=!s.isEmpty(),v=function(t,e){var i=t.getBaseAxis(),n=t.getOtherAxis(i),a=0;if(!i.onZero){var o=n.scale.getExtent();o[0]>0?a=o[0]:o[1]<0&&(a=o[1])}var r=n.dim,s="x"===r||"radius"===r?1:0;return e.mapArray([r],(function(n,o){for(var l,h=e.stackedOn;h&&Um(h.get(r,o))===Um(n);){l=h;break}var u=[];return u[s]=e.get(i.dim,o),u[1-s]=l?l.get(r,o,!0):a,t.dataToPoint(u)}),!0)}(n,o),y=t.get("showSymbol"),x=y&&!h&&!t.get("showAllSymbol")&&this._getSymbolIgnoreFunc(o,n),_=this._data;_&&_.eachItemGraphicEl((function(t,e){t.__temp&&(a.remove(t),_.setItemGraphicEl(e,null))})),y||c.remove(),a.add(f);var b=!h&&t.get("step");d&&u.type===n.type&&b===this._step?(m&&!p?p=this._newPolygon(l,v,n,g):p&&!m&&(f.remove(p),p=this._polygon=null),f.setClipPath(qm(n,!1,t)),y&&c.updateData(o,x),o.eachItemGraphicEl((function(t){t.stopAnimation(!0)})),Fm(this._stackedOnPoints,v)&&Fm(this._points,l)||(g?this._updateAnimation(o,v,n,i,b):(b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d.setShape({points:l}),p&&p.setShape({points:l,stackedOnPoints:v})))):(y&&c.updateData(o,x),b&&(l=Xm(l,n,b),v=Xm(v,n,b)),d=this._newPolyline(l,n,g),m&&(p=this._newPolygon(l,v,n,g)),f.setClipPath(qm(n,!0,t)));var w=function(t,e){var i=t.getVisual("visualMeta");if(i&&i.length&&t.count()){for(var n,a=i.length-1;a>=0;a--)if(i[a].dimension<2){n=i[a];break}if(n&&"cartesian2d"===e.type){var o=n.dimension,r=t.dimensions[o],s=e.getAxis(r),l=Om.map(n.stops,(function(t){return{coord:s.toGlobalCoord(s.dataToCoord(t.value)),color:t.color}})),h=l.length,u=n.outerColors.slice();h&&l[0].coord>l[h-1].coord&&(l.reverse(),u.reverse());var c=l[0].coord-10,d=l[h-1].coord+10,p=d-c;if(p<.001)return"transparent";Om.each(l,(function(t){t.offset=(t.coord-c)/p})),l.push({offset:h?l[h-1].offset:.5,color:u[1]||"transparent"}),l.unshift({offset:h?l[0].offset:.5,color:u[0]||"transparent"});var f=new Nm.LinearGradient(0,0,0,0,l,!0);return f[r]=c,f[r+"2"]=d,f}}}(o,n)||o.getVisual("color");d.useStyle(Om.defaults(r.getLineStyle(),{fill:"none",stroke:w,lineJoin:"bevel"}));var S=t.get("smooth");if(S=Zm(t.get("smooth")),d.setShape({smooth:S,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")}),p){var M=o.stackedOn,I=0;if(p.useStyle(Om.defaults(s.getAreaStyle(),{fill:w,opacity:.7,lineJoin:"bevel"})),M)I=Zm(M.hostModel.get("smooth"));p.setShape({smooth:S,stackedOnSmooth:I,smoothMonotone:t.get("smoothMonotone"),connectNulls:t.get("connectNulls")})}this._data=o,this._coordSys=n,this._stackedOnPoints=v,this._points=l,this._step=b},dispose:function(){},highlight:function(t,e,i,n){var a=t.getData(),o=Vm.queryDataIndex(a,n);if(!(o instanceof Array)&&null!=o&&o>=0){var r=a.getItemGraphicEl(o);if(!r){var s=a.getItemLayout(o);if(!s)return;(r=new Em(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 Hm.prototype.highlight.call(this,t,e,i,n)},downplay:function(t,e,i,n){var a=t.getData(),o=Vm.queryDataIndex(a,n);if(null!=o&&o>=0){var r=a.getItemGraphicEl(o);r&&(r.__temp?(a.setItemGraphicEl(o,null),this.group.remove(r)):r.downplay())}else Hm.prototype.downplay.call(this,t,e,i,n)},_newPolyline:function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new Gm({shape:{points:t},silent:!0,z2:10}),this._lineGroup.add(e),this._polyline=e,e},_newPolygon:function(t,e){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new Wm({shape:{points:t,stackedOnPoints:e},silent:!0}),this._lineGroup.add(i),this._polygon=i,i},_getSymbolIgnoreFunc:function(t,e){var i=e.getAxesByScale("ordinal")[0];if(i&&i.isLabelIgnored)return Om.bind(i.isLabelIgnored,i)},_updateAnimation:function(t,e,i,n,a){var o=this._polyline,r=this._polygon,s=t.hostModel,l=Rm(this._data,t,this._stackedOnPoints,e,this._coordSys,i),h=l.current,u=l.stackedOnCurrent,c=l.next,d=l.stackedOnNext;a&&(h=Xm(l.current,i,a),u=Xm(l.stackedOnCurrent,i,a),c=Xm(l.next,i,a),d=Xm(l.stackedOnNext,i,a)),o.shape.__points=l.current,o.shape.points=h,Nm.updateProps(o,{shape:{points:c}},s),r&&(r.setShape({points:h,stackedOnPoints:u}),Nm.updateProps(r,{shape:{points:c,stackedOnPoints:d}},s));for(var p=[],f=l.status,g=0;g<f.length;g++){if("="===f[g].cmd){var m=t.getItemGraphicEl(f[g].idx1);m&&p.push({el:m,ptIdx:g})}}o.animators&&o.animators.length&&o.animators[0].during((function(){for(var t=0;t<p.length;t++){p[t].el.attr("position",o.shape.__points[p[t].ptIdx])}}))},remove:function(t){var e=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl((function(t,n){t.__temp&&(e.remove(t),i.setItemGraphicEl(n,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._data=null}});var Ym=function(t,e,i,n,a){n.eachRawSeriesByType(t,(function(t){var a=t.getData(),o=t.get("symbol")||e,r=t.get("symbolSize");a.setVisual({legendSymbol:i||o,symbol:o,symbolSize:r}),n.isSeriesFiltered(t)||("function"==typeof r&&a.each((function(e){var i=t.getRawValue(e),n=t.getDataParams(e);a.setItemVisual(e,"symbolSize",r(i,n))})),a.each((function(t){var e=a.getItemModel(t),i=e.getShallow("symbol",!0),n=e.getShallow("symbolSize",!0);null!=i&&a.setItemVisual(t,"symbol",i),null!=n&&a.setItemVisual(t,"symbolSize",n)})))}))};var $m=function(t,e){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=t.coordinateSystem;if(i){for(var n=[],a=i.dimensions,o=0;o<a.length;o++)n.push(t.coordDimToDataDim(i.dimensions[o])[0]);1===n.length?e.each(n[0],(function(t,n){e.setItemLayout(n,isNaN(t)?[NaN,NaN]:i.dataToPoint(t))})):2===n.length&&e.each(n,(function(t,n,a){e.setItemLayout(a,isNaN(t)||isNaN(n)?[NaN,NaN]:i.dataToPoint([t,n]))}),!0)}}))},Km={average:function(t){for(var e=0,i=0,n=0;n<t.length;n++)isNaN(t[n])||(e+=t[n],i++);return 0===i?NaN:e/i},sum:function(t){for(var e=0,i=0;i<t.length;i++)e+=t[i]||0;return e},max:function(t){for(var e=-1/0,i=0;i<t.length;i++)t[i]>e&&(e=t[i]);return e},min:function(t){for(var e=1/0,i=0;i<t.length;i++)t[i]<e&&(e=t[i]);return e},nearest:function(t){return t[0]}},Jm=function(t,e){return Math.round(t.length/2)};var Qm=function(t,e,i){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=t.get("sampling"),n=t.coordinateSystem;if("cartesian2d"===n.type&&i){var a,o=n.getBaseAxis(),r=n.getOtherAxis(o),s=o.getExtent(),l=s[1]-s[0],h=Math.round(e.count()/l);if(h>1)"string"==typeof i?a=Km[i]:"function"==typeof i&&(a=i),a&&(e=e.downSample(r.dim,1/h,a,Jm),t.setData(e))}}),this)},tv=b;function ev(t){return this._axes[t]}var iv=function(t){this._axes={},this._dimList=[],this.name=t||""};iv.prototype={constructor:iv,type:"cartesian",getAxis:function(t){return this._axes[t]},getAxes:function(){return tv.map(this._dimList,ev,this)},getAxesByScale:function(t){return t=t.toLowerCase(),tv.filter(this.getAxes(),(function(e){return e.scale.type===t}))},addAxis:function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},dataToCoord:function(t){return this._dataCoordConvert(t,"dataToCoord")},coordToData:function(t){return this._dataCoordConvert(t,"coordToData")},_dataCoordConvert:function(t,e){for(var i=this._dimList,n=t instanceof Array?[]:{},a=0;a<i.length;a++){var o=i[a],r=this._axes[o];n[o]=r[e](t[o])}return n}};var nv=b,av=iv;function ov(t){av.call(this,t)}ov.prototype={constructor:ov,type:"cartesian2d",dimensions:["x","y"],getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},containPoint:function(t){var e=this.getAxis("x"),i=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&i.contain(i.toLocalCoord(t[1]))},containData:function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},dataToPoint:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return[i.toGlobalCoord(i.dataToCoord(t[0],e)),n.toGlobalCoord(n.dataToCoord(t[1],e))]},pointToData:function(t,e){var i=this.getAxis("x"),n=this.getAxis("y");return[i.coordToData(i.toLocalCoord(t[0]),e),n.coordToData(n.toLocalCoord(t[1]),e)]},getOtherAxis:function(t){return this.getAxis("x"===t.dim?"y":"x")}},nv.inherits(ov,av);var rv=ov,sv=b,lv=gg,hv=function(t,e,i,n,a){lv.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom"};hv.prototype={constructor:hv,index:0,onZero:!1,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},getGlobalExtent:function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},getOtherAxis:function(){this.grid.getOtherAxis()},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}},pointToData:function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},toLocalCoord:null,toGlobalCoord:null},sv.inherits(hv,lv);var uv=hv,cv=b,dv={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)"]}}},pv={};pv.categoryAxis=cv.merge({boundaryGap:!0,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},dv),pv.valueAxis=cv.merge({boundaryGap:[0,0],splitNumber:5},dv),pv.timeAxis=cv.defaults({scale:!0,min:"dataMin",max:"dataMax"},pv.valueAxis),pv.logAxis=cv.defaults({scale:!0,logBase:10},pv.valueAxis);var fv=pv,gv=b,mv=fv,vv=Zu,yv=wu,xv=yv.getLayoutParams,_v=yv.mergeLayoutParam,bv=["value","category","time","log"];var wv=function(t,e,i,n){gv.each(bv,(function(a){e.extend({type:t+"Axis."+a,mergeDefaultAndTheme:function(e,n){var o=this.layoutMode,r=o?xv(e):{},s=n.getTheme();gv.merge(e,s.get(a+"Axis")),gv.merge(e,this.getDefaultOption()),e.type=i(t,e),o&&_v(e,r,o)},defaultOption:gv.mergeAll([{},mv[a+"Axis"],n],!0)})})),vv.registerSubTypeDefaulter(t+"Axis",gv.curry(i,t))},Sv=b,Mv=wv,Iv=Wf,Av=Zu.extend({type:"cartesian2dAxis",axis:null,init:function(){Av.superApply(this,"init",arguments),this.resetRange()},mergeOption:function(){Av.superApply(this,"mergeOption",arguments),this.resetRange()},restoreData:function(){Av.superApply(this,"restoreData",arguments),this.resetRange()},getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid",index:this.option.gridIndex,id:this.option.gridId})[0]}});function Tv(t,e){return e.type||(e.data?"category":"value")}Sv.merge(Av.prototype,Iv);var Cv={offset:0};Mv("x",Av,Tv,Cv),Mv("y",Av,Tv,Cv),Zu.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 Lv=b,Dv=Je,Pv=wu.getLayoutRect,kv=Rp,Ov=rv,zv=uv,Ev=_c,Rv=Lv.each,Nv=kv.ifAxisCrossZero,Vv=kv.niceScaleExtent;function Bv(t,e,i){return t.getCoordSysModel()===e}function Gv(t,e,i){this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this._initCartesian(t,e,i),this.model=t}var Wv=Gv.prototype;function Hv(t,e,i){var n=t[e];if(i.onZero){var a=i.onZeroAxisIndex;if(null==a){for(var o in n){if(n.hasOwnProperty(o))if((r=n[o])&&!Fv(r)){a=+o;break}}null==a&&(i.onZero=!1),i.onZeroAxisIndex=a}else{var r;(r=n[a])&&Fv(r)&&(i.onZero=!1)}}}function Fv(t){return"category"===t.type||"time"===t.type||!Nv(t)}Wv.type="grid",Wv.axisPointerEnabled=!0,Wv.getRect=function(){return this._rect},Wv.update=function(t,e){var i=this._axesMap;this._updateScale(t,this.model),Rv(i.x,(function(t){Vv(t.scale,t.model)})),Rv(i.y,(function(t){Vv(t.scale,t.model)})),Rv(i.x,(function(t){Hv(i,"y",t)})),Rv(i.y,(function(t){Hv(i,"x",t)})),this.resize(this.model,e)},Wv.resize=function(t,e,i){var n=Pv(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()});this._rect=n;var a=this._axesList;function o(){Rv(a,(function(t){var e=t.isHorizontal(),i=e?[0,n.width]:[0,n.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),function(t,e){var i=t.getExtent(),n=i[0]+i[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return n-t+e}}(t,e?n.x:n.y)}))}o(),!i&&t.get("containLabel")&&(Rv(a,(function(t){if(!t.model.get("axisLabel.inside")){var e=function(t){var e,i,n,a,o,r,s,l,h=t.model,u=h.getFormattedLabels(),c=h.getModel("axisLabel"),d=1,p=u.length;p>40&&(d=Math.ceil(p/40));for(var f=0;f<p;f+=d)if(!t.isLabelIgnored(f)){var g=(i=c.getTextRect(u[f]),n=void 0,a=void 0,o=void 0,r=void 0,s=void 0,l=void 0,n=(c.get("rotate")||0)*Math.PI/180,o=(a=i.plain()).width,r=a.height,s=o*Math.cos(n)+r*Math.sin(n),l=o*Math.sin(n)+r*Math.cos(n),new Dv(a.x,a.y,s,l));e?e.union(g):e=g}return e}(t);if(e){var i=t.isHorizontal()?"height":"width",a=t.model.get("axisLabel.margin");n[i]-=e[i]+a,"top"===t.position?n.y+=e.height+a:"left"===t.position&&(n.x+=e.width+a)}}})),o())},Wv.getAxis=function(t,e){var i=this._axesMap[t];if(null!=i){if(null==e)for(var n in i)if(i.hasOwnProperty(n))return i[n];return i[e]}},Wv.getAxes=function(){return this._axesList.slice()},Wv.getCartesian=function(t,e){if(null!=t&&null!=e){var i="x"+t+"y"+e;return this._coordsMap[i]}Lv.isObject(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,a=this._coordsList;n<a.length;n++)if(a[n].getAxis("x").index===t||a[n].getAxis("y").index===e)return a[n]},Wv.getCartesians=function(){return this._coordsList.slice()},Wv.convertToPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.dataToPoint(i):n.axis?n.axis.toGlobalCoord(n.axis.dataToCoord(i)):null},Wv.convertFromPixel=function(t,e,i){var n=this._findConvertTarget(t,e);return n.cartesian?n.cartesian.pointToData(i):n.axis?n.axis.coordToData(n.axis.toLocalCoord(i)):null},Wv._findConvertTarget=function(t,e){var i,n,a=e.seriesModel,o=e.xAxisModel||a&&a.getReferringComponents("xAxis")[0],r=e.yAxisModel||a&&a.getReferringComponents("yAxis")[0],s=e.gridModel,l=this._coordsList;if(a)i=a.coordinateSystem,Lv.indexOf(l,i)<0&&(i=null);else if(o&&r)i=this.getCartesian(o.componentIndex,r.componentIndex);else if(o)n=this.getAxis("x",o.componentIndex);else if(r)n=this.getAxis("y",r.componentIndex);else if(s){s.coordinateSystem===this&&(i=this._coordsList[0])}return{cartesian:i,axis:n}},Wv.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},Wv._initCartesian=function(t,e,i){var n={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},o={x:0,y:0};if(e.eachComponent("xAxis",r("x"),this),e.eachComponent("yAxis",r("y"),this),!o.x||!o.y)return this._axesMap={},void(this._axesList=[]);function r(e){return function(i,r){if(Bv(i,t)){var s=i.get("position");"x"===e?"top"!==s&&"bottom"!==s&&n[s="bottom"]&&(s="top"===s?"bottom":"top"):"left"!==s&&"right"!==s&&n[s="left"]&&(s="left"===s?"right":"left"),n[s]=!0;var l=new zv(e,kv.createScaleByModel(i),[0,0],i.get("type"),s),h="category"===l.type;l.onBand=h&&i.get("boundaryGap"),l.inverse=i.get("inverse"),l.onZero=i.get("axisLine.onZero"),l.onZeroAxisIndex=i.get("axisLine.onZeroAxisIndex"),i.axis=l,l.model=i,l.grid=this,l.index=r,this._axesList.push(l),a[e][r]=l,o[e]++}}}this._axesMap=a,Rv(a.x,(function(e,i){Rv(a.y,(function(n,a){var o="x"+i+"y"+a,r=new Ov(o);r.grid=this,r.model=t,this._coordsMap[o]=r,this._coordsList.push(r),r.addAxis(e),r.addAxis(n)}),this)}),this)},Wv._updateScale=function(t,e){function i(t,e,i){Rv(i.coordDimToDataDim(e.dim),(function(i){e.scale.unionExtentFromData(t,i)}))}Lv.each(this._axesList,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeries((function(t){if(Uv(t)){var n=jv(t),a=n[0],o=n[1];if(!Bv(a,e)||!Bv(o,e))return;var r=this.getCartesian(a.componentIndex,o.componentIndex),s=t.getData(),l=r.getAxis("x"),h=r.getAxis("y");"list"===s.type&&(i(s,l,t),i(s,h,t))}}),this)},Wv.getTooltipAxes=function(t){var e=[],i=[];return Rv(this.getCartesians(),(function(n){var a=null!=t&&"auto"!==t?n.getAxis(t):n.getBaseAxis(),o=n.getOtherAxis(a);Lv.indexOf(e,a)<0&&e.push(a),Lv.indexOf(i,o)<0&&i.push(o)})),{baseAxes:e,otherAxes:i}};var Zv=["xAxis","yAxis"];function jv(t,e){return Lv.map(Zv,(function(e){return t.getReferringComponents(e)[0]}))}function Uv(t){return"cartesian2d"===t.get("coordinateSystem")}Gv.create=function(t,e){var i=[];return t.eachComponent("grid",(function(n,a){var o=new Gv(n,t,e);o.name="grid_"+a,o.resize(n,e,!0),n.coordinateSystem=o,i.push(o)})),t.eachSeries((function(t){if(Uv(t)){var e=jv(t),i=e[0],n=e[1],a=i.getCoordSysModel().coordinateSystem;t.coordinateSystem=a.getCartesian(i.componentIndex,n.componentIndex)}})),i},Gv.dimensions=Gv.prototype.dimensions=Ov.prototype.dimensions,Ev.register("cartesian2d",Gv);var qv=b,Xv=qv.retrieve,Yv=qv.defaults,$v=qv.extend,Kv=qv.each,Jv=co,Qv=Bo,ty=ou,ey=po,iy=ey.isRadianAroundZero,ny=ey.remRadian,ay=Hf.createSymbol,oy=mt,ry=j.applyTransform,sy=Math.PI;function ly(t){var e={componentType:t.mainType};return e[t.mainType+"Index"]=t.componentIndex,e}var hy=function(t,e){this.opt=e,this.axisModel=t,Yv(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0}),this.group=new Qv.Group;var i=new Qv.Group({position:e.position.slice(),rotation:e.rotation});i.updateTransform(),this._transform=i.transform,this._dumbGroup=i};hy.prototype={constructor:hy,hasBuilder:function(t){return!!uy[t]},add:function(t){uy[t].call(this)},getGroup:function(){return this.group}};var uy={axisLine:function(){var t=this.opt,e=this.axisModel;if(e.get("axisLine.show")){var i=this.axisModel.axis.getExtent(),n=this._transform,a=[i[0],0],o=[i[1],0];n&&(ry(a,a,n),ry(o,o,n));var r=$v({lineCap:"round"},e.getModel("axisLine.lineStyle").getLineStyle());this.group.add(new Qv.Line(Qv.subPixelOptimizeLine({anid:"line",shape:{x1:a[0],y1:a[1],x2:o[0],y2:o[1]},style:r,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1})));var s=e.get("axisLine.symbol"),l=e.get("axisLine.symbolSize");if(null!=s){"string"==typeof s&&(s=[s,s]),"string"!=typeof l&&"number"!=typeof l||(l=[l,l]);var h=l[0],u=l[1];Kv([[t.rotation+Math.PI/2,a],[t.rotation-Math.PI/2,o]],(function(t,e){if("none"!==s[e]&&null!=s[e]){var i=ay(s[e],-h/2,-u/2,h,u,r.stroke,!0);i.attr({rotation:t[0],position:t[1],silent:!0}),this.group.add(i)}}),this)}}},axisTickLabel:function(){var t=this.axisModel,e=this.opt,i=function(t,e,i){var n=e.axis;if(!e.get("axisTick.show")||n.scale.isBlank())return;for(var a=e.getModel("axisTick"),o=a.getModel("lineStyle"),r=a.get("length"),s=vy(a,i.labelInterval),l=n.getTicksCoords(a.get("alignWithLabel")),h=n.scale.getTicks(),u=e.get("axisLabel.showMinLabel"),c=e.get("axisLabel.showMaxLabel"),d=[],p=[],f=t._transform,g=[],m=l.length,v=0;v<m;v++)if(!my(n,v,s,m,u,c)){var y=l[v];d[0]=y,d[1]=0,p[0]=y,p[1]=i.tickDirection*r,f&&(ry(d,d,f),ry(p,p,f));var x=new Qv.Line(Qv.subPixelOptimizeLine({anid:"tick_"+h[v],shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:Yv(o.getLineStyle(),{stroke:e.get("axisLine.lineStyle.color")}),z2:2,silent:!0}));t.group.add(x),g.push(x)}return g}(this,t,e),n=function(t,e,i){var n=e.axis;if(!Xv(i.axisLabelShow,e.get("axisLabel.show"))||n.scale.isBlank())return;var a=e.getModel("axisLabel"),o=a.get("margin"),r=n.scale.getTicks(),s=e.getFormattedLabels(),l=(Xv(i.labelRotate,a.get("rotate"))||0)*sy/180,h=cy(i.rotation,l,i.labelDirection),u=e.get("data"),c=[],d=dy(e),p=e.get("triggerEvent"),f=e.get("axisLabel.showMinLabel"),g=e.get("axisLabel.showMaxLabel");return Kv(r,(function(l,m){if(!my(n,m,i.labelInterval,r.length,f,g)){var v=a;u&&u[l]&&u[l].textStyle&&(v=new ty(u[l].textStyle,a,e.ecModel));var y=v.getTextColor()||e.get("axisLine.lineStyle.color"),x=[n.dataToCoord(l),i.labelOffset+i.labelDirection*o],_=n.scale.getLabel(l),b=new Qv.Text({anid:"label_"+l,position:x,rotation:h.rotation,silent:d,z2:10});Qv.setTextStyle(b.style,v,{text:s[m],textAlign:v.getShallow("align",!0)||h.textAlign,textVerticalAlign:v.getShallow("verticalAlign",!0)||v.getShallow("baseline",!0)||h.textVerticalAlign,textFill:"function"==typeof y?y("category"===n.type?_:"value"===n.type?l+"":l,m):y}),p&&(b.eventData=ly(e),b.eventData.targetType="axisLabel",b.eventData.value=_),t._dumbGroup.add(b),b.updateTransform(),c.push(b),t.group.add(b),b.decomposeTransform()}})),c}(this,t,e);!function(t,e,i){var n=t.get("axisLabel.showMinLabel"),a=t.get("axisLabel.showMaxLabel");i=i||[];var o=(e=e||[])[0],r=e[1],s=e[e.length-1],l=e[e.length-2],h=i[0],u=i[1],c=i[i.length-1],d=i[i.length-2];!1===n?(py(o),py(h)):fy(o,r)&&(n?(py(r),py(u)):(py(o),py(h)));!1===a?(py(s),py(c)):fy(l,s)&&(a?(py(l),py(d)):(py(s),py(c)))}(t,n,i)},axisName:function(){var t=this.opt,e=this.axisModel,i=Xv(t.axisName,e.get("name"));if(i){var n,a,o=e.get("nameLocation"),r=t.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,h=this.axisModel.axis.getExtent(),u=h[0]>h[1]?-1:1,c=["start"===o?h[0]-u*l:"end"===o?h[1]+u*l:(h[0]+h[1])/2,gy(o)?t.labelOffset+r*l:0],d=e.get("nameRotate");null!=d&&(d=d*sy/180),gy(o)?n=cy(t.rotation,null!=d?d:t.rotation,r):(n=function(t,e,i,n){var a,o,r=ny(i-t.rotation),s=n[0]>n[1],l="start"===e&&!s||"start"!==e&&s;iy(r-sy/2)?(o=l?"bottom":"top",a="center"):iy(r-1.5*sy)?(o=l?"top":"bottom",a="center"):(o="middle",a=r<1.5*sy&&r>sy/2?l?"left":"right":l?"right":"left");return{rotation:r,textAlign:a,textVerticalAlign:o}}(t,o,d||0,h),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(n.rotation)),!isFinite(a)&&(a=null)));var p=s.getFont(),f=e.get("nameTruncate",!0)||{},g=f.ellipsis,m=Xv(t.nameTruncateMaxWidth,f.maxWidth,a),v=null!=g&&null!=m?Jv.truncateText(i,m,p,g,{minChar:2,placeholder:f.placeholder}):i,y=e.get("tooltip",!0),x=e.mainType,_={componentType:x,name:i,$vars:["name"]};_[x+"Index"]=e.componentIndex;var b=new Qv.Text({anid:"name",__fullText:i,__truncatedText:v,position:c,rotation:n.rotation,silent:dy(e),z2:1,tooltip:y&&y.show?$v({content:i,formatter:function(){return i},formatterParams:_},y):null});Qv.setTextStyle(b.style,s,{text:v,textFont:p,textFill:s.getTextColor()||e.get("axisLine.lineStyle.color"),textAlign:n.textAlign,textVerticalAlign:n.textVerticalAlign}),e.get("triggerEvent")&&(b.eventData=ly(e),b.eventData.targetType="axisName",b.eventData.name=i),this._dumbGroup.add(b),b.updateTransform(),this.group.add(b),b.decomposeTransform()}}},cy=hy.innerTextLayout=function(t,e,i){var n,a,o=ny(e-t);return iy(o)?(a=i>0?"top":"bottom",n="center"):iy(o-sy)?(a=i>0?"bottom":"top",n="center"):(a="middle",n=o>0&&o<sy?i>0?"right":"left":i>0?"left":"right"),{rotation:o,textAlign:n,textVerticalAlign:a}};function dy(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)}function py(t){t&&(t.ignore=!0)}function fy(t,e,i){var n=t&&t.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(n&&a){var o=oy.identity([]);return oy.rotate(o,o,-t.rotation),n.applyTransform(oy.mul([],o,t.getLocalTransform())),a.applyTransform(oy.mul([],o,e.getLocalTransform())),n.intersect(a)}}function gy(t){return"middle"===t||"center"===t}var my=hy.ifIgnoreOnTick=function(t,e,i,n,a,o){if(0===e&&a||e===n-1&&o)return!1;var r,s=t.scale;return"ordinal"===s.type&&("function"==typeof i?!i(r=s.getTicks()[e],s.getLabel(r)):e%(i+1))},vy=hy.getInterval=function(t,e){var i=t.get("interval");return null!=i&&"auto"!=i||(i=e),i};var yy=hy,xy={},_y=b,by=ou,wy=_y.each,Sy=_y.curry;function My(t,e){return"all"===t||_y.isArray(t)&&_y.indexOf(t,e)>=0||t===e}function Iy(t){var e=(t.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[Ty(t)]}function Ay(t){return!!t.get("handle.show")}function Ty(t){return t.type+"||"+t.id}xy.collect=function(t,e){var i={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return function(t,e,i){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),o=a.get("link",!0)||[],r=[];wy(i.getCoordinateSystems(),(function(i){if(i.axisPointerEnabled){var s=Ty(i.model),l=t.coordSysAxesInfo[s]={};t.coordSysMap[s]=i;var h=i.model.getModel("tooltip",n);if(wy(i.getAxes(),Sy(p,!1,null)),i.getTooltipAxes&&n&&h.get("show")){var u="axis"===h.get("trigger"),c="cross"===h.get("axisPointer.type"),d=i.getTooltipAxes(h.get("axisPointer.axis"));(u||c)&&wy(d.baseAxes,Sy(p,!c||"cross",u)),c&&wy(d.otherAxes,Sy(p,"cross",!1))}}function p(n,s,u){var c=u.model.getModel("axisPointer",a),d=c.get("show");if(d&&("auto"!==d||n||Ay(c))){null==s&&(s=c.get("triggerTooltip")),c=n?function(t,e,i,n,a,o){var r=e.getModel("axisPointer"),s={};wy(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(t){s[t]=_y.clone(r.get(t))})),s.snap="category"!==t.type&&!!o,"cross"===r.get("type")&&(s.type="line");var l=s.label||(s.label={});if(null==l.show&&(l.show=!1),"cross"===a&&(l.show=!0,!o)){var h=s.lineStyle=r.get("crossStyle");h&&_y.defaults(l,h.textStyle)}return t.model.getModel("axisPointer",new by(s,i,n))}(u,h,a,e,n,s):c;var p=c.get("snap"),f=Ty(u.model),g=s||p||"category"===u.type,m=t.axesInfo[f]={key:f,axis:u,coordSys:i,axisPointerModel:c,triggerTooltip:s,involveSeries:g,snap:p,useHandle:Ay(c),seriesModels:[]};l[f]=m,t.seriesInvolved|=g;var v=function(t,e){for(var i=e.model,n=e.dim,a=0;a<t.length;a++){var o=t[a]||{};if(My(o[n+"AxisId"],i.id)||My(o[n+"AxisIndex"],i.componentIndex)||My(o[n+"AxisName"],i.name))return a}}(o,u);if(null!=v){var y=r[v]||(r[v]={axesInfo:{}});y.axesInfo[f]=m,y.mapper=o[v].mapper,m.linkGroup=y}}}}))}(i,t,e),i.seriesInvolved&&function(t,e){e.eachSeries((function(e){var i=e.coordinateSystem,n=e.get("tooltip.trigger",!0),a=e.get("tooltip.show",!0);i&&"none"!==n&&!1!==n&&"item"!==n&&!1!==a&&!1!==e.get("axisPointer.show",!0)&&wy(t.coordSysAxesInfo[Ty(i.model)],(function(t){var n=t.axis;i.getAxis(n.dim)===n&&(t.seriesModels.push(e),null==t.seriesDataCount&&(t.seriesDataCount=0),t.seriesDataCount+=e.getData().count())}))}),this)}(i,t),i},xy.fixValue=function(t){var e=Iy(t);if(e){var i=e.axisPointerModel,n=e.axis.scale,a=i.option,o=i.get("status"),r=i.get("value");null!=r&&(r=n.parse(r));var s=Ay(i);null==o&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==r||r>l[1])&&(r=l[1]),r<l[0]&&(r=l[0]),a.value=r,s&&(a.status=e.axis.scale.isBlank()?"hide":"show")}},xy.getAxisInfo=Iy,xy.getAxisPointerModel=function(t){var e=Iy(t);return e&&e.axisPointerModel},xy.makeKey=Ty;var Cy=xy,Ly=m.extendComponentView({type:"axis",_axisPointer:null,axisPointerClass:null,render:function(t,e,i,n){this.axisPointerClass&&Cy.fixValue(t),Ly.superApply(this,"render",arguments),Dy(this,t,e,i,n,!0)},updateAxisPointer:function(t,e,i,n,a){Dy(this,t,e,i,n,!1)},remove:function(t,e){var i=this._axisPointer;i&&i.remove(e),Ly.superApply(this,"remove",arguments)},dispose:function(t,e){Py(this,e),Ly.superApply(this,"dispose",arguments)}});function Dy(t,e,i,n,a,o){var r=Ly.getAxisPointerClass(t.axisPointerClass);if(r){var s=Cy.getAxisPointerModel(e);s?(t._axisPointer||(t._axisPointer=new r)).render(e,s,n,o):Py(t,n)}}function Py(t,e,i){var n=t._axisPointer;n&&n.dispose(e,i),t._axisPointer=null}var ky=[];Ly.registerAxisPointerClass=function(t,e){ky[t]=e},Ly.getAxisPointerClass=function(t){return t&&ky[t]};var Oy=Ly,zy={},Ey=b;zy.layout=function(t,e,i){i=i||{};var n=t.coordinateSystem,a=e.axis,o={},r=a.position,s=a.onZero?"onZero":r,l=a.dim,h=n.getRect(),u=[h.x,h.x+h.width,h.y,h.y+h.height],c={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p="x"===l?[u[2]-d,u[3]+d]:[u[0]-d,u[1]+d];if(a.onZero){var f=n.getAxis("x"===l?"y":"x",a.onZeroAxisIndex),g=f.toGlobalCoord(f.dataToCoord(0));p[c.onZero]=Math.max(Math.min(g,p[1]),p[0])}o.position=["y"===l?p[c[s]]:u[0],"x"===l?p[c[s]]:u[3]],o.rotation=Math.PI/2*("x"===l?0:1),o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[r],o.labelOffset=a.onZero?p[c[r]]-p[c.onZero]:0,e.get("axisTick.inside")&&(o.tickDirection=-o.tickDirection),Ey.retrieve(i.labelInside,e.get("axisLabel.inside"))&&(o.labelDirection=-o.labelDirection);var m=e.get("axisLabel.rotate");return o.labelRotate="top"===s?-m:m,o.labelInterval=a.getLabelInterval(),o.z2=1,o};var Ry=b,Ny=Bo,Vy=yy,By=Oy,Gy=zy,Wy=Vy.ifIgnoreOnTick,Hy=Vy.getInterval,Fy=["axisLine","axisTickLabel","axisName"],Zy=["splitArea","splitLine"],jy=By.extend({type:"cartesianAxis",axisPointerClass:"CartesianAxisPointer",render:function(t,e,i,n){this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new Ny.Group,this.group.add(this._axisGroup),t.get("show")){var o=t.getCoordSysModel(),r=Gy.layout(o,t),s=new Vy(t,r);Ry.each(Fy,s.add,s),this._axisGroup.add(s.getGroup()),Ry.each(Zy,(function(e){t.get(e+".show")&&this["_"+e](t,o,r.labelInterval)}),this),Ny.groupTransition(a,this._axisGroup,t),jy.superCall(this,"render",t,e,i,n)}},_splitLine:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),r=o.get("color"),s=Hy(a,i);r=Ry.isArray(r)?r:[r];for(var l=e.coordinateSystem.getRect(),h=n.isHorizontal(),u=0,c=n.getTicksCoords(),d=n.scale.getTicks(),p=t.get("axisLabel.showMinLabel"),f=t.get("axisLabel.showMaxLabel"),g=[],m=[],v=o.getLineStyle(),y=0;y<c.length;y++)if(!Wy(n,y,s,c.length,p,f)){var x=n.toGlobalCoord(c[y]);h?(g[0]=x,g[1]=l.y,m[0]=x,m[1]=l.y+l.height):(g[0]=l.x,g[1]=x,m[0]=l.x+l.width,m[1]=x);var _=u++%r.length;this._axisGroup.add(new Ny.Line(Ny.subPixelOptimizeLine({anid:"line_"+d[y],shape:{x1:g[0],y1:g[1],x2:m[0],y2:m[1]},style:Ry.defaults({stroke:r[_]},v),silent:!0})))}}},_splitArea:function(t,e,i){var n=t.axis;if(!n.scale.isBlank()){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),r=o.get("color"),s=e.coordinateSystem.getRect(),l=n.getTicksCoords(),h=n.scale.getTicks(),u=n.toGlobalCoord(l[0]),c=n.toGlobalCoord(l[0]),d=0,p=Hy(a,i),f=o.getAreaStyle();r=Ry.isArray(r)?r:[r];for(var g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=1;v<l.length;v++)if(!Wy(n,v,p,l.length,g,m)){var y,x,_,b,w=n.toGlobalCoord(l[v]);n.isHorizontal()?(y=u,x=s.y,_=w-y,b=s.height):(y=s.x,x=c,_=s.width,b=w-x);var S=d++%r.length;this._axisGroup.add(new Ny.Rect({anid:"area_"+h[v],shape:{x:y,y:x,width:_,height:b},style:Ry.defaults({fill:r[S]},f),silent:!0})),u=y+_,c=x+b}}}});jy.extend({type:"xAxis"}),jy.extend({type:"yAxis"});var Uy=m,qy=b,Xy=Bo;Uy.extendComponentView({type:"grid",render:function(t,e){this.group.removeAll(),t.get("show")&&this.group.add(new Xy.Rect({shape:t.coordinateSystem.getRect(),style:qy.defaults({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))}}),Uy.registerPreprocessor((function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})}));var Yy=m,$y=b,Ky=Ym,Jy=$m,Qy=Qm;Yy.registerVisual($y.curry(Ky,"line","circle","line")),Yy.registerLayout($y.curry(Jy,"line")),Yy.registerProcessor(Yy.PRIORITY.PROCESSOR.STATISTIC,$y.curry(Qy,"line"));var tx=b,ex=po.parsePercent;function ix(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function nx(t){return t.dim+t.index}function ax(t,e){var i={};tx.each(t,(function(t,e){var n=t.axisKey,a=t.bandWidth,o=i[n]||{bandWidth:a,remainedWidth:a,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},r=o.stacks;i[n]=o;var s=t.stackId;r[s]||o.autoWidthCount++,r[s]=r[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!r[s].width&&(r[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var h=t.barMaxWidth;h&&(r[s].maxWidth=h);var u=t.barGap;null!=u&&(o.gap=u);var c=t.barCategoryGap;null!=c&&(o.categoryGap=c)}));var n={};return tx.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,o=ex(t.categoryGap,a),r=ex(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*r);h=Math.max(h,0),tx.each(i,(function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),h=(s-o)/(l+(l-1)*r),h=Math.max(h,0);var u,c=0;tx.each(i,(function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+r)})),u&&(c-=u.width*r);var d=-c/2;tx.each(i,(function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+r)}))})),n}function ox(t,e,i){var n,a=(n=tx.filter(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type})),ax(tx.map(n,(function(t){var e=t.getData(),i=t.coordinateSystem.getBaseAxis(),n=i.getExtent(),a="category"===i.type?i.getBandWidth():Math.abs(n[1]-n[0])/e.count();return{bandWidth:a,barWidth:ex(t.get("barWidth"),a),barMaxWidth:ex(t.get("barMaxWidth"),a),barGap:t.get("barGap"),barCategoryGap:t.get("barCategoryGap"),axisKey:nx(i),stackId:ix(t)}})))),o={},r={};e.eachSeriesByType(t,(function(t){if("cartesian2d"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,n=i.getBaseAxis(),s=ix(t),l=a[nx(n)][s],h=l.offset,u=l.width,c=i.getOtherAxis(n),d=t.get("barMinHeight")||0,p=n.onZero?c.toGlobalCoord(c.dataToCoord(0)):c.getGlobalExtent()[0],f=[t.coordDimToDataDim("x")[0],t.coordDimToDataDim("y")[0]],g=e.mapArray(f,(function(t,e){return i.dataToPoint([t,e])}),!0);o[s]=o[s]||[],r[s]=r[s]||[],e.setLayout({offset:h,size:u}),e.each(t.coordDimToDataDim(c.dim)[0],(function(t,i){if(!isNaN(t)){o[s][i]||(o[s][i]={p:p,n:p},r[s][i]={p:p,n:p});var n,a,l,f,m=t>=0?"p":"n",v=g[i],y=o[s][i][m],x=r[s][i][m];c.isHorizontal()?(n=y,a=v[1]+h,l=v[0]-x,f=u,r[s][i][m]+=l,Math.abs(l)<d&&(l=(l<0?-1:1)*d),o[s][i][m]+=l):(n=v[0]+h,a=y,l=u,f=v[1]-x,r[s][i][m]+=f,Math.abs(f)<d&&(f=(f<=0?-1:1)*d),o[s][i][m]+=f),e.setItemLayout(i,{x:n,y:a,width:l,height:f})}}),!0)}}),this)}ox.getLayoutOnAxis=function(t,e){var i=[],n=t.axis,a="axis0";if("category"===n.type){for(var o=n.getBandWidth(),r=0;r<t.count;r++)i.push(tx.defaults({bandWidth:o,axisKey:a,stackId:"__ec_stack_"+r},t));var s=ax(i),l=[];for(r=0;r<t.count;r++){var h=s.axis0["__ec_stack_"+r];h.offsetCenter=h.offset+h.width/2,l.push(h)}return l}};var rx=ox,sx=Ep,lx=yd.extend({type:"series.__base_bar__",getInitialData:function(t,e){return sx(t.data,this,e)},getMarkerPosition:function(t){var e=this.coordinateSystem;if(e){var i=e.dataToPoint(t,!0),n=this.getData(),a=n.getLayout("offset"),o=n.getLayout("size");return i[e.getBaseAxis().isHorizontal()?0:1]+=a+o/2,i}return[NaN,NaN]},defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,itemStyle:{}}});lx.extend({type:"series.bar",dependencies:["grid","polar"],brushSelector:"rect"});var hx={},ux=Bo;function cx(t,e){"outside"===t.textPosition&&(t.textPosition=e)}hx.setLabel=function(t,e,i,n,a,o,r){var s=i.getModel("label.normal"),l=i.getModel("label.emphasis");ux.setLabelStyle(t,e,s,l,{labelFetcher:a,labelDataIndex:o,defaultText:a.getRawValue(o),isRectText:!0,autoColor:n}),cx(t),cx(e)};var dx=zo([["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["stroke","barBorderColor"],["lineWidth","barBorderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),px={getBarItemStyle:function(t){var e=dx(this,t);if(this.getBorderLineDash){var i=this.getBorderLineDash();i&&(e.lineDash=i)}return e}},fx=m,gx=b,mx=Bo,vx=hx.setLabel,yx=ou,xx=px,_x=["itemStyle","normal","barBorderWidth"];gx.extend(yx.prototype,xx),fx.extendChartView({type:"bar",render:function(t,e,i){var n=t.get("coordinateSystem");return"cartesian2d"!==n&&"polar"!==n||this._render(t,e,i),this.group},dispose:gx.noop,_render:function(t,e,i){var n,a=this.group,o=t.getData(),r=this._data,s=t.coordinateSystem,l=s.getBaseAxis();"cartesian2d"===s.type?n=l.isHorizontal():"polar"===s.type&&(n="angle"===l.dim);var h=t.isAnimationEnabled()?t:null;o.diff(r).add((function(e){if(o.hasValue(e)){var i=o.getItemModel(e),r=Mx[s.type](o,e,i),l=bx[s.type](o,e,i,r,n,h);o.setItemGraphicEl(e,l),a.add(l),Ix(l,o,e,i,r,t,n,"polar"===s.type)}})).update((function(e,i){var l=r.getItemGraphicEl(i);if(o.hasValue(e)){var u=o.getItemModel(e),c=Mx[s.type](o,e,u);l?mx.updateProps(l,{shape:c},h,e):l=bx[s.type](o,e,u,c,n,h,!0),o.setItemGraphicEl(e,l),a.add(l),Ix(l,o,e,u,c,t,n,"polar"===s.type)}else a.remove(l)})).remove((function(t){var e=r.getItemGraphicEl(t);"cartesian2d"===s.type?e&&wx(t,h,e):e&&Sx(t,h,e)})).execute(),this._data=o},remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){"sector"===e.type?Sx(e.dataIndex,t,e):wx(e.dataIndex,t,e)})):i.removeAll()}});var bx={cartesian2d:function(t,e,i,n,a,o,r){var s=new mx.Rect({shape:gx.extend({},n)});if(o){var l=a?"height":"width",h={};s.shape[l]=0,h[l]=n[l],mx[r?"updateProps":"initProps"](s,{shape:h},o,e)}return s},polar:function(t,e,i,n,a,o,r){var s=new mx.Sector({shape:gx.extend({},n)});if(o){var l=a?"r":"endAngle",h={};s.shape[l]=a?0:n.startAngle,h[l]=n[l],mx[r?"updateProps":"initProps"](s,{shape:h},o,e)}return s}};function wx(t,e,i){i.style.text=null,mx.updateProps(i,{shape:{width:0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}function Sx(t,e,i){i.style.text=null,mx.updateProps(i,{shape:{r:i.shape.r0}},e,t,(function(){i.parent&&i.parent.remove(i)}))}var Mx={cartesian2d:function(t,e,i){var n=t.getItemLayout(e),a=function(t,e){var i=t.get(_x)||0;return Math.min(i,Math.abs(e.width),Math.abs(e.height))}(i,n),o=n.width>0?1:-1,r=n.height>0?1:-1;return{x:n.x+o*a/2,y:n.y+r*a/2,width:n.width-o*a,height:n.height-r*a}},polar:function(t,e,i){var n=t.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle}}};function Ix(t,e,i,n,a,o,r,s){var l=e.getItemVisual(i,"color"),h=e.getItemVisual(i,"opacity"),u=n.getModel("itemStyle.normal"),c=n.getModel("itemStyle.emphasis").getBarItemStyle();s||t.setShape("r",u.get("barBorderRadius")||0),t.useStyle(gx.defaults({fill:l,opacity:h},u.getBarItemStyle()));var d=n.getShallow("cursor");d&&t.attr("cursor",d);var p=r?a.height>0?"bottom":"top":a.width>0?"left":"right";s||vx(t.style,c,n,l,o,i,p),mx.setHoverStyle(t,c)}var Ax=m,Tx=b,Cx=rx;Ax.registerLayout(Tx.curry(Cx,"bar")),Ax.registerVisual((function(t){t.eachSeriesByType("bar",(function(t){t.getData().setVisual("legendSymbol","roundRect")}))}));var Lx=b,Dx={updateSelectedMap:function(t){this._targetList=t.slice(),this._selectTargetMap=Lx.reduce(t||[],(function(t,e){return t.set(e.name,e),t}),Lx.createHashMap())},select:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);"single"===this.get("selectedMode")&&this._selectTargetMap.each((function(t){t.selected=!1})),i&&(i.selected=!0)},unSelect:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);i&&(i.selected=!1)},toggleSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);if(null!=i)return this[i.selected?"unSelect":"select"](t,e),i.selected},isSelected:function(t,e){var i=null!=e?this._targetList[e]:this._selectTargetMap.get(t);return i&&i.selected}},Px=m,kx=dp,Ox=b,zx=uo,Ex=po.getPercentWithPrecision,Rx=wp,Nx=Dx,Vx=Px.extendSeriesModel({type:"series.pie",init:function(t){Vx.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this.updateSelectedMap(t.data),this._defaultLabelLine(t)},mergeOption:function(t){Vx.superCall(this,"mergeOption",t),this.updateSelectedMap(this.option.data)},getInitialData:function(t,e){var i=Rx(["value"],t.data),n=new kx(i,this);return n.initData(t.data),n},getDataParams:function(t){var e=this.getData(),i=Vx.superCall(this,"getDataParams",t),n=[];return e.each("value",(function(t){n.push(t)})),i.percent=Ex(n,t,e.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},_defaultLabelLine:function(t){zx.defaultEmphasis(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,selectedOffset:10,hoverOffset:10,avoidLabelOverlap:!0,percentPrecision:2,stillShowZeroSum:!0,label:{normal:{rotate:!1,show:!0,position:"outer"},emphasis:{}},labelLine:{normal:{show:!0,length:15,length2:15,smooth:!1,lineStyle:{width:1,type:"solid"}}},itemStyle:{normal:{borderWidth:1},emphasis:{}},animationType:"expansion",animationEasing:"cubicOut",data:[]}});Ox.mixin(Vx,Nx);var Bx=b,Gx=Bo,Wx=zd;function Hx(t,e,i,n){var a=e.getData(),o=this.dataIndex,r=a.getName(o),s=e.get("selectedOffset");n.dispatchAction({type:"pieToggleSelect",from:t,name:r,seriesId:e.id}),a.each((function(t){Fx(a.getItemGraphicEl(t),a.getItemLayout(t),e.isSelected(a.getName(t)),s,i)}))}function Fx(t,e,i,n,a){var o=(e.startAngle+e.endAngle)/2,r=i?n:0,s=[Math.cos(o)*r,Math.sin(o)*r];a?t.animate().when(200,{position:s}).start("bounceOut"):t.attr("position",s)}function Zx(t,e){Gx.Group.call(this);var i=new Gx.Sector({z2:2}),n=new Gx.Polyline,a=new Gx.Text;function o(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function r(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",o).on("normal",r).on("mouseover",o).on("mouseout",r)}var jx=Zx.prototype;jx.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=Bx.extend({},r);(s.label=null,i)?(n.setShape(s),"scale"===a.getShallow("animationType")?(n.shape.r=r.r0,Gx.initProps(n,{shape:{r:r.r}},a,e)):(n.shape.endAngle=r.startAngle,Gx.updateProps(n,{shape:{endAngle:r.endAngle}},a,e))):Gx.updateProps(n,{shape:s},a,e);var l=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.useStyle(Bx.defaults({lineJoin:"bevel",fill:h},l.getModel("normal").getItemStyle())),n.hoverStyle=l.getModel("emphasis").getItemStyle();var u=o.getShallow("cursor");function c(){n.stopAnimation(!0),n.animateTo({shape:{r:r.r+a.get("hoverOffset")}},300,"elasticOut")}function d(){n.stopAnimation(!0),n.animateTo({shape:{r:r.r}},300,"elasticOut")}u&&n.attr("cursor",u),Fx(this,t.getItemLayout(e),o.get("selected"),a.get("selectedOffset"),a.get("animation")),n.off("mouseover").off("mouseout").off("emphasis").off("normal"),o.get("hoverAnimation")&&a.isAnimationEnabled()&&n.on("mouseover",c).on("mouseout",d).on("emphasis",c).on("normal",d),this._updateLabel(t,e),Gx.setHoverStyle(this)},jx._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");Gx.updateProps(i,{shape:{points:r.linePoints||[[r.x,r.y],[r.x,r.y],[r.x,r.y]]}},a,e),Gx.updateProps(n,{style:{x:r.x,y:r.y}},a,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=o.getModel("label.normal"),h=o.getModel("label.emphasis"),u=o.getModel("labelLine.normal"),c=o.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");Gx.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign,opacity:t.getItemVisual(e,"opacity")}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s,opacity:t.getItemVisual(e,"opacity")}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle();var d=u.get("smooth");d&&!0===d&&(d=.4),i.setShape({smooth:d})},Bx.inherits(Zx,Gx.Group),Wx.extend({type:"pie",init:function(){var t=new Gx.Group;this._sectorGroup=t},render:function(t,e,i,n){if(!n||n.from!==this.uid){var a=t.getData(),o=this._data,r=this.group,s=e.get("animation"),l=!o,h=t.get("animationType"),u=Bx.curry(Hx,this.uid,t,s,i),c=t.get("selectedMode");if(a.diff(o).add((function(t){var e=new Zx(a,t);l&&"scale"!==h&&e.eachChild((function(t){t.stopAnimation(!0)})),c&&e.on("click",u),a.setItemGraphicEl(t,e),r.add(e)})).update((function(t,e){var i=o.getItemGraphicEl(e);i.updateData(a,t),i.off("click"),c&&i.on("click",u),r.add(i),a.setItemGraphicEl(t,i)})).remove((function(t){var e=o.getItemGraphicEl(t);r.remove(e)})).execute(),s&&l&&a.count()>0&&"scale"!==h){var d=a.getItemLayout(0),p=Math.max(i.getWidth(),i.getHeight())/2,f=Bx.bind(r.removeClipPath,r);r.setClipPath(this._createClipPath(d.cx,d.cy,p,d.startAngle,d.clockwise,f,t))}this._data=a}},dispose:function(){},_createClipPath:function(t,e,i,n,a,o,r){var s=new Gx.Sector({shape:{cx:t,cy:e,r0:0,r:i,startAngle:n,endAngle:n,clockwise:a}});return Gx.initProps(s,{shape:{endAngle:n+(a?1:-1)*Math.PI*2}},r,o),s},containPoint:function(t,e){var i=e.getData().getItemLayout(0);if(i){var n=t[0]-i.cx,a=t[1]-i.cy,o=Math.sqrt(n*n+a*a);return o<=i.r&&o>=i.r0}}});var Ux=m,qx=b;var Xx=function(t,e){qx.each(e,(function(e){e.update="updateView",Ux.registerAction(e,(function(i,n){var a={};return n.eachComponent({mainType:"series",subType:t,query:i},(function(t){t[e.method]&&t[e.method](i.name,i.dataIndex);var n=t.getData();n.each((function(e){var i=n.getName(e);a[i]=t.isSelected(i)||!1}))})),{name:i.name,selected:a}}))}))};var Yx=function(t,e){var i={};e.eachRawSeriesByType(t,(function(t){var n=t.getRawData(),a={};if(!e.isSeriesFiltered(t)){var o=t.getData();o.each((function(t){var e=o.getRawIndex(t);a[e]=t})),n.each((function(e){var r=a[e],s=null!=r&&o.getItemVisual(r,"color",!0);if(s)n.setItemVisual(e,"color",s);else{var l=n.getItemModel(e).get("itemStyle.normal.color")||t.getColorFromPalette(n.getName(e),i);n.setItemVisual(e,"color",l),null!=r&&o.setItemVisual(r,"color",l)}}))}}))},$x=Ni;function Kx(t,e,i,n,a,o,r){function s(e,i,n,a){for(var o=e;o<i;o++)if(t[o].y+=n,o>e&&o+1<i&&t[o+1].y>t[o].y+t[o].height)return void l(o,n/2);l(i-1,n/2)}function l(e,i){for(var n=e;n>=0&&(t[n].y-=i,!(n>0&&t[n].y>t[n-1].y+t[n-1].height));n--);}function h(t,e,i,n,a,o){for(var r=e?Number.MAX_VALUE:0,s=0,l=t.length;s<l;s++)if("center"!==t[s].position){var h=Math.abs(t[s].y-n),u=t[s].len,c=t[s].len2,d=h<a+u?Math.sqrt((a+u+c)*(a+u+c)-h*h):Math.abs(t[s].x-i);e&&d>=r&&(d=r-10),!e&&d<=r&&(d=r+10),t[s].x=i+d*o,r=d}}t.sort((function(t,e){return t.y-e.y}));for(var u,c=0,d=t.length,p=[],f=[],g=0;g<d;g++)(u=t[g].y-c)<0&&s(g,d,-u),c=t[g].y+t[g].height;r-c<0&&l(d-1,c-r);for(g=0;g<d;g++)t[g].y>=i?f.push(t[g]):p.push(t[g]);h(p,!1,e,i,n,a),h(f,!0,e,i,n,a)}var Jx=function(t,e,i,n){var a,o,r=t.getData(),s=[],l=!1;r.each((function(i){var n,h,u,c,d=r.getItemLayout(i),p=r.getItemModel(i),f=p.getModel("label.normal"),g=f.get("position")||p.get("label.emphasis.position"),m=p.getModel("labelLine.normal"),v=m.get("length"),y=m.get("length2"),x=(d.startAngle+d.endAngle)/2,_=Math.cos(x),b=Math.sin(x);a=d.cx,o=d.cy;var w="inside"===g||"inner"===g;if("center"===g)n=d.cx,h=d.cy,c="center";else{var S=(w?(d.r+d.r0)/2*_:d.r*_)+a,M=(w?(d.r+d.r0)/2*b:d.r*b)+o;if(n=S+3*_,h=M+3*b,!w){var I=S+_*(v+e-d.r),A=M+b*(v+e-d.r),T=I+(_<0?-1:1)*y;n=T+(_<0?-5:5),h=A,u=[[S,M],[I,A],[T,A]]}c=w?"center":_>0?"left":"right"}var C=f.getFont(),L=f.get("rotate")?_<0?-x+Math.PI:-x:0,D=t.getFormattedLabel(i,"normal")||r.getName(i),P=$x.getBoundingRect(D,C,c,"top");l=!!L,d.label={x:n,y:h,position:g,height:P.height,len:v,len2:y,linePoints:u,textAlign:c,verticalAlign:"middle",rotation:L,inside:w},w||s.push(d.label)})),!l&&t.get("avoidLabelOverlap")&&function(t,e,i,n,a,o){for(var r=[],s=[],l=0;l<t.length;l++)t[l].x<e?r.push(t[l]):s.push(t[l]);for(Kx(s,e,i,n,1,0,o),Kx(r,e,i,n,-1,0,o),l=0;l<t.length;l++){var h=t[l].linePoints;if(h){var u=h[1][0]-h[2][0];t[l].x<e?h[2][0]=t[l].x+3:h[2][0]=t[l].x-3,h[1][1]=h[2][1]=t[l].y,h[1][0]=h[2][0]+u}}}(s,a,o,e,0,n)},Qx=po,t_=Qx.parsePercent,e_=Qx.linearMap,i_=Jx,n_=b,a_=2*Math.PI,o_=Math.PI/180;var r_=function(t,e){var i=e.findComponents({mainType:"legend"});i&&i.length&&e.eachSeriesByType(t,(function(t){var e=t.getData();e.filterSelf((function(t){for(var n=e.getName(t),a=0;a<i.length;a++)if(!i[a].isSelected(n))return!1;return!0}),this)}),this)},s_=m,l_=b,h_=Yx,u_=function(t,e,i,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),n=t.get("radius");n_.isArray(n)||(n=[0,n]),n_.isArray(e)||(e=[e,e]);var a=i.getWidth(),o=i.getHeight(),r=Math.min(a,o),s=t_(e[0],a),l=t_(e[1],o),h=t_(n[0],r/2),u=t_(n[1],r/2),c=t.getData(),d=-t.get("startAngle")*o_,p=t.get("minAngle")*o_,f=0;c.each("value",(function(t){!isNaN(t)&&f++}));var g=c.getSum("value"),m=Math.PI/(g||f)*2,v=t.get("clockwise"),y=t.get("roseType"),x=t.get("stillShowZeroSum"),_=c.getDataExtent("value");_[0]=0;var b=a_,w=0,S=d,M=v?1:-1;if(c.each("value",(function(t,e){var i;if(isNaN(t))c.setItemLayout(e,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:s,cy:l,r0:h,r:y?NaN:u});else{(i="area"!==y?0===g&&x?m:t*m:a_/f)<p?(i=p,b-=p):w+=t;var n=S+M*i;c.setItemLayout(e,{angle:i,startAngle:S,endAngle:n,clockwise:v,cx:s,cy:l,r0:h,r:y?e_(t,_,[h,u]):u}),S=n}}),!0),b<a_&&f)if(b<=.001){var I=a_/f;c.each("value",(function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e);i.angle=I,i.startAngle=d+M*e*I,i.endAngle=d+M*(e+1)*I}}))}else m=b/w,S=d,c.each("value",(function(t,e){if(!isNaN(t)){var i=c.getItemLayout(e),n=i.angle===p?p:t*m;i.startAngle=S,i.endAngle=S+M*n,S+=M*n}}));i_(t,u,a,o)}))},c_=r_;Xx("pie",[{type:"pieToggleSelect",event:"pieselectchanged",method:"toggleSelected"},{type:"pieSelect",event:"pieselected",method:"select"},{type:"pieUnSelect",event:"pieunselected",method:"unSelect"}]),s_.registerVisual(l_.curry(h_,"pie")),s_.registerLayout(l_.curry(u_,"pie")),s_.registerProcessor(l_.curry(c_,"pie"));var d_=Ep;yd.extend({type:"series.scatter",dependencies:["grid","polar","geo","singleAxis","calendar"],getInitialData:function(t,e){return d_(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,hoverAnimation:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{normal:{opacity:.8}}}});var p_=Bo,f_=Hf.createSymbol,g_=p_.extendShape({shape:{points:null,sizes:null},symbolProxy:null,buildPath:function(t,e){for(var i=e.points,n=e.sizes,a=this.symbolProxy,o=a.shape,r=0;r<i.length;r++){var s=i[r];if(!isNaN(s[0])&&!isNaN(s[1])){var l=n[r];l[0]<4?t.rect(s[0]-l[0]/2,s[1]-l[1]/2,l[0],l[1]):(o.x=s[0]-l[0]/2,o.y=s[1]-l[1]/2,o.width=l[0],o.height=l[1],a.buildPath(t,o,!0))}}},findDataIndex:function(t,e){for(var i=this.shape,n=i.points,a=i.sizes,o=n.length-1;o>=0;o--){var r=n[o],s=a[o],l=r[0]-s[0]/2,h=r[1]-s[1]/2;if(t>=l&&e>=h&&t<=l+s[0]&&e<=h+s[1])return o}return-1}});function m_(){this.group=new p_.Group,this._symbolEl=new g_({})}var v_=m_.prototype;v_.updateData=function(t){this.group.removeAll();var e=this._symbolEl,i=t.hostModel;e.setShape({points:t.mapArray(t.getItemLayout),sizes:t.mapArray((function(e){var i=t.getItemVisual(e,"symbolSize");return i instanceof Array||(i=[i,i]),i}))}),e.symbolProxy=f_(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor,e.useStyle(i.getModel("itemStyle.normal").getItemStyle(["color"]));var n=t.getVisual("color");n&&e.setColor(n),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>=0&&(e.dataIndex=i)})),this.group.add(e)},v_.updateLayout=function(t){var e=t.getData();this._symbolEl.setShape({points:e.mapArray(e.getItemLayout)})},v_.remove=function(){this.group.removeAll()};var y_=pm,x_=m_;m.extendChartView({type:"scatter",init:function(){this._normalSymbolDraw=new y_,this._largeSymbolDraw=new x_},render:function(t,e,i){var n=t.getData(),a=this._largeSymbolDraw,o=this._normalSymbolDraw,r=this.group,s=t.get("large")&&n.count()>t.get("largeThreshold")?a:o;this._symbolDraw=s,s.updateData(n),r.add(s.group),r.remove(s===a?o.group:a.group)},updateLayout:function(t){this._symbolDraw.updateLayout(t)},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e,!0)},dispose:function(){}});var __=m,b_=b,w_=Ym,S_=$m;__.registerVisual(b_.curry(w_,"scatter","circle",null)),__.registerLayout(b_.curry(S_,"scatter"));var M_=gg;function I_(t,e,i){M_.call(this,t,e,i),this.type="value",this.angle=0,this.name="",this.model}b.inherits(I_,M_);var A_=b,T_=I_,C_=af,L_=po,D_=Rp,P_=D_.getScaleExtent,k_=D_.niceScaleExtent,O_=_c;function z_(t,e,i){this._model=t,this.dimensions=[],this._indicatorAxes=A_.map(t.getIndicatorModels(),(function(t,e){var i="indicator_"+e,n=new T_(i,new C_);return n.name=t.get("name"),n.model=t,t.axis=n,this.dimensions.push(i),n}),this),this.resize(t,i),this.cx,this.cy,this.r,this.startAngle}z_.prototype.getIndicatorAxes=function(){return this._indicatorAxes},z_.prototype.dataToPoint=function(t,e){var i=this._indicatorAxes[e];return this.coordToPoint(i.dataToCoord(t),e)},z_.prototype.coordToPoint=function(t,e){var i=this._indicatorAxes[e].angle;return[this.cx+t*Math.cos(i),this.cy-t*Math.sin(i)]},z_.prototype.pointToData=function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=Math.sqrt(e*e+i*i);e/=n,i/=n;for(var a,o=Math.atan2(-i,e),r=1/0,s=-1,l=0;l<this._indicatorAxes.length;l++){var h=this._indicatorAxes[l],u=Math.abs(o-h.angle);u<r&&(a=h,s=l,r=u)}return[s,+(a&&a.coodToData(n))]},z_.prototype.resize=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a)/2;this.cx=L_.parsePercent(i[0],n),this.cy=L_.parsePercent(i[1],a),this.startAngle=t.get("startAngle")*Math.PI/180,this.r=L_.parsePercent(t.get("radius"),o),A_.each(this._indicatorAxes,(function(t,e){t.setExtent(0,this.r);var i=this.startAngle+e*Math.PI*2/this._indicatorAxes.length;i=Math.atan2(Math.sin(i),Math.cos(i)),t.angle=i}),this)},z_.prototype.update=function(t,e){var i=this._indicatorAxes,n=this._model;A_.each(i,(function(t){t.scale.setExtent(1/0,-1/0)})),t.eachSeriesByType("radar",(function(e,a){if("radar"===e.get("coordinateSystem")&&t.getComponent("radar",e.get("radarIndex"))===n){var o=e.getData();A_.each(i,(function(t){t.scale.unionExtentFromData(o,t.dim)}))}}),this);var a=n.get("splitNumber");function o(t){var e=Math.pow(10,Math.floor(Math.log(t)/Math.LN10)),i=t/e;return 2===i?i=5:i*=2,i*e}A_.each(i,(function(t,e){var i=P_(t.scale,t.model);k_(t.scale,t.model);var n=t.model,r=t.scale,s=n.getMin(),l=n.getMax(),h=r.getInterval();if(null!=s&&null!=l)r.setExtent(+s,+l),r.setInterval((l-s)/a);else if(null!=s){var u;do{u=s+h*a,r.setExtent(+s,u),r.setInterval(h),h=o(h)}while(u<i[1]&&isFinite(u)&&isFinite(i[1]))}else if(null!=l){var c;do{c=l-h*a,r.setExtent(c,+l),r.setInterval(h),h=o(h)}while(c>i[0]&&isFinite(c)&&isFinite(i[0]))}else{r.getTicks().length-1>a&&(h=o(h));var d=Math.round((i[0]+i[1])/2/h)*h,p=Math.round(a/2);r.setExtent(L_.round(d-p*h),L_.round(d+(a-p)*h)),r.setInterval(h)}}))},z_.dimensions=[],z_.create=function(t,e){var i=[];return t.eachComponent("radar",(function(n){var a=new z_(n,t,e);i.push(a),n.coordinateSystem=a})),t.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},O_.register("radar",z_);var E_=m,R_=b,N_=ou,V_=Wf,B_=fv.valueAxis;function G_(t,e){return R_.defaults({show:e},t)}E_.extendComponentModel({type:"radar",optionUpdated:function(){var t=this.get("boundaryGap"),e=this.get("splitNumber"),i=this.get("scale"),n=this.get("axisLine"),a=this.get("axisTick"),o=this.get("axisLabel"),r=this.get("name"),s=this.get("name.show"),l=this.get("name.formatter"),h=this.get("nameGap"),u=this.get("triggerEvent"),c=R_.map(this.get("indicator")||[],(function(c){null!=c.max&&c.max>0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var d=r;if(null!=c.color&&(d=R_.defaults({color:c.color},r)),c=R_.merge(R_.clone(c),{boundaryGap:t,splitNumber:e,scale:i,axisLine:n,axisTick:a,axisLabel:o,name:c.text,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:u},!1),s||(c.name=""),"string"==typeof l){var p=c.name;c.name=l.replace("{value}",null!=p?p:"")}else"function"==typeof l&&(c.name=l(c.name,c));var f=R_.extend(new N_(c,null,this.ecModel),V_);return f.mainType="radar",f.componentIndex=this.componentIndex,f}),this);this.getIndicatorModels=function(){return c}},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,name:{show:!0},boundaryGap:[0,0],splitNumber:5,nameGap:15,scale:!1,shape:"polygon",axisLine:R_.merge({lineStyle:{color:"#bbb"}},B_.axisLine),axisLabel:G_(B_.axisLabel,!1),axisTick:G_(B_.axisTick,!1),splitLine:G_(B_.splitLine,!0),splitArea:G_(B_.splitArea,!0),indicator:[]}});var W_=b,H_=yy,F_=Bo,Z_=["axisLine","axisTickLabel","axisName"];m.extendComponentView({type:"radar",render:function(t,e,i){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},_buildAxes:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes(),n=W_.map(i,(function(t){return new H_(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})}));W_.each(n,(function(t){W_.each(Z_,t.add,t),this.group.add(t.getGroup())}),this)},_buildSplitLineAndArea:function(t){var e=t.coordinateSystem,i=e.getIndicatorAxes();if(i.length){var n=t.get("shape"),a=t.getModel("splitLine"),o=t.getModel("splitArea"),r=a.getModel("lineStyle"),s=o.getModel("areaStyle"),l=a.get("show"),h=o.get("show"),u=r.get("color"),c=s.get("color");u=W_.isArray(u)?u:[u],c=W_.isArray(c)?c:[c];var d=[],p=[];if("circle"===n)for(var f=i[0].getTicksCoords(),g=e.cx,m=e.cy,v=0;v<f.length;v++){if(l)d[I(d,u,v)].push(new F_.Circle({shape:{cx:g,cy:m,r:f[v]}}));if(h&&v<f.length-1)p[I(p,c,v)].push(new F_.Ring({shape:{cx:g,cy:m,r0:f[v],r:f[v+1]}}))}else{var y,x=W_.map(i,(function(t,i){var n=t.getTicksCoords();return y=null==y?n.length-1:Math.min(n.length-1,y),W_.map(n,(function(t){return e.coordToPoint(t,i)}))})),_=[];for(v=0;v<=y;v++){for(var b=[],w=0;w<i.length;w++)b.push(x[w][v]);if(b[0]&&b.push(b[0].slice()),l)d[I(d,u,v)].push(new F_.Polyline({shape:{points:b}}));if(h&&_)p[I(p,c,v-1)].push(new F_.Polygon({shape:{points:b.concat(_)}}));_=b.slice().reverse()}}var S=r.getLineStyle(),M=s.getAreaStyle();W_.each(p,(function(t,e){this.group.add(F_.mergePath(t,{style:W_.defaults({stroke:"none",fill:c[e%c.length]},M),silent:!0}))}),this),W_.each(d,(function(t,e){this.group.add(F_.mergePath(t,{style:W_.defaults({fill:"none",stroke:u[e%u.length]},S),silent:!0}))}),this)}function I(t,e,i){var n=i%e.length;return t[n]=t[n]||[],n}}});var j_=yd,U_=dp,q_=wp,X_=b,Y_=co.encodeHTML,$_=j_.extend({type:"series.radar",dependencies:["radar"],init:function(t){$_.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},getInitialData:function(t,e){var i=t.data||[],n=q_([],i,{extraPrefix:"indicator_",extraFromZero:!0}),a=new U_(n,this);return a.initData(i),a},formatTooltip:function(t){var e=this.getRawValue(t),i=this.coordinateSystem.getIndicatorAxes(),n=this.getData().getName(t);return Y_(""===n?this.name:n)+"<br/>"+X_.map(i,(function(t,i){return Y_(t.name+" : "+e[i])})).join("<br />")},defaultOption:{zlevel:0,z:2,coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{normal:{width:2,type:"solid"}},label:{normal:{position:"top"}},symbol:"emptyCircle",symbolSize:4}}),K_=Bo,J_=b,Q_=Hf;m.extendChartView({type:"radar",render:function(t,e,i){var n=t.coordinateSystem,a=this.group,o=t.getData(),r=this._data;function s(t,e){var i=t.getItemVisual(e,"symbol")||"circle",n=t.getItemVisual(e,"color");if("none"!==i){var a=function(t){return J_.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),o=Q_.createSymbol(i,-1,-1,2,2,n);return o.attr({style:{strokeNoScale:!0},z2:100,scale:[a[0]/2,a[1]/2]}),o}}function l(e,i,n,a,o,r){n.removeAll();for(var l=0;l<i.length-1;l++){var h=s(a,o);h&&(h.__dimIdx=l,e[l]?(h.attr("position",e[l]),K_[r?"initProps":"updateProps"](h,{position:i[l]},t,o)):h.attr("position",i[l]),n.add(h))}}function h(t){return J_.map(t,(function(t){return[n.cx,n.cy]}))}o.diff(r).add((function(e){var i=o.getItemLayout(e);if(i){var n=new K_.Polygon,a=new K_.Polyline,r={shape:{points:i}};n.shape.points=h(i),a.shape.points=h(i),K_.initProps(n,r,t,e),K_.initProps(a,r,t,e);var s=new K_.Group,u=new K_.Group;s.add(a),s.add(n),s.add(u),l(a.shape.points,i,u,o,e,!0),o.setItemGraphicEl(e,s)}})).update((function(e,i){var n=r.getItemGraphicEl(i),a=n.childAt(0),s=n.childAt(1),h=n.childAt(2),u={shape:{points:o.getItemLayout(e)}};u.shape.points&&(l(a.shape.points,u.shape.points,h,o,e,!1),K_.updateProps(a,u,t),K_.updateProps(s,u,t),o.setItemGraphicEl(e,n))})).remove((function(t){a.remove(r.getItemGraphicEl(t))})).execute(),o.eachItemGraphicEl((function(t,e){var i=o.getItemModel(e),n=t.childAt(0),r=t.childAt(1),s=t.childAt(2),l=o.getItemVisual(e,"color");a.add(t),n.useStyle(J_.defaults(i.getModel("lineStyle.normal").getLineStyle(),{fill:"none",stroke:l})),n.hoverStyle=i.getModel("lineStyle.emphasis").getLineStyle();var h=i.getModel("areaStyle.normal"),u=i.getModel("areaStyle.emphasis"),c=h.isEmpty()&&h.parentModel.isEmpty(),d=u.isEmpty()&&u.parentModel.isEmpty();d=d&&c,r.ignore=c,r.useStyle(J_.defaults(h.getAreaStyle(),{fill:l,opacity:.7})),r.hoverStyle=u.getAreaStyle();var p=i.getModel("itemStyle.normal").getItemStyle(["color"]),f=i.getModel("itemStyle.emphasis").getItemStyle(),g=i.getModel("label.normal"),m=i.getModel("label.emphasis");function v(){r.attr("ignore",d)}function y(){r.attr("ignore",c)}s.eachChild((function(t){t.setStyle(p),t.hoverStyle=J_.clone(f),K_.setLabelStyle(t.style,t.hoverStyle,g,m,{labelFetcher:o.hostModel,labelDataIndex:e,labelDimIndex:t.__dimIdx,defaultText:o.get(o.dimensions[t.__dimIdx],e),autoColor:l,isRectText:!0})})),t.off("mouseover").off("mouseout").off("normal").off("emphasis"),t.on("emphasis",v).on("mouseover",v).on("normal",y).on("mouseout",y),K_.setHoverStyle(t)})),this._data=o},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var tb=function(t){t.eachSeriesByType("radar",(function(t){var e=t.getData(),i=[],n=t.coordinateSystem;if(n){for(var a=0;a<n.getIndicatorAxes().length;a++){var o=e.dimensions[a];e.each(o,r)}e.each((function(t){i[t][0]&&i[t].push(i[t][0].slice()),e.setItemLayout(t,i[t])}))}function r(t,e){i[e]=i[e]||[],i[e][a]=n.dataToPoint(t,a)}}))},eb=b;var ib=m,nb=b,ab=Yx,ob=Ym,rb=tb,sb=r_,lb=function(t){var e=t.polar;if(e){eb.isArray(e)||(e=[e]);var i=[];eb.each(e,(function(e,n){e.indicator?(e.type&&!e.shape&&(e.shape=e.type),t.radar=t.radar||[],eb.isArray(t.radar)||(t.radar=[t.radar]),t.radar.push(e)):i.push(e)})),t.polar=i}eb.each(t.series,(function(t){t&&"radar"===t.type&&t.polarIndex&&(t.radarIndex=t.polarIndex)}))};ib.registerVisual(nb.curry(ab,"radar")),ib.registerVisual(nb.curry(ob,"radar","circle",null)),ib.registerLayout(rb),ib.registerProcessor(nb.curry(sb,"radar")),ib.registerPreprocessor(lb);var hb=b,ub=j,cb=mt,db=Je,pb=At,fb=ub.applyTransform;function gb(){pb.call(this)}function mb(t){this.name=t,this.zoomLimit,pb.call(this),this._roamTransform=new gb,this._viewTransform=new gb,this._center,this._zoom}function vb(t,e,i,n){var a=i.seriesModel,o=a?a.coordinateSystem:null;return o===this?o[t](n):null}hb.mixin(gb,pb),mb.prototype={constructor:mb,type:"view",dimensions:["x","y"],setBoundingRect:function(t,e,i,n){return this._rect=new db(t,e,i,n),this._rect},getBoundingRect:function(){return this._rect},setViewRect:function(t,e,i,n){this.transformTo(t,e,i,n),this._viewRect=new db(t,e,i,n)},transformTo:function(t,e,i,n){var a=this.getBoundingRect(),o=this._viewTransform;o.transform=a.calculateTransform(new db(t,e,i,n)),o.decomposeTransform(),this._updateTransform()},setCenter:function(t){t&&(this._center=t,this._updateCenterAndZoom())},setZoom:function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},getDefaultCenter:function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},getCenter:function(){return this._center||this.getDefaultCenter()},getZoom:function(){return this._zoom||1},getRoamTransform:function(){return this._roamTransform},_updateCenterAndZoom:function(){var t=this._viewTransform.getLocalTransform(),e=this._roamTransform,i=this.getDefaultCenter(),n=this.getCenter(),a=this.getZoom();n=ub.applyTransform([],n,t),i=ub.applyTransform([],i,t),e.origin=n,e.position=[i[0]-n[0],i[1]-n[1]],e.scale=[a,a],this._updateTransform()},_updateTransform:function(){var t=this._roamTransform,e=this._viewTransform;e.parent=t,t.updateTransform(),e.updateTransform(),e.transform&&cb.copy(this.transform||(this.transform=[]),e.transform),this.transform?(this.invTransform=this.invTransform||[],cb.invert(this.invTransform,this.transform)):this.invTransform=null,this.decomposeTransform()},getViewRect:function(){return this._viewRect},getViewRectAfterRoam:function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},dataToPoint:function(t){var e=this.transform;return e?fb([],t,e):[t[0],t[1]]},pointToData:function(t){var e=this.invTransform;return e?fb([],t,e):[t[0],t[1]]},convertToPixel:hb.curry(vb,"dataToPoint"),convertFromPixel:hb.curry(vb,"pointToData"),containPoint:function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])}},hb.mixin(mb,pb);for(var yb=mb,xb=b,_b=Mg,bb=[126,25],wb=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],Sb=0;Sb<wb.length;Sb++)for(var Mb=0;Mb<wb[Sb].length;Mb++)wb[Sb][Mb][0]/=10.5,wb[Sb][Mb][1]/=-14,wb[Sb][Mb][0]+=bb[0],wb[Sb][Mb][1]+=bb[1];var Ib=b,Ab={"":[32,80],"广":[0,-10],"":[10,5],"":[-10,10],"":[5,5]};var Tb=b,Cb={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};var Lb=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];var Db=function(t){if("china"===t.map)for(var e=0,i=t.regions.length;e<i;++e)""===t.regions[e].name&&t.regions[e].geometries.push({type:"polygon",exterior:Lb[0]})},Pb=b,kb=Je,Ob=Cg,zb=yb,Eb=[function(t){"china"===t.map&&t.regions.push(new _b("",xb.map(wb,(function(t){return{type:"polygon",exterior:t}})),bb))},function(t){Ib.each(t.regions,(function(t){var e=Ab[t.name];if(e){var i=t.center;i[0]+=e[0]/10.5,i[1]+=-e[1]/14}}))},function(t){Tb.each(t.regions,(function(t){var e=Cb[t.name];if(e){var i=t.center;i[0]=e[0],i[1]=e[1]}}))},Db];function Rb(t,e,i,n,a){zb.call(this,t),this.map=e,this._nameCoordMap=Pb.createHashMap(),this.loadGeoJson(i,n,a)}function Nb(t,e,i,n){var a=i.geoModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem||(o.getReferringComponents("geo")[0]||{}).coordinateSystem:null;return r===this?r[t](n):null}Rb.prototype={constructor:Rb,type:"geo",dimensions:["lng","lat"],containCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return!0;return!1},loadGeoJson:function(t,e,i){try{this.regions=t?Ob(t):[]}catch(l){throw"Invalid geoJson format\n"+l.message}e=e||{},i=i||{};for(var n=this.regions,a=Pb.createHashMap(),o=0;o<n.length;o++){var r=n[o].name;r=i.hasOwnProperty(r)?i[r]:r,n[o].name=r,a.set(r,n[o]),this.addGeoCoord(r,n[o].center);var s=e[r];s&&n[o].transformTo(s.left,s.top,s.width,s.height)}this._regionsMap=a,this._rect=null,Pb.each(Eb,(function(t){t(this)}),this)},transformTo:function(t,e,i,n){var a=this.getBoundingRect();(a=a.clone()).y=-a.y-a.height;var o=this._viewTransform;o.transform=a.calculateTransform(new kb(t,e,i,n)),o.decomposeTransform();var r=o.scale;r[1]=-r[1],o.updateTransform(),this._updateTransform()},getRegion:function(t){return this._regionsMap.get(t)},getRegionByCoord:function(t){for(var e=this.regions,i=0;i<e.length;i++)if(e[i].contain(t))return e[i]},addGeoCoord:function(t,e){this._nameCoordMap.set(t,e)},getGeoCoord:function(t){return this._nameCoordMap.get(t)},getBoundingRect:function(){if(this._rect)return this._rect;for(var t,e=this.regions,i=0;i<e.length;i++){var n=e[i].getBoundingRect();(t=t||n.clone()).union(n)}return this._rect=t||new kb(0,0,0,0)},dataToPoint:function(t){if("string"==typeof t&&(t=this.getGeoCoord(t)),t)return zb.prototype.dataToPoint.call(this,t)},convertToPixel:Pb.curry(Nb,"dataToPoint"),convertFromPixel:Pb.curry(Nb,"pointToData")},Pb.mixin(Rb,zb);var Vb=m,Bb=b,Gb=Rb,Wb=wu,Hb=po;function Fb(t,e){var i=t.get("boundingCoords");if(null!=i){var n=i[0],a=i[1];isNaN(n[0])||isNaN(n[1])||isNaN(a[0])||isNaN(a[1])||this.setBoundingRect(n[0],n[1],a[0]-n[0],a[1]-n[1])}var o,r=this.getBoundingRect(),s=t.get("layoutCenter"),l=t.get("layoutSize"),h=e.getWidth(),u=e.getHeight(),c=t.get("aspectScale")||.75,d=r.width/r.height*c,p=!1;if(s&&l&&(s=[Hb.parsePercent(s[0],h),Hb.parsePercent(s[1],u)],l=Hb.parsePercent(l,Math.min(h,u)),isNaN(s[0])||isNaN(s[1])||isNaN(l)||(p=!0)),p){var f={};d>1?(f.width=l,f.height=l/d):(f.height=l,f.width=l*d),f.y=s[1]-f.height/2,f.x=s[0]-f.width/2}else(o=t.getBoxLayoutParams()).aspect=d,f=Wb.getLayoutRect(o,{width:h,height:u});this.setViewRect(f.x,f.y,f.width,f.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}function Zb(t,e){Bb.each(e.get("geoCoord"),(function(e,i){t.addGeoCoord(i,e)}))}var jb={dimensions:Gb.prototype.dimensions,create:function(t,e){var i=[];t.eachComponent("geo",(function(t,n){var a=t.get("map"),o=Vb.getMap(a),r=new Gb(a+n,a,o&&o.geoJson,o&&o.specialAreas,t.get("nameMap"));r.zoomLimit=t.get("scaleLimit"),i.push(r),Zb(r,t),t.coordinateSystem=r,r.model=t,r.resize=Fb,r.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=i[e]}}));var n={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();n[e]=n[e]||[],n[e].push(t)}})),Bb.each(n,(function(t,n){var a=Vb.getMap(n),o=Bb.map(t,(function(t){return t.get("nameMap")})),r=new Gb(n,n,a&&a.geoJson,a&&a.specialAreas,Bb.mergeAll(o));r.zoomLimit=Bb.retrieve.apply(null,Bb.map(t,(function(t){return t.get("scaleLimit")}))),i.push(r),r.resize=Fb,r.resize(t[0],e),Bb.each(t,(function(t){t.coordinateSystem=r,Zb(r,t)}))})),i},getFilledRegions:function(t,e,i){var n=(t||[]).slice();i=i||{};var a=Vb.getMap(e),o=a&&a.geoJson;if(!o)return t;for(var r=Bb.createHashMap(),s=o.features,l=0;l<n.length;l++)r.set(n[l].name,n[l]);for(l=0;l<s.length;l++){var h=s[l].properties.name;r.get(h)||(i.hasOwnProperty(h)&&(h=i[h]),n.push({name:h}))}return n}};Vb.registerCoordinateSystem("geo",jb);var Ub=jb,qb=b,Xb=dp,Yb=yd,$b=wp,Kb=co,Jb=Kb.encodeHTML,Qb=Kb.addCommas,tw=Dx,ew=Ub,iw=Yb.extend({type:"series.map",dependencies:["geo"],layoutMode:"box",needsDrawMap:!1,seriesGroup:[],init:function(t){this._fillOption(t,this.getMapType()),iw.superApply(this,"init",arguments),this.updateSelectedMap(t.data)},getInitialData:function(t){var e=$b(["value"],t.data||[]),i=new Xb(e,this);return i.initData(t.data),i},mergeOption:function(t){this._fillOption(t,this.getMapType()),iw.superApply(this,"mergeOption",arguments),this.updateSelectedMap(this.option.data)},getHostGeoModel:function(){var t=this.option.geoIndex;return null!=t?this.dependentModels.geo[t]:null},getMapType:function(){return(this.getHostGeoModel()||this).option.map},_fillOption:function(t,e){t.data=ew.getFilledRegions(t.data,e,t.nameMap)},getRawValue:function(t){return this.getData().get("value",t)},getRegionModel:function(t){var e=this.getData();return e.getItemModel(e.indexOfName(t))},formatTooltip:function(t){for(var e=this.getData(),i=Qb(this.getRawValue(t)),n=e.getName(t),a=this.seriesGroup,o=[],r=0;r<a.length;r++){var s=a[r].originalData.indexOfName(n);isNaN(a[r].originalData.get("value",s))||o.push(Jb(a[r].name))}return o.join(", ")+"<br />"+Jb(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:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{areaColor:"rgba(255,215,0,0.8)"}}}});qb.mixin(iw,tw);var nw={},aw="\0_ec_interaction_mutex";function ow(t){return t[aw]||(t[aw]={})}m.registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){})),nw.take=function(t,e,i){ow(t)[e]=i},nw.release=function(t,e,i){var n=ow(t);n[e]===i&&(n[e]=null)},nw.isTaken=function(t,e){return!!ow(t)[e]};var rw=b,sw=rt,lw=fa,hw=nw;function uw(t){this.pointerChecker,this._zr=t,this._opt={};var e=rw.bind,i=e(cw,this),n=e(dw,this),a=e(pw,this),o=e(fw,this),r=e(gw,this);sw.call(this),this.setPointerChecker=function(t){this.pointerChecker=t},this.enable=function(e,s){this.disable(),this._opt=rw.defaults(rw.clone(s)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}),null==e&&(e=!0),!0!==e&&"move"!==e&&"pan"!==e||(t.on("mousedown",i),t.on("mousemove",n),t.on("mouseup",a)),!0!==e&&"scale"!==e&&"zoom"!==e||(t.on("mousewheel",o),t.on("pinch",r))},this.disable=function(){t.off("mousedown",i),t.off("mousemove",n),t.off("mouseup",a),t.off("mousewheel",o),t.off("pinch",r)},this.dispose=this.disable,this.isDragging=function(){return this._dragging},this.isPinching=function(){return this._pinching}}function cw(t){if(!(lw.notLeftMouse(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 dw(t){if(!lw.notLeftMouse(t)&&vw(this,"moveOnMouseMove",t)&&this._dragging&&"pinch"!==t.gestureEvent&&!hw.isTaken(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&&lw.stop(t.event),this.trigger("pan",o,r,n,a,e,i)}}function pw(t){lw.notLeftMouse(t)||(this._dragging=!1)}function fw(t){if(vw(this,"zoomOnMouseWheel",t)&&0!==t.wheelDelta){var e=t.wheelDelta>0?1.1:1/1.1;mw.call(this,t,e,t.offsetX,t.offsetY)}}function gw(t){if(!hw.isTaken(this._zr,"globalPan")){var e=t.pinchScale>1?1.1:1/1.1;mw.call(this,t,e,t.pinchX,t.pinchY)}}function mw(t,e,i,n){this.pointerChecker&&this.pointerChecker(t,i,n)&&(lw.stop(t.event),this.trigger("zoom",e,i,n))}function vw(t,e,i){var n=t._opt[e];return n&&(!rw.isString(n)||i.event[n+"Key"])}rw.mixin(uw,sw);var yw=uw,xw={};xw.updateViewOnPan=function(t,e,i){var n=t.target,a=n.position;a[0]+=e,a[1]+=i,n.dirty()},xw.updateViewOnZoom=function(t,e,i,n){var a=t.target,o=t.zoomLimit,r=a.position,s=a.scale,l=t.zoom=t.zoom||1;if(l*=e,o){var h=o.min||0,u=o.max||1/0;l=Math.max(Math.min(u,l),h)}var c=l/t.zoom;t.zoom=l,r[0]-=(i-r[0])*(c-1),r[1]-=(n-r[1])*(c-1),s[0]*=c,s[1]*=c,a.dirty()};var _w={},bw={axisPointer:1,tooltip:1,brush:1};_w.onIrrelevantElement=function(t,e,i){var n=e.getComponentByElement(t.topTarget),a=n&&n.coordinateSystem;return n&&n!==i&&!bw[n.mainType]&&a&&a.model!==i};var ww=b,Sw=yw,Mw=xw,Iw=_w.onIrrelevantElement,Aw=Bo;function Tw(t,e){var i=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(i.fill=n),i}function Cw(t,e){e.eachChild((function(e){ww.each(e.__regions,(function(i){e.trigger(t.isSelected(i.name)?"emphasis":"normal")}))}))}function Lw(t,e){var i=new Aw.Group;this._controller=new Sw(t.getZr()),this._controllerHost={target:e?i:null},this.group=i,this._updateGroup=e,this._mouseDownFlag}Lw.prototype={constructor:Lw,draw:function(t,e,i,n,a){var o="geo"===t.mainType,r=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},(function(e){r||e.getHostGeoModel()!==t||(r=e.getData())}));var s=t.coordinateSystem,l=this.group,h=s.scale,u={position:s.position,scale:h};!l.childAt(0)||a?l.attr(u):Aw.updateProps(l,u,t),l.removeAll();var c=["itemStyle","normal"],d=["itemStyle","emphasis"],p=["label","normal"],f=["label","emphasis"],g=ww.createHashMap();ww.each(s.regions,(function(e){var i=g.get(e.name)||g.set(e.name,new Aw.Group),n=new Aw.CompoundPath({shape:{paths:[]}});i.add(n);var a,s=(C=t.getRegionModel(e.name)||t).getModel(c),u=C.getModel(d),m=Tw(s),v=Tw(u),y=C.getModel(p),x=C.getModel(f);if(r){a=r.indexOfName(e.name);var _=r.getItemVisual(a,"color",!0);_&&(m.fill=_)}ww.each(e.geometries,(function(t){if("polygon"===t.type){n.shape.paths.push(new Aw.Polygon({shape:{points:t.exterior}}));for(var e=0;e<(t.interiors?t.interiors.length:0);e++)n.shape.paths.push(new Aw.Polygon({shape:{points:t.interiors[e]}}))}})),n.setStyle(m),n.style.strokeNoScale=!0,n.culling=!0;var b=y.get("show"),w=x.get("show"),S=r&&isNaN(r.get("value",a)),M=r&&r.getItemLayout(a);if(o||S&&(b||w)||M&&M.showLabel){var I,A=o?e.name:a;(!r||a>=0)&&(I=t);var T=new Aw.Text({position:e.center.slice(),scale:[1/h[0],1/h[1]],z2:10,silent:!0});Aw.setLabelStyle(T.style,T.hoverStyle={},y,x,{labelFetcher:I,labelDataIndex:A,defaultText:e.name,useInsideStyle:!1},{textAlign:"center",textVerticalAlign:"middle"}),i.add(T)}if(r)r.setItemGraphicEl(a,i);else{var C=t.getRegionModel(e.name);n.eventData={componentType:"geo",geoIndex:t.componentIndex,name:e.name,region:C&&C.option||{}}}(i.__regions||(i.__regions=[])).push(e),Aw.setHoverStyle(i,v,{hoverSilentOnTouch:!!t.get("selectedMode")}),l.add(i)})),this._updateController(t,e,i),function(t,e,i,n,a){i.off("click"),i.off("mousedown"),e.get("selectedMode")&&(i.on("mousedown",(function(){t._mouseDownFlag=!0})),i.on("click",(function(o){if(t._mouseDownFlag){t._mouseDownFlag=!1;for(var r=o.target;!r.__regions;)r=r.parent;if(r){var s={type:("geo"===e.mainType?"geo":"map")+"ToggleSelect",batch:ww.map(r.__regions,(function(t){return{name:t.name,from:a.uid}}))};s[e.mainType+"Id"]=e.id,n.dispatchAction(s),Cw(e,i)}}})))}(this,t,l,i,n),Cw(t,l)},remove:function(){this.group.removeAll(),this._controller.dispose(),this._controllerHost={}},_updateController:function(t,e,i){var n=t.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=n.getZoom(),a.enable(t.get("roam")||!1);var r=t.mainType;function s(){var e={type:"geoRoam",componentType:r};return e[r+"Id"]=t.id,e}a.off("pan").on("pan",(function(t,e){this._mouseDownFlag=!1,Mw.updateViewOnPan(o,t,e),i.dispatchAction(ww.extend(s(),{dx:t,dy:e}))}),this),a.off("zoom").on("zoom",(function(t,e,n){if(this._mouseDownFlag=!1,Mw.updateViewOnZoom(o,t,e,n),i.dispatchAction(ww.extend(s(),{zoom:t,originX:e,originY:n})),this._updateGroup){var a=this.group,r=a.scale;a.traverse((function(t){"text"===t.type&&t.attr("scale",[1/r[0],1/r[1]])}))}}),this),a.setPointerChecker((function(e,a,o){return n.getViewRectAfterRoam().contain(a,o)&&!Iw(e,i,t)}))}};var Dw=Lw,Pw=b,kw=Bo,Ow=Dw;m.extendChartView({type:"map",render:function(t,e,i,n){if(!n||"mapToggleSelect"!==n.type||n.from!==this.uid){var a=this.group;if(a.removeAll(),!t.getHostGeoModel()){if(n&&"geoRoam"===n.type&&"series"===n.componentType&&n.seriesId===t.id)(o=this._mapDraw)&&a.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new Ow(i,!0);a.add(o.group),o.draw(t,e,i,this,n),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,i)}}},remove:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},dispose:function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},_renderSymbols:function(t,e,i){var n=t.originalData,a=this.group;n.each("value",(function(e,i){if(!isNaN(e)){var o=n.getItemLayout(i);if(o&&o.point){var r=o.point,s=o.offset,l=new kw.Circle({style:{fill:t.getData().getVisual("color")},shape:{cx:r[0]+9*s,cy:r[1],r:3},silent:!0,z2:s?8:10});if(!s){var h=t.mainSeries.getData(),u=n.getName(i),c=h.indexOfName(u),d=n.getItemModel(i),p=d.getModel("label.normal"),f=d.getModel("label.emphasis"),g=h.getItemGraphicEl(c),m=Pw.retrieve2(t.getFormattedLabel(i,"normal"),u),v=Pw.retrieve2(t.getFormattedLabel(i,"emphasis"),m),y=function(){var t=kw.setTextStyle({},f,{text:f.get("show")?v:null},{isRectText:!0,useInsideStyle:!1},!0);l.style.extendFrom(t),l.__mapOriginalZ2=l.z2,l.z2+=1},x=function(){kw.setTextStyle(l.style,p,{text:p.get("show")?m:null,textPosition:p.getShallow("position")||"bottom"},{isRectText:!0,useInsideStyle:!1}),null!=l.__mapOriginalZ2&&(l.z2=l.__mapOriginalZ2,l.__mapOriginalZ2=null)};g.on("mouseover",y).on("mouseout",x).on("emphasis",y).on("normal",x),x()}a.add(l)}}}))}});var zw={};zw.updateCenterAndZoom=function(t,e,i){var n=t.getZoom(),a=t.getCenter(),o=e.zoom,r=t.dataToPoint(a);if(null!=e.dx&&null!=e.dy){r[0]-=e.dx,r[1]-=e.dy;a=t.pointToData(r);t.setCenter(a)}if(null!=o){if(i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(n*o,l),s)/n}t.scale[0]*=o,t.scale[1]*=o;var h=t.position,u=(e.originX-h[0])*(o-1),c=(e.originY-h[1])*(o-1);h[0]-=u,h[1]-=c,t.updateTransform();a=t.pointToData(r);t.setCenter(a),t.setZoom(o*n)}return{center:t.getCenter(),zoom:t.getZoom()}};var Ew=m,Rw=b,Nw=zw.updateCenterAndZoom;Ew.registerAction({type:"geoRoam",event:"geoRoam",update:"updateLayout"},(function(t,e){var i=t.componentType||"series";e.eachComponent({mainType:i,query:t},(function(e){var n=e.coordinateSystem;if("geo"===n.type){var a=Nw(n,t,e.get("scaleLimit"));e.setCenter&&e.setCenter(a.center),e.setZoom&&e.setZoom(a.zoom),"series"===i&&Rw.each(e.seriesGroup,(function(t){t.setCenter(a.center),t.setZoom(a.zoom)}))}}))}));var Vw=b;var Bw=b;var Gw=function(t){var e={};t.eachSeriesByType("map",(function(t){var i=t.getHostGeoModel(),n=i?"o"+i.id:"i"+t.getMapType();(e[n]=e[n]||[]).push(t)})),Bw.each(e,(function(t,e){for(var i,n,a,o,r=(i=Bw.map(t,(function(t){return t.getData()})),n=t[0].get("mapValueCalculation"),a={},o=["value"],Bw.each(i,(function(t){t.each(o,(function(e,i){var n="ec-"+t.getName(i);a[n]=a[n]||[],isNaN(e)||a[n].push(e)}))})),i[0].map(o,(function(t,e){for(var o="ec-"+i[0].getName(e),r=0,s=1/0,l=-1/0,h=a[o].length,u=0;u<h;u++)s=Math.min(s,a[o][u]),l=Math.max(l,a[o][u]),r+=a[o][u];return 0===h?NaN:"min"===n?s:"max"===n?l:"average"===n?r/h:r}))),s=0;s<t.length;s++)t[s].originalData=t[s].getData();for(s=0;s<t.length;s++)t[s].seriesGroup=t,t[s].needsDrawMap=0===s&&!t[s].getHostGeoModel(),t[s].setData(r.cloneShallow()),t[s].mainSeries=t[0]}))},Ww=b;var Hw=m,Fw=function(t){var e={};t.eachSeriesByType("map",(function(i){var n=i.getMapType();if(!i.getHostGeoModel()&&!e[n]){var a={};Vw.each(i.seriesGroup,(function(e){var i=e.coordinateSystem,n=e.originalData;e.get("showLegendSymbol")&&t.getComponent("legend")&&n.each("value",(function(t,e){var o=n.getName(e),r=i.getRegion(o);if(r&&!isNaN(t)){var s=a[o]||0,l=i.dataToPoint(r.center);a[o]=s+1,n.setItemLayout(e,{point:l,offset:s})}}))}));var o=i.getData();o.each((function(t){var e=o.getName(t),i=o.getItemLayout(t)||{};i.showLabel=!a[e],o.setItemLayout(t,i)})),e[n]=!0}}))},Zw=function(t){t.eachSeriesByType("map",(function(t){var e=t.get("color"),i=t.getModel("itemStyle.normal"),n=i.get("areaColor"),a=i.get("color")||e[t.seriesIndex%e.length];t.getData().setVisual({areaColor:n,color:a})}))},jw=Gw,Uw=function(t){Ww.each(t.series,(function(t){t&&"map"===t.type&&(t.map=t.map||t.mapType,Ww.defaults(t,t.mapLocation))}))},qw=Xx;Hw.registerLayout(Fw),Hw.registerVisual(Zw),Hw.registerProcessor(Hw.PRIORITY.PROCESSOR.STATISTIC,jw),Hw.registerPreprocessor(Uw),qw("map",[{type:"mapToggleSelect",event:"mapselectchanged",method:"toggleSelected"},{type:"mapSelect",event:"mapselected",method:"select"},{type:"mapUnSelect",event:"mapunselected",method:"unSelect"}]);var Xw=b,Yw=Xw.each,$w="\0__link_datas",Kw="\0__link_mainData";function Jw(t,e){if((n=this)[Kw]===n){var i=Xw.extend({},this[$w]);i[this.dataType]=e,iS(e,i,t)}else nS(e,this.dataType,this[Kw],t);var n;return e}function Qw(t,e){return t.struct&&t.struct.update(this),e}function tS(t,e){return Yw(e[$w],(function(i,n){i!==e&&nS(i.cloneShallow(),n,e,t)})),e}function eS(t){var e=this[Kw];return null==t||null==e?e:e[$w][t]}function iS(t,e,i){t[$w]={},Yw(e,(function(e,n){nS(e,n,t,i)}))}function nS(t,e,i,n){i[$w][e]=t,t[Kw]=i,t.dataType=e,n.struct&&(t[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=t),t.getLinkedData=eS}var aS=function(t){var e=t.mainData,i=t.datas;i||(i={main:e},t.datasAttr={main:"data"}),t.datas=t.mainData=null,iS(e,i,t),Yw(i,(function(i){Yw(e.TRANSFERABLE_METHODS,(function(e){i.wrapMethod(e,Xw.curry(Jw,t))}))})),e.wrapMethod("cloneShallow",Xw.curry(tS,t)),Yw(e.CHANGABLE_METHODS,(function(i){e.wrapMethod(i,Xw.curry(Qw,t))})),Xw.assert(i[e.dataType]===e)},oS=b,rS=ou,sS=dp,lS=aS,hS=wp,uS=function(t,e){this.name=t||"",this.depth=0,this.height=0,this.parentNode=null,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.hostTree=e};function cS(t,e,i){this.root,this.data,this._nodes=[],this.hostModel=t,this.levelModels=oS.map(e||[],(function(e){return new rS(e,t,t.ecModel)})),this.leavesModel=new rS(i||{},t,t.ecModel)}uS.prototype={constructor:uS,isRemoved:function(){return this.dataIndex<0},eachNode:function(t,e,i){"function"==typeof t&&(i=e,e=t,t=null),t=t||{},oS.isString(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&&r<o.length;r++)o[r].eachNode(t,e,i);"postorder"===a&&e.call(i,this)},updateDepthAndHeight:function(t){var e=0;this.depth=t;for(var i=0;i<this.children.length;i++){var n=this.children[i];n.updateDepthAndHeight(t+1),n.height>e&&(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;e<n;e++){var a=i[e].getNodeById(t);if(a)return a}},contains:function(t){if(t===this)return!0;for(var e=0,i=this.children,n=i.length;e<n;e++){var a=i[e].contains(t);if(a)return a}},getAncestors:function(t){for(var e=[],i=t?this:this.parentNode;i;)e.push(i),i=i.parentNode;return e.reverse(),e},getValue:function(t){var e=this.hostTree.data;return e.get(e.getDimension(t||"value"),this.dataIndex)},setLayout:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},getLayout:function(){return this.hostTree.data.getItemLayout(this.dataIndex)},getModel:function(t){if(!(this.dataIndex<0)){var e,i=this.hostTree,n=i.data.getItemModel(this.dataIndex),a=this.getLevelModel();return a||0!==this.children.length&&(0===this.children.length||!1!==this.isExpand)||(e=this.getLeavesModel()),n.getModel(t,(a||e||i.hostModel).getModel(t))}},getLevelModel:function(){return(this.hostTree.levelModels||[])[this.depth]},getLeavesModel:function(){return this.hostTree.leavesModel},setVisual:function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},getVisual:function(t,e){return this.hostTree.data.getItemVisual(this.dataIndex,t,e)},getRawIndex:function(){return this.hostTree.data.getRawIndex(this.dataIndex)},getId:function(){return this.hostTree.data.getId(this.dataIndex)}},cS.prototype={constructor:cS,type:"tree",eachNode:function(t,e,i){this.root.eachNode(t,e,i)},getNodeByDataIndex:function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},getNodeByName:function(t){return this.root.getNodeByName(t)},update:function(){for(var t=this.data,e=this._nodes,i=0,n=e.length;i<n;i++)e[i].dataIndex=-1;for(i=0,n=t.count();i<n;i++)e[t.getRawIndex(i)].dataIndex=i},clearLayouts:function(){this.data.clearItemLayouts()}},cS.createTree=function(t,e,i){var n=new cS(e,i.levels,i.leaves),a=[],o=1;!function t(e,i){var r=e.value;o=Math.max(o,oS.isArray(r)?r.length:1),a.push(e);var s=new uS(e.name,n);i?function(t,e){var i=e.children;if(t.parentNode===e)return;i.push(t),t.parentNode=e}(s,i):n.root=s,n._nodes.push(s);var l=e.children;if(l)for(var h=0;h<l.length;h++)t(l[h],s)}(t),n.root.updateDepthAndHeight(0);var r=hS([{name:"value"}],a,{dimCount:o}),s=new sS(r,e);return s.initData(a),lS({mainData:s,struct:n,structAttr:"tree"}),n.update(),n};var dS=cS,pS=yd,fS=dS,gS=co.encodeHTML;pS.extend({type:"series.tree",layoutInfo:null,layoutMode:"box",getInitialData:function(t){var e={name:t.name,children:t.data},i=t.leaves||{},n={};n.leaves=i;var a=fS.createTree(e,this,n),o=0;a.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var r=t.expandAndCollapse&&t.initialTreeDepth>=0?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},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 gS(o+(isNaN(a)||null==a?"":" : "+a))},defaultOption:{zlevel:0,z:2,left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",orient:"horizontal",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{normal:{color:"#ccc",width:1.5,curveness:.5}},itemStyle:{normal:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5}},label:{normal:{show:!0,color:"#555"}},leaves:{label:{normal:{show:!0}}},animationEasing:"linear",animationDuration:700,animationDurationUpdate:1e3}});var mS={},vS=wu;function yS(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function xS(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function _S(t,e,i){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:i}function bS(t,e,i){var n=i/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=i,e.hierNode.modifier+=i,e.hierNode.prelim+=i,t.hierNode.change+=n}function wS(t,e){return t.parentNode===e.parentNode?1:2}mS.init=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;a>=0;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)}},mS.firstWalk=function(t,e){var i=t.isExpand?t.children:[],n=t.parentNode.children,a=t.hierNode.i?n[t.hierNode.i-1]:null;if(i.length){!function(t){var e=t.children,i=e.length,n=0,a=0;for(;--i>=0;){var o=e[i];o.hierNode.prelim+=n,o.hierNode.modifier+=n,a+=o.hierNode.change,n+=o.hierNode.shift+a}}(t);var o=(i[0].hierNode.prelim+i[i.length-1].hierNode.prelim)/2;a?(t.hierNode.prelim=a.hierNode.prelim+e(t,a),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else a&&(t.hierNode.prelim=a.hierNode.prelim+e(t,a));t.parentNode.hierNode.defaultAncestor=function(t,e,i,n){if(e){for(var a=t,o=t,r=o.parentNode.children[0],s=e,l=a.hierNode.modifier,h=o.hierNode.modifier,u=r.hierNode.modifier,c=s.hierNode.modifier;s=yS(s),o=xS(o),s&&o;){a=yS(a),r=xS(r),a.hierNode.ancestor=t;var d=s.hierNode.prelim+c-o.hierNode.prelim-h+n(s,o);d>0&&(bS(_S(s,t,i),t,d),h+=d,l+=d),c+=s.hierNode.modifier,h+=o.hierNode.modifier,l+=a.hierNode.modifier,u+=r.hierNode.modifier}s&&!yS(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),o&&!xS(r)&&(r.hierNode.thread=o,r.hierNode.modifier+=h-u,i=t)}return i}(t,a,t.parentNode.hierNode.defaultAncestor||n[0],e)},mS.secondWalk=function(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier},mS.separation=function(t){return arguments.length?t:wS},mS.radialCoordinate=function(t,e){var i={};return t-=Math.PI/2,i.x=e*Math.cos(t),i.y=e*Math.sin(t),i},mS.getViewRect=function(t,e){return vS.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})};var SS=b,MS=Bo,IS=sm,AS=mS.radialCoordinate;function TS(t,e){var i=t.getItemLayout(e);return i&&!isNaN(i.x)&&!isNaN(i.y)&&"none"!==t.getItemVisual(e,"symbol")}function CS(t,e,i){return i.itemModel=e,i.itemStyle=e.getModel("itemStyle.normal").getItemStyle(),i.hoverItemStyle=e.getModel("itemStyle.emphasis").getItemStyle(),i.lineStyle=e.getModel("lineStyle.normal").getLineStyle(),i.labelModel=e.getModel("label.normal"),i.hoverLabelModel=e.getModel("label.emphasis"),!1===t.isExpand&&0!==t.children.length?i.symbolInnerColor=i.itemStyle.fill:i.symbolInnerColor="#fff",i}function LS(t,e,i,n,a,o){var r=!i,s=t.tree.getNodeByDataIndex(e),l=s.getModel(),h=(o=CS(s,l,o),t.tree.root),u=s.parentNode===h?s:s.parentNode||s,c=t.getItemGraphicEl(u.dataIndex),d=u.getLayout(),p=c?{x:c.position[0],y:c.position[1],rawX:c.__radialOldRawX,rawY:c.__radialOldRawY}:d,f=s.getLayout();r?(i=new IS(t,e,o)).attr("position",[p.x,p.y]):i.updateData(t,e,o),i.__radialOldRawX=i.__radialRawX,i.__radialOldRawY=i.__radialRawY,i.__radialRawX=f.rawX,i.__radialRawY=f.rawY,n.add(i),t.setItemGraphicEl(e,i),MS.updateProps(i,{position:[f.x,f.y]},a);var g=i.getSymbolPath();if("radial"===o.layout){var m,v,y=h.children[0],x=y.getLayout(),_=y.children.length;if(f.x===x.x&&!0===s.isExpand){var b={};b.x=(y.children[0].getLayout().x+y.children[_-1].getLayout().x)/2,b.y=(y.children[0].getLayout().y+y.children[_-1].getLayout().y)/2,(m=Math.atan2(b.y-x.y,b.x-x.x))<0&&(m=2*Math.PI+m),(v=b.x<x.x)&&(m-=Math.PI)}else(m=Math.atan2(f.y-x.y,f.x-x.x))<0&&(m=2*Math.PI+m),0===s.children.length||0!==s.children.length&&!1===s.isExpand?(v=f.x<x.x)&&(m-=Math.PI):(v=f.x>x.x)||(m-=Math.PI);var w=v?"left":"right";g.setStyle({textPosition:w,textRotation:-m,textOrigin:"center",verticalAlign:"middle"})}if(s.parentNode&&s.parentNode!==h){var S=i.__edge;S||(S=i.__edge=new MS.BezierCurve({shape:PS(o,p,p),style:SS.defaults({opacity:0},o.lineStyle)})),MS.updateProps(S,{shape:PS(o,d,f),style:{opacity:1}},a),n.add(S)}}function DS(t,e,i,n,a,o){for(var r,s=t.tree.getNodeByDataIndex(e),l=t.tree.root,h=s.getModel(),u=(o=CS(s,h,o),s.parentNode===l?s:s.parentNode||s);null==(r=u.getLayout());)u=u.parentNode===l?u:u.parentNode||u;MS.updateProps(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&&MS.updateProps(c,{shape:PS(o,r,r),style:{opacity:0}},a,(function(){n.remove(c)}))}function PS(t,e,i){var n,a,o,r,s=t.orient;if("radial"===t.layout){var l=e.rawX,h=e.rawY,u=i.rawX,c=i.rawY,d=AS(l,h),p=AS(l,h+(c-h)*t.curvature),f=AS(u,c+(h-c)*t.curvature),g=AS(u,c);return{x1:d.x,y1:d.y,x2:g.x,y2:g.y,cpx1:p.x,cpy1:p.y,cpx2:f.x,cpy2:f.y}}l=e.x,h=e.y,u=i.x,c=i.y;return"horizontal"===s&&(n=l+(u-l)*t.curvature,a=h,o=u+(l-u)*t.curvature,r=c),"vertical"===s&&(n=l,a=h+(c-h)*t.curvature,o=u,r=c+(h-c)*t.curvature),{x1:l,y1:h,x2:u,y2:c,cpx1:n,cpy1:a,cpx2:o,cpy2:r}}m.extendChartView({type:"tree",init:function(t,e){this._oldTree,this._mainGroup=new MS.Group,this.group.add(this._mainGroup)},render:function(t,e,i,n){var a=t.getData(),o=t.layoutInfo,r=this._mainGroup,s=t.get("layout");"radial"===s?r.attr("position",[o.x+o.width/2,o.y+o.height/2]):r.attr("position",[o.x,o.y]);var l=this._data,h={expandAndCollapse:t.get("expandAndCollapse"),layout:s,orient:t.get("orient"),curvature:t.get("lineStyle.normal.curveness"),symbolRotate:t.get("symbolRotate"),symbolOffset:t.get("symbolOffset"),hoverAnimation:t.get("hoverAnimation"),useNameLabel:!0,fadeIn:!0};a.diff(l).add((function(e){TS(a,e)&&LS(a,e,null,r,t,h)})).update((function(e,i){var n=l.getItemGraphicEl(i);TS(a,e)?LS(a,e,n,r,t,h):n&&DS(a,e,n,r,t,h)})).remove((function(e){var i=l.getItemGraphicEl(e);DS(a,e,i,r,t,h)})).execute(),!0===h.expandAndCollapse&&a.eachItemGraphicEl((function(e,n){e.off("click").on("click",(function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:n})}))})),this._data=a},dispose:function(){},remove:function(){this._mainGroup.removeAll(),this._data=null}}),m.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},(function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},(function(e){var i=t.dataIndex,n=e.getData().tree.getNodeByDataIndex(i);n.isExpand=!n.isExpand}))}));var kS={};kS.eachAfter=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;s<r.length;s++)a.push(r[s])}for(;n=o.pop();)e(n,i)},kS.eachBefore=function(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;o>=0;o--)n.push(a[o])}};var OS=kS,zS=OS.eachAfter,ES=OS.eachBefore,RS=mS,NS=RS.init,VS=RS.firstWalk,BS=RS.secondWalk,GS=RS.separation,WS=RS.radialCoordinate,HS=RS.getViewRect;var FS=function(t,e){var i=HS(t,e);t.layoutInfo=i;var n=t.get("layout"),a=0,o=0,r=null;"radial"===n?(a=2*Math.PI,o=Math.min(i.height,i.width)/2,r=GS((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(a=i.width,o=i.height,r=GS());var s=t.getData().tree.root,l=s.children[0];NS(s),zS(l,VS,r),s.hierNode.modifier=-l.hierNode.prelim,ES(l,BS);var h=l,u=l,c=l;ES(l,(function(t){var e=t.getLayout().x;e<h.getLayout().x&&(h=t),e>u.getLayout().x&&(u=t),t.depth>c.depth&&(c=t)}));var d=h===u?1:r(h,u)/2,p=d-h.getLayout().x,f=0,g=0,m=0,v=0;"radial"===n?(f=a/(u.getLayout().x+d+p),g=o/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g;var e=WS(m,v);t.setLayout({x:e.x,y:e.y,rawX:m,rawY:v},!0)}))):"horizontal"===t.get("orient")?(g=o/(u.getLayout().x+d+p),f=a/(c.depth-1||1),ES(l,(function(t){v=(t.getLayout().x+p)*g,m=(t.depth-1)*f,t.setLayout({x:m,y:v},!0)}))):(f=a/(u.getLayout().x+d+p),g=o/(c.depth-1||1),ES(l,(function(t){m=(t.getLayout().x+p)*f,v=(t.depth-1)*g,t.setLayout({x:m,y:v},!0)})))},ZS=FS;var jS=FS;var US=m,qS=b,XS=Ym,YS=function(t,e){t.eachSeriesByType("tree",(function(t){ZS(t,e)}))},$S=function(t,e){t.eachSeriesByType("tree",(function(t){jS(t,e)}))};US.registerVisual(qS.curry(XS,"tree","circle",null)),US.registerLayout(YS),US.registerLayout($S);var KS={},JS=b;function QS(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}KS.retrieveTargetInfo=function(t,e){if(t&&("treemapZoomToNode"===t.type||"treemapRootToNode"===t.type)){var i=e.getData().tree.root,n=t.targetNode;if(n&&i.contains(n))return{node:n};var a=t.targetNodeId;if(null!=a&&(n=i.getNodeById(a)))return{node:n}}},KS.getPathToRoot=QS,KS.aboveViewRoot=function(t,e){var i=QS(t);return JS.indexOf(i,e)>=0},KS.wrapTreePathInfo=function(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};var tM=b,eM=yd,iM=dS,nM=ou,aM=co,oM=aM.encodeHTML,rM=aM.addCommas,sM=KS.wrapTreePathInfo;function lM(t){var e=0;tM.each(t.children,(function(t){lM(t);var i=t.value;tM.isArray(i)&&(i=i[0]),e+=i}));var i=t.value;tM.isArray(i)&&(i=i[0]),(null==i||isNaN(i))&&(i=e),i<0&&(i=0),tM.isArray(t.value)?t.value[0]=i:t.value=i}eM.extend({type:"series.treemap",layoutMode:"box",dependencies:["grid","polar"],_viewRoot:null,defaultOption:{progressive:0,hoverLayerThreshold:1/0,left:"center",top:"middle",right:null,bottom:null,width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{normal:{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:{normal:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",ellipsis:!0}},upperLabel:{normal:{show:!1,position:[0,"50%"],height:20,color:"#fff",ellipsis:!0,verticalAlign:"middle"},emphasis:{show:!0,position:[0,"50%"],color:"#fff",ellipsis:!0,verticalAlign:"middle"}},itemStyle:{normal:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{}},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};lM(i);var n=t.levels||[];n=t.levels=function(t,e){var i,n=e.get("color");if(!n)return;if(t=t||[],tM.each(t,(function(t){var e=new nM(t),n=e.get("color");(e.get("itemStyle.normal.color")||n&&"none"!==n)&&(i=!0)})),!i){(t[0]||(t[0]={})).color=n.slice()}return t}(n,e);var a={};return a.levels=n,iM.createTree(i,this,a).data},optionUpdated:function(){this.resetViewRoot()},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=tM.isArray(i)?rM(i[0]):rM(i),a=e.getName(t);return oM(a+": "+n)},getDataParams:function(t){var e=eM.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return e.treePathInfo=sM(i,this),e},setLayoutInfo:function(t){this.layoutInfo=this.layoutInfo||{},tM.extend(this.layoutInfo,t)},mapIdToIndex:function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=tM.createHashMap(),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.getData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)}});var hM=Bo,uM=wu,cM=b,dM=KS.wrapTreePathInfo;function pM(t){this.group=new hM.Group,t.add(this.group)}function fM(t,e,i,n,a,o){var r=[[a?t:t-5,e],[t+i,e],[t+i,e+n],[a?t:t-5,e+n]];return!o&&r.splice(2,0,[t+i+5,e+n/2]),!a&&r.push([t,e+n/2]),r}function gM(t,e,i){t.eventData={componentType:"series",componentSubType:"treemap",seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:i&&i.dataIndex,name:i&&i.name},treePathInfo:i&&dM(i,e)}}pM.prototype={constructor:pM,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.normal"),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),uM.positionElement(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=0,r=e.emptyItemWidth,s=t.get("breadcrumb.height"),l=uM.getAvailableSize(e.pos,e.box),h=e.totalWidth,u=e.renderList,c=u.length-1;c>=0;c--){var d=u[c],p=d.node,f=d.width,g=d.text;h>l.width&&(h-=f-r,f=r,g=null);var m=new hM.Polygon({shape:{points:fM(o,0,f,s,c===u.length-1,0===c)},style:cM.defaults(i.getItemStyle(),{lineJoin:"bevel",text:g,textFill:n.getTextColor(),textFont:n.getFont()}),z:10,onclick:cM.curry(a,p)});this.group.add(m),gM(m,t,p),o+=f+8}},remove:function(){this.group.removeAll()}};var mM=pM,vM={},yM=b;vM.createWrap=function(){var t,e=[],i={};return{add:function(t,n,a,o,r){return yM.isString(o)&&(r=o,o=0),!i[t.id]&&(i[t.id]=1,e.push({el:t,target:n,time:a,delay:o,easing:r}),!0)},done:function(e){return t=e,this},start:function(){for(var n=e.length,a=0,o=e.length;a<o;a++){var r=e[a];r.el.animateTo(r.target,r.time,r.delay,r.easing,s)}return this;function s(){--n||(e.length=0,i={},t&&t())}}}};var xM=m,_M=b,bM=Bo,wM=$d,SM=KS,MM=mM,IM=yw,AM=Je,TM=mt,CM=vM,LM=zo,DM=_M.bind,PM=bM.Group,kM=bM.Rect,OM=_M.each,zM=["label","normal"],EM=["label","emphasis"],RM=["upperLabel","normal"],NM=["upperLabel","emphasis"],VM=LM([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),BM=function(t){var e=VM(t);return e.stroke=e.fill=e.lineWidth=null,e};function GM(t,e,i,n,a,o,r,s,l,h){if(r){var u=r.getLayout();if(u&&u.isInView){var c=u.width,d=u.height,p=u.borderWidth,f=u.invisible,g=r.getRawIndex(),m=s&&s.getRawIndex(),v=r.viewChildren,y=u.upperHeight,x=v&&v.length,_=r.getModel("itemStyle.normal"),b=r.getModel("itemStyle.emphasis"),w=T("nodeGroup",PM);if(w){if(l.add(w),w.attr("position",[u.x||0,u.y||0]),w.__tmNodeWidth=c,w.__tmNodeHeight=d,u.isAboveViewRoot)return w;var S=T("background",kM,h,1);if(S&&function(e,i,n){i.dataIndex=r.dataIndex,i.seriesIndex=t.seriesIndex,i.setShape({x:0,y:0,width:c,height:d});var a=r.getVisual("borderColor",!0),o=b.get("borderColor");I(i,(function(){var t=BM(_);t.fill=a;var e=VM(b);if(e.fill=o,n){var r=c-2*p;A(t,e,a,r,y,{x:p,y:0,width:r,height:y})}else t.text=e.text=null;i.setStyle(t),bM.setHoverStyle(i,e)})),e.add(i)}(w,S,x&&u.upperHeight),!x){var M=T("content",kM,h,2);M&&function(e,i){i.dataIndex=r.dataIndex,i.seriesIndex=t.seriesIndex;var n=Math.max(c-2*p,0),a=Math.max(d-2*p,0);i.culling=!0,i.setShape({x:p,y:p,width:n,height:a});var o=r.getVisual("color",!0);I(i,(function(){var t=BM(_);t.fill=o;var e=VM(b);A(t,e,o,n,a),i.setStyle(t),bM.setHoverStyle(i,e)})),e.add(i)}(w,M)}return w}}}function I(t,e){f?!t.invisible&&o.push(t):(e(),t.__tmWillVisible||(t.invisible=!1))}function A(e,i,n,a,o,s){var l=r.getModel(),h=_M.retrieve(t.getFormattedLabel(r.dataIndex,"normal",null,null,s?"upperLabel":"label"),l.get("name"));if(!s&&u.isLeafRoot){var c=t.get("drillDownIcon",!0);h=c?c+" "+h:h}var d=l.getModel(s?RM:zM),p=l.getModel(s?NM:EM),f=d.getShallow("show");bM.setLabelStyle(e,i,d,p,{defaultText:f?h:null,autoColor:n,isRectText:!0}),s&&(e.textRect=_M.clone(s)),e.truncate=f&&d.get("ellipsis")?{outerWidth:a,outerHeight:o,minChar:2}:null}function T(t,o,s,l){var h=null!=m&&i[t][m],u=a[t];return h?(i[t][m]=null,function(t,e,i){(t[g]={}).old="nodeGroup"===i?e.position.slice():_M.extend({},e.shape)}(u,h,t)):f||((h=new o({z:WM(s,l)})).__tmDepth=s,h.__tmStorageName=t,function(t,e,i){var o=t[g]={},s=r.parentNode;if(s&&(!n||"drillDown"===n.direction)){var l=0,h=0,u=a.background[s.getRawIndex()];!n&&u&&u.old&&(l=u.old.width,h=u.old.height),o.old="nodeGroup"===i?[0,h]:{x:l,y:h,width:0,height:0}}o.fadein="nodeGroup"!==i}(u,0,t)),e[t][g]=h}}function WM(t,e){var i=10*t+e;return(i-1)/i}xM.extendChartView({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){var a=e.findComponents({mainType:"series",subType:"treemap",query:n});if(!(_M.indexOf(a,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=e;var o=SM.retrieveTargetInfo(n,t),r=n&&n.type,s=t.layoutInfo,l=!this._oldTree,h=this._storage,u="treemapRootToNode"===r&&o&&h?{rootNodeGroup:h.nodeGroup[o.node.getRawIndex()],direction:n.direction}:null,c=this._giveContainerGroup(s),d=this._doRender(c,t,u);l||r&&"treemapZoomToNode"!==r&&"treemapRootToNode"!==r?d.renderFinally():this._doAnimation(c,d,t,u),this._resetController(i),this._renderBreadcrumb(t,i,o)}},_giveContainerGroup:function(t){var e=this._containerGroup;return e||(e=this._containerGroup=new PM,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=[],h=_M.curry(GM,e,r,s,i,o,l);!function t(e,i,n,a,o){a?(i=e,OM(e,(function(t,e){!t.isRemoved()&&s(e,e)}))):new wM(i,e,r,r).add(s).update(s).remove(_M.curry(s,null)).execute();function r(t){return t.getId()}function s(r,s){var l=null!=r?e[r]:null,u=null!=s?i[s]:null,c=h(l,u,n,o);c&&t(l&&l.viewChildren||[],u&&u.viewChildren||[],c,a,o+1)}}(n.root?[n.root]:[],a&&a.root?[a.root]:[],t,n===a||!a,0);var u,c,d=(c={nodeGroup:[],background:[],content:[]},(u=s)&&OM(u,(function(t,e){var i=c[e];OM(t,(function(t){t&&(i.push(t),t.__tmWillDelete=1)}))})),c);return this._oldTree=n,this._storage=r,{lastsForAnimation:o,willDeleteEls:d,renderFinally:function(){OM(d,(function(t){OM(t,(function(t){t.parent&&t.parent.remove(t)}))})),OM(l,(function(t){t.invisible=!0,t.dirty()}))}}},_doAnimation:function(t,e,i,n){if(i.get("animation")){var a=i.get("animationDurationUpdate"),o=i.get("animationEasing"),r=CM.createWrap();OM(e.willDeleteEls,(function(t,e){OM(t,(function(t,i){if(!t.invisible){var s,l=t.parent;if(n&&"drillDown"===n.direction)s=l===n.rootNodeGroup?{shape:{x:0,y:0,width:l.__tmNodeWidth,height:l.__tmNodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var h=0,u=0;l.__tmWillDelete||(h=l.__tmNodeWidth/2,u=l.__tmNodeHeight/2),s="nodeGroup"===e?{position:[h,u],style:{opacity:0}}:{shape:{x:h,y:u,width:0,height:0},style:{opacity:0}}}s&&r.add(t,s,a,o)}}))})),OM(this._storage,(function(t,i){OM(t,(function(t,n){var s=e.lastsForAnimation[i][n],l={};s&&("nodeGroup"===i?s.old&&(l.position=t.position.slice(),t.attr("position",s.old)):(s.old&&(l.shape=_M.extend({},t.shape),t.setShape(s.old)),s.fadein?(t.setStyle("opacity",0),l.style={opacity:1}):1!==t.style.opacity&&(l.style={opacity:1})),r.add(t,l,a,o))}))}),this),this._state="animating",r.done(DM((function(){this._state="ready",e.renderFinally()}),this)).start()}},_resetController:function(t){var e=this._controller;e||((e=this._controller=new IM(t.getZr())).enable(this.seriesModel.get("roam")),e.on("pan",DM(this._onPan,this)),e.on("zoom",DM(this._onZoom,this)));var i=new AM(0,0,t.getWidth(),t.getHeight());e.setPointerChecker((function(t,e,n){return i.contain(e,n)}))},_clearController:function(){var t=this._controller;t&&(t.dispose(),t=null)},_onPan:function(t,e){if("animating"!==this._state&&(Math.abs(t)>3||Math.abs(e)>3)){var i=this.seriesModel.getData().tree.root;if(!i)return;var n=i.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t,y:n.y+e,width:n.width,height:n.height}})}},_onZoom:function(t,e,i){if("animating"!==this._state){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;var o=new AM(a.x,a.y,a.width,a.height),r=this.seriesModel.layoutInfo;e-=r.x,i-=r.y;var s=TM.create();TM.translate(s,s,[-e,-i]),TM.scale(s,s,[t,t]),TM.translate(s,s,[e,i]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},_initEvents:function(t){t.on("click",(function(t){if("ready"===this._state){var e=this.seriesModel.get("nodeClick",!0);if(e){var i=this.findTarget(t.offsetX,t.offsetY);if(i){var n=i.node;if(n.getLayout().isLeafRoot)this._rootToNode(i);else if("zoomToNode"===e)this._zoomToNode(i);else if("link"===e){var a=n.hostTree.data.getItemModel(n.dataIndex),o=a.get("link",!0),r=a.get("target",!0)||"blank";o&&window.open(o,r)}}}}}),this)},_renderBreadcrumb:function(t,e,i){i||(i=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(i={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new MM(this.group))).render(t,e,i.node,DM((function(e){"animating"!==this._state&&(SM.aboveViewRoot(t.getViewRoot(),e)?this._rootToNode({node:e}):this._zoomToNode({node:e}))}),this))},remove:function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},dispose:function(){this._clearController()},_zoomToNode:function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},_rootToNode:function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},findTarget:function(t,e){var i;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(n){var a=this._storage.background[n.getRawIndex()];if(a){var o=a.transformCoordToLocal(t,e),r=a.shape;if(!(r.x<=o[0]&&o[0]<=r.x+r.width&&r.y<=o[1]&&o[1]<=r.y+r.height))return!1;i={node:n,offsetX:o[0],offsetY:o[1]}}}),this),i}});for(var HM=m,FM=KS,ZM=function(){},jM=["treemapZoomToNode","treemapRender","treemapMove"],UM=0;UM<jM.length;UM++)HM.registerAction({type:jM[UM],update:"updateView"},ZM);HM.registerAction({type:"treemapRootToNode",update:"updateView"},(function(t,e){e.eachComponent({mainType:"series",subType:"treemap",query:t},(function(e,i){var n=FM.retrieveTargetInfo(t,e);if(n){var a=e.getViewRoot();a&&(t.direction=FM.aboveViewRoot(a,n.node)?"rollUp":"drillDown"),e.resetViewRoot(n.node)}}))}));var qM=b,XM=Pt,YM=po.linearMap,$M=qM.each,KM=qM.isObject,JM=function(t){var e=t.mappingMethod,i=t.type,n=this.option=qM.clone(t);this.type=i,this.mappingMethod=e,this._normalizeData=hI[e];var a=QM[i];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._doMap=a._doMap[e],"piecewise"===e?(tI(n),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,qM.each(e,(function(e,i){e.originIndex=i,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(n)):"category"===e?n.categories?function(t){var e=t.categories,i=t.visual,n=t.categoryMap={};if($M(e,(function(t,e){n[t]=e})),!qM.isArray(i)){var a=[];qM.isObject(i)?$M(i,(function(t,e){var i=n[e];a[null!=i?i:-1]=t})):a[-1]=i,i=lI(t,a)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(n):tI(n,!0):(qM.assert("linear"!==e||n.dataExtent),tI(n))};JM.prototype={constructor:JM,mapValueToVisual:function(t){var e=this._normalizeData(t);return this._doMap(e,t)},getNormalizer:function(){return qM.bind(this._normalizeData,this)}};var QM=JM.visualHandlers={color:{applyVisual:nI("color"),getColorMapper:function(){var t=this.option;return qM.bind("category"===t.mappingMethod?function(t,e){return!e&&(t=this._normalizeData(t)),aI.call(this,t)}:function(e,i,n){var a=!!n;return!i&&(e=this._normalizeData(e)),n=XM.fastLerp(e,t.parsedVisual,n),a?n:XM.stringify(n,"rgba")},this)},_doMap:{linear:function(t){return XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")},category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=XM.stringify(XM.fastLerp(t,this.option.parsedVisual),"rgba")),i},fixed:oI}},colorHue:eI((function(t,e){return XM.modifyHSL(t,e)})),colorSaturation:eI((function(t,e){return XM.modifyHSL(t,null,e)})),colorLightness:eI((function(t,e){return XM.modifyHSL(t,null,null,e)})),colorAlpha:eI((function(t,e){return XM.modifyAlpha(t,e)})),opacity:{applyVisual:nI("opacity"),_doMap:rI([0,1])},symbol:{applyVisual:function(t,e,i){var n=this.mapValueToVisual(t);if(qM.isString(n))i("symbol",n);else if(KM(n))for(var a in n)n.hasOwnProperty(a)&&i(a,n[a])},_doMap:{linear:iI,category:aI,piecewise:function(t,e){var i=sI.call(this,e);return null==i&&(i=iI.call(this,t)),i},fixed:oI}},symbolSize:{applyVisual:nI("symbolSize"),_doMap:rI([0,1])}};function tI(t,e){var i=t.visual,n=[];qM.isObject(i)?$M(i,(function(t){n.push(t)})):null!=i&&n.push(i);e||1!==n.length||{color:1,symbol:1}.hasOwnProperty(t.type)||(n[1]=n[0]),lI(t,n)}function eI(t){return{applyVisual:function(e,i,n){e=this.mapValueToVisual(e),n("color",t(i("color"),e))},_doMap:rI([0,1])}}function iI(t){var e=this.option.visual;return e[Math.round(YM(t,[0,1],[0,e.length-1],!0))]||{}}function nI(t){return function(e,i,n){n(t,this.mapValueToVisual(e))}}function aI(t){var e=this.option.visual;return e[this.option.loop&&-1!==t?t%e.length:t]}function oI(){return this.option.visual[0]}function rI(t){return{linear:function(e){return YM(e,t,this.option.visual,!0)},category:aI,piecewise:function(e,i){var n=sI.call(this,i);return null==n&&(n=YM(e,t,this.option.visual,!0)),n},fixed:oI}}function sI(t){var e=this.option,i=e.pieceList;if(e.hasSpecialVisual){var n=i[JM.findPieceIndex(t,i)];if(n&&n.visual)return n.visual[this.type]}}function lI(t,e){return t.visual=e,"color"===t.type&&(t.parsedVisual=qM.map(e,(function(t){return XM.parse(t)}))),e}var hI={linear:function(t){return YM(t,this.option.dataExtent,[0,1],!0)},piecewise:function(t){var e=this.option.pieceList,i=JM.findPieceIndex(t,e,!0);if(null!=i)return YM(i,[0,e.length-1],[0,1],!0)},category:function(t){var e=this.option.categories?this.option.categoryMap[t]:t;return null==e?-1:e},fixed:qM.noop};function uI(t,e,i){return t?e<=i:e<i}JM.listVisualTypes=function(){var t=[];return qM.each(QM,(function(e,i){t.push(i)})),t},JM.addVisualHandler=function(t,e){QM[t]=e},JM.isValidType=function(t){return QM.hasOwnProperty(t)},JM.eachVisual=function(t,e,i){qM.isObject(t)?qM.each(t,e,i):e.call(i,t)},JM.mapVisual=function(t,e,i){var n,a=qM.isArray(t)?[]:qM.isObject(t)?{}:(n=!0,null);return JM.eachVisual(t,(function(t,o){var r=e.call(i,t,o);n?a=r:a[o]=r})),a},JM.retrieveVisuals=function(t){var e,i={};return t&&$M(QM,(function(n,a){t.hasOwnProperty(a)&&(i[a]=t[a],e=!0)})),e?i:null},JM.prepareVisualTypes=function(t){if(KM(t)){var e=[];$M(t,(function(t,i){e.push(i)})),t=e}else{if(!qM.isArray(t))return[];t=t.slice()}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},JM.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},JM.findPieceIndex=function(t,e,i){for(var n,a=1/0,o=0,r=e.length;o<r;o++){var s=e[o].value;if(null!=s){if(s===t||"string"==typeof s&&s===t+"")return o;i&&c(s,o)}}for(o=0,r=e.length;o<r;o++){var l=e[o],h=l.interval,u=l.close;if(h){if(h[0]===-1/0){if(uI(u[1],t,h[1]))return o}else if(h[1]===1/0){if(uI(u[0],h[0],t))return o}else if(uI(u[0],h[0],t)&&uI(u[1],t,h[1]))return o;i&&c(h[0],o),i&&c(h[1],o)}}if(i)return t===1/0?e.length-1:t===-1/0?0:n;function c(e,i){var o=Math.abs(e-t);o<a&&(a=o,n=i)}};var cI=JM,dI=cI,pI=Pt,fI=b,gI=fI.isArray;function mI(t,e,i,n,a,o){var r=t.getModel(),s=t.getLayout();if(s&&!s.invisible&&s.isInView){var l,h=t.getModel("itemStyle.normal"),u=function(t,e,i,n){var a=fI.extend({},e);return fI.each(["color","colorAlpha","colorSaturation"],(function(o){var r=t.get(o,!0);null==r&&i&&(r=i[o]),null==r&&(r=e[o]),null==r&&(r=n.get(o)),null!=r&&(a[o]=r)})),a}(h,e,i[t.depth],n),c=h.get("borderColor"),d=h.get("borderColorSaturation");null!=d&&(c=function(t,e){return null!=e?pI.modifyHSL(e,null,null,t):null}(d,l=vI(u))),t.setVisual("borderColor",c);var p=t.viewChildren;if(p&&p.length){var f=function(t,e,i,n,a,o){if(!o||!o.length)return;var r=xI(e,"color")||null!=a.color&&"none"!==a.color&&(xI(e,"colorAlpha")||xI(e,"colorSaturation"));if(!r)return;var s=e.get("visualMin"),l=e.get("visualMax"),h=i.dataExtent.slice();null!=s&&s<h[0]&&(h[0]=s),null!=l&&l>h[1]&&(h[1]=l);var u=e.get("colorMappingBy"),c={type:r.name,dataExtent:h,visual:r.range};"color"!==c.type||"index"!==u&&"id"!==u?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var d=new dI(c);return d.__drColorMappingBy=u,d}(0,r,s,0,u,p);fI.each(p,(function(t,e){if(t.depth>=a.length||t===a[t.depth]){var s=function(t,e,i,n,a,o){var r=fI.extend({},e);if(a){var s=a.type,l="color"===s&&a.__drColorMappingBy,h="index"===l?n:"id"===l?o.mapIdToIndex(i.getId()):i.getValue(t.get("visualDimension"));r[s]=a.mapValueToVisual(h)}return r}(r,u,t,e,f,o);mI(t,s,i,n,a,o)}}))}else l=vI(u),t.setVisual("color",l)}}function vI(t){var e=yI(t,"color");if(e){var i=yI(t,"colorAlpha"),n=yI(t,"colorSaturation");return n&&(e=pI.modifyHSL(e,null,null,n)),i&&(e=pI.modifyAlpha(e,i)),e}}function yI(t,e){var i=t[e];if(null!=i&&"none"!==i)return i}function xI(t,e){var i=t.get(e);return gI(i)&&i.length?{name:e,range:i}:null}var _I=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var e=t.getData().tree,i=e.root,n=t.getModel("itemStyle.normal");i.isRemoved()||mI(i,{},fI.map(e.levelModels,(function(t){return t?t.get("itemStyle.normal"):null})),n,t.getViewRoot().getAncestors(),t)}))},bI=b,wI=Je,SI=po,MI=SI.parsePercent,II=SI.MAX_SAFE_INTEGER,AI=wu,TI=KS,CI=Math.max,LI=Math.min,DI=bI.retrieve,PI=bI.each,kI=["itemStyle","normal","borderWidth"],OI=["itemStyle","normal","gapWidth"],zI=["upperLabel","normal","show"],EI=["upperLabel","normal","height"];function RI(t,e,i,n){var a,o;if(!t.isRemoved()){var r=t.getLayout();a=r.width,o=r.height;var s=(p=t.getModel()).get(kI),l=p.get(OI)/2,h=GI(p),u=Math.max(s,h),c=s-l,d=u-l,p=t.getModel();t.setLayout({borderWidth:s,upperHeight:u,upperLabelHeight:h},!0);var f=(a=CI(a-2*c,0))*(o=CI(o-c-d,0)),g=function(t,e,i,n,a,o){var r=t.children||[],s=n.sort;"asc"!==s&&"desc"!==s&&(s=null);var l=null!=n.leafDepth&&n.leafDepth<=o;if(a&&!l)return t.viewChildren=[];r=bI.filter(r,(function(t){return!t.isRemoved()})),function(t,e){e&&t.sort((function(t,i){var n="asc"===e?t.getValue()-i.getValue():i.getValue()-t.getValue();return 0===n?"asc"===e?t.dataIndex-i.dataIndex:i.dataIndex-t.dataIndex:n}))}(r,s);var h=function(t,e,i){for(var n=0,a=0,o=e.length;a<o;a++)n+=e[a].getValue();var r=t.get("visualDimension");if(e&&e.length)if("value"===r&&i)s=[e[e.length-1].getValue(),e[0].getValue()],"asc"===i&&s.reverse();else{var s=[1/0,-1/0];PI(e,(function(t){var e=t.getValue(r);e<s[0]&&(s[0]=e),e>s[1]&&(s[1]=e)}))}else s=[NaN,NaN];return{sum:n,dataExtent:s}}(e,r,s);if(0===h.sum)return t.viewChildren=[];if(h.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;l>=0;l--){var h=a["asc"===n?r-l-1:l].getValue();h/i*e<o&&(s=l,i-=h)}return"asc"===n?a.splice(0,r-s):a.splice(s,r-s),i}(e,i,h.sum,s,r),0===h.sum)return t.viewChildren=[];for(var u=0,c=r.length;u<c;u++){var d=r[u].getValue()/h.sum*i;r[u].setLayout({area:d})}l&&(r.length&&t.setLayout({isLeafRoot:!0},!0),r.length=0);return t.viewChildren=r,t.setLayout({dataExtent:h.dataExtent},!0),r}(t,p,f,e,i,n);if(g.length){var m={x:c,y:d,width:a,height:o},v=LI(a,o),y=1/0,x=[];x.area=0;for(var _=0,b=g.length;_<b;){var w=g[_];x.push(w),x.area+=w.getLayout().area;var S=NI(x,v,e.squareRatio);S<=y?(_++,y=S):(x.area-=x.pop().getLayout().area,VI(x,v,m,l,!1),v=LI(m.width,m.height),x.length=x.area=0,y=1/0)}if(x.length&&VI(x,v,m,l,!0),!i){var M=p.get("childrenVisibleMin");null!=M&&f<M&&(i=!0)}for(_=0,b=g.length;_<b;_++)RI(g[_],e,i,n+1)}}}function NI(t,e,i){for(var n,a=0,o=1/0,r=0,s=t.length;r<s;r++)(n=t[r].getLayout().area)&&(n<o&&(o=n),n>a&&(a=n));var l=t.area*t.area,h=e*e*i;return l?CI(h*a/l,l/(h*o)):1/0}function VI(t,e,i,n,a){var o=e===i.width?0:1,r=1-o,s=["x","y"],l=["width","height"],h=i[s[o]],u=e?t.area/e:0;(a||u>i[l[r]])&&(u=i[l[r]]);for(var c=0,d=t.length;c<d;c++){var p=t[c],f={},g=u?p.getLayout().area/u:0,m=f[l[r]]=CI(u-2*n,0),v=i[s[o]]+i[l[o]]-h,y=c===d-1||v<g?v:g,x=f[l[o]]=CI(y-2*n,0);f[s[r]]=i[s[r]]+LI(n,m/2),f[s[o]]=h+LI(n,x/2),h+=y,p.setLayout(f,!0)}i[s[r]]+=u,i[l[r]]-=u}function BI(t,e,i,n,a){var o=t.getLayout(),r=i[a],s=r&&r===t;if(!(r&&!s||a===i.length&&t!==n)){t.setLayout({isInView:!0,invisible:!s&&!e.intersect(o),isAboveViewRoot:s},!0);var l=new wI(e.x-o.x,e.y-o.y,e.width,e.height);PI(t.viewChildren||[],(function(t){BI(t,l,i,n,a+1)}))}}function GI(t){return t.get(zI)?t.get(EI):0}var WI=function(t,e,i){var n={mainType:"series",subType:"treemap",query:i};t.eachComponent(n,(function(t){var n=e.getWidth(),a=e.getHeight(),o=t.option,r=AI.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),s=o.size||[],l=MI(DI(r.width,s[0]),n),h=MI(DI(r.height,s[1]),a),u=i&&i.type,c=TI.retrieveTargetInfo(i,t),d="treemapRender"===u||"treemapMove"===u?i.rootRect:null,p=t.getViewRoot(),f=TI.getPathToRoot(p);if("treemapMove"!==u){var g="treemapZoomToNode"===u?function(t,e,i,n,a){var o,r=(e||{}).node,s=[n,a];if(!r||r===i)return s;var l=n*a,h=l*t.option.zoomToNodeRatio;for(;o=r.parentNode;){for(var u=0,c=o.children,d=0,p=c.length;d<p;d++)u+=c[d].getValue();var f=r.getValue();if(0===f)return s;h*=u/f;var g=o.getModel(),m=g.get(kI);(h+=4*m*m+(3*m+Math.max(m,GI(g)))*Math.pow(h,.5))>II&&(h=II),r=o}h<l&&(h=l);var v=Math.pow(h/l,.5);return[n*v,a*v]}(t,c,p,l,h):d?[d.width,d.height]:[l,h],m=o.sort;m&&"asc"!==m&&"desc"!==m&&(m="desc");var v={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};p.hostTree.clearLayouts();var y={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(y),RI(p,v,!1,0);y=p.getLayout();PI(f,(function(t,e){var i=(f[e+1]||p).getValue();t.setLayout(bI.extend({dataExtent:[i,i],borderWidth:0,upperHeight:0},y))}))}var x=t.getData().tree.root;x.setLayout(function(t,e,i){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!i)return n;var a=i.node,o=a.getLayout();if(!o)return n;var r=[o.width/2,o.height/2],s=a;for(;s;){var l=s.getLayout();r[0]+=l.x,r[1]+=l.y,s=s.parentNode}return{x:t.width/2-r[0],y:t.height/2-r[1]}}(r,d,c),!0),t.setLayoutInfo(r),BI(x,new wI(-r.x,-r.y,n,a),f,p,0)}))},HI=m,FI=_I,ZI=WI;HI.registerVisual(FI),HI.registerLayout(ZI);var jI=b;function UI(t){return"_EC_"+t}var qI=function(t){this._directed=t||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},XI=qI.prototype;function YI(t,e){this.id=null==t?"":t,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=null==e?-1:e}function $I(t,e,i){this.node1=t,this.node2=e,this.dataIndex=null==i?-1:i}XI.type="graph",XI.isDirected=function(){return this._directed},XI.addNode=function(t,e){t=t||""+e;var i=this._nodesMap;if(!i[UI(t)]){var n=new YI(t,e);return n.hostGraph=this,this.nodes.push(n),i[UI(t)]=n,n}},XI.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},XI.getNodeById=function(t){return this._nodesMap[UI(t)]},XI.addEdge=function(t,e,i){var n=this._nodesMap,a=this._edgesMap;if("number"==typeof t&&(t=this.nodes[t]),"number"==typeof e&&(e=this.nodes[e]),t instanceof YI||(t=n[UI(t)]),e instanceof YI||(e=n[UI(e)]),t&&e){var o=t.id+"-"+e.id;if(!a[o]){var r=new $I(t,e,i);return r.hostGraph=this,this._directed&&(t.outEdges.push(r),e.inEdges.push(r)),t.edges.push(r),t!==e&&e.edges.push(r),this.edges.push(r),a[o]=r,r}}},XI.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},XI.getEdge=function(t,e){t instanceof YI&&(t=t.id),e instanceof YI&&(e=e.id);var i=this._edgesMap;return this._directed?i[t+"-"+e]:i[t+"-"+e]||i[e+"-"+t]},XI.eachNode=function(t,e){for(var i=this.nodes,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&t.call(e,i[a],a)},XI.eachEdge=function(t,e){for(var i=this.edges,n=i.length,a=0;a<n;a++)i[a].dataIndex>=0&&i[a].node1.dataIndex>=0&&i[a].node2.dataIndex>=0&&t.call(e,i[a],a)},XI.breadthFirstTraverse=function(t,e,i,n){if(e instanceof YI||(e=this._nodesMap[UI(e)]),e){for(var a="out"===i?"outEdges":"in"===i?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!t.call(n,e,null))for(var r=[e];r.length;){var s=r.shift(),l=s[a];for(o=0;o<l.length;o++){var h=l[o],u=h.node1===s?h.node2:h.node1;if(!u.__visited){if(t.call(n,u,s))return;r.push(u),u.__visited=!0}}}}},XI.update=function(){for(var t=this.data,e=this.edgeData,i=this.nodes,n=this.edges,a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(a=0,o=t.count();a<o;a++)i[t.getRawIndex(a)].dataIndex=a;e.filterSelf((function(t){var i=n[e.getRawIndex(t)];return i.node1.dataIndex>=0&&i.node2.dataIndex>=0}));for(a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(a=0,o=e.count();a<o;a++)n[e.getRawIndex(a)].dataIndex=a},XI.clone=function(){for(var t=new qI(this._directed),e=this.nodes,i=this.edges,n=0;n<e.length;n++)t.addNode(e[n].id,e[n].dataIndex);for(n=0;n<i.length;n++){var a=i[n];t.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return t},YI.prototype={constructor:YI,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(t){if(!(this.dataIndex<0))return this.hostGraph.data.getItemModel(this.dataIndex).getModel(t)}},$I.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t)};var KI=function(t,e){return{getValue:function(i){var n=this[t][e];return n.get(n.getDimension(i||"value"),this.dataIndex)},setVisual:function(i,n){this.dataIndex>=0&&this[t][e].setItemVisual(this.dataIndex,i,n)},getVisual:function(i,n){return this[t][e].getItemVisual(this.dataIndex,i,n)},setLayout:function(i,n){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,i,n)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}};jI.mixin(YI,KI("hostGraph","data")),jI.mixin($I,KI("hostGraph","edgeData")),qI.Node=YI,qI.Edge=$I;var JI=b,QI=dp,tA=qI,eA=aS,iA=wp,nA=_c,aA=Ep;var oA=function(t,e,i,n,a){for(var o=new tA(n),r=0;r<t.length;r++)o.addNode(JI.retrieve(t[r].id,t[r].name,r),r);var s=[],l=[],h=0;for(r=0;r<e.length;r++){var u=e[r],c=u.source,d=u.target;o.addEdge(c,d,h)&&(l.push(u),s.push(JI.retrieve(u.id,c+" > "+d)),h++)}var p,f=i.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)p=aA(t,i,i.ecModel);else{var g=nA.get(f),m=iA((g&&"view"!==g.type&&g.dimensions||[]).concat(["value"]),t);(p=new QI(m,i)).initData(t)}var v=new QI(["value"],i);return v.initData(l,s),a&&a(p,v),eA({mainData:p,struct:o,structAttr:"graph",datas:{node:p,edge:v},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o},rA=m,sA=dp,lA=b,hA=uo.defaultEmphasis,uA=ou,cA=co.encodeHTML,dA=oA,pA=rA.extendSeriesModel({type:"series.graph",init:function(t){pA.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeOption:function(t){pA.superApply(this,"mergeOption",arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},mergeDefaultAndTheme:function(t){pA.superApply(this,"mergeDefaultAndTheme",arguments),hA(t.edgeLabel,["show"])},getInitialData:function(t,e){var i=t.edges||t.links||[],n=t.data||t.nodes||[],a=this;if(n&&i)return dA(n,i,this,!0,(function(t,i){t.wrapMethod("getItemModel",(function(t){var e=a._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=a.getModel("edgeLabel"),o=new uA({label:n.option},n.parentModel,e);function r(t){return(t=this.parsePath(t))&&"label"===t[0]?o:this.parentModel}i.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){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=cA(l.join(" > ")),a.value&&(l+=" : "+cA(a.value)),l}return pA.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var t=lA.map(this.option.categories||[],(function(t){return null!=t.value?t:lA.extend({value:0},t)})),e=new sA(["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 pA.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:{normal:{position:"middle"},emphasis:{}},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{normal:{show:!1,formatter:"{b}"},emphasis:{show:!0}},itemStyle:{normal:{},emphasis:{}},lineStyle:{normal:{color:"#aaa",width:1,curveness:0,opacity:.5},emphasis:{}}}}),fA=Bo,gA=j,mA=fA.Line.prototype,vA=fA.BezierCurve.prototype;function yA(t){return isNaN(+t.cpx1)||isNaN(+t.cpy1)}var xA=fA.extendShape({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){(yA(e)?mA:vA).buildPath(t,e)},pointAt:function(t){return yA(this.shape)?mA.pointAt.call(this,t):vA.pointAt.call(this,t)},tangentAt:function(t){var e=this.shape,i=yA(e)?[e.x2-e.x1,e.y2-e.y1]:vA.tangentAt.call(this,t);return gA.normalize(i,i)}}),_A=b,bA=j,wA=Hf,SA=xA,MA=Bo,IA=po.round,AA=["fromSymbol","toSymbol"];function TA(t){return"_"+t+"Type"}function CA(t,e,i){var n=e.getItemVisual(i,"color"),a=e.getItemVisual(i,t),o=e.getItemVisual(i,t+"Size");if(a&&"none"!==a){_A.isArray(o)||(o=[o,o]);var r=wA.createSymbol(a,-o[0]/2,-o[1]/2,o[0],o[1],n);return r.name=t,r}}function LA(t,e){var i=e[0],n=e[1],a=e[2];t.x1=i[0],t.y1=i[1],t.x2=n[0],t.y2=n[1],t.percent=1,a?(t.cpx1=a[0],t.cpy1=a[1]):(t.cpx1=NaN,t.cpy1=NaN)}function DA(t,e,i){MA.Group.call(this),this._createLine(t,e,i)}var PA=DA.prototype;PA.beforeUpdate=function(){var t=this,e=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),n=t.childOfName("label");if(e||i||!n.ignore){for(var a=1,o=this.parent;o;)o.scale&&(a/=o.scale[0]),o=o.parent;var r=t.childOfName("line");if(this.__dirty||r.__dirty){var s=r.shape.percent,l=r.pointAt(0),h=r.pointAt(s),u=bA.sub([],h,l);if(bA.normalize(u,u),e){e.attr("position",l);var c=r.tangentAt(0);e.attr("rotation",Math.PI/2-Math.atan2(c[1],c[0])),e.attr("scale",[a*s,a*s])}if(i){i.attr("position",h);c=r.tangentAt(1);i.attr("rotation",-Math.PI/2-Math.atan2(c[1],c[0])),i.attr("scale",[a*s,a*s])}if(!n.ignore){var d,p,f;n.attr("position",h);var g=5*a;if("end"===n.__position)d=[u[0]*g+h[0],u[1]*g+h[1]],p=u[0]>.8?"left":u[0]<-.8?"right":"center",f=u[1]>.8?"top":u[1]<-.8?"bottom":"middle";else if("middle"===n.__position){var m=s/2,v=[(c=r.tangentAt(m))[1],-c[0]],y=r.pointAt(m);v[1]>0&&(v[0]=-v[0],v[1]=-v[1]),d=[y[0]+v[0]*g,y[1]+v[1]*g],p="center",f="bottom";var x=-Math.atan2(c[1],c[0]);h[0]<l[0]&&(x=Math.PI+x),n.attr("rotation",x)}else d=[-u[0]*g+l[0],-u[1]*g+l[1]],p=u[0]>.8?"right":u[0]<-.8?"left":"center",f=u[1]>.8?"bottom":u[1]<-.8?"top":"middle";n.attr({style:{textVerticalAlign:n.__verticalAlign||f,textAlign:n.__textAlign||p},position:d,scale:[a,a]})}}}},PA._createLine=function(t,e,i){var n=t.hostModel,a=function(t){var e=new SA({name:"line"});return LA(e.shape,t),e}(t.getItemLayout(e));a.shape.percent=0,MA.initProps(a,{shape:{percent:1}},n,e),this.add(a);var o=new MA.Text({name:"label"});this.add(o),_A.each(AA,(function(i){var n=CA(i,t,e);this.add(n),this[TA(i)]=t.getItemVisual(e,i)}),this),this._updateCommonStl(t,e,i)},PA.updateData=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=t.getItemLayout(e),r={shape:{}};LA(r.shape,o),MA.updateProps(a,r,n,e),_A.each(AA,(function(i){var n=t.getItemVisual(e,i),a=TA(i);if(this[a]!==n){this.remove(this.childOfName(i));var o=CA(i,t,e);this.add(o)}this[a]=n}),this),this._updateCommonStl(t,e,i)},PA._updateCommonStl=function(t,e,i){var n=t.hostModel,a=this.childOfName("line"),o=i&&i.lineStyle,r=i&&i.hoverLineStyle,s=i&&i.labelModel,l=i&&i.hoverLabelModel;if(!i||t.hasItemOption){var h=t.getItemModel(e);o=h.getModel("lineStyle.normal").getLineStyle(),r=h.getModel("lineStyle.emphasis").getLineStyle(),s=h.getModel("label.normal"),l=h.getModel("label.emphasis")}var u=t.getItemVisual(e,"color"),c=_A.retrieve3(t.getItemVisual(e,"opacity"),o.opacity,1);a.useStyle(_A.defaults({strokeNoScale:!0,fill:"none",stroke:u,opacity:c},o)),a.hoverStyle=r,_A.each(AA,(function(t){var e=this.childOfName(t);e&&(e.setColor(u),e.setStyle({opacity:c}))}),this);var d,p,f,g,m=s.getShallow("show"),v=l.getShallow("show"),y=this.childOfName("label");if(m||v){var x=n.getRawValue(e);p=null==x?p=t.getName(e):isFinite(x)?IA(x):x,d=u||"#000",f=_A.retrieve2(n.getFormattedLabel(e,"normal",t.dataType),p),g=_A.retrieve2(n.getFormattedLabel(e,"emphasis",t.dataType),f)}if(m){var _=MA.setTextStyle(y.style,s,{text:f},{autoColor:d});y.__textAlign=_.textAlign,y.__verticalAlign=_.textVerticalAlign,y.__position=s.get("position")||"middle"}else y.setStyle("text",null);y.hoverStyle=v?{text:g,textFill:l.getTextColor(!0),fontStyle:l.getShallow("fontStyle"),fontWeight:l.getShallow("fontWeight"),fontSize:l.getShallow("fontSize"),fontFamily:l.getShallow("fontFamily")}:{text:null},y.ignore=!m&&!v,MA.setHoverStyle(this)},PA.highlight=function(){this.trigger("emphasis")},PA.downplay=function(){this.trigger("normal")},PA.updateLayout=function(t,e){this.setLinePoints(t.getItemLayout(e))},PA.setLinePoints=function(t){var e=this.childOfName("line");LA(e.shape,t),e.dirty()},_A.inherits(DA,MA.Group);var kA=DA,OA=Bo,zA=kA;function EA(t){return isNaN(t[0])||isNaN(t[1])}function RA(t){return!EA(t[0])&&!EA(t[1])}function NA(t){this._ctor=t||zA,this.group=new OA.Group}var VA=NA.prototype;VA.updateData=function(t){var e=this._lineData,i=this.group,n=this._ctor,a=t.hostModel,o={lineStyle:a.getModel("lineStyle.normal").getLineStyle(),hoverLineStyle:a.getModel("lineStyle.emphasis").getLineStyle(),labelModel:a.getModel("label.normal"),hoverLabelModel:a.getModel("label.emphasis")};t.diff(e).add((function(e){if(RA(t.getItemLayout(e))){var a=new n(t,e,o);t.setItemGraphicEl(e,a),i.add(a)}})).update((function(a,r){var s=e.getItemGraphicEl(r);RA(t.getItemLayout(a))?(s?s.updateData(t,a,o):s=new n(t,a,o),t.setItemGraphicEl(a,s),i.add(s)):i.remove(s)})).remove((function(t){i.remove(e.getItemGraphicEl(t))})).execute(),this._lineData=t},VA.updateLayout=function(){var t=this._lineData;t.eachItemGraphicEl((function(e,i){e.updateLayout(t,i)}),this)},VA.remove=function(){this.group.removeAll()};var BA=NA,GA=Wo,WA=j,HA=[],FA=[],ZA=[],jA=GA.quadraticAt,UA=WA.distSquare,qA=Math.abs;function XA(t,e,i){for(var n,a=t[0],o=t[1],r=t[2],s=1/0,l=i*i,h=.1,u=.1;u<=.9;u+=.1){HA[0]=jA(a[0],o[0],r[0],u),HA[1]=jA(a[1],o[1],r[1],u),(p=qA(UA(HA,e)-l))<s&&(s=p,n=u)}for(var c=0;c<32;c++){var d=n+h;FA[0]=jA(a[0],o[0],r[0],n),FA[1]=jA(a[1],o[1],r[1],n),ZA[0]=jA(a[0],o[0],r[0],d),ZA[1]=jA(a[1],o[1],r[1],d);var p=UA(FA,e)-l;if(qA(p)<.01)break;var f=UA(ZA,e)-l;h/=2,p<0?f>=0?n+=h:n-=h:f>=0?n-=h:n+=h}return n}var YA=function(t,e){var i=[],n=GA.quadraticSubdivide,a=[[],[],[]],o=[[],[]],r=[];function s(t){var e=t.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),e}e/=2,t.eachEdge((function(t,l){var h=t.getLayout(),u=t.getVisual("fromSymbol"),c=t.getVisual("toSymbol");h.__original||(h.__original=[WA.clone(h[0]),WA.clone(h[1])],h[2]&&h.__original.push(WA.clone(h[2])));var d=h.__original;if(null!=h[2]){if(WA.copy(a[0],d[0]),WA.copy(a[1],d[2]),WA.copy(a[2],d[1]),u&&"none"!=u){var p=s(t.node1),f=XA(a,d[0],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[0][0]=i[3],a[1][0]=i[4],n(a[0][1],a[1][1],a[2][1],f,i),a[0][1]=i[3],a[1][1]=i[4]}if(c&&"none"!=c){p=s(t.node2),f=XA(a,d[1],p*e);n(a[0][0],a[1][0],a[2][0],f,i),a[1][0]=i[1],a[2][0]=i[2],n(a[0][1],a[1][1],a[2][1],f,i),a[1][1]=i[1],a[2][1]=i[2]}WA.copy(h[0],a[0]),WA.copy(h[1],a[2]),WA.copy(h[2],a[1])}else{if(WA.copy(o[0],d[0]),WA.copy(o[1],d[1]),WA.sub(r,o[1],o[0]),WA.normalize(r,r),u&&"none"!=u){p=s(t.node1);WA.scaleAndAdd(o[0],o[0],r,p*e)}if(c&&"none"!=c){p=s(t.node2);WA.scaleAndAdd(o[1],o[1],r,-p*e)}WA.copy(h[0],o[0]),WA.copy(h[1],o[1])}}))},$A=m,KA=b,JA=pm,QA=BA,tT=yw,eT=xw,iT=_w.onIrrelevantElement,nT=Bo,aT=YA,oT=["itemStyle","normal","opacity"],rT=["lineStyle","normal","opacity"];function sT(t,e){return t.getVisual("opacity")||t.getModel().get(e)}function lT(t,e,i){var n=t.getGraphicEl(),a=sT(t,e);null!=i&&(null==a&&(a=1),a*=i),n.downplay&&n.downplay(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",a)}))}function hT(t,e){var i=sT(t,e),n=t.getGraphicEl();n.highlight&&n.highlight(),n.traverse((function(t){"group"!==t.type&&t.setStyle("opacity",i)}))}$A.extendChartView({type:"graph",init:function(t,e){var i=new JA,n=new QA,a=this.group;this._controller=new tT(e.getZr()),this._controllerHost={target:a},a.add(i.group),a.add(n.group),this._symbolDraw=i,this._lineDraw=n,this._firstRender=!0},render:function(t,e,i){var n=t.coordinateSystem;this._model=t,this._nodeScaleRatio=t.get("nodeScaleRatio");var a=this._symbolDraw,o=this._lineDraw,r=this.group;if("view"===n.type){var s={position:n.position,scale:n.scale};this._firstRender?r.attr(s):nT.updateProps(r,s,t)}aT(t.getGraph(),this._getNodeGlobalScale(t));var l=t.getData();a.updateData(l);var h=t.getEdgeData();o.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,i),clearTimeout(this._layoutTimeout);var u=t.forceLayout,c=t.get("force.layoutAnimation");u&&this._startForceLayoutIteration(u,c),l.eachItemGraphicEl((function(e,n){var a=l.getItemModel(n);e.off("drag").off("dragend");var o=l.getItemModel(n).get("draggable");o&&e.on("drag",(function(){u&&(u.warmUp(),!this._layouting&&this._startForceLayoutIteration(u,c),u.setFixed(n),l.setItemLayout(n,e.position))}),this).on("dragend",(function(){u&&u.setUnfixed(n)}),this),e.setDraggable(o&&u),e.off("mouseover",e.__focusNodeAdjacency),e.off("mouseout",e.__unfocusNodeAdjacency),a.get("focusNodeAdjacency")&&(e.on("mouseover",e.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,dataIndex:e.dataIndex})}),e.on("mouseout",e.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}),this),l.graph.eachEdge((function(e){var n=e.getGraphicEl();n.off("mouseover",n.__focusNodeAdjacency),n.off("mouseout",n.__unfocusNodeAdjacency),e.getModel().get("focusNodeAdjacency")&&(n.on("mouseover",n.__focusNodeAdjacency=function(){i.dispatchAction({type:"focusNodeAdjacency",seriesId:t.id,edgeDataIndex:e.dataIndex})}),n.on("mouseout",n.__unfocusNodeAdjacency=function(){i.dispatchAction({type:"unfocusNodeAdjacency",seriesId:t.id})}))}));var d="circular"===t.get("layout")&&t.get("circular.rotateLabel"),p=l.getLayout("cx"),f=l.getLayout("cy");l.eachItemGraphicEl((function(t,e){var i=t.getSymbolPath();if(d){var n=l.getItemLayout(e),a=Math.atan2(n[1]-f,n[0]-p);a<0&&(a=2*Math.PI+a);var o=n[0]<p;o&&(a-=Math.PI);var r=o?"left":"right";i.setStyle({textRotation:-a,textPosition:r,textOrigin:"center"}),i.hoverStyle&&(i.hoverStyle.textPosition=r)}else i.setStyle({textRotation:0})})),this._firstRender=!1},dispose:function(){this._controller&&this._controller.dispose(),this._controllerHost={}},focusNodeAdjacency:function(t,e,i,n){var a=this._model.getData().graph,o=n.dataIndex,r=n.edgeDataIndex,s=a.getNodeByIndex(o),l=a.getEdgeByIndex(r);(s||l)&&(a.eachNode((function(t){lT(t,oT,.1)})),a.eachEdge((function(t){lT(t,rT,.1)})),s&&(hT(s,oT),KA.each(s.edges,(function(t){t.dataIndex<0||(hT(t,rT),hT(t.node1,oT),hT(t.node2,oT))}))),l&&(hT(l,rT),hT(l.node1,oT),hT(l.node2,oT)))},unfocusNodeAdjacency:function(t,e,i,n){var a=this._model.getData().graph;a.eachNode((function(t){lT(t,oT)})),a.eachEdge((function(t){lT(t,rT)}))},_startForceLayoutIteration:function(t,e){var i=this;!function n(){t.step((function(t){i.updateLayout(i._model),(i._layouting=!t)&&(e?i._layoutTimeout=setTimeout(n,16):n())}))}()},_updateController:function(t,e,i){var n=this._controller,a=this._controllerHost,o=this.group;n.setPointerChecker((function(e,n,a){var r=o.getBoundingRect();return r.applyTransform(o.transform),r.contain(n,a)&&!iT(e,i,t)})),"view"===t.coordinateSystem.type?(n.enable(t.get("roam")),a.zoomLimit=t.get("scaleLimit"),a.zoom=t.coordinateSystem.getZoom(),n.off("pan").off("zoom").on("pan",(function(e,n){eT.updateViewOnPan(a,e,n),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e,dy:n})})).on("zoom",(function(e,n,o){eT.updateViewOnZoom(a,e,n,o),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e,originX:n,originY:o}),this._updateNodeAndLinkScale(),aT(t.getGraph(),this._getNodeGlobalScale(t)),this._lineDraw.updateLayout()}),this)):n.disable()},_updateNodeAndLinkScale:function(){var t=this._model,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},updateLayout:function(t){aT(t.getGraph(),this._getNodeGlobalScale(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()}});var uT=m,cT=zw.updateCenterAndZoom;uT.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},(function(t,e){e.eachComponent({mainType:"series",query:t},(function(e){var i=e.coordinateSystem,n=cT(i,t);e.setCenter&&e.setCenter(n.center),e.setZoom&&e.setZoom(n.zoom)}))})),uT.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series.graph:focusNodeAdjacency"},(function(){})),uT.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series.graph:unfocusNodeAdjacency"},(function(){}));var dT=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getGraph().data,a=i.mapArray(i.getName);n.filterSelf((function(t){var i=n.getItemModel(t).getShallow("category");if(null!=i){"number"==typeof i&&(i=a[i]);for(var o=0;o<e.length;o++)if(!e[o].isSelected(i))return!1}return!0}))}),this)};var pT=function(t){var e={};t.eachSeriesByType("graph",(function(t){var i=t.getCategoriesData(),n=t.getData(),a={};i.each((function(n){var o=i.getName(n);a["ec-"+o]=n;var r=i.getItemModel(n).get("itemStyle.normal.color")||t.getColorFromPalette(o,e);i.setItemVisual(n,"color",r)})),i.count()&&n.each((function(t){var e=n.getItemModel(t).getShallow("category");null!=e&&("string"==typeof e&&(e=a["ec-"+e]),n.getItemVisual(t,"color",!0)||n.setItemVisual(t,"color",i.getItemVisual(e,"color")))}))}))};function fT(t){return t instanceof Array||(t=[t,t]),t}var gT=function(t){t.eachSeriesByType("graph",(function(t){var e=t.getGraph(),i=t.getEdgeData(),n=fT(t.get("edgeSymbol")),a=fT(t.get("edgeSymbolSize")),o="lineStyle.normal.color".split("."),r="lineStyle.normal.opacity".split(".");i.setVisual("fromSymbol",n&&n[0]),i.setVisual("toSymbol",n&&n[1]),i.setVisual("fromSymbolSize",a&&a[0]),i.setVisual("toSymbolSize",a&&a[1]),i.setVisual("color",t.get(o)),i.setVisual("opacity",t.get(r)),i.each((function(t){var n=i.getItemModel(t),a=e.getEdgeByIndex(t),s=fT(n.getShallow("symbol",!0)),l=fT(n.getShallow("symbolSize",!0)),h=n.get(o),u=n.get(r);switch(h){case"source":h=a.node1.getVisual("color");break;case"target":h=a.node2.getVisual("color")}s[0]&&a.setVisual("fromSymbol",s[0]),s[1]&&a.setVisual("toSymbol",s[1]),l[0]&&a.setVisual("fromSymbolSize",l[0]),l[1]&&a.setVisual("toSymbolSize",l[1]),a.setVisual("color",h),a.setVisual("opacity",u)}))}))},mT={},vT=j;function yT(t){t.eachEdge((function(t){var e=t.getModel().get("lineStyle.normal.curveness")||0,i=vT.clone(t.node1.getLayout()),n=vT.clone(t.node2.getLayout()),a=[i,n];+e&&a.push([(i[0]+n[0])/2-(i[1]-n[1])*e,(i[1]+n[1])/2-(n[0]-i[0])*e]),t.setLayout(a)}))}mT.simpleLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=t.getGraph();i.eachNode((function(t){var e=t.getModel();t.setLayout([+e.get("x"),+e.get("y")])})),yT(i)}},mT.simpleLayoutEdge=yT;var xT=mT,_T=xT.simpleLayout,bT=xT.simpleLayoutEdge;var wT=function(t,e){t.eachSeriesByType("graph",(function(t){var e=t.get("layout"),i=t.coordinateSystem;if(i&&"view"!==i.type){var n=t.getData(),a=i.dimensions;n.each(a,(function(){for(var t,e=arguments,o=[],r=0;r<a.length;r++)isNaN(e[r])||(t=!0),o.push(e[r]);var s=e[e.length-1];t?n.setItemLayout(s,i.dataToPoint(o)):n.setItemLayout(s,[NaN,NaN])})),bT(n.graph)}else e&&"none"!==e||_T(t)}))},ST={},MT=j;ST.circularLayout=function(t){var e=t.coordinateSystem;if(!e||"view"===e.type){var i=e.getBoundingRect(),n=t.getData(),a=n.graph,o=0,r=n.getSum("value"),s=2*Math.PI/(r||n.count()),l=i.width/2+i.x,h=i.height/2+i.y,u=Math.min(i.width,i.height)/2;a.eachNode((function(t){var e=t.getValue("value");o+=s*(r?e:1)/2,t.setLayout([u*Math.cos(o)+l,u*Math.sin(o)+h]),o+=s*(r?e:1)/2})),n.setLayout({cx:l,cy:h}),a.eachEdge((function(t){var e,i=t.getModel().get("lineStyle.normal.curveness")||0,n=MT.clone(t.node1.getLayout()),a=MT.clone(t.node2.getLayout()),o=(n[0]+a[0])/2,r=(n[1]+a[1])/2;+i&&(e=[l*(i*=3)+o*(1-i),h*i+r*(1-i)]),t.setLayout([n,a,e])}))}};var IT=ST.circularLayout;var AT=function(t){t.eachSeriesByType("graph",(function(t){"circular"===t.get("layout")&&IT(t)}))},TT={},CT=j,LT=CT.scaleAndAdd;TT.forceLayout=function(t,e,i){for(var n=i.rect,a=n.width,o=n.height,r=[n.x+a/2,n.y+o/2],s=null==i.gravity?.1:i.gravity,l=0;l<t.length;l++){var h=t[l];h.p||(h.p=CT.create(a*(Math.random()-.5)+r[0],o*(Math.random()-.5)+r[1])),h.pp=CT.clone(h.p),h.edges=null}var u=.6;return{warmUp:function(){u=.5},setFixed:function(e){t[e].fixed=!0},setUnfixed:function(e){t[e].fixed=!1},step:function(i){for(var n=[],a=t.length,o=0;o<e.length;o++){var l=e[o],h=l.n1,c=l.n2;CT.sub(n,c.p,h.p);var d=CT.len(n)-l.d,p=c.w/(h.w+c.w);isNaN(p)&&(p=0),CT.normalize(n,n),!h.fixed&&LT(h.p,h.p,n,p*d*u),!c.fixed&&LT(c.p,c.p,n,-(1-p)*d*u)}for(o=0;o<a;o++){(v=t[o]).fixed||(CT.sub(n,r,v.p),LT(v.p,v.p,n,s*u))}for(o=0;o<a;o++){h=t[o];for(var f=o+1;f<a;f++){c=t[f];CT.sub(n,c.p,h.p),0===(d=CT.len(n))&&(CT.set(n,Math.random()-.5,Math.random()-.5),d=1);var g=(h.rep+c.rep)/d/d;!h.fixed&&LT(h.pp,h.pp,n,g),!c.fixed&&LT(c.pp,c.pp,n,-g)}}var m=[];for(o=0;o<a;o++){var v;(v=t[o]).fixed||(CT.sub(m,v.p,v.pp),LT(v.p,v.p,m,u),CT.copy(v.pp,v.p))}u*=.992,i&&i(t,e,u<.01)}}};var DT=TT.forceLayout,PT=mT.simpleLayout,kT=ST.circularLayout,OT=po.linearMap,zT=j,ET=b;var RT=function(t){t.eachSeriesByType("graph",(function(t){if(!(c=t.coordinateSystem)||"view"===c.type)if("force"===t.get("layout")){var e=t.preservedPoints||{},i=t.getGraph(),n=i.data,a=i.edgeData,o=t.getModel("force"),r=o.get("initLayout");t.preservedPoints?n.each((function(t){var i=n.getId(t);n.setItemLayout(t,e[i]||[NaN,NaN])})):r&&"none"!==r?"circular"===r&&kT(t):PT(t);var s=n.getDataExtent("value"),l=a.getDataExtent("value"),h=o.get("repulsion"),u=o.get("edgeLength");ET.isArray(h)||(h=[h,h]),ET.isArray(u)||(u=[u,u]),u=[u[1],u[0]];var c,d=n.mapArray("value",(function(t,e){var i=n.getItemLayout(e),a=OT(t,s,h);return isNaN(a)&&(a=(h[0]+h[1])/2),{w:a,rep:a,fixed:n.getItemModel(e).get("fixed"),p:!i||isNaN(i[0])||isNaN(i[1])?null:i}})),p=a.mapArray("value",(function(t,e){var n=i.getEdgeByIndex(e),a=OT(t,l,u);return isNaN(a)&&(a=(u[0]+u[1])/2),{n1:d[n.node1.dataIndex],n2:d[n.node2.dataIndex],d:a,curveness:n.getModel().get("lineStyle.normal.curveness")||0}})),f=(c=t.coordinateSystem).getBoundingRect(),g=DT(d,p,{rect:f,gravity:o.get("gravity")}),m=g.step;g.step=function(t){for(var a=0,o=d.length;a<o;a++)d[a].fixed&&zT.copy(d[a].p,i.getNodeByIndex(a).getLayout());m((function(a,o,r){for(var s=0,l=a.length;s<l;s++)a[s].fixed||i.getNodeByIndex(s).setLayout(a[s].p),e[n.getId(s)]=a[s].p;for(s=0,l=o.length;s<l;s++){var h=o[s],u=i.getEdgeByIndex(s),c=h.n1.p,d=h.n2.p,p=u.getLayout();(p=p?p.slice():[])[0]=p[0]||[],p[1]=p[1]||[],zT.copy(p[0],c),zT.copy(p[1],d),+h.curveness&&(p[2]=[(c[0]+d[0])/2-(c[1]-d[1])*h.curveness,(c[1]+d[1])/2-(d[0]-c[0])*h.curveness]),u.setLayout(p)}t&&t(r)}))},t.forceLayout=g,t.preservedPoints=e,g.step()}else t.forceLayout=null}))},NT=yb,VT=wu.getLayoutRect,BT=ir;var GT=m,WT=b,HT=dT,FT=Ym,ZT=pT,jT=gT,UT=wT,qT=AT,XT=RT,YT=function(t,e){var i=[];return t.eachSeriesByType("graph",(function(t){var n=t.get("coordinateSystem");if(!n||"view"===n){var a=t.getData(),o=a.mapArray((function(t){var e=a.getItemModel(t);return[+e.get("x"),+e.get("y")]})),r=[],s=[];BT.fromPoints(o,r,s),s[0]-r[0]==0&&(s[0]+=1,r[0]-=1),s[1]-r[1]==0&&(s[1]+=1,r[1]-=1);var l=(s[0]-r[0])/(s[1]-r[1]),h=function(t,e,i){var n=t.getBoxLayoutParams();return n.aspect=i,VT(n,{width:e.getWidth(),height:e.getHeight()})}(t,e,l);isNaN(l)&&(r=[h.x,h.y],s=[h.x+h.width,h.y+h.height]);var u=s[0]-r[0],c=s[1]-r[1],d=h.width,p=h.height,f=t.coordinateSystem=new NT;f.zoomLimit=t.get("scaleLimit"),f.setBoundingRect(r[0],r[1],u,c),f.setViewRect(h.x,h.y,d,p),f.setCenter(t.get("center")),f.setZoom(t.get("zoom")),i.push(f)}})),i};GT.registerProcessor(HT),GT.registerVisual(WT.curry(FT,"graph","circle",null)),GT.registerVisual(ZT),GT.registerVisual(jT),GT.registerLayout(UT),GT.registerLayout(qT),GT.registerLayout(XT),GT.registerCoordinateSystem("graphView",{create:YT});var $T=dp,KT=b;yd.extend({type:"series.gauge",getInitialData:function(t,e){var i=new $T(["value"],this),n=t.data||[];return KT.isArray(n)||(n=[n]),i.initData(n),i},defaultOption:{zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,lineStyle:{color:[[.2,"#91c7ae"],[.8,"#63869e"],[1,"#c23531"]],width:30}},splitLine:{show:!0,length:30,lineStyle:{color:"#eee",width:2,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:8,lineStyle:{color:"#eee",width:1,type:"solid"}},axisLabel:{show:!0,distance:5,color:"auto"},pointer:{show:!0,length:"80%",width:8},itemStyle:{normal:{color:"auto"}},title:{show:!0,offsetCenter:[0,"-40%"],color:"#333",fontSize:15},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"auto",fontSize:30}}});var JT=ms.extend({type:"echartsGaugePointer",shape:{angle:0,width:10,r:10,x:0,y:0},buildPath:function(t,e){var i=Math.cos,n=Math.sin,a=e.r,o=e.width,r=e.angle,s=e.x-i(r)*o*(o>=a/3?1:2),l=e.y-n(r)*o*(o>=a/3?1:2);r=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+i(r)*o,e.y+n(r)*o),t.lineTo(e.x+i(e.angle)*a,e.y+n(e.angle)*a),t.lineTo(e.x-i(r)*o,e.y-n(r)*o),t.lineTo(s,l)}}),QT=Bo,tC=zd,eC=po,iC=eC.parsePercent,nC=eC.round,aC=eC.linearMap;function oC(t,e){return e&&("string"==typeof e?t=e.replace("{value}",null!=t?t:""):"function"==typeof e&&(t=e(t))),t}var rC=2*Math.PI;tC.extend({type:"gauge",render:function(t,e,i){this.group.removeAll();var n=t.get("axisLine.lineStyle.color"),a=function(t,e){var i=t.get("center"),n=e.getWidth(),a=e.getHeight(),o=Math.min(n,a);return{cx:iC(i[0],e.getWidth()),cy:iC(i[1],e.getHeight()),r:iC(t.get("radius"),o/2)}}(t,i);this._renderMain(t,e,i,n,a)},dispose:function(){},_renderMain:function(t,e,i,n,a){for(var o=this.group,r=t.getModel("axisLine").getModel("lineStyle"),s=t.get("clockwise"),l=-t.get("startAngle")/180*Math.PI,h=((p=-t.get("endAngle")/180*Math.PI)-l)%rC,u=l,c=r.get("width"),d=0;d<n.length;d++){var p=l+h*Math.min(Math.max(n[d][0],0),1),f=new QT.Sector({shape:{startAngle:u,endAngle:p,cx:a.cx,cy:a.cy,clockwise:s,r0:a.r-c,r:a.r},silent:!0});f.setStyle({fill:n[d][1]}),f.setStyle(r.getLineStyle(["color","borderWidth","borderColor"])),o.add(f),u=p}var g=function(t){if(t<=0)return n[0][1];for(var e=0;e<n.length;e++)if(n[e][0]>=t&&(0===e?0:n[e-1][0])<t)return n[e][1];return n[e-1][1]};if(!s){var m=l;l=p,p=m}this._renderTicks(t,e,i,g,a,l,p,s),this._renderPointer(t,e,i,g,a,l,p,s),this._renderTitle(t,e,i,g,a),this._renderDetail(t,e,i,g,a)},_renderTicks:function(t,e,i,n,a,o,r,s){for(var l=this.group,h=a.cx,u=a.cy,c=a.r,d=+t.get("min"),p=+t.get("max"),f=t.getModel("splitLine"),g=t.getModel("axisTick"),m=t.getModel("axisLabel"),v=t.get("splitNumber"),y=g.get("splitNumber"),x=iC(f.get("length"),c),_=iC(g.get("length"),c),b=o,w=(r-o)/v,S=w/y,M=f.getModel("lineStyle").getLineStyle(),I=g.getModel("lineStyle").getLineStyle(),A=0;A<=v;A++){var T=Math.cos(b),C=Math.sin(b);if(f.get("show")){var L=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-x)+h,y2:C*(c-x)+u},style:M,silent:!0});"auto"===M.stroke&&L.setStyle({stroke:n(A/v)}),l.add(L)}if(m.get("show")){var D=oC(nC(A/v*(p-d)+d),m.get("formatter")),P=m.get("distance"),k=n(A/v);l.add(new QT.Text({style:QT.setTextStyle({},m,{text:D,x:T*(c-x-P)+h,y:C*(c-x-P)+u,textVerticalAlign:C<-.4?"top":C>.4?"bottom":"middle",textAlign:T<-.4?"left":T>.4?"right":"center"},{autoColor:k}),silent:!0}))}if(g.get("show")&&A!==v){for(var O=0;O<=y;O++){T=Math.cos(b),C=Math.sin(b);var z=new QT.Line({shape:{x1:T*c+h,y1:C*c+u,x2:T*(c-_)+h,y2:C*(c-_)+u},silent:!0,style:I});"auto"===I.stroke&&z.setStyle({stroke:n((A+O/y)/v)}),l.add(z),b+=S}b-=S}else b+=w}},_renderPointer:function(t,e,i,n,a,o,r,s){var l=this.group,h=this._data;if(t.get("pointer.show")){var u=[+t.get("min"),+t.get("max")],c=[o,r],d=t.getData();d.diff(h).add((function(e){var i=new JT({shape:{angle:o}});QT.initProps(i,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(i),d.setItemGraphicEl(e,i)})).update((function(e,i){var n=h.getItemGraphicEl(i);QT.updateProps(n,{shape:{angle:aC(d.get("value",e),u,c,!0)}},t),l.add(n),d.setItemGraphicEl(e,n)})).remove((function(t){var e=h.getItemGraphicEl(t);l.remove(e)})).execute(),d.eachItemGraphicEl((function(t,e){var i=d.getItemModel(e),o=i.getModel("pointer");t.setShape({x:a.cx,y:a.cy,width:iC(o.get("width"),a.r),r:iC(o.get("length"),a.r)}),t.useStyle(i.getModel("itemStyle.normal").getItemStyle()),"auto"===t.style.fill&&t.setStyle("fill",n(aC(d.get("value",e),u,[0,1],!0))),QT.setHoverStyle(t,i.getModel("itemStyle.emphasis").getItemStyle())})),this._data=d}else h&&h.eachItemGraphicEl((function(t){l.remove(t)}))},_renderTitle:function(t,e,i,n,a){var o=t.getModel("title");if(o.get("show")){var r=o.get("offsetCenter"),s=a.cx+iC(r[0],a.r),l=a.cy+iC(r[1],a.r),h=+t.get("min"),u=+t.get("max"),c=t.getData().get("value",0),d=n(aC(c,[h,u],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},o,{x:s,y:l,text:t.getData().getName(0),textAlign:"center",textVerticalAlign:"middle"},{autoColor:d,forceRich:!0})}))}},_renderDetail:function(t,e,i,n,a){var o=t.getModel("detail"),r=+t.get("min"),s=+t.get("max");if(o.get("show")){var l=o.get("offsetCenter"),h=a.cx+iC(l[0],a.r),u=a.cy+iC(l[1],a.r),c=iC(o.get("width"),a.r),d=iC(o.get("height"),a.r),p=t.getData().get("value",0),f=n(aC(p,[r,s],[0,1],!0));this.group.add(new QT.Text({silent:!0,style:QT.setTextStyle({},o,{x:h,y:u,text:oC(p,o.get("formatter")),textWidth:isNaN(c)?null:c,textHeight:isNaN(d)?null:d,textAlign:"center",textVerticalAlign:"middle"},{autoColor:f,forceRich:!0})}))}}});var sC=m,lC=dp,hC=uo.defaultEmphasis,uC=wp,cC=sC.extendSeriesModel({type:"series.funnel",init:function(t){cC.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()},this._defaultLabelLine(t)},getInitialData:function(t,e){var i=uC(["value"],t.data),n=new lC(i,this);return n.initData(t.data),n},_defaultLabelLine:function(t){hC(t.labelLine,["show"]);var e=t.labelLine.normal,i=t.labelLine.emphasis;e.show=e.show&&t.label.normal.show,i.show=i.show&&t.label.emphasis.show},getDataParams:function(t){var e=this.getData(),i=cC.superCall(this,"getDataParams",t),n=e.getSum("value");return i.percent=n?+(e.get("value",t)/n*100).toFixed(2):0,i.$vars.push("percent"),i},defaultOption:{zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",gap:0,funnelAlign:"center",label:{normal:{show:!0,position:"outer"},emphasis:{show:!0}},labelLine:{normal:{show:!0,length:20,lineStyle:{width:1,type:"solid"}},emphasis:{}},itemStyle:{normal:{borderColor:"#fff",borderWidth:1},emphasis:{}}}}),dC=Bo,pC=b,fC=zd;function gC(t,e){dC.Group.call(this);var i=new dC.Polygon,n=new dC.Polyline,a=new dC.Text;function o(){n.ignore=n.hoverIgnore,a.ignore=a.hoverIgnore}function r(){n.ignore=n.normalIgnore,a.ignore=a.normalIgnore}this.add(i),this.add(n),this.add(a),this.updateData(t,e,!0),this.on("emphasis",o).on("normal",r).on("mouseover",o).on("mouseout",r)}var mC=gC.prototype,vC=["itemStyle","normal","opacity"];mC.updateData=function(t,e,i){var n=this.childAt(0),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e),s=t.getItemModel(e).get(vC);s=null==s?1:s,n.useStyle({}),i?(n.setShape({points:r.points}),n.setStyle({opacity:0}),dC.initProps(n,{style:{opacity:s}},a,e)):dC.updateProps(n,{style:{opacity:s},shape:{points:r.points}},a,e);var l=o.getModel("itemStyle"),h=t.getItemVisual(e,"color");n.setStyle(pC.defaults({lineJoin:"round",fill:h},l.getModel("normal").getItemStyle(["opacity"]))),n.hoverStyle=l.getModel("emphasis").getItemStyle(),this._updateLabel(t,e),dC.setHoverStyle(this)},mC._updateLabel=function(t,e){var i=this.childAt(1),n=this.childAt(2),a=t.hostModel,o=t.getItemModel(e),r=t.getItemLayout(e).label,s=t.getItemVisual(e,"color");dC.updateProps(i,{shape:{points:r.linePoints||r.linePoints}},a,e),dC.updateProps(n,{style:{x:r.x,y:r.y}},a,e),n.attr({rotation:r.rotation,origin:[r.x,r.y],z2:10});var l=o.getModel("label.normal"),h=o.getModel("label.emphasis"),u=o.getModel("labelLine.normal"),c=o.getModel("labelLine.emphasis");s=t.getItemVisual(e,"color");dC.setLabelStyle(n.style,n.hoverStyle={},l,h,{labelFetcher:t.hostModel,labelDataIndex:e,defaultText:t.getName(e),autoColor:s,useInsideStyle:!!r.inside},{textAlign:r.textAlign,textVerticalAlign:r.verticalAlign}),n.ignore=n.normalIgnore=!l.get("show"),n.hoverIgnore=!h.get("show"),i.ignore=i.normalIgnore=!u.get("show"),i.hoverIgnore=!c.get("show"),i.setStyle({stroke:s}),i.setStyle(u.getModel("lineStyle").getLineStyle()),i.hoverStyle=c.getModel("lineStyle").getLineStyle()},pC.inherits(gC,dC.Group),fC.extend({type:"funnel",render:function(t,e,i){var n=t.getData(),a=this._data,o=this.group;n.diff(a).add((function(t){var e=new gC(n,t);n.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var i=a.getItemGraphicEl(e);i.updateData(n,t),o.add(i),n.setItemGraphicEl(t,i)})).remove((function(t){var e=a.getItemGraphicEl(t);o.remove(e)})).execute(),this._data=n},remove:function(){this.group.removeAll(),this._data=null},dispose:function(){}});var yC=wu,xC=po,_C=xC.parsePercent,bC=xC.linearMap;var wC=function(t,e,i){t.eachSeriesByType("funnel",(function(t){var i=t.getData(),n=t.get("sort"),a=function(t,e){return yC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),o=function(t,e){for(var i=t.mapArray("value",(function(t){return t})),n=[],a="ascending"===e,o=0,r=t.count();o<r;o++)n[o]=o;return"function"==typeof e?n.sort(e):"none"!==e&&n.sort((function(t,e){return a?i[t]-i[e]:i[e]-i[t]})),n}(i,n),r=[_C(t.get("minSize"),a.width),_C(t.get("maxSize"),a.width)],s=i.getDataExtent("value"),l=t.get("min"),h=t.get("max");null==l&&(l=Math.min(s[0],0)),null==h&&(h=s[1]);var u=t.get("funnelAlign"),c=t.get("gap"),d=(a.height-c*(i.count()-1))/i.count(),p=a.y,f=function(t,e){var n,o=i.get("value",t)||0,s=bC(o,[l,h],r,!0);switch(u){case"left":n=a.x;break;case"center":n=a.x+(a.width-s)/2;break;case"right":n=a.x+a.width-s}return[[n,e],[n+s,e]]};"ascending"===n&&(d=-d,c=-c,p+=a.height,o=o.reverse());for(var g=0;g<o.length;g++){var m=o[g],v=o[g+1],y=f(m,p),x=f(v,p+d);p+=d+c,i.setItemLayout(m,{points:y.concat(x.slice().reverse())})}!function(t){t.each((function(e){var i,n,a,o,r=t.getItemModel(e),s=r.getModel("label.normal").get("position"),l=r.getModel("labelLine.normal"),h=t.getItemLayout(e),u=h.points,c="inner"===s||"inside"===s||"center"===s;if(c)i="center",o=[[n=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,a=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4],[n,a]];else{var d,p,f,g=l.get("length");"left"===s?(d=(u[3][0]+u[0][0])/2,p=(u[3][1]+u[0][1])/2,n=(f=d-g)-5,i="right"):(d=(u[1][0]+u[2][0])/2,p=(u[1][1]+u[2][1])/2,n=(f=d+g)+5,i="left"),o=[[d,p],[f,p]],a=p}h.label={linePoints:o,x:n,y:a,verticalAlign:"middle",textAlign:i,inside:c}}))}(i)}))},SC=m,MC=b,IC=Yx,AC=wC,TC=r_;SC.registerVisual(MC.curry(IC,"funnel")),SC.registerLayout(AC),SC.registerProcessor(MC.curry(TC,"funnel"));var CC=b,LC=uo;var DC=function(t){!function(t){if(t.parallel)return;var e=!1;CC.each(t.series,(function(t){t&&"parallel"===t.type&&(e=!0)})),e&&(t.parallel=[{}])}(t),function(t){var e=LC.normalizeToArray(t.parallelAxis);CC.each(e,(function(e){if(CC.isObject(e)){var i=e.parallelIndex||0,n=LC.normalizeToArray(t.parallel)[i];n&&n.parallelAxisDefault&&CC.merge(e,n.parallelAxisDefault,!1)}}))}(t)},PC=b,kC=gg,OC=function(t,e,i,n,a){kC.call(this,t,e,i),this.type=n||"value",this.axisIndex=a};function zC(t,e){var i=t[e]-t[1-e];return{span:Math.abs(i),sign:i>0?-1:i<0?1:e?-1:1}}function EC(t,e){return Math.min(e[1],Math.max(e[0],t))}OC.prototype={constructor:OC,model:null,isHorizontal:function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")}},PC.inherits(OC,kC);var RC=function(t,e,i,n,a,o){e[0]=EC(e[0],i),e[1]=EC(e[1],i),t=t||0;var r=i[1]-i[0];null!=a&&(a=EC(a,[0,r])),null!=o&&(o=Math.max(o,null!=a?a:0)),"all"===n&&(a=o=Math.abs(e[1]-e[0]),n=0);var s=zC(e,n);e[n]+=t;var l=a||0,h=i.slice();s.sign<0?h[0]+=l:h[1]-=l,e[n]=EC(e[n],h);var u=zC(e,n);return null!=a&&(u.sign!==s.sign||u.span<a)&&(e[1-n]=e[n]+s.sign*a),u=zC(e,n),null!=o&&u.span>o&&(e[1-n]=e[n]+u.sign*o),e},NC=b,VC=mt,BC=wu,GC=Rp,WC=OC,HC=Bo,FC=po,ZC=RC,jC=NC.each,UC=Math.min,qC=Math.max,XC=Math.floor,YC=Math.ceil,$C=FC.round,KC=Math.PI;function JC(t,e,i){this._axesMap=NC.createHashMap(),this._axesLayout={},this.dimensions=t.dimensions,this._rect,this._model=t,this._init(t,e,i)}function QC(t,e){return UC(qC(t,e[0]),e[1])}function tL(t,e){var i=e.layoutLength/(e.axisCount-1);return{position:i*t,axisNameAvailableWidth:i,axisLabelShow:!0}}function eL(t,e){var i,n,a=e.layoutLength,o=e.axisExpandWidth,r=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,h=s,u=!1;return t<l[0]?(i=t*s,n=s):t<=l[1]?(i=e.axisExpandWindow0Pos+t*o-e.axisExpandWindow[0],h=o,u=!0):(i=a-(r-1-t)*s,n=s),{position:i,axisNameAvailableWidth:h,axisLabelShow:u,nameTruncateMaxWidth:n}}JC.prototype={type:"parallel",constructor:JC,_init:function(t,e,i){var n=t.dimensions,a=t.parallelAxisIndex;jC(n,(function(t,i){var n=a[i],o=e.getComponent("parallelAxis",n),r=this._axesMap.set(t,new WC(t,GC.createScaleByModel(o),[0,0],o.get("type"),n)),s="category"===r.type;r.onBand=s&&o.get("boundaryGap"),r.inverse=o.get("inverse"),o.axis=r,r.model=o,r.coordinateSystem=o.coordinateSystem=this}),this)},update:function(t,e){this._updateAxesFromSeries(this._model,t)},containPoint:function(t){var e=this._makeLayoutInfo(),i=e.axisBase,n=e.layoutBase,a=e.pixelDimIndex,o=t[1-a],r=t[a];return o>=i&&o<=i+e.axisLength&&r>=n&&r<=n+e.layoutLength},getModel:function(){return this._model},_updateAxesFromSeries:function(t,e){e.eachSeries((function(i){if(t.contains(i,e)){var n=i.getData();jC(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(n,t),GC.niceScaleExtent(e.scale,e.model)}),this)}}),this)},resize:function(t,e){this._rect=BC.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},getRect:function(){return this._rect},_makeLayoutInfo:function(){var t,e=this._model,i=this._rect,n=["x","y"],a=["width","height"],o=e.get("layout"),r="horizontal"===o?0:1,s=i[a[r]],l=[0,s],h=this.dimensions.length,u=QC(e.get("axisExpandWidth"),l),c=QC(e.get("axisExpandCount")||0,[0,h]),d=e.get("axisExpandable")&&h>3&&h>c&&c>1&&u>0&&s>0,p=e.get("axisExpandWindow");p?(t=QC(p[1]-p[0],l),p[1]=p[0]+t):(t=QC(u*(c-1),l),(p=[u*(e.get("axisExpandCenter")||XC(h/2))-t/2])[1]=p[0]+t);var f=(s-t)/(h-c);f<3&&(f=0);var g=[XC($C(p[0]/u,1))+1,YC($C(p[1]/u,1))-1],m=f/u*p[0];return{layout:o,pixelDimIndex:r,layoutBase:i[n[r]],layoutLength:s,axisBase:i[n[1-r]],axisLength:i[a[1-r]],axisExpandable:d,axisExpandWidth:u,axisCollapseWidth:f,axisExpandWindow:p,axisCount:h,winInnerIndices:g,axisExpandWindow0Pos:m}},_layoutAxes:function(){var t=this._rect,e=this._axesMap,i=this.dimensions,n=this._makeLayoutInfo(),a=n.layout;e.each((function(t){var e=[0,n.axisLength],i=t.inverse?1:0;t.setExtent(e[i],e[1-i])})),jC(i,(function(i,o){var r=(n.axisExpandable?eL:tL)(o,n),s={horizontal:{x:r.position,y:n.axisLength},vertical:{x:0,y:r.position}},l={horizontal:KC/2,vertical:0},h=[s[a].x+t.x,s[a].y+t.y],u=l[a],c=VC.create();VC.rotate(c,c,u),VC.translate(c,c,h),this._axesLayout[i]={position:h,rotation:u,transform:c,axisNameAvailableWidth:r.axisNameAvailableWidth,axisLabelShow:r.axisLabelShow,nameTruncateMaxWidth:r.nameTruncateMaxWidth,tickDirection:1,labelDirection:1,labelInterval:e.get(i).getLabelInterval()}}),this)},getAxis:function(t){return this._axesMap.get(t)},dataToPoint:function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},eachActiveState:function(t,e,i){for(var n=this.dimensions,a=this._axesMap,o=this.hasAxisBrushed(),r=0,s=t.count();r<s;r++){var l,h=t.getValues(n,r);if(o){l="active";for(var u=0,c=n.length;u<c;u++){var d=n[u];if("inactive"===a.get(d).model.getActiveState(h[u],u)){l="inactive";break}}}else l="normal";e.call(i,l,r)}},hasAxisBrushed:function(){for(var t=this.dimensions,e=this._axesMap,i=!1,n=0,a=t.length;n<a;n++)"normal"!==e.get(t[n]).model.getActiveState()&&(i=!0);return i},axisCoordToPoint:function(t,e){var i=this._axesLayout[e];return HC.applyTransform([t,0],i.transform)},getAxisLayout:function(t){return NC.clone(this._axesLayout[t])},getSlidedAxisExpandWindow:function(t){var e=this._makeLayoutInfo(),i=e.pixelDimIndex,n=e.axisExpandWindow.slice(),a=n[1]-n[0],o=[0,e.axisExpandWidth*(e.axisCount-1)];if(!this.containPoint(t))return{behavior:"none",axisExpandWindow:n};var r,s=t[i]-e.layoutBase-e.axisExpandWindow0Pos,l="slide",h=e.axisCollapseWidth,u=this._model.get("axisExpandSlideTriggerArea"),c=null!=u[0];if(h)c&&h&&s<a*u[0]?(l="jump",r=s-a*u[2]):c&&h&&s>a*(1-u[0])?(l="jump",r=s-a*(1-u[2])):(r=s-a*u[1])>=0&&(r=s-a*(1-u[1]))<=0&&(r=0),(r*=e.axisExpandWidth/h)?ZC(r,n,o,"all"):l="none";else{a=n[1]-n[0];(n=[qC(0,o[1]*s/a-a/2)])[1]=UC(o[1],n[0]+a),n[0]=n[1]-a}return{axisExpandWindow:n,behavior:l}}};var iL=JC;_c.register("parallel",{create:function(t,e){var i=[];return t.eachComponent("parallel",(function(n,a){var o=new iL(n,t,e);o.name="parallel_"+a,o.resize(n,e),n.coordinateSystem=o,o.model=n,i.push(o)})),t.eachSeries((function(e){if("parallel"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"parallel",index:e.get("parallelIndex"),id:e.get("parallelId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}});var nL=b,aL=zo,oL=wv,rL=po,sL=Wf,lL=Zu.extend({type:"baseParallelAxis",axis:null,activeIntervals:[],getAreaSelectStyle:function(){return aL([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},setActiveIntervals:function(t){var e=this.activeIntervals=nL.clone(t);if(e)for(var i=e.length-1;i>=0;i--)rL.asc(e[i])},getActiveState:function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t)return"inactive";for(var i=0,n=e.length;i<n;i++)if(e[i][0]<=t&&t<=e[i][1])return"active";return"inactive"}});nL.merge(lL.prototype,sL),oL("parallel",lL,(function(t,e){return e.type||(e.data?"category":"value")}),{type:"value",dim:null,areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10});var hL=b,uL=Zu;uL.extend({type:"parallel",dependencies:["parallelAxis"],coordinateSystem:null,dimensions:null,parallelAxisIndex:null,layoutMode:"box",defaultOption:{zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},init:function(){uL.prototype.init.apply(this,arguments),this.mergeOption({})},mergeOption:function(t){var e=this.option;t&&hL.merge(e,t,!0),this._initDimensions()},contains:function(t,e){var i=t.get("parallelIndex");return null!=i&&e.getComponent("parallel",i)===this},setAxisExpand:function(t){hL.each(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},_initDimensions:function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[],i=hL.filter(this.dependentModels.parallelAxis,(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this);hL.each(i,(function(i){t.push("dim"+i.get("dim")),e.push(i.componentIndex)}))}});var cL=m;cL.registerAction({type:"axisAreaSelect",event:"axisAreaSelected",update:"updateVisual"},(function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},(function(e){e.axis.model.setActiveIntervals(t.intervals)}))})),cL.registerAction("parallelAxisExpand",(function(t,e){e.eachComponent({mainType:"parallel",query:t},(function(e){e.setAxisExpand(t)}))}));var dL=b,pL=rt,fL=Bo,gL=nw,mL=$d,vL=dL.curry,yL=dL.each,xL=dL.map,_L=Math.min,bL=Math.max,wL=Math.pow,SL={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},ML={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},IL={brushStyle:{lineWidth:2,stroke:"rgba(0,0,0,0.3)",fill:"rgba(0,0,0,0.1)"},transformable:!0,brushMode:"single",removeOnClick:!1},AL=0;function TL(t){pL.call(this),this._zr=t,this.group=new fL.Group,this._brushType,this._brushOption,this._panels,this._track=[],this._dragging,this._covers=[],this._creatingCover,this._creatingPanel,this._enableGlobalPan,this._uid="brushController_"+AL++,this._handlers={},yL(tD,(function(t,e){this._handlers[e]=dL.bind(t,this)}),this)}function CL(t,e){var i=iD[e.brushType].createCover(t,e);return i.__brushOption=e,PL(i,e),t.group.add(i),i}function LL(t,e){var i=OL(e);return i.endCreating&&(i.endCreating(t,e),PL(e,e.__brushOption)),e}function DL(t,e){var i=e.__brushOption;OL(e).updateCoverShape(t,e,i.range,i)}function PL(t,e){var i=e.z;null==i&&(i=1e4),t.traverse((function(t){t.z=i,t.z2=i}))}function kL(t,e){OL(e).updateCommon(t,e),DL(t,e)}function OL(t){return iD[t.__brushOption.brushType]}function zL(t,e,i){var n,a=t._panels;if(!a)return!0;var o=t._transform;return yL(a,(function(t){t.isTargetByCursor(e,i,o)&&(n=t)})),n}function EL(t,e){var i=t._panels;if(!i)return!0;var n=e.__brushOption.panelId;return null==n||i[n]}function RL(t){var e=t._covers,i=e.length;return yL(e,(function(e){t.group.remove(e)}),t),e.length=0,!!i}function NL(t,e){var i=xL(t._covers,(function(t){var e=t.__brushOption,i=dL.clone(e.range);return{brushType:e.brushType,panelId:e.panelId,range:i}}));t.trigger("brush",i,{isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function VL(t){var e=t.length-1;return e<0&&(e=0),[t[0],t[e]]}function BL(t,e,i,n){var a=new fL.Group;return a.add(new fL.Rect({name:"main",style:FL(i),silent:!0,draggable:!0,cursor:"move",drift:vL(t,e,a,"nswe"),ondragend:vL(NL,e,{isEnd:!0})})),yL(n,(function(i){a.add(new fL.Rect({name:i,style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:vL(t,e,a,i),ondragend:vL(NL,e,{isEnd:!0})}))})),a}function GL(t,e,i,n){var a=n.brushStyle.lineWidth||0,o=bL(a,6),r=i[0][0],s=i[1][0],l=r-a/2,h=s-a/2,u=i[0][1],c=i[1][1],d=u-o+a/2,p=c-o+a/2,f=u-r,g=c-s,m=f+a,v=g+a;HL(t,e,"main",r,s,f,g),n.transformable&&(HL(t,e,"w",l,h,o,v),HL(t,e,"e",d,h,o,v),HL(t,e,"n",l,h,m,o),HL(t,e,"s",l,p,m,o),HL(t,e,"nw",l,h,o,o),HL(t,e,"ne",d,h,o,o),HL(t,e,"sw",l,p,o,o),HL(t,e,"se",d,p,o,o))}function WL(t,e){var i=e.__brushOption,n=i.transformable,a=e.childAt(0);a.useStyle(FL(i)),a.attr({silent:!n,cursor:n?"move":"default"}),yL(["w","e","n","s","se","sw","ne","nw"],(function(i){var a=e.childOfName(i),o=jL(t,i);a&&a.attr({silent:!n,invisible:!n,cursor:n?ML[o]+"-resize":null})}))}function HL(t,e,i,n,a,o,r){var s=e.childOfName(i);s&&s.setShape(function(t){var e=_L(t[0][0],t[1][0]),i=_L(t[0][1],t[1][1]),n=bL(t[0][0],t[1][0]),a=bL(t[0][1],t[1][1]);return{x:e,y:i,width:n-e,height:a-i}}(YL(t,e,[[n,a],[n+o,a+r]])))}function FL(t){return dL.defaults({strokeNoScale:!0},t.brushStyle)}function ZL(t,e,i,n){var a=[_L(t,i),_L(e,n)],o=[bL(t,i),bL(e,n)];return[[a[0],o[0]],[a[1],o[1]]]}function jL(t,e){if(e.length>1)return("e"===(i=[jL(t,(e=e.split(""))[0]),jL(t,e[1])])[0]||"w"===i[0])&&i.reverse(),i.join("");var i=fL.transformDirection({w:"left",e:"right",n:"top",s:"bottom"}[e],function(t){return fL.getTransform(t.group)}(t));return{left:"w",right:"e",top:"n",bottom:"s"}[i]}function UL(t,e,i,n,a,o,r,s){var l=n.__brushOption,h=t(l.range),u=XL(i,o,r);yL(a.split(""),(function(t){var e=SL[t];h[e[0]][e[1]]+=u[e[0]]})),l.range=e(ZL(h[0][0],h[1][0],h[0][1],h[1][1])),kL(i,n),NL(i,{isEnd:!1})}function qL(t,e,i,n,a){var o=e.__brushOption.range,r=XL(t,i,n);yL(o,(function(t){t[0]+=r[0],t[1]+=r[1]})),kL(t,e),NL(t,{isEnd:!1})}function XL(t,e,i){var n=t.group,a=n.transformCoordToLocal(e,i),o=n.transformCoordToLocal(0,0);return[a[0]-o[0],a[1]-o[1]]}function YL(t,e,i){var n=EL(t,e);return n&&!0!==n?n.clipPath(i,t._transform):dL.clone(i)}function $L(t){var e=t.event;e.preventDefault&&e.preventDefault()}function KL(t,e,i){return t.childOfName("main").contain(e,i)}function JL(t,e,i,n){var a,o=t._creatingCover,r=t._creatingPanel,s=t._brushOption;if(t._track.push(i.slice()),function(t){var e=t._track;if(!e.length)return!1;var i=e[e.length-1],n=e[0],a=i[0]-n[0],o=i[1]-n[1];return wL(a*a+o*o,.5)>6}(t)||o){if(r&&!o){"single"===s.brushMode&&RL(t);var l=dL.clone(s);l.brushType=QL(l.brushType,r),l.panelId=!0===r?null:r.panelId,o=t._creatingCover=CL(t,l),t._covers.push(o)}if(o){var h=iD[QL(t._brushType,r)];o.__brushOption.range=h.getCreatingRange(YL(t,o,t._track)),n&&(LL(t,o),h.updateCommon(t,o)),DL(t,o),a={isEnd:n}}}else n&&"single"===s.brushMode&&s.removeOnClick&&zL(t,e,i)&&RL(t)&&(a={isEnd:n,removeOnClick:!0});return a}function QL(t,e){return"auto"===t?e.defaultBrushType:t}TL.prototype={constructor:TL,enableBrush:function(t){var e,i;return this._brushType&&(i=(e=this)._zr,gL.release(i,"globalPan",e._uid),yL(e._handlers,(function(t,e){i.off(e,t)})),e._brushType=e._brushOption=null),t.brushType&&function(t,e){var i=t._zr;t._enableGlobalPan||gL.take(i,"globalPan",t._uid);yL(t._handlers,(function(t,e){i.on(e,t)})),t._brushType=e.brushType,t._brushOption=dL.merge(dL.clone(IL),e,!0)}(this,t),this},setPanels:function(t){if(t&&t.length){var e=this._panels={};dL.each(t,(function(t){e[t.panelId]=dL.clone(t)}))}else this._panels=null;return this},mount:function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var e=this.group;return this._zr.add(e),e.attr({position:t.position||[0,0],rotation:t.rotation||0,scale:t.scale||[1,1]}),this._transform=e.getLocalTransform(),this},eachCover:function(t,e){yL(this._covers,t,e)},updateCovers:function(t){t=dL.map(t,(function(t){return dL.merge(dL.clone(IL),t,!0)}));var e=this._covers,i=this._covers=[],n=this,a=this._creatingCover;return new mL(e,t,(function(t,e){return o(t.__brushOption,e)}),o).add(r).update(r).remove((function(t){e[t]!==a&&n.group.remove(e[t])})).execute(),this;function o(t,e){return(null!=t.id?t.id:"\0-brush-index-"+e)+"-"+t.brushType}function r(o,r){var s=t[o];if(null!=r&&e[r]===a)i[o]=e[r];else{var l=i[o]=null!=r?(e[r].__brushOption=s,e[r]):LL(n,CL(n,s));kL(n,l)}}},unmount:function(){return this.enableBrush(!1),RL(this),this._zr.remove(this.group),this},dispose:function(){this.unmount(),this.off()}},dL.mixin(TL,pL);var tD={mousedown:function(t){if(this._dragging)eD.call(this,t);else if(!t.target||!t.target.draggable){$L(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=zL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);if(function(t,e,i){if(t._brushType){var n=t._zr,a=t._covers,o=zL(t,e,i);if(!t._dragging)for(var r=0;r<a.length;r++){var s=a[r].__brushOption;if(o&&(!0===o||s.panelId===o.panelId)&&iD[s.brushType].contain(a[r],i[0],i[1]))return}o&&n.setCursorStyle("crosshair")}}(this,t,e),this._dragging){$L(t);var i=JL(this,t,e,!1);i&&NL(this,i)}},mouseup:eD};function eD(t){if(this._dragging){$L(t);var e=JL(this,t,this.group.transformCoordToLocal(t.offsetX,t.offsetY),!0);this._dragging=!1,this._track=[],this._creatingCover=null,e&&NL(this,e)}}var iD={lineX:nD(0),lineY:nD(1),rect:{createCover:function(t,e){return BL(vL(UL,(function(t){return t}),(function(t){return t})),t,e,["w","e","n","s","se","sw","ne","nw"])},getCreatingRange:function(t){var e=VL(t);return ZL(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(t,e,i,n){GL(t,e,i,n)},updateCommon:WL,contain:KL},polygon:{createCover:function(t,e){var i=new fL.Group;return i.add(new fL.Polyline({name:"main",style:FL(e),silent:!0})),i},getCreatingRange:function(t){return t},endCreating:function(t,e){e.remove(e.childAt(0)),e.add(new fL.Polygon({name:"main",draggable:!0,drift:vL(qL,t,e),ondragend:vL(NL,t,{isEnd:!0})}))},updateCoverShape:function(t,e,i,n){e.childAt(0).setShape({points:YL(t,e,i)})},updateCommon:WL,contain:KL}};function nD(t){return{createCover:function(e,i){return BL(vL(UL,(function(e){var i=[e,[0,100]];return t&&i.reverse(),i}),(function(e){return e[t]})),e,i,[["w","e"],["n","s"]][t])},getCreatingRange:function(e){var i=VL(e);return[_L(i[0][t],i[1][t]),bL(i[0][t],i[1][t])]},updateCoverShape:function(e,i,n,a){var o,r=EL(e,i);if(!0!==r&&r.getLinearBrushOtherExtent)o=r.getLinearBrushOtherExtent(t,e._transform);else{var s=e._zr;o=[0,[s.getWidth(),s.getHeight()][1-t]]}var l=[n,o];t&&l.reverse(),GL(e,i,l,a)},updateCommon:WL,contain:KL}}var aD=TL,oD={},rD=Je,sD=_w.onIrrelevantElement,lD=Bo;function hD(t){return rD.create(t)}oD.makeRectPanelClipPath=function(t){return t=hD(t),function(e,i){return lD.clipPointsByRect(e,t)}},oD.makeLinearBrushOtherExtent=function(t,e){return t=hD(t),function(i){var n=null!=e?e:i,a=n?t.width:t.height,o=n?t.x:t.y;return[o,o+(a||0)]}},oD.makeRectIsTargetByCursor=function(t,e,i){return t=hD(t),function(n,a,o){return t.contain(a[0],a[1])&&!sD(n,e,i)}};var uD=b,cD=yy,dD=aD,pD=oD,fD=Bo,gD=["axisLine","axisTickLabel","axisName"],mD=m.extendComponentView({type:"parallelAxis",init:function(t,e){mD.superApply(this,"init",arguments),(this._brushController=new dD(e.getZr())).on("brush",uD.bind(this._onBrush,this))},render:function(t,e,i,n){if(!function(t,e,i){return i&&"axisAreaSelect"===i.type&&e.findComponents({mainType:"parallelAxis",query:i})[0]===t}(t,e,n)){this.axisModel=t,this.api=i,this.group.removeAll();var a=this._axisGroup;if(this._axisGroup=new fD.Group,this.group.add(this._axisGroup),t.get("show")){var o=function(t,e){return e.getComponent("parallel",t.get("parallelIndex"))}(t,e),r=o.coordinateSystem,s=t.getAreaSelectStyle(),l=s.width,h=t.axis.dim,u=r.getAxisLayout(h),c=uD.extend({strokeContainThreshold:l},u),d=new cD(t,c);uD.each(gD,d.add,d),this._axisGroup.add(d.getGroup()),this._refreshBrushController(c,s,t,o,l,i);var p=n&&!1===n.animation?null:t;fD.groupTransition(a,this._axisGroup,p)}}},updateVisual:function(t,e,i,n){this._brushController&&this._brushController.updateCovers(vD(t))},_refreshBrushController:function(t,e,i,n,a,o){var r=i.axis.getExtent(),s=r[1]-r[0],l=Math.min(30,.1*Math.abs(s)),h=fD.BoundingRect.create({x:r[0],y:-a/2,width:s,height:a});h.x-=l,h.width+=2*l,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,position:t.position}).setPanels([{panelId:"pl",clipPath:pD.makeRectPanelClipPath(h),isTargetByCursor:pD.makeRectIsTargetByCursor(h,o,n),getLinearBrushOtherExtent:pD.makeLinearBrushOtherExtent(h,0)}]).enableBrush({brushType:"lineX",brushStyle:e,removeOnClick:!0}).updateCovers(vD(i))},_onBrush:function(t,e){var i=this.axisModel,n=i.axis,a=uD.map(t,(function(t){return[n.coordToData(t.range[0],!0),n.coordToData(t.range[1],!0)]}));(!i.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:a})},dispose:function(){this._brushController.dispose()}});function vD(t){var e=t.axis;return uD.map(t.activeIntervals,(function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}}))}var yD=m,xD=b,_D=Ed,bD=DC;yD.extendComponentView({type:"parallel",render:function(t,e,i){this._model=t,this._api=i,this._handlers||(this._handlers={},xD.each(wD,(function(t,e){i.getZr().on(e,this._handlers[e]=xD.bind(t,this))}),this)),_D.createOrUpdate(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},dispose:function(t,e){xD.each(this._handlers,(function(t,i){e.getZr().off(i,t)})),this._handlers=null},_throttledDispatchExpand:function(t){this._dispatchExpand(t)},_dispatchExpand:function(t){t&&this._api.dispatchAction(xD.extend({type:"parallelAxisExpand"},t))}});var wD={mousedown:function(t){SD(this,"click")&&(this._mouseDownPoint=[t.offsetX,t.offsetY])},mouseup:function(t){var e=this._mouseDownPoint;if(SD(this,"click")&&e){var i=[t.offsetX,t.offsetY];if(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2)>5)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==n.behavior&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&SD(this,"mousemove")){var e=this._model,i=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),n=i.behavior;"jump"===n&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===n?null:{axisExpandWindow:i.axisExpandWindow,animation:"jump"===n&&null})}}};function SD(t,e){var i=t._model;return i.get("axisExpandable")&&i.get("axisExpandTriggerOn")===e}yD.registerPreprocessor(bD);var MD=dp,ID=b,AD=wp;function TD(t){return+t.replace("dim","")}yd.extend({type:"series.parallel",dependencies:["parallel"],visualColorAccessPath:"lineStyle.normal.color",getInitialData:function(t,e){var i=e.getComponent("parallel",this.get("parallelIndex")),n=i.parallelAxisIndex,a=t.data,o=i.dimensions,r=function(t,e){var i=0;ID.each(t,(function(t){var e=TD(t);e>i&&(i=e)}));var n=e[0];n&&n.length-1>i&&(i=n.length-1);for(var a=[],o=0;o<=i;o++)a.push("dim"+o);return a}(o,a),s=ID.map(r,(function(t,i){var r=ID.indexOf(o,t),s=r>=0&&e.getComponent("parallelAxis",n[r]);return s&&"category"===s.get("type")?(function(t,e,i){var n=t.get("data"),a=TD(e);n&&n.length&&ID.each(i,(function(t){if(t){var e=ID.indexOf(n,t[a]);t[a]=e>=0?e:NaN}}))}(s,t,a),{name:t,type:"ordinal"}):r<0&&AD.guessOrdinal(a,i)?{name:t,type:"ordinal"}:t})),l=new MD(s,this);return l.initData(a),this.option.progressive&&(this.option.animation=!1),l},getRawIndicesByActiveState:function(t){var e=this.coordinateSystem,i=this.getData(),n=[];return e.eachActiveState(i,(function(e,a){t===e&&n.push(i.getRawIndex(a))})),n},defaultOption:{zlevel:0,z:2,coordinateSystem:"parallel",parallelIndex:0,label:{normal:{show:!1},emphasis:{show:!1}},inactiveOpacity:.05,activeOpacity:1,lineStyle:{normal:{width:1,opacity:.45,type:"solid"}},progressive:!1,smooth:!1,animationEasing:"linear"}});var CD=Bo,LD=b;function DD(t,e,i,n){for(var a,o=[],r=0;r<i.length;r++){var s=i[r],l=t.get(s,e);a=l,("category"===n.getAxis(s).type?null==a:null==a||isNaN(a))||o.push(n.dataToPoint(l,s))}return o}zd.extend({type:"parallel",init:function(){this._dataGroup=new CD.Group,this.group.add(this._dataGroup),this._data},render:function(t,e,i,n){this._renderForNormal(t,n)},dispose:function(){},_renderForNormal:function(t,e){var i=this._dataGroup,n=t.getData(),a=this._data,o=t.coordinateSystem,r=o.dimensions,s=t.option.smooth?.3:null;if(n.diff(a).add((function(t){!function(t,e,i,n,a){var o=DD(t,i,n,a),r=new CD.Polyline({shape:{points:o},silent:!0,z2:10});e.add(r),t.setItemGraphicEl(i,r)}(n,i,t,r,o)})).update((function(i,s){var l=a.getItemGraphicEl(s),h=DD(n,i,r,o);n.setItemGraphicEl(i,l);var u=e&&!1===e.animation?null:t;CD.updateProps(l,{shape:{points:h}},u,i)})).remove((function(t){var e=a.getItemGraphicEl(t);i.remove(e)})).execute(),function(t,e){var i=t.hostModel.getModel("lineStyle.normal"),n=i.getLineStyle();t.eachItemGraphicEl((function(a,o){if(t.hasItemOption){var r=t.getItemModel(o).getModel("lineStyle.normal",i);n=r.getLineStyle(["color","stroke"])}a.useStyle(LD.extend(n,{fill:null,stroke:t.getItemVisual(o,"color"),opacity:t.getItemVisual(o,"opacity")})),a.shape.smooth=e}))}(n,s),!this._data){var l=function(t,e,i){var n=t.model,a=t.getRect(),o=new CD.Rect({shape:{x:a.x,y:a.y,width:a.width,height:a.height}}),r="horizontal"===n.get("layout")?"width":"height";return o.setShape(r,0),CD.initProps(o,{shape:{width:a.width,height:a.height}},e,i),o}(o,t,(function(){setTimeout((function(){i.removeClipPath()}))}));i.setClipPath(l)}this._data=n},remove:function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null}});var PD=["lineStyle","normal","opacity"];m.registerVisual((function(t){t.eachSeriesByType("parallel",(function(e){var i=e.getModel("itemStyle.normal"),n=e.getModel("lineStyle.normal"),a=t.get("color"),o=n.get("color")||i.get("color")||a[e.seriesIndex%a.length],r=e.get("inactiveOpacity"),s=e.get("activeOpacity"),l=e.getModel("lineStyle.normal").getLineStyle(),h=e.coordinateSystem,u=e.getData(),c={normal:l.opacity,active:s,inactive:r};h.eachActiveState(u,(function(t,e){var i=u.getItemModel(e),n=c[t];if("normal"===t){var a=i.get(PD,!0);null!=a&&(n=a)}u.setItemVisual(e,"opacity",n)})),u.setVisual("color",o)}))}));var kD=yd,OD=oA,zD=co.encodeHTML,ED=kD.extend({type:"series.sankey",layoutInfo:null,getInitialData:function(t){var e=t.edges||t.links,i=t.data||t.nodes;if(i&&e)return OD(i,e,this,!0).data},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},formatTooltip:function(t,e,i){if("edge"===i){var n=this.getDataParams(t,i),a=n.data,o=a.source+" -- "+a.target;return n.value&&(o+=" : "+n.value),zD(o)}return ED.superCall(this,"formatTooltip",t,e)},defaultOption:{zlevel:0,z:2,coordinateSystem:"view",layout:null,left:"5%",top:"5%",right:"20%",bottom:"5%",nodeWidth:20,nodeGap:8,layoutIterations:32,label:{normal:{show:!0,position:"right",color:"#000",fontSize:12},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:1,borderColor:"#333"}},lineStyle:{normal:{color:"#314656",opacity:.2,curveness:.5},emphasis:{opacity:.6}},animationEasing:"linear",animationDuration:1e3}}),RD=Bo,ND=m,VD=RD.extendShape({shape:{x1:0,y1:0,x2:0,y2:0,cpx1:0,cpy1:0,cpx2:0,cpy2:0,extent:0},buildPath:function(t,e){var i=e.extent/2;t.moveTo(e.x1,e.y1-i),t.bezierCurveTo(e.cpx1,e.cpy1-i,e.cpx2,e.cpy2-i,e.x2,e.y2-i),t.lineTo(e.x2,e.y2+i),t.bezierCurveTo(e.cpx2,e.cpy2+i,e.cpx1,e.cpy1+i,e.x1,e.y1+i),t.closePath()}});ND.extendChartView({type:"sankey",_model:null,render:function(t,e,i){var n=t.getGraph(),a=this.group,o=t.layoutInfo,r=t.getData(),s=t.getData("edge");this._model=t,a.removeAll(),a.attr("position",[o.x,o.y]),n.eachEdge((function(e){var i=new VD;i.dataIndex=e.dataIndex,i.seriesIndex=t.seriesIndex,i.dataType="edge";var n=e.getModel("lineStyle.normal"),o=n.get("curveness"),r=e.node1.getLayout(),l=e.node2.getLayout(),h=e.getLayout();i.shape.extent=Math.max(1,h.dy);var u=r.x+r.dx,c=r.y+h.sy+h.dy/2,d=l.x,p=l.y+h.ty+h.dy/2,f=u*(1-o)+d*o,g=c,m=u*o+d*(1-o),v=p;switch(i.setShape({x1:u,y1:c,x2:d,y2:p,cpx1:f,cpy1:g,cpx2:m,cpy2:v}),i.setStyle(n.getItemStyle()),i.style.fill){case"source":i.style.fill=e.node1.getVisual("color");break;case"target":i.style.fill=e.node2.getVisual("color")}RD.setHoverStyle(i,e.getModel("lineStyle.emphasis").getItemStyle()),a.add(i),s.setItemGraphicEl(e.dataIndex,i)})),n.eachNode((function(e){var i=e.getLayout(),n=e.getModel(),o=n.getModel("label.normal"),s=n.getModel("label.emphasis"),l=new RD.Rect({shape:{x:i.x,y:i.y,width:e.getLayout().dx,height:e.getLayout().dy},style:n.getModel("itemStyle.normal").getItemStyle()}),h=e.getModel("itemStyle.emphasis").getItemStyle();RD.setLabelStyle(l.style,h,o,s,{labelFetcher:t,labelDataIndex:e.dataIndex,defaultText:e.id,isRectText:!0}),l.setStyle("fill",e.getVisual("color")),RD.setHoverStyle(l,h),a.add(l),r.setItemGraphicEl(e.dataIndex,l),l.dataType="node"})),!this._data&&t.get("animation")&&a.setClipPath(function(t,e,i){var n=new RD.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return RD.initProps(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(a.getBoundingRect(),t,(function(){a.removeClipPath()}))),this._data=t.getData()},dispose:function(){}});var BD=b;var GD=function(){var t=[],e=[];function i(e,n){if(n>=t.length)return e;for(var a=-1,o=e.length,r=t[n++],s={},l={};++a<o;){var h=r(e[a]),u=l[h];u?u.push(e[a]):l[h]=[e[a]]}return BD.each(l,(function(t,e){s[e]=i(t,n)})),s}function n(i,a){if(a>=t.length)return i;var o=[],r=e[a++];return BD.each(i,(function(t,e){o.push({key:e,values:n(t,a)})})),r?o.sort((function(t,e){return r(t.key,e.key)})):o}return{key:function(e){return t.push(e),this},sortKeys:function(i){return e[t.length-1]=i,this},entries:function(t){return n(i(t,0),0)}}},WD=wu,HD=GD,FD=b;function ZD(t,e,i){FD.each(t,(function(t){var n,a,o,r=0,s=t.length;for(t.sort(QD),o=0;o<s;o++){if((a=r-(n=t[o]).getLayout().y)>0){var l=n.getLayout().y+a;n.setLayout({y:l},!0)}r=n.getLayout().y+n.getLayout().dy+e}if((a=r-e-i)>0){l=n.getLayout().y-a;for(n.setLayout({y:l},!0),r=n.getLayout().y,o=s-2;o>=0;--o)(a=(n=t[o]).getLayout().y+n.getLayout().dy+e-r)>0&&(l=n.getLayout().y-a,n.setLayout({y:l},!0)),r=n.getLayout().y}}))}function jD(t,e){FD.each(t.slice().reverse(),(function(t){FD.each(t,(function(t){if(t.outEdges.length){var i=KD(t.outEdges,UD)/KD(t.outEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function UD(t){return JD(t.node2)*t.getValue()}function qD(t,e){FD.each(t,(function(t){FD.each(t,(function(t){if(t.inEdges.length){var i=KD(t.inEdges,XD)/KD(t.inEdges,eP),n=t.getLayout().y+(i-JD(t))*e;t.setLayout({y:n},!0)}}))}))}function XD(t){return JD(t.node1)*t.getValue()}function YD(t,e){return t.node2.getLayout().y-e.node2.getLayout().y}function $D(t,e){return t.node1.getLayout().y-e.node1.getLayout().y}function KD(t,e){for(var i=0,n=t.length,a=-1;++a<n;){var o=+e.call(t,t[a],a);isNaN(o)||(i+=o)}return i}function JD(t){return t.getLayout().y+t.getLayout().dy/2}function QD(t,e){return t.getLayout().y-e.getLayout().y}function tP(t,e){return t<e?-1:t>e?1:t===e?0:NaN}function eP(t){return t.getValue()}var iP=function(t,e,i){t.eachSeriesByType("sankey",(function(t){var i=t.get("nodeWidth"),n=t.get("nodeGap"),a=function(t,e){return WD.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=a;var o=a.width,r=a.height,s=t.getGraph(),l=s.nodes,h=s.edges;!function(t){FD.each(t,(function(t){var e=KD(t.outEdges,eP),i=KD(t.inEdges,eP),n=Math.max(e,i);t.setLayout({value:n},!0)}))}(l),function(t,e,i,n,a,o,r){(function(t,e,i){var n=t,a=null,o=0;for(;n.length;){a=[];for(var r=0,s=n.length;r<s;r++){var l=n[r];l.setLayout({x:o},!0),l.setLayout({dx:e},!0);for(var h=0,u=l.outEdges.length;h<u;h++)a.push(l.outEdges[h].node2)}n=a,++o}(function(t,e){FD.each(t,(function(t){t.outEdges.length||t.setLayout({x:e-1},!0)}))})(t,o),function(t,e){FD.each(t,(function(t){var i=t.getLayout().x*e;t.setLayout({x:i},!0)}))}(t,(i-e)/(o-1))})(t,i,a),function(t,e,i,n,a){var o=HD().key((function(t){return t.getLayout().x})).sortKeys(tP).entries(t).map((function(t){return t.values}));(function(t,e,i,n,a){var o=[];FD.each(e,(function(t){var e=t.length,i=0;FD.each(t,(function(t){i+=t.getLayout().value}));var r=(n-(e-1)*a)/i;o.push(r)})),o.sort((function(t,e){return t-e}));var r=o[0];FD.each(e,(function(t){FD.each(t,(function(t,e){t.setLayout({y:e},!0);var i=t.getLayout().value*r;t.setLayout({dy:i},!0)}))})),FD.each(i,(function(t){var e=+t.getValue()*r;t.setLayout({dy:e},!0)}))})(0,o,e,i,n),ZD(o,n,i);for(var r=1;a>0;a--)jD(o,r*=.99),ZD(o,n,i),qD(o,r),ZD(o,n,i)}(t,e,o,n,r),function(t){FD.each(t,(function(t){t.outEdges.sort(YD),t.inEdges.sort($D)})),FD.each(t,(function(t){var e=0,i=0;FD.each(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),FD.each(t.inEdges,(function(t){t.setLayout({ty:i},!0),i+=t.getLayout().dy}))}))}(t)}(l,h,i,n,o,r,0!==FD.filter(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"))}))},nP=cI,aP=b;var oP=m,rP=iP,sP=function(t,e){t.eachSeriesByType("sankey",(function(t){var e=t.getGraph().nodes;e.sort((function(t,e){return t.getLayout().value-e.getLayout().value}));var i=e[0].getLayout().value,n=e[e.length-1].getLayout().value;aP.each(e,(function(e){var a=new nP({type:"color",mappingMethod:"linear",dataExtent:[i,n],visual:t.get("color")}).mapValueToVisual(e.getLayout().value);e.setVisual("color",a);var o=e.getModel().get("itemStyle.normal.color");null!=o&&e.setVisual("color",o)}))}))};oP.registerLayout(rP),oP.registerVisual(sP);var lP={},hP=b,uP=Bo,cP=ms.extend({type:"whiskerInBox",shape:{},buildPath:function(t,e){for(var i in e)if(e.hasOwnProperty(i)&&0===i.indexOf("ends")){var n=e[i];t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1])}}});function dP(t,e,i,n){uP.Group.call(this),this.bodyIndex,this.whiskerIndex,this.styleUpdater=i,this._createContent(t,e,n),this.updateData(t,e,n),this._seriesModel}var pP=dP.prototype;function fP(t,e,i){return hP.map(t,(function(t){return(t=t.slice())[e]=i.initBaseline,t}))}function gP(t){var e={};return hP.each(t,(function(t,i){e["ends"+i]=t})),e}function mP(t){this.group=new uP.Group,this.styleUpdater=t}pP._createContent=function(t,e,i){var n=t.getItemLayout(e),a="horizontal"===n.chartLayout?1:0,o=0;this.add(new uP.Polygon({shape:{points:i?fP(n.bodyEnds,a,n):n.bodyEnds},style:{strokeNoScale:!0},z2:100})),this.bodyIndex=o++;var r=hP.map(n.whiskerEnds,(function(t){return i?fP(t,a,n):t}));this.add(new cP({shape:gP(r),style:{strokeNoScale:!0},z2:100})),this.whiskerIndex=o++},pP.updateData=function(t,e,i){var n=this._seriesModel=t.hostModel,a=t.getItemLayout(e),o=uP[i?"initProps":"updateProps"];o(this.childAt(this.bodyIndex),{shape:{points:a.bodyEnds}},n,e),o(this.childAt(this.whiskerIndex),{shape:gP(a.whiskerEnds)},n,e),this.styleUpdater.call(null,this,t,e)},hP.inherits(dP,uP.Group);var vP=mP.prototype;vP.updateData=function(t){var e=this.group,i=this._data,n=this.styleUpdater;t.diff(i).add((function(i){if(t.hasValue(i)){var a=new dP(t,i,n,!0);t.setItemGraphicEl(i,a),e.add(a)}})).update((function(a,o){var r=i.getItemGraphicEl(o);t.hasValue(a)?(r?r.updateData(t,a):r=new dP(t,a,n),e.add(r),t.setItemGraphicEl(a,r)):e.remove(r)})).remove((function(t){var n=i.getItemGraphicEl(t);n&&e.remove(n)})).execute(),this._data=t},vP.remove=function(){var t=this.group,e=this._data;this._data=null,e&&e.eachItemGraphicEl((function(e){e&&t.remove(e)}))};var yP=dp,xP=wp,_P=mP,bP=b,wP={_baseAxisDim:null,getInitialData:function(t,e){var i,n,a=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),r=a.get("type"),s=o.get("type");"category"===r?(t.layout="horizontal",i=a.getCategories(),n=!0):"category"===s?(t.layout="vertical",i=o.getCategories(),n=!0):t.layout=t.layout||"horizontal";var l=["x","y"],h="horizontal"===t.layout?0:1,u=this._baseAxisDim=l[h],c=l[1-h],d=t.data;n&&bP.each(d,(function(t,e){t.value&&bP.isArray(t.value)?t.value.unshift(e):bP.isArray(t)&&t.unshift(e)}));var p=this.defaultValueDimensions,f=[{name:u,otherDims:{tooltip:!1},dimsDef:["base"]},{name:c,dimsDef:p.slice()}];f=xP(f,d,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions"),dimCount:p.length+1});var g=new yP(f,this);return g.initData(d,i?i.slice():null),g},getBaseAxis:function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis}},SP={init:function(){var t=this._whiskerBoxDraw=new _P(this.getStyleUpdater());this.group.add(t.group)},render:function(t,e,i){this._whiskerBoxDraw.updateData(t.getData())},remove:function(t){this._whiskerBoxDraw.remove()}};lP.seriesModelMixin=wP,lP.viewMixin=SP;var MP=b,IP=yd,AP=lP.seriesModelMixin,TP=IP.extend({type:"series.boxplot",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["min","Q1","median","Q3","max"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,boxWidth:[7,50],itemStyle:{normal:{color:"#fff",borderWidth:1},emphasis:{borderWidth:2,shadowBlur:5,shadowOffsetX:2,shadowOffsetY:2,shadowColor:"rgba(0,0,0,0.4)"}},animationEasing:"elasticOut",animationDuration:800}});MP.mixin(TP,AP,!0);var CP=b,LP=zd,DP=Bo,PP=lP.viewMixin,kP=LP.extend({type:"boxplot",getStyleUpdater:function(){return EP},dispose:CP.noop});CP.mixin(kP,PP,!0);var OP=["itemStyle","normal"],zP=["itemStyle","emphasis"];function EP(t,e,i){var n=e.getItemModel(i),a=n.getModel(OP),o=e.getItemVisual(i,"color"),r=a.getItemStyle(["borderColor"]),s=t.childAt(t.whiskerIndex);s.style.set(r),s.style.stroke=o,s.dirty();var l=t.childAt(t.bodyIndex);l.style.set(r),l.style.stroke=o,l.dirty();var h=n.getModel(zP).getItemStyle();DP.setHoverStyle(t,h)}var RP=["itemStyle","normal","borderColor"];var NP=function(t,e){var i=t.get("color");t.eachRawSeriesByType("boxplot",(function(e){var n=i[e.seriesIndex%i.length],a=e.getData();a.setVisual({legendSymbol:"roundRect",color:e.get(RP)||n}),t.isSeriesFiltered(e)||a.each((function(t){var e=a.getItemModel(t);a.setItemVisual(t,{color:e.get(RP,!0)})}))}))},VP=b,BP=po.parsePercent,GP=VP.each;var WP=m,HP=NP,FP=function(t){var e=function(t){var e=[],i=[];return t.eachSeriesByType("boxplot",(function(t){var n=t.getBaseAxis(),a=VP.indexOf(i,n);a<0&&(a=i.length,i[a]=n,e[a]={axis:n,seriesModels:[]}),e[a].seriesModels.push(t)})),e}(t);GP(e,(function(t){var e=t.seriesModels;e.length&&(!function(t){var e,i,n=t.axis,a=t.seriesModels,o=a.length,r=t.boxWidthList=[],s=t.boxOffsetList=[],l=[];if("category"===n.type)i=n.getBandWidth();else{var h=0;GP(a,(function(t){h=Math.max(h,t.getData().count())})),e=n.getExtent(),Math.abs(e[1]-e[0])}GP(a,(function(t){var e=t.get("boxWidth");VP.isArray(e)||(e=[e,e]),l.push([BP(e[0],i)||0,BP(e[1],i)||0])}));var u=.8*i-2,c=u/o*.3,d=(u-c*(o-1))/o,p=d/2-u/2;GP(a,(function(t,e){s.push(p),p+=c+d,r.push(Math.min(Math.max(d,l[e][0]),l[e][1]))}))}(t),GP(e,(function(e,i){!function(t,e,i){var n,a=t.coordinateSystem,o=t.getData(),r=i/2,s=t.get("layout"),l="horizontal"===s?0:1,h=1-l,u=["x","y"],c=[];if(VP.each(o.dimensions,(function(t){var e=o.getDimensionInfo(t).coordDim;e===u[h]?c.push(t):e===u[l]&&(n=t)})),null==n||c.length<5)return;o.each([n].concat(c),(function(){var t=arguments,i=t[0],n=t[c.length+1],u=m(t[3]),d=m(t[1]),p=m(t[5]),f=[[d,m(t[2])],[p,m(t[4])]];y(d),y(p),y(u);var g=[];function m(t){var n,o=[];return o[l]=i,o[h]=t,isNaN(i)||isNaN(t)?n=[NaN,NaN]:(n=a.dataToPoint(o))[l]+=e,n}function v(t,e){var i=t.slice(),n=t.slice();i[l]+=r,n[l]-=r,e?g.push(i,n):g.push(n,i)}function y(t){var e=[t.slice(),t.slice()];e[0][l]-=r,e[1][l]+=r,f.push(e)}v(f[0][1],0),v(f[1][1],1),o.setItemLayout(n,{chartLayout:s,initBaseline:u[h],median:u,bodyEnds:g,whiskerEnds:f})}))}(e,t.boxOffsetList[i],t.boxWidthList[i])})))}))};WP.registerVisual(HP),WP.registerLayout(FP);var ZP=b,jP=yd,UP=lP.seriesModelMixin,qP=jP.extend({type:"series.candlestick",dependencies:["xAxis","yAxis","grid"],defaultValueDimensions:["open","close","lowest","highest"],dimensions:null,defaultOption:{zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,hoverAnimation:!0,layout:null,itemStyle:{normal:{color:"#c23531",color0:"#314656",borderWidth:1,borderColor:"#c23531",borderColor0:"#314656"},emphasis:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,animationUpdate:!1,animationEasing:"linear",animationDuration:300},getShadowDim:function(){return"open"},brushSelector:function(t,e,i){var n=e.getItemLayout(t);return i.rect(n.brushRect)}});ZP.mixin(qP,UP,!0);var XP=b,YP=zd,$P=Bo,KP=lP.viewMixin,JP=YP.extend({type:"candlestick",getStyleUpdater:function(){return ek},dispose:XP.noop});XP.mixin(JP,KP,!0);var QP=["itemStyle","normal"],tk=["itemStyle","emphasis"];function ek(t,e,i){var n=e.getItemModel(i),a=n.getModel(QP),o=e.getItemVisual(i,"color"),r=e.getItemVisual(i,"borderColor")||o,s=a.getItemStyle(["color","color0","borderColor","borderColor0"]),l=t.childAt(t.whiskerIndex);l.useStyle(s),l.style.stroke=r;var h=t.childAt(t.bodyIndex);h.useStyle(s),h.style.fill=o,h.style.stroke=r;var u=n.getModel(tk).getItemStyle();$P.setHoverStyle(t,u)}var ik=b;var nk=function(t){t&&ik.isArray(t.series)&&ik.each(t.series,(function(t){ik.isObject(t)&&"k"===t.type&&(t.type="candlestick")}))},ak=["itemStyle","normal","borderColor"],ok=["itemStyle","normal","borderColor0"],rk=["itemStyle","normal","color"],sk=["itemStyle","normal","color0"];var lk=function(t,e){t.eachRawSeriesByType("candlestick",(function(e){var i=e.getData();i.setVisual({legendSymbol:"roundRect"}),t.isSeriesFiltered(e)||i.each((function(t){var e=i.getItemModel(t),n=i.getItemLayout(t).sign;i.setItemVisual(t,{color:e.get(n>0?rk:sk),borderColor:e.get(n>0?ak:ok)})}))}))},hk=b,uk=po.parsePercent,ck=Bo.subPixelOptimize,dk=hk.retrieve2;var pk=m,fk=nk,gk=lk,mk=function(t){t.eachSeriesByType("candlestick",(function(t){var e,i=t.coordinateSystem,n=t.getData(),a=function(t,e){var i,n=t.getBaseAxis(),a="category"===n.type?n.getBandWidth():(i=n.getExtent(),Math.abs(i[1]-i[0])/e.count()),o=uk(dk(t.get("barMaxWidth"),a),a),r=uk(dk(t.get("barMinWidth"),1),a),s=t.get("barWidth");return null!=s?uk(s,a):Math.max(Math.min(a/2,o),r)}(t,n),o=t.get("layout"),r="horizontal"===o?0:1,s=1-r,l=["x","y"],h=[];if(hk.each(n.dimensions,(function(t){var i=n.getDimensionInfo(t).coordDim;i===l[s]?h.push(t):i===l[r]&&(e=t)})),!(null==e||h.length<4)){var u=0;n.each([e].concat(h),(function(){var t,e=arguments,l=e[0],c=e[h.length+1],d=e[1],p=e[2],f=e[3],g=e[4],m=Math.min(d,p),v=Math.max(d,p),y=M(m),x=M(v),_=M(f),b=M(g),w=[[T(b),T(x)],[T(_),T(y)]],S=[];function M(t){var e=[];return e[r]=l,e[s]=t,isNaN(l)||isNaN(t)?[NaN,NaN]:i.dataToPoint(e)}function I(t,e){var i=t.slice(),n=t.slice();i[r]=ck(i[r]+a/2,1,!1),n[r]=ck(n[r]-a/2,1,!0),e?S.push(i,n):S.push(n,i)}function A(){var t=M(Math.min(d,p,f,g)),e=M(Math.max(d,p,f,g));return t[r]-=a/2,e[r]-=a/2,{x:t[0],y:t[1],width:s?a:e[0]-t[0],height:s?e[1]-t[1]:a}}function T(t){return t[r]=ck(t[r],1),t}I(x,0),I(y,1),t=d>p?-1:d<p?1:u>0?n.getItemModel(u-1).get()[2]<=p?1:-1:1,n.setItemLayout(c,{chartLayout:o,sign:t,initBaseline:d>p?x[s]:y[s],bodyEnds:S,whiskerEnds:w,brushRect:A()}),++u}),!0)}}))};pk.registerPreprocessor(fk),pk.registerVisual(gk),pk.registerLayout(mk);var vk=Ep;yd.extend({type:"series.effectScatter",dependencies:["grid","polar"],getInitialData:function(t,e){return vk(t.data,this,e)},brushSelector:"point",defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",rippleEffect:{period:4,scale:2.5,brushType:"fill"},symbolSize:10}});var yk=b,xk=Hf.createSymbol,_k=Bo.Group,bk=po.parsePercent,wk=sm;function Sk(t,e){t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?e.color:null,fill:"fill"===e.brushType?e.color:null}})}))}function Mk(t,e){_k.call(this);var i=new wk(t,e),n=new _k;this.add(i),this.add(n),n.beforeUpdate=function(){this.attr(i.getScale())},this.updateData(t,e)}var Ik=Mk.prototype;Ik.stopEffectAnimation=function(){this.childAt(1).removeAll()},Ik.startEffectAnimation=function(t){for(var e=t.symbolType,i=t.color,n=this.childAt(1),a=0;a<3;a++){var o=xk(e,-1,-1,2,2,i);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scale:[.5,.5]});var r=-a/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(r).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(r).start(),n.add(o)}Sk(n,t)},Ik.updateEffectAnimation=function(t){for(var e=this._effectCfg,i=this.childAt(1),n=["symbolType","period","rippleScale"],a=0;a<n.length;a++){var o=n[a];if(e[o]!==t[o])return this.stopEffectAnimation(),void this.startEffectAnimation(t)}Sk(i,t)},Ik.highlight=function(){this.trigger("emphasis")},Ik.downplay=function(){this.trigger("normal")},Ik.updateData=function(t,e){var i=t.hostModel;this.childAt(0).updateData(t,e);var n=this.childAt(1),a=t.getItemModel(e),o=t.getItemVisual(e,"symbol"),r=function(t){return yk.isArray(t)||(t=[+t,+t]),t}(t.getItemVisual(e,"symbolSize")),s=t.getItemVisual(e,"color");n.attr("scale",r),n.traverse((function(t){t.attr({fill:s})}));var l=a.getShallow("symbolOffset");if(l){var h=n.position;h[0]=bk(l[0],r[0]),h[1]=bk(l[1],r[1])}n.rotation=(a.getShallow("symbolRotate")||0)*Math.PI/180||0;var u={};if(u.showEffectOn=i.get("showEffectOn"),u.rippleScale=a.get("rippleEffect.scale"),u.brushType=a.get("rippleEffect.brushType"),u.period=1e3*a.get("rippleEffect.period"),u.effectOffset=e/t.count(),u.z=a.getShallow("z")||0,u.zlevel=a.getShallow("zlevel")||0,u.symbolType=o,u.color=s,this.off("mouseover").off("mouseout").off("emphasis").off("normal"),"render"===u.showEffectOn)this._effectCfg?this.updateEffectAnimation(u):this.startEffectAnimation(u),this._effectCfg=u;else{this._effectCfg=null,this.stopEffectAnimation();var c=this.childAt(0),d=function(){c.highlight(),"render"!==u.showEffectOn&&this.startEffectAnimation(u)},p=function(){c.downplay(),"render"!==u.showEffectOn&&this.stopEffectAnimation()};this.on("mouseover",d,this).on("mouseout",p,this).on("emphasis",d,this).on("normal",p,this)}this._effectCfg=u},Ik.fadeOut=function(t){this.off("mouseover").off("mouseout").off("emphasis").off("normal"),t&&t()},yk.inherits(Mk,_k);var Ak=pm,Tk=Mk;m.extendChartView({type:"effectScatter",init:function(){this._symbolDraw=new Ak(Tk)},render:function(t,e,i){var n=t.getData(),a=this._symbolDraw;a.updateData(n),this.group.add(a.group)},updateLayout:function(){this._symbolDraw.updateLayout()},remove:function(t,e){this._symbolDraw&&this._symbolDraw.remove(e)},dispose:function(){}});var Ck=m,Lk=b,Dk=Ym,Pk=$m;Ck.registerVisual(Lk.curry(Dk,"effectScatter","circle",null)),Ck.registerLayout(Lk.curry(Pk,"effectScatter"));var kk=yd,Ok=dp,zk=b,Ek=co.encodeHTML;function Rk(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=zk.map(e,(function(t){var e={coords:[t[0].coord,t[1].coord]};return t[0].name&&(e.fromName=t[0].name),t[1].name&&(e.toName=t[1].name),zk.mergeAll([e,t[0],t[1]])})))}var Nk=kk.extend({type:"series.lines",dependencies:["grid","polar"],visualColorAccessPath:"lineStyle.normal.color",init:function(t){Rk(t),Nk.superApply(this,"init",arguments)},mergeOption:function(t){Rk(t),Nk.superApply(this,"mergeOption",arguments)},getInitialData:function(t,e){var i=new Ok(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],(function(t,e,n,a){if(t instanceof Array)return NaN;i.hasItemOption=!0;var o=t.value;return null!=o?o instanceof Array?o[a]:o:void 0})),i},formatTooltip:function(t){var e=this.getData().getItemModel(t),i=e.get("name");if(i)return i;var n=e.get("fromName"),a=e.get("toName"),o=[];return null!=n&&o.push(n),null!=a&&o.push(a),Ek(o.join(" > "))},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:{normal:{show:!1,position:"end"}},lineStyle:{normal:{opacity:.5}}}}),Vk=Bo,Bk=kA,Gk=b,Wk=Hf.createSymbol,Hk=j,Fk=Wo;function Zk(t,e,i){Vk.Group.call(this),this.add(this.createLine(t,e,i)),this._updateEffectSymbol(t,e)}var jk=Zk.prototype;jk.createLine=function(t,e,i){return new Bk(t,e,i)},jk._updateEffectSymbol=function(t,e){var i=t.getItemModel(e).getModel("effect"),n=i.get("symbolSize"),a=i.get("symbol");Gk.isArray(n)||(n=[n,n]);var o=i.get("color")||t.getItemVisual(e,"color"),r=this.childAt(1);this._symbolType!==a&&(this.remove(r),(r=Wk(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))},jk._updateEffectAnimation=function(t,e,i){var n=this.childAt(1);if(n){var a=this,o=t.getItemLayout(i),r=1e3*e.get("period"),s=e.get("loop"),l=e.get("constantSpeed"),h=Gk.retrieve(e.get("delay"),(function(e){return e/t.count()*r/3})),u="function"==typeof h;if(n.ignore=!0,this.updateAnimationPoints(n,o),l>0&&(r=this.getLineLength(n)/l*1e3),r!==this._period||s!==this._loop){n.stopAnimation();var c=h;u&&(c=h(i)),n.__t>0&&(c=-r*n.__t),n.__t=0;var d=n.animate("",s).when(r,{__t:1}).delay(c).during((function(){a.updateSymbolPosition(n)}));s||d.done((function(){a.remove(n)})),d.start()}this._period=r,this._loop=s}},jk.getLineLength=function(t){return Hk.dist(t.__p1,t.__cp1)+Hk.dist(t.__cp1,t.__p2)},jk.updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},jk.updateData=function(t,e,i){this.childAt(0).updateData(t,e,i),this._updateEffectSymbol(t,e)},jk.updateSymbolPosition=function(t){var e=t.__p1,i=t.__p2,n=t.__cp1,a=t.__t,o=t.position,r=Fk.quadraticAt,s=Fk.quadraticDerivativeAt;o[0]=r(e[0],n[0],i[0],a),o[1]=r(e[1],n[1],i[1],a);var l=s(e[0],n[0],i[0],a),h=s(e[1],n[1],i[1],a);t.rotation=-Math.atan2(h,l)-Math.PI/2,t.ignore=!1},jk.updateLayout=function(t,e){this.childAt(0).updateLayout(t,e);var i=t.getItemModel(e).getModel("effect");this._updateEffectAnimation(t,i,e)},Gk.inherits(Zk,Vk.Group);var Uk=Zk,qk=Bo,Xk=b;function Yk(t,e,i){qk.Group.call(this),this._createPolyline(t,e,i)}var $k=Yk.prototype;$k._createPolyline=function(t,e,i){var n=t.getItemLayout(e),a=new qk.Polyline({shape:{points:n}});this.add(a),this._updateCommonStl(t,e,i)},$k.updateData=function(t,e,i){var n=t.hostModel,a=this.childAt(0),o={shape:{points:t.getItemLayout(e)}};qk.updateProps(a,o,n,e),this._updateCommonStl(t,e,i)},$k._updateCommonStl=function(t,e,i){var n=this.childAt(0),a=t.getItemModel(e),o=t.getItemVisual(e,"color"),r=i&&i.lineStyle,s=i&&i.hoverLineStyle;i&&!t.hasItemOption||(r=a.getModel("lineStyle.normal").getLineStyle(),s=a.getModel("lineStyle.emphasis").getLineStyle()),n.useStyle(Xk.defaults({strokeNoScale:!0,fill:"none",stroke:o},r)),n.hoverStyle=s,qk.setHoverStyle(this)},$k.updateLayout=function(t,e){this.childAt(0).setShape("points",t.getItemLayout(e))},Xk.inherits(Yk,qk.Group);var Kk=Yk,Jk=Kk,Qk=b,tO=Uk,eO=j;function iO(t,e,i){tO.call(this,t,e,i),this._lastFrame=0,this._lastFramePercent=0}var nO=iO.prototype;nO.createLine=function(t,e,i){return new Jk(t,e,i)},nO.updateAnimationPoints=function(t,e){this._points=e;for(var i=[0],n=0,a=1;a<e.length;a++){var o=e[a-1],r=e[a];n+=eO.dist(o,r),i.push(n)}if(0!==n){for(a=0;a<i.length;a++)i[a]/=n;this._offsets=i,this._length=n}},nO.getLineLength=function(t){return this._length},nO.updateSymbolPosition=function(t){var e=t.__t,i=this._points,n=this._offsets,a=i.length;if(n){var o=this._lastFrame;if(e<this._lastFramePercent){for(r=Math.min(o+1,a-1);r>=0&&!(n[r]<=e);r--);r=Math.min(r,a-2)}else{for(var r=o;r<a&&!(n[r]>e);r++);r=Math.min(r-1,a-2)}eO.lerp(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}},Qk.inherits(iO,tO);var aO=iO,oO=Bo,rO=Er,sO=Vr,lO=oO.extendShape({shape:{polyline:!1,segs:[]},buildPath:function(t,e){for(var i=e.segs,n=e.polyline,a=0;a<i.length;a++){var o=i[a];if(n){t.moveTo(o[0][0],o[0][1]);for(var r=1;r<o.length;r++)t.lineTo(o[r][0],o[r][1])}else t.moveTo(o[0][0],o[0][1]),o.length>2?t.quadraticCurveTo(o[2][0],o[2][1],o[1][0],o[1][1]):t.lineTo(o[1][0],o[1][1])}},findDataIndex:function(t,e){for(var i=this.shape,n=i.segs,a=i.polyline,o=Math.max(this.style.lineWidth,1),r=0;r<n.length;r++){var s=n[r];if(a){for(var l=1;l<s.length;l++)if(rO.containStroke(s[l-1][0],s[l-1][1],s[l][0],s[l][1],o,t,e))return r}else if(s.length>2){if(sO.containStroke(s[0][0],s[0][1],s[2][0],s[2][1],s[1][0],s[1][1],o,t,e))return r}else if(rO.containStroke(s[0][0],s[0][1],s[1][0],s[1][1],o,t,e))return r}return-1}});function hO(){this.group=new oO.Group,this._lineEl=new lO}var uO=hO.prototype;uO.updateData=function(t){this.group.removeAll();var e=this._lineEl,i=t.hostModel;e.setShape({segs:t.mapArray(t.getItemLayout),polyline:i.get("polyline")}),e.useStyle(i.getModel("lineStyle.normal").getLineStyle());var n=t.getVisual("color");n&&e.setStyle("stroke",n),e.setStyle("fill"),e.seriesIndex=i.seriesIndex,e.on("mousemove",(function(t){e.dataIndex=null;var i=e.findDataIndex(t.offsetX,t.offsetY);i>0&&(e.dataIndex=i)})),this.group.add(e)},uO.updateLayout=function(t){var e=t.getData();this._lineEl.setShape({segs:e.mapArray(e.getItemLayout)})},uO.remove=function(){this.group.removeAll()};var cO=BA,dO=Uk,pO=kA,fO=Kk,gO=aO,mO=hO;m.extendChartView({type:"lines",init:function(){},render:function(t,e,i){var n=t.getData(),a=this._lineDraw,o=t.get("effect.show"),r=t.get("polyline"),s=t.get("large")&&n.count()>=t.get("largeThreshold");o===this._hasEffet&&r===this._isPolyline&&s===this._isLarge||(a&&a.remove(),a=this._lineDraw=s?new mO:new cO(r?o?gO:fO:o?dO:pO),this._hasEffet=o,this._isPolyline=r,this._isLarge=s);var l=t.get("zlevel"),h=t.get("effect.trailLength"),u=i.getZr(),c="svg"===u.painter.getType();c||u.painter.getLayer(l).clear(!0),null==this._lastZlevel||c||u.configLayer(this._lastZlevel,{motionBlur:!1}),o&&h&&(c||u.configLayer(l,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(h/10+.9,1),0)})),this.group.add(a.group),a.updateData(n),this._lastZlevel=l},updateLayout:function(t,e,i){this._lineDraw.updateLayout(t);var n=i.getZr();"svg"===n.painter.getType()||n.painter.getLayer(this._lastZlevel).clear(!0)},remove:function(t,e){this._lineDraw&&this._lineDraw.remove(e,!0);var i=e.getZr();"svg"===i.painter.getType()||i.painter.getLayer(this._lastZlevel).clear(!0)},dispose:function(){}});var vO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.coordinateSystem,i=t.getData();i.each((function(n){var a=i.getItemModel(n),o=a.option instanceof Array?a.option:a.get("coords"),r=[];if(t.get("polyline"))for(var s=0;s<o.length;s++)r.push(e.dataToPoint(o[s]));else{r[0]=e.dataToPoint(o[0]),r[1]=e.dataToPoint(o[1]);var l=a.get("lineStyle.normal.curveness");+l&&(r[2]=[(r[0][0]+r[1][0])/2-(r[0][1]-r[1][1])*l,(r[0][1]+r[1][1])/2-(r[1][0]-r[0][0])*l])}i.setItemLayout(n,r)}))}))};function yO(t){return t instanceof Array||(t=[t,t]),t}var xO=m,_O=vO,bO=function(t){t.eachSeriesByType("lines",(function(t){var e=t.getData(),i=yO(t.get("symbol")),n=yO(t.get("symbolSize")),a="lineStyle.normal.opacity".split(".");e.setVisual("fromSymbol",i&&i[0]),e.setVisual("toSymbol",i&&i[1]),e.setVisual("fromSymbolSize",n&&n[0]),e.setVisual("toSymbolSize",n&&n[1]),e.setVisual("opacity",t.get(a)),e.each((function(t){var i=e.getItemModel(t),n=yO(i.getShallow("symbol",!0)),o=yO(i.getShallow("symbolSize",!0)),r=i.get(a);n[0]&&e.setItemVisual(t,"fromSymbol",n[0]),n[1]&&e.setItemVisual(t,"toSymbol",n[1]),o[0]&&e.setItemVisual(t,"fromSymbolSize",o[0]),o[1]&&e.setItemVisual(t,"toSymbolSize",o[1]),e.setItemVisual(t,"opacity",r)}))}))};xO.registerLayout(_O),xO.registerVisual(bO);var wO=Ep;yd.extend({type:"series.heatmap",getInitialData:function(t,e){return wO(t.data,this,e)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0}});var SO=b;function MO(){var t=SO.createCanvas();this.canvas=t,this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={}}MO.prototype={update:function(t,e,i,n,a,o){var r=this._getBrush(),s=this._getGradient(t,a,"inRange"),l=this._getGradient(t,a,"outOfRange"),h=this.pointSize+this.blurSize,u=this.canvas,c=u.getContext("2d"),d=t.length;u.width=e,u.height=i;for(var p=0;p<d;++p){var f=t[p],g=f[0],m=f[1],v=n(f[2]);c.globalAlpha=v,c.drawImage(r,g-h,m-h)}if(!u.width||!u.height)return u;for(var y=c.getImageData(0,0,u.width,u.height),x=y.data,_=0,b=x.length,w=this.minOpacity,S=this.maxOpacity-w;_<b;){v=x[_+3]/256;var M=4*Math.floor(255*v);if(v>0){var I=o(v)?s:l;v>0&&(v=v*S+w),x[_++]=I[M],x[_++]=I[M+1],x[_++]=I[M+2],x[_++]=I[M+3]*v*256}else _+=4}return c.putImageData(y,0,0),u},_getBrush:function(){var t=this._brushCanvas||(this._brushCanvas=SO.createCanvas()),e=this.pointSize+this.blurSize,i=2*e;t.width=i,t.height=i;var n=t.getContext("2d");return n.clearRect(0,0,i,i),n.shadowOffsetX=i,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-e,e,this.pointSize,0,2*Math.PI,!0),n.closePath(),n.fill(),t},_getGradient:function(t,e,i){for(var n=this._gradientPixels,a=n[i]||(n[i]=new Uint8ClampedArray(1024)),o=[0,0,0,0],r=0,s=0;s<256;s++)e[i](s/255,!0,o),a[r++]=o[0],a[r++]=o[1],a[r++]=o[2],a[r++]=o[3];return a}};var IO=Bo,AO=MO,TO=b;m.extendChartView({type:"heatmap",render:function(t,e,i){var n;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(i){i===t&&(n=e)}))})),this.group.removeAll();var a=t.coordinateSystem;"cartesian2d"===a.type||"calendar"===a.type?this._renderOnCartesianAndCalendar(a,t,i):function(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}(a)&&this._renderOnGeo(a,t,n,i)},dispose:function(){},_renderOnCartesianAndCalendar:function(t,e,i){if("cartesian2d"===t.type)var n=t.getAxis("x"),a=t.getAxis("y"),o=n.getBandWidth(),r=a.getBandWidth();var s=this.group,l=e.getData(),h="itemStyle.normal",u="itemStyle.emphasis",c=e.getModel(h).getItemStyle(["color"]),d=e.getModel(u).getItemStyle(),p=e.getModel("label.normal"),f=e.getModel("label.emphasis"),g=t.type,m="cartesian2d"===g?[e.coordDimToDataDim("x")[0],e.coordDimToDataDim("y")[0],e.coordDimToDataDim("value")[0]]:[e.coordDimToDataDim("time")[0],e.coordDimToDataDim("value")[0]];l.each((function(i){var n;if("cartesian2d"===g){if(isNaN(l.get(m[2],i)))return;var a=t.dataToPoint([l.get(m[0],i),l.get(m[1],i)]);n=new IO.Rect({shape:{x:a[0]-o/2,y:a[1]-r/2,width:o,height:r},style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}else{if(isNaN(l.get(m[1],i)))return;n=new IO.Rect({z2:1,shape:t.dataToRect([l.get(m[0],i)]).contentShape,style:{fill:l.getItemVisual(i,"color"),opacity:l.getItemVisual(i,"opacity")}})}var v=l.getItemModel(i);l.hasItemOption&&(c=v.getModel(h).getItemStyle(["color"]),d=v.getModel(u).getItemStyle(),p=v.getModel("label.normal"),f=v.getModel("label.emphasis"));var y=e.getRawValue(i),x="-";y&&null!=y[2]&&(x=y[2]),IO.setLabelStyle(c,d,p,f,{labelFetcher:e,labelDataIndex:i,defaultText:x,isRectText:!0}),n.setStyle(c),IO.setHoverStyle(n,l.hasItemOption?d:TO.extend({},d)),s.add(n),l.setItemGraphicEl(i,n)}))},_renderOnGeo:function(t,e,i,n){var a=i.targetVisuals.inRange,o=i.targetVisuals.outOfRange,r=e.getData(),s=this._hmLayer||this._hmLayer||new AO;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),h=t.getRoamTransform().transform;l.applyTransform(h);var u=Math.max(l.x,0),c=Math.max(l.y,0),d=Math.min(l.width+l.x,n.getWidth()),p=Math.min(l.height+l.y,n.getHeight()),f=d-u,g=p-c,m=r.mapArray(["lng","lat","value"],(function(e,i,n){var a=t.dataToPoint([e,i]);return a[0]-=u,a[1]-=c,a.push(n),a})),v=i.getExtent(),y="visualMap.continuous"===i.type?function(t,e){var i=t[1]-t[0];return e=[(e[0]-t[0])/i,(e[1]-t[0])/i],function(t){return t>=e[0]&&t<=e[1]}}(v,i.option.range):function(t,e,i){var n=t[1]-t[0],a=(e=TO.map(e,(function(e){return{interval:[(e.interval[0]-t[0])/n,(e.interval[1]-t[0])/n]}}))).length,o=0;return function(t){for(var n=o;n<a;n++)if((r=e[n].interval)[0]<=t&&t<=r[1]){o=n;break}if(n===a)for(n=o-1;n>=0;n--){var r;if((r=e[n].interval)[0]<=t&&t<=r[1]){o=n;break}}return n>=0&&n<a&&i[n]}}(v,i.getPieceList(),i.option.selected);s.update(m,f,g,a.color.getNormalizer(),{inRange:a.color.getColorMapper(),outOfRange:o.color.getColorMapper()},y);var x=new IO.Image({style:{width:f,height:g,x:u,y:c,image:s.canvas},silent:!0});this.group.add(x)}});var CO=lx.extend({type:"series.pictorialBar",dependencies:["grid"],defaultOption:{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,hoverAnimation:!1},getInitialData:function(t){return t.stack=null,CO.superApply(this,"getInitialData",arguments)}}),LO=m,DO=b,PO=Bo,kO=Hf.createSymbol,OO=po,zO=OO.parsePercent,EO=OO.isNumeric,RO=hx.setLabel,NO=["itemStyle","normal","borderWidth"],VO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],BO=new PO.Circle;function GO(t,e,i,n){var a=t.getItemLayout(e),o=i.get("symbolRepeat"),r=i.get("symbolClip"),s=i.get("symbolPosition")||"start",l=(i.get("symbolRotate")||0)*Math.PI/180||0,h=i.get("symbolPatternSize")||2,u=i.isAnimationEnabled(),c={dataIndex:e,layout:a,itemModel:i,symbolType:t.getItemVisual(e,"symbol")||"circle",color:t.getItemVisual(e,"color"),symbolClip:r,symbolRepeat:o,symbolRepeatDirection:i.get("symbolRepeatDirection"),symbolPatternSize:h,rotation:l,animationModel:u?i:null,hoverAnimation:u&&i.get("hoverAnimation"),z2:i.getShallow("z",!0)||0};!function(t,e,i,n,a){var o,r=n.valueDim,s=t.get("symbolBoundingData"),l=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),h=l.toGlobalCoord(l.dataToCoord(0)),u=1-+(i[r.wh]<=0);if(DO.isArray(s)){var c=[WO(l,s[0])-h,WO(l,s[1])-h];c[1]<c[0]&&c.reverse(),o=c[u]}else o=null!=s?WO(l,s)-h:e?n.coordSysExtent[r.index][u]-h:i[r.wh];a.boundingLength=o,e&&(a.repeatCutLength=i[r.wh]);a.pxSign=o>0?1:o<0?-1:0}(i,o,a,n,c),function(t,e,i,n,a,o,r,s,l,h){var u=l.valueDim,c=l.categoryDim,d=Math.abs(i[c.wh]),p=t.getItemVisual(e,"symbolSize");DO.isArray(p)?p=p.slice():(null==p&&(p="100%"),p=[p,p]);p[c.index]=zO(p[c.index],d),p[u.index]=zO(p[u.index],n?d:Math.abs(o)),h.symbolSize=p,(h.symbolScale=[p[0]/s,p[1]/s])[u.index]*=(l.isHorizontal?-1:1)*r}(t,e,a,o,0,c.boundingLength,c.pxSign,h,n,c),function(t,e,i,n,a){var o=t.get(NO)||0;o&&(BO.attr({scale:e.slice(),rotation:i}),BO.updateTransform(),o/=BO.getLineScale(),o*=e[n.valueDim.index]);a.valueLineWidth=o}(i,c.symbolScale,l,n,c);var d=c.symbolSize,p=i.get("symbolOffset");return DO.isArray(p)&&(p=[zO(p[0],d[0]),zO(p[1],d[1])]),function(t,e,i,n,a,o,r,s,l,h,u,c){var d=u.categoryDim,p=u.valueDim,f=c.pxSign,g=Math.max(e[p.index]+s,0),m=g;if(n){var v=Math.abs(l),y=DO.retrieve(t.get("symbolMargin"),"15%")+"",x=!1;y.lastIndexOf("!")===y.length-1&&(x=!0,y=y.slice(0,y.length-1)),y=zO(y,e[p.index]);var _=Math.max(g+2*y,0),b=x?0:2*y,w=EO(n),S=w?n:nz((v+b)/_);_=g+2*(y=(v-S*g)/2/(x?S:S-1)),b=x?0:2*y,w||"fixed"===n||(S=h?nz((Math.abs(h)+b)/_):0),m=S*_-b,c.repeatTimes=S,c.symbolMargin=y}var M=f*(m/2),I=c.pathPosition=[];I[d.index]=i[d.wh]/2,I[p.index]="start"===r?M:"end"===r?l-M:l/2,o&&(I[0]+=o[0],I[1]+=o[1]);var A=c.bundlePosition=[];A[d.index]=i[d.xy],A[p.index]=i[p.xy];var T=c.barRectShape=DO.extend({},i);T[p.wh]=f*Math.max(Math.abs(i[p.wh]),Math.abs(I[p.index]+M)),T[d.wh]=i[d.wh];var C=c.clipShape={};C[d.xy]=-i[d.xy],C[d.wh]=u.ecSize[d.wh],C[p.xy]=0,C[p.wh]=i[p.wh]}(i,d,a,o,0,p,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,n,c),c}function WO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function HO(t){var e=t.symbolPatternSize,i=kO(t.symbolType,-e/2,-e/2,e,e,t.color);return i.attr({culling:!0}),"image"!==i.type&&i.setStyle({strokeNoScale:!0}),i}function FO(t,e,i,n){var a=t.__pictorialBundle,o=i.symbolSize,r=i.valueLineWidth,s=i.pathPosition,l=e.valueDim,h=i.repeatTimes||0,u=0,c=o[e.valueDim.index]+r+2*i.symbolMargin;for(tz(t,(function(t){t.__pictorialAnimationIndex=u,t.__pictorialRepeatTimes=h,u<h?ez(t,null,f(u),i,n):ez(t,null,{scale:[0,0]},i,n,(function(){a.remove(t)})),$O(t,i),u++}));u<h;u++){var d=HO(i);d.__pictorialAnimationIndex=u,d.__pictorialRepeatTimes=h,a.add(d);var p=f(u);ez(d,{position:p.position,scale:[0,0]},{scale:p.scale,rotation:p.rotation},i,n),d.on("mouseover",g).on("mouseout",m),$O(d,i)}function f(t){var e=s.slice(),n=i.pxSign,a=t;return("start"===i.symbolRepeatDirection?n>0:n<0)&&(a=h-1-t),e[l.index]=c*(a-h/2+.5)+s[l.index],{position:e,scale:i.symbolScale.slice(),rotation:i.rotation}}function g(){tz(t,(function(t){t.trigger("emphasis")}))}function m(){tz(t,(function(t){t.trigger("normal")}))}}function ZO(t,e,i,n){var a=t.__pictorialBundle,o=t.__pictorialMainPath;o?ez(o,null,{position:i.pathPosition.slice(),scale:i.symbolScale.slice(),rotation:i.rotation},i,n):(o=t.__pictorialMainPath=HO(i),a.add(o),ez(o,{position:i.pathPosition.slice(),scale:[0,0],rotation:i.rotation},{scale:i.symbolScale.slice()},i,n),o.on("mouseover",(function(){this.trigger("emphasis")})).on("mouseout",(function(){this.trigger("normal")}))),$O(o,i)}function jO(t,e,i){var n=DO.extend({},e.barRectShape),a=t.__pictorialBarRect;a?ez(a,null,{shape:n},e,i):(a=t.__pictorialBarRect=new PO.Rect({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(a))}function UO(t,e,i,n){if(i.symbolClip){var a=t.__pictorialClipPath,o=DO.extend({},i.clipShape),r=e.valueDim,s=i.animationModel,l=i.dataIndex;if(a)PO.updateProps(a,{shape:o},s,l);else{o[r.wh]=0,a=new PO.Rect({shape:o}),t.__pictorialBundle.setClipPath(a),t.__pictorialClipPath=a;var h={};h[r.wh]=i.clipShape[r.wh],PO[n?"updateProps":"initProps"](a,{shape:h},s,l)}}}function qO(t,e){var i=t.getItemModel(e);return i.getAnimationDelayParams=XO,i.isAnimationEnabled=YO,i}function XO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function YO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function $O(t,e){t.off("emphasis").off("normal");var i=e.symbolScale.slice();e.hoverAnimation&&t.on("emphasis",(function(){this.animateTo({scale:[1.1*i[0],1.1*i[1]]},400,"elasticOut")})).on("normal",(function(){this.animateTo({scale:i.slice()},400,"elasticOut")}))}function KO(t,e,i,n){var a=new PO.Group,o=new PO.Group;return a.add(o),a.__pictorialBundle=o,o.attr("position",i.bundlePosition.slice()),i.symbolRepeat?FO(a,e,i):ZO(a,0,i),jO(a,i,n),UO(a,e,i,n),a.__pictorialShapeStr=QO(t,i),a.__pictorialSymbolMeta=i,a}function JO(t,e,i,n){var a=n.__pictorialBarRect;a&&(a.style.text=null);var o=[];tz(n,(function(t){o.push(t)})),n.__pictorialMainPath&&o.push(n.__pictorialMainPath),n.__pictorialClipPath&&(i=null),DO.each(o,(function(t){PO.updateProps(t,{scale:[0,0]},i,e,(function(){n.parent&&n.parent.remove(n)}))})),t.setItemGraphicEl(e,null)}function QO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function tz(t,e,i){DO.each(t.__pictorialBundle.children(),(function(n){n!==t.__pictorialBarRect&&e.call(i,n)}))}function ez(t,e,i,n,a,o){e&&t.attr(e),n.symbolClip&&!a?i&&t.attr(i):i&&PO[a?"updateProps":"initProps"](t,i,n.animationModel,n.dataIndex,o)}function iz(t,e,i){var n=i.color,a=i.dataIndex,o=i.itemModel,r=o.getModel("itemStyle.normal").getItemStyle(["color"]),s=o.getModel("itemStyle.emphasis").getItemStyle(),l=o.getShallow("cursor");tz(t,(function(t){t.setColor(n),t.setStyle(DO.defaults({fill:n,opacity:i.opacity},r)),PO.setHoverStyle(t,s),l&&(t.cursor=l),t.z2=i.z2}));var h={},u=e.valueDim.posDesc[+(i.boundingLength>0)],c=t.__pictorialBarRect;RO(c.style,h,o,n,e.seriesModel,a,u),PO.setHoverStyle(c,h)}function nz(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}LO.extendChartView({type:"pictorialBar",render:function(t,e,i){var n=this.group,a=t.getData(),o=this._data,r=t.coordinateSystem,s=!!r.getBaseAxis().isHorizontal(),l=r.grid.getRect(),h={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:r,coordSysExtent:[[l.x,l.x+l.width],[l.y,l.y+l.height]],isHorizontal:s,valueDim:VO[+s],categoryDim:VO[1-s]};return a.diff(o).add((function(t){if(a.hasValue(t)){var e=qO(a,t),i=GO(a,t,e,h),o=KO(a,h,i);a.setItemGraphicEl(t,o),n.add(o),iz(o,h,i)}})).update((function(t,e){var i=o.getItemGraphicEl(e);if(a.hasValue(t)){var r=qO(a,t),s=GO(a,t,r,h),l=QO(a,s);i&&l!==i.__pictorialShapeStr&&(n.remove(i),a.setItemGraphicEl(t,null),i=null),i?function(t,e,i){var n=i.animationModel,a=i.dataIndex,o=t.__pictorialBundle;PO.updateProps(o,{position:i.bundlePosition.slice()},n,a),i.symbolRepeat?FO(t,e,i,!0):ZO(t,e,i,!0);jO(t,i,!0),UO(t,e,i,!0)}(i,h,s):i=KO(a,h,s,!0),a.setItemGraphicEl(t,i),i.__pictorialSymbolMeta=s,n.add(i),iz(i,h,s)}else n.remove(i)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&JO(o,t,e.__pictorialSymbolMeta.animationModel,e)})).execute(),this._data=a,this.group},dispose:DO.noop,remove:function(t,e){var i=this.group,n=this._data;t.get("animation")?n&&n.eachItemGraphicEl((function(e){JO(n,e.dataIndex,t,e)})):i.removeAll()}});var az=m,oz=b,rz=rx,sz=Ym;az.registerLayout(oz.curry(rz,"pictorialBar")),az.registerVisual(oz.curry(sz,"pictorialBar","roundRect",null));var lz=b,hz=gg,uz=function(t,e,i,n,a){hz.call(this,t,e,i),this.type=n||"value",this.position=a||"bottom",this.orient=null,this._labelInterval=null};uz.prototype={constructor:uz,model:null,isHorizontal:function(){var t=this.position;return"top"===t||"bottom"===t},pointToData:function(t,e){return this.coordinateSystem.pointToData(t,e)[0]},toGlobalCoord:null,toLocalCoord:null},lz.inherits(uz,hz);var cz=uz,dz=Rp,pz=wu.getLayoutRect;function fz(t,e,i){this.dimension="single",this.dimensions=["single"],this._axis=null,this._rect,this._init(t,e,i),this.model=t}fz.prototype={type:"singleAxis",axisPointerEnabled:!0,constructor:fz,_init:function(t,e,i){var n=this.dimension,a=new cz(n,dz.createScaleByModel(t),[0,0],t.get("type"),t.get("position")),o="category"===a.type;a.onBand=o&&t.get("boundaryGap"),a.inverse=t.get("inverse"),a.orient=t.get("orient"),t.axis=a,a.model=t,a.coordinateSystem=this,this._axis=a},update:function(t,e){t.eachSeries((function(t){if(t.coordinateSystem===this){var e=t.getData(),i=this.dimension;this._axis.scale.unionExtentFromData(e,t.coordDimToDataDim(i)),dz.niceScaleExtent(this._axis.scale,this._axis.model)}}),this)},resize:function(t,e){this._rect=pz({left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")},{width:e.getWidth(),height:e.getHeight()}),this._adjustAxis()},getRect:function(){return this._rect},_adjustAxis:function(){var t=this._rect,e=this._axis,i=e.isHorizontal(),n=i?[0,t.width]:[0,t.height],a=e.reverse?1:0;e.setExtent(n[a],n[1-a]),this._updateAxisTransform(e,i?t.x:t.y)},_updateAxisTransform:function(t,e){var i=t.getExtent(),n=i[0]+i[1],a=t.isHorizontal();t.toGlobalCoord=a?function(t){return t+e}:function(t){return n-t+e},t.toLocalCoord=a?function(t){return t-e}:function(t){return n-t+e}},getAxis:function(){return this._axis},getBaseAxis:function(){return this._axis},getAxes:function(){return[this._axis]},getTooltipAxes:function(){return{baseAxes:[this.getAxis()]}},containPoint:function(t){var e=this.getRect(),i=this.getAxis();return"horizontal"===i.orient?i.contain(i.toLocalCoord(t[0]))&&t[1]>=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}};var gz=fz;_c.register("single",{create:function(t,e){var i=[];return t.eachComponent("singleAxis",(function(n,a){var o=new gz(n,t,e);o.name="single_"+a,o.resize(n,e),n.coordinateSystem=o,i.push(o)})),t.eachSeries((function(e){if("singleAxis"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"singleAxis",index:e.get("singleAxisIndex"),id:e.get("singleAxisId")})[0];e.coordinateSystem=i&&i.coordinateSystem}})),i},dimensions:gz.prototype.dimensions});var mz={},vz=b;mz.layout=function(t,e){e=e||{};var i=t.coordinateSystem,n=t.axis,a={},o=n.position,r=n.orient,s=i.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],h={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};a.position=["vertical"===r?h.vertical[o]:l[0],"horizontal"===r?h.horizontal[o]:l[3]],a.rotation=Math.PI/2*{horizontal:0,vertical:1}[r],a.labelDirection=a.tickDirection=a.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get("axisTick.inside")&&(a.tickDirection=-a.tickDirection),vz.retrieve(e.labelInside,t.get("axisLabel.inside"))&&(a.labelDirection=-a.labelDirection);var u=e.rotate;return null==u&&(u=t.get("axisLabel.rotate")),a.labelRotation="top"===o?-u:u,a.labelInterval=n.getLabelInterval(),a.z2=1,a};var yz=b,xz=yy,_z=Bo,bz=mz,wz=Oy,Sz=xz.getInterval,Mz=xz.ifIgnoreOnTick,Iz=["axisLine","axisTickLabel","axisName"],Az=wz.extend({type:"singleAxis",axisPointerClass:"SingleAxisPointer",render:function(t,e,i,n){var a=this.group;a.removeAll();var o=bz.layout(t),r=new xz(t,o);yz.each(Iz,r.add,r),a.add(r.getGroup()),t.get("splitLine.show")&&this._splitLine(t,o.labelInterval),Az.superCall(this,"render",t,e,i,n)},_splitLine:function(t,e){var i=t.axis;if(!i.scale.isBlank()){var n=t.getModel("splitLine"),a=n.getModel("lineStyle"),o=a.get("width"),r=a.get("color"),s=Sz(n,e);r=r instanceof Array?r:[r];for(var l=t.coordinateSystem.getRect(),h=i.isHorizontal(),u=[],c=0,d=i.getTicksCoords(),p=[],f=[],g=t.get("axisLabel.showMinLabel"),m=t.get("axisLabel.showMaxLabel"),v=0;v<d.length;++v)if(!Mz(i,v,s,d.length,g,m)){var y=i.toGlobalCoord(d[v]);h?(p[0]=y,p[1]=l.y,f[0]=y,f[1]=l.y+l.height):(p[0]=l.x,p[1]=y,f[0]=l.x+l.width,f[1]=y);var x=c++%r.length;u[x]=u[x]||[],u[x].push(new _z.Line(_z.subPixelOptimizeLine({shape:{x1:p[0],y1:p[1],x2:f[0],y2:f[1]},style:{lineWidth:o},silent:!0})))}for(v=0;v<u.length;++v)this.group.add(_z.mergePath(u[v],{style:{stroke:r[v%r.length],lineDash:a.getLineDash(o),lineWidth:o},silent:!0}))}}}),Tz=b,Cz=wv,Lz=Wf,Dz=Zu.extend({type:"singleAxis",layoutMode:"box",axis:null,coordinateSystem:null,getCoordSysModel:function(){return this}});Tz.merge(Dz.prototype,Lz),Cz("single",Dz,(function(t,e){return e.type||(e.data?"category":"value")}),{left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:2,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:2}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}});var Pz=b,kz=uo;var Oz=function(t,e){var i,n=[],a=t.seriesIndex;if(null==a||!(i=e.getSeriesByIndex(a)))return{point:[]};var o=i.getData(),r=kz.queryDataIndex(o,t);if(null==r||Pz.isArray(r))return{point:[]};var s=o.getItemGraphicEl(r),l=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(r)||[];else if(l&&l.dataToPoint)n=l.dataToPoint(o.getValues(Pz.map(l.dimensions,(function(t){return i.coordDimToDataDim(t)[0]})),r,!0))||[];else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}},zz=b,Ez=uo,Rz=xy,Nz=Oz,Vz=zz.each,Bz=zz.curry,Gz=Ez.makeGetter();function Wz(t,e,i,n,a){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var r=function(t,e){var i=e.axis,n=i.dim,a=t,o=[],r=Number.MAX_VALUE,s=-1;return Vz(e.seriesModels,(function(e,l){var h,u,c=e.coordDimToDataDim(n);if(e.getAxisTooltipData){var d=e.getAxisTooltipData(c,t,i);u=d.dataIndices,h=d.nestestValue}else{if(!(u=e.getData().indicesOfNearest(c[0],t,!1,"category"===i.type?.5:null)).length)return;h=e.getData().get(c[0],u[0])}if(null!=h&&isFinite(h)){var p=t-h,f=Math.abs(p);f<=r&&((f<r||p>=0&&s<0)&&(r=f,s=p,a=h,o.length=0),Vz(u,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:a}}(e,t),s=r.payloadBatch,l=r.snapToValue;s[0]&&null==a.seriesIndex&&zz.extend(a,s[0]),!n&&t.snap&&o.containData(l)&&null!=l&&(e=l),i.showPointer(t,e,s,a),i.showTooltip(t,r,l)}else i.showPointer(t,e)}function Hz(t,e,i,n){t[e.key]={value:i,payloadBatch:n}}function Fz(t,e,i,n){var a=i.payloadBatch,o=e.axis,r=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&a.length){var l=e.coordSys.model,h=Rz.makeKey(l),u=t.map[h];u||(u=t.map[h]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(u)),u.dataByAxis.push({axisDim:o.dim,axisIndex:r.componentIndex,axisType:r.type,axisId:r.id,value:n,valueLabelOpt:{precision:s.get("label.precision"),formatter:s.get("label.formatter")},seriesDataIndices:a.slice()})}}function Zz(t){var e=t.axis.model,i={},n=i.axisDim=t.axis.dim;return i.axisIndex=i[n+"AxisIndex"]=e.componentIndex,i.axisName=i[n+"AxisName"]=e.name,i.axisId=i[n+"AxisId"]=e.id,i}function jz(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}var Uz=function(t,e,i){var n=t.currTrigger,a=[t.x,t.y],o=t,r=t.dispatchAction||zz.bind(i.dispatchAction,i),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){jz(a)&&(a=Nz({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=jz(a),h=o.axesInfo,u=s.axesInfo,c="leave"===n||jz(a),d={},p={},f={list:[],map:{}},g={showPointer:Bz(Hz,p),showTooltip:Bz(Fz,f)};Vz(s.coordSysMap,(function(t,e){var i=l||t.containPoint(a);Vz(s.coordSysAxesInfo[e],(function(t,e){var n=t.axis,o=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}}(h,t);if(!c&&i&&(!h||o)){var r=o&&o.value;null!=r||l||(r=n.pointToData(a)),null!=r&&Wz(t,r,g,!1,d)}}))}));var m={};return Vz(u,(function(t,e){var i=t.linkGroup;i&&!p[e]&&Vz(i.axesInfo,(function(e,n){var a=p[n];if(e!==t&&a){var o=a.value;i.mapper&&(o=t.axis.scale.parse(i.mapper(o,Zz(e),Zz(t)))),m[t.key]=o}}))})),Vz(m,(function(t,e){Wz(u[e],t,g,!0,d)})),function(t,e,i){var n=i.axesInfo=[];Vz(e,(function(e,i){var a=e.axisPointerModel.option,o=t[i];o?(!e.useHandle&&(a.status="show"),a.value=o.value,a.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(a.status="hide"),"show"===a.status&&n.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:a.value})}))}(p,u,d),function(t,e,i,n){if(jz(e)||!t.list.length)return void 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})}(f,a,t,r),function(t,e,i){var n=i.getZr(),a="axisPointerLastHighlights",o=Gz(n)[a]||{},r=Gz(n)[a]={};Vz(t,(function(t,e){var i=t.axisPointerModel.option;"show"===i.status&&Vz(i.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;r[e]=t}))}));var s=[],l=[];zz.each(o,(function(t,e){!r[e]&&l.push(t)})),zz.each(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})}(u,0,i),d}};m.extendComponentModel({type:"axisPointer",coordSysAxesInfo:null,defaultOption:{show:"auto",triggerOn:null,zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#aaa",width:1,type:"solid"},shadowStyle:{color:"rgba(150,150,150,0.3)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,shadowBlur:3,shadowColor:"#aaa"},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}}});var qz={},Xz=b,Yz=_,$z=uo.makeGetter(),Kz=Xz.each;function Jz(t,e,i){t.handler("leave",null,i)}function Qz(t,e,i,n){e.handler(t,i,n)}qz.register=function(t,e,i){if(!Yz.node){var n=e.getZr();$z(n).records||($z(n).records={}),function(t,e){if($z(t).initialized)return;function i(i,n){t.on(i,(function(i){var a=function(t){var e={showTip:[],hideTip:[]},i=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=i,t.dispatchAction(n))};return{dispatchAction:i,pendings:e}}(e);Kz($z(t).records,(function(t){t&&n(t,i,a.dispatchAction)})),function(t,e){var i,n=t.showTip.length,a=t.hideTip.length;n?i=t.showTip[n-1]:a&&(i=t.hideTip[a-1]);i&&(i.dispatchAction=null,e.dispatchAction(i))}(a.pendings,e)}))}$z(t).initialized=!0,i("click",Xz.curry(Qz,"click")),i("mousemove",Xz.curry(Qz,"mousemove")),i("globalout",Jz)}(n,e),($z(n).records[t]||($z(n).records[t]={})).handler=i}},qz.unregister=function(t,e){if(!Yz.node){var i=e.getZr();($z(i).records||{})[t]&&($z(i).records[t]=null)}};var tE=qz,eE=m.extendComponentView({type:"axisPointer",render:function(t,e,i){var n=e.getComponent("tooltip"),a=t.get("triggerOn")||n&&n.get("triggerOn")||"mousemove|click";tE.register("axisPointer",i,(function(t,e,i){"none"!==a&&("leave"===t||a.indexOf(t)>=0)&&i({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},remove:function(t,e){tE.unregister(e.getZr(),"axisPointer"),eE.superApply(this._model,"remove",arguments)},dispose:function(t,e){tE.unregister("axisPointer",e),eE.superApply(this._model,"dispose",arguments)}}),iE=b,nE=To,aE=Bo,oE=xy,rE=fa,sE=Ed,lE=uo.makeGetter(),hE=iE.clone,uE=iE.bind;function cE(){}function dE(t,e,i,n){pE(lE(i).lastProp,n)||(lE(i).lastProp=n,e?aE.updateProps(i,n,t):(i.stopAnimation(),i.attr(n)))}function pE(t,e){if(iE.isObject(t)&&iE.isObject(e)){var i=!0;return iE.each(e,(function(e,n){i=i&&pE(t[n],e)})),!!i}return t===e}function fE(t,e){t[e.get("label.show")?"show":"hide"]()}function gE(t){return{position:t.position.slice(),rotation:t.rotation||0}}function mE(t,e,i){var n=e.get("z"),a=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=n&&(t.z=n),null!=a&&(t.zlevel=a),t.silent=i)}))}cE.prototype={_group:null,_lastGraphicKey:null,_handle:null,_dragging:!1,_lastValue:null,_lastStatus:null,_payloadInfo:null,animationThreshold:15,render:function(t,e,i,n){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=i,n||this._lastValue!==a||this._lastStatus!==o){this._lastValue=a,this._lastStatus=o;var r=this._group,s=this._handle;if(!o||"hide"===o)return r&&r.hide(),void(s&&s.hide());r&&r.show(),s&&s.show();var l={};this.makeElOption(l,a,t,e,i);var h=l.graphicKey;h!==this._lastGraphicKey&&this.clear(i),this._lastGraphicKey=h;var u=this._moveAnimation=this.determineAnimation(t,e);if(r){var c=iE.curry(dE,e,u);this.updatePointerEl(r,l,c,e),this.updateLabelEl(r,l,c,e)}else r=this._group=new aE.Group,this.createPointerEl(r,l,t,e),this.createLabelEl(r,l,t,e),i.getZr().add(r);mE(r,e,!0),this._renderHandle(a)}},remove:function(t){this.clear(t)},dispose:function(t){this.clear(t)},determineAnimation:function(t,e){var i=e.get("animation"),n=t.axis,a="category"===n.type,o=e.get("snap");if(!o&&!a)return!1;if("auto"===i||null==i){var r=this.animationThreshold;if(a&&n.getBandWidth()>r)return!0;if(o){var s=oE.getAxisInfo(t).seriesDataCount,l=n.getExtent();return Math.abs(l[0]-l[1])/s>r}return!1}return!0===i},makeElOption:function(t,e,i,n,a){},createPointerEl:function(t,e,i,n){var a=e.pointer;if(a){var o=lE(t).pointerEl=new aE[a.type](hE(e.pointer));t.add(o)}},createLabelEl:function(t,e,i,n){if(e.label){var a=lE(t).labelEl=new aE.Rect(hE(e.label));t.add(a),fE(a,n)}},updatePointerEl:function(t,e,i){var n=lE(t).pointerEl;n&&(n.setStyle(e.pointer.style),i(n,{shape:e.pointer.shape}))},updateLabelEl:function(t,e,i,n){var a=lE(t).labelEl;a&&(a.setStyle(e.label.style),i(a,{shape:e.label.shape,position:e.label.position}),fE(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=aE.createIcon(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){rE.stop(t.event)},onmousedown:uE(this._onHandleDragMove,this,0,0),drift:uE(this._onHandleDragMove,this),ondragend:uE(this._onHandleDragEnd,this)}),n.add(a)),mE(a,i,!1);a.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");iE.isArray(s)||(s=[s,s]),a.attr("scale",[s[0]/2,s[1]/2]),sE.createOrUpdate(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},_moveHandleToValue:function(t,e){dE(this._axisPointerModel,!e&&this._moveAnimation,this._handle,gE(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},_onHandleDragMove:function(t,e){var i=this._handle;if(i){this._dragging=!0;var n=this.updateHandleTransform(gE(i),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,i.stopAnimation(),i.attr(gE(n)),lE(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]}}},cE.prototype.constructor=cE,nE.enableClassExtend(cE);var vE=cE,yE={},xE=b,_E=Bo,bE=Ni,wE=co,SE=mt,ME=Rp,IE=yy;function AE(t,e,i,n,a){var o=TE(i.get("value"),e.axis,e.ecModel,i.get("seriesDataIndices"),{precision:i.get("label.precision"),formatter:i.get("label.formatter")}),r=i.getModel("label"),s=wE.normalizeCssArray(r.get("padding")||0),l=r.getFont(),h=bE.getBoundingRect(o,l),u=a.position,c=h.width+s[1]+s[3],d=h.height+s[0]+s[2],p=a.align;"right"===p&&(u[0]-=c),"center"===p&&(u[0]-=c/2);var f=a.verticalAlign;"bottom"===f&&(u[1]-=d),"middle"===f&&(u[1]-=d/2),function(t,e,i,n){var a=n.getWidth(),o=n.getHeight();t[0]=Math.min(t[0]+e,a)-e,t[1]=Math.min(t[1]+i,o)-i,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(u,c,d,n);var g=r.get("backgroundColor");g&&"auto"!==g||(g=e.get("axisLine.lineStyle.color")),t.label={shape:{x:0,y:0,width:c,height:d,r:r.get("borderRadius")},position:u.slice(),style:{text:o,textFont:l,textFill:r.getTextColor(),textPosition:"inside",fill:g,stroke:r.get("borderColor")||"transparent",lineWidth:r.get("borderWidth")||0,shadowBlur:r.get("shadowBlur"),shadowColor:r.get("shadowColor"),shadowOffsetX:r.get("shadowOffsetX"),shadowOffsetY:r.get("shadowOffsetY")},z2:10}}function TE(t,e,i,n,a){var o=e.scale.getLabel(t,{precision:a.precision}),r=a.formatter;if(r){var s={value:ME.getAxisRawValue(e,t),seriesData:[]};xE.each(n,(function(t){var e=i.getSeriesByIndex(t.seriesIndex),n=t.dataIndexInside,a=e&&e.getDataParams(n);a&&s.seriesData.push(a)})),xE.isString(r)?o=r.replace("{value}",o):xE.isFunction(r)&&(o=r(s))}return o}function CE(t,e,i){var n=SE.create();return SE.rotate(n,n,i.rotation),SE.translate(n,n,i.position),_E.applyTransform([t.dataToCoord(e),(i.labelOffset||0)+(i.labelDirection||1)*(i.labelMargin||0)],n)}yE.buildElStyle=function(t){var e,i=t.get("type"),n=t.getModel(i+"Style");return"line"===i?(e=n.getLineStyle()).fill=null:"shadow"===i&&((e=n.getAreaStyle()).stroke=null),e},yE.buildLabelElOption=AE,yE.getValueLabel=TE,yE.getTransformedPosition=CE,yE.buildCartesianSingleLabelElOption=function(t,e,i,n,a,o){var r=IE.innerTextLayout(i.rotation,0,i.labelDirection);i.labelMargin=a.get("label.margin"),AE(e,n,a,o,{position:CE(n.axis,t,i),align:r.textAlign,verticalAlign:r.textVerticalAlign})},yE.makeLineShape=function(t,e,i){return{x1:t[i=i||0],y1:t[1-i],x2:e[i],y2:e[1-i]}},yE.makeRectShape=function(t,e,i){return{x:t[i=i||0],y:t[1-i],width:e[i],height:e[1-i]}},yE.makeSectorShape=function(t,e,i,n,a,o){return{cx:t,cy:e,r0:i,r:n,startAngle:a,endAngle:o,clockwise:!0}};var LE=Bo,DE=yE,PE=zy,kE=Oy,OE=vE.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.grid,s=n.get("type"),l=zE(r,o).getOtherAxis(o).getGlobalExtent(),h=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var u=DE.buildElStyle(n),c=EE[s](o,h,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=PE.layout(r.model,i);DE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=PE.layout(e.axis.grid.model,e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:DE.getTransformedPosition(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=zE(o,a).getOtherAxis(a).getGlobalExtent(),l="x"===a.dim?0:1,h=t.position;h[l]+=e[l],h[l]=Math.min(r[1],h[l]),h[l]=Math.max(r[0],h[l]);var u=(s[1]+s[0])/2,c=[u,u];c[l]=h[l];return{position:h,rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}}});function zE(t,e){var i={};return i[e.dim+"AxisIndex"]=e.index,t.getCartesian(i)}var EE={line:function(t,e,i,n){var a=DE.makeLineShape([e,i[0]],[e,i[1]],RE(t));return LE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:DE.makeRectShape([e-a/2,i[0]],[a,o],RE(t))}}};function RE(t){return"x"===t.dim?0:1}kE.registerAxisPointerClass("CartesianAxisPointer",OE);var NE=m,VE=b,BE=xy,GE=Uz;NE.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!VE.isArray(e)&&(t.axisPointer.link=[e])}})),NE.registerProcessor(NE.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=BE.collect(t,e)})),NE.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},GE);var WE=Bo,HE=yE,FE=mz,ZE=Oy,jE=["x","y"],UE=["width","height"],qE=vE.extend({makeElOption:function(t,e,i,n,a){var o=i.axis,r=o.coordinateSystem,s=$E(r,1-YE(o)),l=r.dataToPoint(e)[0],h=n.get("type");if(h&&"none"!==h){var u=HE.buildElStyle(n),c=XE[h](o,l,s,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=FE.layout(i);HE.buildCartesianSingleLabelElOption(e,t,d,i,n,a)},getHandleTransform:function(t,e,i){var n=FE.layout(e,{labelInside:!1});return n.labelMargin=i.get("handle.margin"),{position:HE.getTransformedPosition(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=YE(a),s=$E(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 h=$E(o,1-r),u=(h[1]+h[0])/2,c=[u,u];return c[r]=l[r],{position:l,rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}}}),XE={line:function(t,e,i,n){var a=HE.makeLineShape([e,i[0]],[e,i[1]],YE(t));return WE.subPixelOptimizeLine({shape:a,style:n}),{type:"Line",shape:a}},shadow:function(t,e,i,n){var a=t.getBandWidth(),o=i[1]-i[0];return{type:"Rect",shape:HE.makeRectShape([e-a/2,i[0]],[a,o],YE(t))}}};function YE(t){return t.isHorizontal()?0:1}function $E(t,e){var i=t.getRect();return[i[jE[e]],i[jE[e]]+i[UE[e]]]}ZE.registerAxisPointerClass("SingleAxisPointer",qE),m.extendComponentView({type:"single"});var KE=wp,JE=yd,QE=dp,tR=b,eR=co.encodeHTML,iR=GD,nR=JE.extend({type:"series.themeRiver",dependencies:["singleAxis"],nameMap:null,init:function(t){nR.superApply(this,"init",arguments),this.legendDataProvider=function(){return this.getRawData()}},fixData:function(t){for(var e=t.length,i=iR().key((function(t){return t[2]})).entries(t),n=tR.map(i,(function(t){return{name:t.key,dataList:t.values}})),a=n.length,o=-1,r=-1,s=0;s<a;++s){var l=n[s].dataList.length;l>o&&(o=l,r=s)}for(var h=0;h<a;++h)if(h!==r)for(var u=n[h].name,c=0;c<o;++c){for(var d=n[r].dataList[c][0],p=n[h].dataList.length,f=-1,g=0;g<p;++g){if(n[h].dataList[g][0]===d){f=g;break}}-1===f&&(t[e]=[],t[e][0]=d,t[e][1]=0,t[e][2]=u,e++)}return t},getInitialData:function(t,e){var i=[],n=e.queryComponents({mainType:"singleAxis",index:this.get("singleAxisIndex"),id:this.get("singleAxisId")})[0].get("type");i=[{name:"time",type:"category"===n?"ordinal":"time"===n?"time":"float"},{name:"value",type:"float"},{name:"name",type:"ordinal"}];for(var a=tR.filter(t.data,(function(t){return void 0!==t[2]})),o=this.fixData(a||[]),r=[],s=this.nameMap=tR.createHashMap(),l=0,h=0;h<o.length;++h)r.push(o[h][2]),s.get(o[h][2])||(s.set(o[h][2],l),l++);i=KE(i,o);var u=new QE(i,this);return u.initData(o,r),u},coordDimToDataDim:function(t){return["time"]},getLayerSeries:function(){for(var t=this.getData(),e=t.count(),i=[],n=0;n<e;++n)i[n]=n;for(var a=iR().key((function(e){return t.get("name",e)})).entries(i),o=tR.map(a,(function(t){return{name:t.key,indices:t.values}})),r=0;r<o.length;++r)o[r].indices.sort(s);function s(e,i){return t.get("time",e)-t.get("time",i)}return o},getAxisTooltipData:function(t,e,i){tR.isArray(t)||(t=t?[t]:[]);for(var n,a=this.getData(),o=this.getLayerSeries(),r=[],s=o.length,l=0;l<s;++l){for(var h=Number.MAX_VALUE,u=-1,c=o[l].indices.length,d=0;d<c;++d){var p=a.get(t[0],o[l].indices[d]),f=Math.abs(p-e);f<=h&&(n=p,h=f,u=o[l].indices[d])}r.push(u)}return{dataIndices:r,nestestValue:n}},formatTooltip:function(t){var e=this.getData(),i=e.get("name",t),n=e.get("value",t);return(isNaN(n)||null==n)&&(n="-"),eR(i+" : "+n)},defaultOption:{zlevel:0,z:2,coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{normal:{margin:4,textAlign:"right",show:!0,position:"left",color:"#000",fontSize:11},emphasis:{show:!0}}}}),aR=m,oR=vm.Polygon,rR=Bo,sR=b,lR=sR.bind,hR=sR.extend,uR=$d;aR.extendChartView({type:"themeRiver",init:function(){this._layers=[]},render:function(t,e,i){var n=t.getData(),a=this.group,o=t.getLayerSeries(),r=n.getLayout("layoutInfo"),s=r.rect,l=r.boundaryGap;function h(t){return t.name}a.attr("position",[0,s.y+l[0]]);var u=new uR(this._layersSeries||[],o,h,h),c={};function d(e,i,r){var s=this._layers;if("remove"!==e){for(var l,h,u,d=[],p=[],f=o[i].indices,g=0;g<f.length;g++){var m=n.getItemLayout(f[g]),v=m.x,y=m.y0,x=m.y;d.push([v,y]),p.push([v,y+x]),l=n.getItemVisual(f[g],"color")}var _=n.getItemLayout(f[0]),b=n.getItemModel(f[g-1]),w=b.getModel("label.normal"),S=w.get("margin");if("add"===e){var M=c[i]=new rR.Group;h=new oR({shape:{points:d,stackedOnPoints:p,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),u=new rR.Text({style:{x:_.x-S,y:_.y0+_.y/2}}),M.add(h),M.add(u),a.add(M),h.setClipPath(function(t,e,i){var n=new rR.Rect({shape:{x:t.x-10,y:t.y-10,width:0,height:t.height+20}});return rR.initProps(n,{shape:{width:t.width+20,height:t.height+20}},e,i),n}(h.getBoundingRect(),t,(function(){h.removeClipPath()})))}else{M=s[r];h=M.childAt(0),u=M.childAt(1),a.add(M),c[i]=M,rR.updateProps(h,{shape:{points:d,stackedOnPoints:p}},t),rR.updateProps(u,{style:{x:_.x-S,y:_.y0+_.y/2}},t)}var I=b.getModel("itemStyle.emphasis"),A=b.getModel("itemStyle.normal");rR.setTextStyle(u.style,w,{text:w.get("show")?t.getFormattedLabel(f[g-1],"normal")||n.getName(f[g-1]):null,textVerticalAlign:"middle"}),h.setStyle(hR({fill:l},A.getItemStyle(["color"]))),rR.setHoverStyle(h,I.getItemStyle())}else a.remove(s[i])}u.add(lR(d,this,"add")).update(lR(d,this,"update")).remove(lR(d,this,"remove")).execute(),this._layersSeries=o,this._layers=c},dispose:function(){}});var cR=b,dR=po;function pR(t,e,i){if(t.count())for(var n,a=e.coordinateSystem,o=e.getLayerSeries(),r=cR.map(o,(function(e){return cR.map(e.indices,(function(e){var i=a.dataToPoint(t.get("time",e));return i[1]=t.get("value",e),i}))})),s=function(t){for(var e=t.length,i=t[0].length,n=[],a=[],o=0,r={},s=0;s<i;++s){for(var l=0,h=0;l<e;++l)h+=t[l][s][1];h>o&&(o=h),n.push(h)}for(var u=0;u<i;++u)a[u]=(o-n[u])/2;o=0;for(var c=0;c<i;++c){var d=n[c]+a[c];d>o&&(o=d)}return r.y0=a,r.max=o,r}(r),l=s.y0,h=i/s.max,u=o.length,c=o[0].indices.length,d=0;d<c;++d){n=l[d]*h,t.setItemLayout(o[0].indices[d],{layerIndex:0,x:r[0][d][0],y0:n,y:r[0][d][1]*h});for(var p=1;p<u;++p)n+=r[p-1][d][1]*h,t.setItemLayout(o[p].indices[d],{layerIndex:p,x:r[p][d][0],y0:n,y:r[p][d][1]*h})}}var fR=function(t,e){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.coordinateSystem,n={},a=i.getRect();n.rect=a;var o=t.get("boundaryGap"),r=i.getAxis();(n.boundaryGap=o,"horizontal"===r.orient)?(o[0]=dR.parsePercent(o[0],a.height),o[1]=dR.parsePercent(o[1],a.height),pR(e,t,a.height-o[0]-o[1])):(o[0]=dR.parsePercent(o[0],a.width),o[1]=dR.parsePercent(o[1],a.width),pR(e,t,a.width-o[0]-o[1]));e.setLayout("layoutInfo",n)}))},gR=b.createHashMap;var mR=m,vR=b,yR=fR,xR=function(t){t.eachSeriesByType("themeRiver",(function(t){var e=t.getData(),i=t.getRawData(),n=t.get("color"),a=gR();e.each((function(t){a.set(e.getRawIndex(t),t)})),i.each((function(o){var r=i.getName(o),s=n[(t.nameMap.get(r)-1)%n.length];i.setItemVisual(o,"color",s);var l=a.get(o);null!=l&&e.setItemVisual(l,"color",s)}))}))},_R=r_;mR.registerLayout(yR),mR.registerVisual(xR),mR.registerProcessor(vR.curry(_R,"themeRiver"));var bR=b;function wR(t,e){return e=e||[0,0],bR.map(["x","y"],(function(i,n){var a=this.getAxis(i),o=e[n],r=t[n]/2;return"category"===a.type?a.getBandWidth():Math.abs(a.dataToCoord(o-r)-a.dataToCoord(o+r))}),this)}var SR=function(t){var e=t.grid.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:bR.bind(t.dataToPoint,t),size:bR.bind(wR,t)}}},MR=b;function IR(t,e){return e=e||[0,0],MR.map([0,1],(function(i){var n=e[i],a=t[i]/2,o=[],r=[];return o[i]=n-a,r[i]=n+a,o[1-i]=r[1-i]=e[1-i],Math.abs(this.dataToPoint(o)[i]-this.dataToPoint(r)[i])}),this)}var AR=function(t){var e=t.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:MR.bind(t.dataToPoint,t),size:MR.bind(IR,t)}}},TR=b;function CR(t,e){var i=this.getAxis(),n=e instanceof Array?e[0]:e,a=(t instanceof Array?t[0]:t)/2;return"category"===i.type?i.getBandWidth():Math.abs(i.dataToCoord(n-a)-i.dataToCoord(n+a))}var LR=function(t){var e=t.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:TR.bind(t.dataToPoint,t),size:TR.bind(CR,t)}}},DR=b;function PR(t,e){return DR.map(["Radius","Angle"],(function(i,n){var a=this["get"+i+"Axis"](),o=e[n],r=t[n]/2,s="dataTo"+i,l="category"===a.type?a.getBandWidth():Math.abs(a[s](o-r)-a[s](o+r));return"Angle"===i&&(l=l*Math.PI/180),l}),this)}var kR=function(t){var e=t.getRadiusAxis(),i=t.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:n[1],r0:n[0]},api:{coord:DR.bind((function(n){var a=e.dataToRadius(n[0]),o=i.dataToAngle(n[1]),r=t.coordToPoint([a,o]);return r.push(a,o*Math.PI/180),r})),size:DR.bind(PR,t)}}},OR=b;var zR=function(t){var e=t.getRect(),i=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:i.start,end:i.end,weeks:i.weeks,dayCount:i.allDay}},api:{coord:OR.bind(t.dataToPoint,t)}}},ER=m,RR=b,NR=Bo,VR=Ug.findLabelValueDim,BR=Ep,GR=rx,WR=$d,HR=["itemStyle","normal"],FR=["itemStyle","emphasis"],ZR=["label","normal"],jR=["label","emphasis"],UR={cartesian2d:SR,geo:AR,singleAxis:LR,polar:kR,calendar:zR};function qR(t,e,i,n,a){null==i[t]||a||(e[t]=i[t],i[t]=n[t])}function XR(t){var e={};return RR.each(t.dimensions,(function(i,n){var a=t.getDimensionInfo(i);if(!a.isExtraCoord){var o=a.coordDim;(e[o]=e[o]||[])[a.coordDimIndex]=n}})),e}function YR(t,e,i,n,a,o){(t=$R(t,e,i,n,a,o))&&o.setItemGraphicEl(e,t)}function $R(t,e,i,n,a,o){var r=i.type;if(!t||r===t.__customGraphicType||"path"===r&&i.pathData===t.__customPathData||"image"===r&&i.style.image===t.__customImagePath||"text"===r&&i.style.text===t.__customText||(a.remove(t),t=null),null!=r){var s,l=!t;if(!t&&(t=function(t){var e,i=t.type;if("path"===i){var n=t.shape;(e=NR.makePath(n.pathData,null,{x:n.x||0,y:n.y||0,width:n.width||0,height:n.height||0},"center")).__customPathData=t.pathData}else"image"===i?(e=new NR.Image({})).__customImagePath=t.style.image:"text"===i?(e=new NR.Text({})).__customText=t.style.text:e=new(0,NR[i.charAt(0).toUpperCase()+i.slice(1)]);return e.__customGraphicType=i,e.name=t.name,e}(i)),function(t,e,i,n,a,o){var r={},s=i.style||{};if(i.shape&&(r.shape=RR.clone(i.shape)),i.position&&(r.position=i.position.slice()),i.scale&&(r.scale=i.scale.slice()),i.origin&&(r.origin=i.origin.slice()),i.rotation&&(r.rotation=i.rotation),"image"===t.type&&i.style){var l=r.style={};RR.each(["x","y","width","height"],(function(e){qR(e,l,s,t.style,o)}))}"text"===t.type&&i.style&&(l=r.style={},RR.each(["x","y"],(function(e){qR(e,l,s,t.style,o)})),!s.hasOwnProperty("textFill")&&s.fill&&(s.textFill=s.fill),!s.hasOwnProperty("textStroke")&&s.stroke&&(s.textStroke=s.stroke));if("group"!==t.type&&(t.useStyle(s),o)){t.style.opacity=0;var h=s.opacity;null==h&&(h=1),NR.initProps(t,{style:{opacity:h}},n,e)}o?t.attr(r):NR.updateProps(t,r,n,e),t.attr({z2:i.z2||0,silent:i.silent}),!1!==i.styleEmphasis&&NR.setHoverStyle(t,i.styleEmphasis)}(t,e,i,n,0,l),"group"===r){var h=t.children()||[],u=i.children||[];if(i.diffChildrenByName)new WR((s={oldChildren:h,newChildren:u,dataIndex:e,animatableModel:n,group:t,data:o}).oldChildren,s.newChildren,KR,KR,s).add(JR).update(JR).remove(QR).execute();else{for(var c=0;c<u.length;c++)$R(t.childAt(c),e,u[c],n,t,o);for(;c<h.length;c++)h[c]&&t.remove(h[c])}}return a.add(t),t}}function KR(t,e){var i=t&&t.name;return null!=i?i:"e\0\0"+e}function JR(t,e){var i=this.context,n=null!=t?i.newChildren[t]:null;$R(null!=e?i.oldChildren[e]:null,i.dataIndex,n,i.animatableModel,i.group,i.data)}function QR(t){var e=this.context,i=e.oldChildren[t];i&&e.group.remove(i)}ER.extendSeriesModel({type:"series.custom",dependencies:["grid","polar","geo","singleAxis","calendar"],defaultOption:{coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0},getInitialData:function(t,e){return BR(t.data,this,e)}}),ER.extendChartView({type:"custom",_data:null,render:function(t,e,i){var n=this._data,a=t.getData(),o=this.group,r=function(t,e,i,n){var a=t.get("renderItem"),o=t.coordinateSystem,r={};o&&(r=o.prepareCustoms?o.prepareCustoms():UR[o.type](o));var s,l,h,u,c,d,p=RR.defaults({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:v,style:y,styleEmphasis:x,visual:_,barLayout:b,currentSeriesIndices:w,font:S},r.api||{}),f={context:{},seriesId:t.id,seriesName:t.name,seriesIndex:t.seriesIndex,coordSys:r.coordSys,dataInsideLength:e.count(),encode:XR(t.getData())},g=!0;return function(t){return s=t,g=!0,a&&a(RR.defaults({dataIndexInside:t,dataIndex:e.getRawIndex(t)},f),p)||{}};function m(t){null==t&&(t=s),g&&(l=e.getItemModel(t),h=l.getModel(ZR),u=l.getModel(jR),c=VR(e),d=e.getItemVisual(t,"color"),g=!1)}function v(t,i){return null==i&&(i=s),e.get(e.getDimension(t||0),i)}function y(i,n){null==n&&(n=s),m(n);var a=l.getModel(HR).getItemStyle();null!=d&&(a.fill=d);var o=e.getItemVisual(n,"opacity");return null!=o&&(a.opacity=o),null!=c&&(NR.setTextStyle(a,h,null,{autoColor:d,isRectText:!0}),a.text=h.getShallow("show")?RR.retrieve2(t.getFormattedLabel(n,"normal"),e.get(c,n)):null),i&&RR.extend(a,i),a}function x(i,n){null==n&&(n=s),m(n);var a=l.getModel(FR).getItemStyle();return null!=c&&(NR.setTextStyle(a,u,null,{isRectText:!0},!0),a.text=u.getShallow("show")?RR.retrieve3(t.getFormattedLabel(n,"emphasis"),t.getFormattedLabel(n,"normal"),e.get(c,n)):null),i&&RR.extend(a,i),a}function _(t,i){return null==i&&(i=s),e.getItemVisual(i,t)}function b(t){if(o.getBaseAxis){var e=o.getBaseAxis();return GR.getLayoutOnAxis(RR.defaults({axis:e},t),n)}}function w(){return i.getCurrentSeriesIndices()}function S(t){return NR.getFont(t,i)}}(t,a,e,i);a.diff(n).add((function(e){a.hasValue(e)&&YR(null,e,r(e),t,o,a)})).update((function(e,i){var s=n.getItemGraphicEl(i);a.hasValue(e)?YR(s,e,r(e),t,o,a):s&&o.remove(s)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&o.remove(e)})).execute(),this._data=a},dispose:RR.noop});var tN=m,eN=b,iN=uo,nN=Bo,aN=wu;tN.registerPreprocessor((function(t){var e=t.graphic;eN.isArray(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])}));var oN=tN.extendComponentModel({type:"graphic",defaultOption:{elements:[],parentId:null},_elOptionsToUpdate:null,mergeOption:function(t){var e=this.option.elements;this.option.elements=null,oN.superApply(this,"mergeOption",arguments),this.option.elements=e},optionUpdated:function(t,e){var i=this.option,n=(e?i:t).elements,a=i.elements=e?[]:i.elements,o=[];this._flatten(n,o);var r=iN.mappingToExists(a,o);iN.makeIdAndName(r);var s=this._elOptionsToUpdate=[];eN.each(r,(function(t,e){var i=t.option;i&&(s.push(i),function(t,e){var i=t.exist;if(e.id=t.keyInfo.id,!e.type&&i&&(e.type=i.type),null==e.parentId){var n=e.parentOption;n?e.parentId=n.id:i&&(e.parentId=i.parentId)}e.parentOption=null}(t,i),function(t,e,i){var n=eN.extend({},i),a=t[e],o=i.$action||"merge";"merge"===o?a?(eN.merge(a,n,!0),aN.mergeLayoutParam(a,n,{ignoreSize:!0}),aN.copyLayoutParams(i,a)):t[e]=n:"replace"===o?t[e]=n:"remove"===o&&a&&(t[e]=null)}(a,e,i),function(t,e){if(!t)return;t.hv=e.hv=[lN(e,["left","right"]),lN(e,["top","bottom"])],"group"===t.type&&(null==t.width&&(t.width=e.width=0),null==t.height&&(t.height=e.height=0))}(a[e],i))}),this);for(var l=a.length-1;l>=0;l--)null==a[l]?a.splice(l,1):delete a[l].$action},_flatten:function(t,e,i){eN.each(t,(function(t){if(t){i&&(t.parentOption=i),e.push(t);var n=t.children;"group"===t.type&&n&&this._flatten(n,e,t),delete t.children}}),this)},useElOptionsToUpdate:function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t}});function rN(t,e,i,n){var a=i.type,o=new(0,nN[a.charAt(0).toUpperCase()+a.slice(1)])(i);e.add(o),n.set(t,o),o.__ecGraphicId=t}function sN(t,e){var i=t&&t.parent;i&&("group"===t.type&&t.traverse((function(t){sN(t,e)})),e.removeKey(t.__ecGraphicId),i.remove(t))}function lN(t,e){var i;return eN.each(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(i=!0)})),i}tN.extendComponentView({type:"graphic",init:function(t,e){this._elMap=eN.createHashMap(),this._lastGraphicModel},render:function(t,e,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t,i),this._relocate(t,i)},_updateElements:function(t,e){var i=t.useElOptionsToUpdate();if(i){var n=this._elMap,a=this.group;eN.each(i,(function(t){var e=t.$action,i=t.id,o=n.get(i),r=t.parentId,s=null!=r?n.get(r):a;if("text"===t.type){var l=t.style;t.hv&&t.hv[1]&&(l.textVerticalAlign=l.textBaseline=null),!l.hasOwnProperty("textFill")&&l.fill&&(l.textFill=l.fill),!l.hasOwnProperty("textStroke")&&l.stroke&&(l.textStroke=l.stroke)}var h=function(t){return t=eN.extend({},t),eN.each(["id","parentId","$action","hv","bounding"].concat(aN.LOCATION_PARAMS),(function(e){delete t[e]})),t}(t);e&&"merge"!==e?"replace"===e?(sN(o,n),rN(i,s,h,n)):"remove"===e&&sN(o,n):o?o.attr(h):rN(i,s,h,n);var u=n.get(i);u&&(u.__ecGraphicWidth=t.width,u.__ecGraphicHeight=t.height)}))}},_relocate:function(t,e){for(var i=t.option.elements,n=this.group,a=this._elMap,o=i.length-1;o>=0;o--){var r=i[o],s=a.get(r.id);if(s){var l=s.parent,h=l===n?{width:e.getWidth(),height:e.getHeight()}:{width:l.__ecGraphicWidth||0,height:l.__ecGraphicHeight||0};aN.positionElement(s,r,h,null,{hv:r.hv,boundingMode:r.bounding})}}},_clear:function(){var t=this._elMap;t.each((function(e){sN(e,t)})),this._elMap=eN.createHashMap()},dispose:function(){this._clear()}});var hN=b,uN=ou,cN=m.extendComponentModel({type:"legend.plain",dependencies:["series"],layoutMode:{type:"box",ignoreSize:!0},init:function(t,e,i){this.mergeDefaultAndTheme(t,i),t.selected=t.selected||{}},mergeOption:function(t){cN.superCall(this,"mergeOption",t)},optionUpdated:function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,i=0;i<t.length;i++){var n=t[i].get("name");if(this.isSelected(n)){this.select(n),e=!0;break}}!e&&this.select(t[0].get("name"))}},_updateData:function(t){var e=hN.map(this.get("data")||[],(function(t){return"string"!=typeof t&&"number"!=typeof t||(t={name:t}),new uN(t,this,this.ecModel)}),this);this._data=e;var i=hN.map(t.getSeries(),(function(t){return t.name}));t.eachSeries((function(t){if(t.legendDataProvider){var e=t.legendDataProvider();i=i.concat(e.mapArray(e.getName))}})),this._availableNames=i},getData:function(){return this._data},select:function(t){var e=this.option.selected;if("single"===this.get("selectedMode")){var i=this._data;hN.each(i,(function(t){e[t.get("name")]=!1}))}e[t]=!0},unSelect:function(t){"single"!==this.get("selectedMode")&&(this.option.selected[t]=!1)},toggleSelected:function(t){var e=this.option.selected;e.hasOwnProperty(t)||(e[t]=!0),this[e[t]?"unSelect":"select"](t)},isSelected:function(t){var e=this.option.selected;return!(e.hasOwnProperty(t)&&!e[t])&&hN.indexOf(this._availableNames,t)>=0},defaultOption:{zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",textStyle:{color:"#333"},selectedMode:!0,tooltip:{show:!1}}}),dN=cN,pN=m,fN=b;function gN(t,e,i){var n,a={},o="toggleSelected"===t;return i.eachComponent("legend",(function(i){o&&null!=n?i[n?"select":"unSelect"](e.name):(i[t](e.name),n=i.isSelected(e.name));var r=i.getData();fN.each(r,(function(t){var e=t.get("name");if("\n"!==e&&""!==e){var n=i.isSelected(e);a.hasOwnProperty(e)?a[e]=a[e]&&n:a[e]=n}}))})),{name:e.name,selected:a}}pN.registerAction("legendToggleSelect","legendselectchanged",fN.curry(gN,"toggleSelected")),pN.registerAction("legendSelect","legendselected",fN.curry(gN,"select")),pN.registerAction("legendUnSelect","legendunselected",fN.curry(gN,"unSelect"));var mN={},vN=wu,yN=vN.getLayoutRect,xN=vN.box,_N=vN.positionElement,bN=co,wN=Bo;mN.layout=function(t,e,i){var n=e.getBoxLayoutParams(),a=e.get("padding"),o={width:i.getWidth(),height:i.getHeight()},r=yN(n,o,a);xN(e.get("orient"),t,e.get("itemGap"),r.width,r.height),_N(t,n,o,a)},mN.makeBackground=function(t,e){var i=bN.normalizeCssArray(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),t=new wN.Rect({shape:{x:t.x-i[3],y:t.y-i[0],width:t.width+i[1]+i[3],height:t.height+i[0]+i[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1})};var SN=m,MN=b,IN=Hf.createSymbol,AN=Bo,TN=mN.makeBackground,CN=wu,LN=MN.curry,DN=MN.each,PN=AN.Group;function kN(t,e){e.dispatchAction({type:"legendToggleSelect",name:t})}function ON(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"highlight",seriesName:t.name,name:e})}function zN(t,e,i){var n=i.getZr().storage.getDisplayList()[0];n&&n.useHoverLayer||t.get("legendHoverLink")&&i.dispatchAction({type:"downplay",seriesName:t.name,name:e})}var EN=SN.extendComponentView({type:"legend.plain",newlineDisabled:!1,init:function(){this.group.add(this._contentGroup=new PN),this._backgroundEl},getContentGroup:function(){return this._contentGroup},render:function(t,e,i){if(this.resetInner(),t.get("show",!0)){var n=t.get("align");n&&"auto"!==n||(n="right"===t.get("left")&&"vertical"===t.get("orient")?"right":"left"),this.renderInner(n,t,e,i);var a=t.getBoxLayoutParams(),o={width:i.getWidth(),height:i.getHeight()},r=t.get("padding"),s=CN.getLayoutRect(a,o,r),l=this.layoutInner(t,n,s),h=CN.getLayoutRect(MN.defaults({width:l.width,height:l.height},a),o,r);this.group.attr("position",[h.x-l.x,h.y-l.y]),this.group.add(this._backgroundEl=TN(l,t))}},resetInner:function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl)},renderInner:function(t,e,i,n){var a=this.getContentGroup(),o=MN.createHashMap(),r=e.get("selectedMode");DN(e.getData(),(function(s,l){var h=s.get("name");if(this.newlineDisabled||""!==h&&"\n"!==h){var u=i.getSeriesByName(h)[0];if(!o.get(h))if(u){var c=u.getData(),d=c.getVisual("color");"function"==typeof d&&(d=d(u.getDataParams(0)));var p=c.getVisual("legendSymbol")||"roundRect",f=c.getVisual("symbol");this._createItem(h,l,s,e,p,f,t,d,r).on("click",LN(kN,h,n)).on("mouseover",LN(ON,u,null,n)).on("mouseout",LN(zN,u,null,n)),o.set(h,!0)}else i.eachRawSeries((function(i){if(!o.get(h)&&i.legendDataProvider){var a=i.legendDataProvider(),u=a.indexOfName(h);if(u<0)return;var c=a.getItemVisual(u,"color");this._createItem(h,l,s,e,"roundRect",null,t,c,r).on("click",LN(kN,h,n)).on("mouseover",LN(ON,i,h,n)).on("mouseout",LN(zN,i,h,n)),o.set(h,!0)}}),this)}else a.add(new PN({newline:!0}))}),this)},_createItem:function(t,e,i,n,a,o,r,s,l){var h=n.get("itemWidth"),u=n.get("itemHeight"),c=n.get("inactiveColor"),d=n.isSelected(t),p=new PN,f=i.getModel("textStyle"),g=i.get("icon"),m=i.getModel("tooltip"),v=m.parentModel;if(a=g||a,p.add(IN(a,0,0,h,u,d?s:c,!0)),!g&&o&&(o!==a||"none"==o)){var y=.8*u;"none"===o&&(o="circle"),p.add(IN(o,(h-y)/2,(u-y)/2,y,y,d?s:c))}var x="left"===r?h+5:-5,_=r,b=n.get("formatter"),w=t;"string"==typeof b&&b?w=b.replace("{name}",null!=t?t:""):"function"==typeof b&&(w=b(t)),p.add(new AN.Text({style:AN.setTextStyle({},f,{text:w,x:x,y:u/2,textFill:d?f.getTextColor():c,textAlign:_,textVerticalAlign:"middle"})}));var S=new AN.Rect({shape:p.getBoundingRect(),invisible:!0,tooltip:m.get("show")?MN.extend({content:t,formatter:v.get("formatter",!0)||function(){return t},formatterParams:{componentType:"legend",legendIndex:n.componentIndex,name:t,$vars:["name"]}},m.option):null});return p.add(S),p.eachChild((function(t){t.silent=!0})),S.silent=!l,this.getContentGroup().add(p),AN.setHoverStyle(p),p.__legendDataIndex=e,p},layoutInner:function(t,e,i){var n=this.getContentGroup();CN.box(t.get("orient"),n,t.get("itemGap"),i.width,i.height);var a=n.getBoundingRect();return n.attr("position",[-a.x,-a.y]),this.group.getBoundingRect()}});var RN=function(t){var e=t.findComponents({mainType:"legend"});e&&e.length&&t.filterSeries((function(t){for(var i=0;i<e.length;i++)if(!e[i].isSelected(t.name))return!1;return!0}))},NN=Zu;m.registerProcessor(RN),NN.registerSubTypeDefaulter("legend",(function(){return"plain"}));var VN=dN,BN=wu,GN=BN.mergeLayoutParam,WN=BN.getLayoutParams,HN=VN.extend({type:"legend.scroll",setScrollDataIndex:function(t){this.option.scrollDataIndex=t},defaultOption:{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800},init:function(t,e,i,n){var a=WN(t);HN.superCall(this,"init",t,e,i,n),FN(this,t,a)},mergeOption:function(t,e){HN.superCall(this,"mergeOption",t,e),FN(this,this.option,t)},getOrient:function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}}});function FN(t,e,i){var n=[1,1];n[t.getOrient().index]=0,GN(e,i,{type:"box",ignoreSize:n})}var ZN=b,jN=Bo,UN=wu,qN=EN,XN=jN.Group,YN=["width","height"],$N=["x","y"],KN=qN.extend({type:"legend.scroll",newlineDisabled:!0,init:function(){KN.superCall(this,"init"),this._currentIndex=0,this.group.add(this._containerGroup=new XN),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new XN),this._showController},resetInner:function(){KN.superCall(this,"resetInner"),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},renderInner:function(t,e,i,n){var a=this;KN.superCall(this,"renderInner",t,e,i,n);var o=this._controllerGroup,r=e.get("pageIconSize",!0);ZN.isArray(r)||(r=[r,r]),l("pagePrev",0);var s=e.getModel("pageTextStyle");function l(t,i){var s=t+"DataIndex",l=jN.createIcon(e.get("pageIcons",!0)[e.getOrient().name][i],{onclick:ZN.bind(a._pageGo,a,s,e,n)},{x:-r[0]/2,y:-r[1]/2,width:r[0],height:r[1]});l.name=t,o.add(l)}o.add(new jN.Text({name:"pageText",style:{textFill:s.getTextColor(),font:s.getFont(),textVerticalAlign:"middle",textAlign:"center"},silent:!0})),l("pageNext",1)},layoutInner:function(t,e,i){var n=this.getContentGroup(),a=this._containerGroup,o=this._controllerGroup,r=t.getOrient().index,s=YN[r],l=YN[1-r],h=$N[1-r];UN.box(t.get("orient"),n,t.get("itemGap"),r?i.width:null,r?null:i.height),UN.box("horizontal",o,t.get("pageButtonItemGap",!0));var u=n.getBoundingRect(),c=o.getBoundingRect(),d=this._showController=u[s]>i[s],p=[-u.x,-u.y];p[r]=n.position[r];var f=[0,0],g=[-c.x,-c.y],m=ZN.retrieve2(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?g[r]+=i[s]-c[s]:f[r]+=c[s]+m);g[1-r]+=u[l]/2-c[l]/2,n.attr("position",p),a.attr("position",f),o.attr("position",g);var v=this.group.getBoundingRect();if((v={x:0,y:0})[s]=d?i[s]:u[s],v[l]=Math.max(u[l],c[l]),v[h]=Math.min(0,c[h]+g[1-r]),a.__rectSize=i[s],d){var y={x:0,y:0};y[s]=Math.max(i[s]-c[s]-m,0),y[l]=v[l],a.setClipPath(new jN.Rect({shape:y})),a.__rectSize=y[s]}else o.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&jN.updateProps(n,{position:x.contentPosition},!!d&&t),this._updatePageInfoView(t,x),v},_pageGo:function(t,e,i){var n=this._getPageInfo(e)[t];null!=n&&i.dispatchAction({type:"legendScroll",scrollDataIndex:n,legendId:e.id})},_updatePageInfoView:function(t,e){var i=this._controllerGroup;ZN.each(["pagePrev","pageNext"],(function(n){var a=null!=e[n+"DataIndex"],o=i.childOfName(n);o&&(o.setStyle("fill",a?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=a?"pointer":"default")}));var n=i.childOfName("pageText"),a=t.get("pageFormatter"),o=e.pageIndex,r=null!=o?o+1:0,s=e.pageCount;n&&a&&n.setStyle("text",ZN.isString(a)?a.replace("{current}",r).replace("{total}",s):a({current:r,total:s}))},_getPageInfo:function(t){var e,i,n,a,o=t.get("scrollDataIndex",!0),r=this.getContentGroup(),s=r.getBoundingRect(),l=this._containerGroup.__rectSize,h=t.getOrient().index,u=YN[h],c=YN[1-h],d=$N[h],p=r.position.slice();this._showController?r.eachChild((function(t){t.__legendDataIndex===o&&(a=t)})):a=r.childAt(0);var f=l?Math.ceil(s[u]/l):0;if(a){var g=a.getBoundingRect(),m=a.position[h]+g[d];p[h]=-m-s[d],e=Math.floor(f*(m+g[d]+l/2)/s[u]),e=s[u]&&f?Math.max(0,Math.min(f-1,e)):-1;var v,y={x:0,y:0};y[u]=l,y[c]=s[c],y[d]=-p[h]-s[d];var x=r.children();if(r.eachChild((function(t,e){var i=b(t);i.intersect(y)&&(null==v&&(v=e),n=t.__legendDataIndex),e===x.length-1&&i[d]+i[u]<=y[d]+y[u]&&(n=null)})),null!=v){var _=b(x[v]);if(y[d]=_[d]+_[u]-y[u],v<=0&&_[d]>=y[d])i=null;else{for(;v>0&&b(x[v-1]).intersect(y);)v--;i=x[v].__legendDataIndex}}}return{contentPosition:p,pageIndex:e,pageCount:f,pagePrevDataIndex:i,pageNextDataIndex:n};function b(t){var e=t.getBoundingRect().clone();return e[d]+=t.position[h],e}}});m.registerAction("legendScroll","legendscroll",(function(t,e){var i=t.scrollDataIndex;null!=i&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(i)}))})),m.extendComponentModel({type:"tooltip",dependencies:["axisPointer"],defaultOption:{zlevel:0,z:8,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",confine:!1,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"rgba(50,50,50,0.7)",borderColor:"#333",borderRadius:4,borderWidth:0,padding:5,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#fff",fontSize:14}}});var JN=b,QN=Pt,tV=fa,eV=_,iV=co,nV=JN.each,aV=iV.toCamelCase,oV=["","-webkit-","-moz-","-o-"];function rV(t){var e,i,n,a=[],o=t.get("transitionDuration"),r=t.get("backgroundColor"),s=t.getModel("textStyle"),l=t.get("padding");return o&&a.push((n="left "+(e=o)+"s "+(i="cubic-bezier(0.23, 1, 0.32, 1)")+",top "+e+"s "+i,JN.map(oV,(function(t){return t+"transition:"+n})).join(";"))),r&&(eV.canvasSupported?a.push("background-Color:"+r):(a.push("background-Color:#"+QN.toHex(r)),a.push("filter:alpha(opacity=70)"))),nV(["width","color","radius"],(function(e){var i="border-"+e,n=aV(i),o=t.get(n);null!=o&&a.push(i+":"+o+("color"===e?"":"px"))})),a.push(function(t){var e=[],i=t.get("fontSize"),n=t.getTextColor();return n&&e.push("color:"+n),e.push("font:"+t.getFont()),i&&e.push("line-height:"+Math.round(3*i/2)+"px"),nV(["decoration","align"],(function(i){var n=t.get(i);n&&e.push("text-"+i+":"+n)})),e.join(";")}(s)),null!=l&&a.push("padding:"+iV.normalizeCssArray(l).join("px ")+"px"),a.join(";")+";"}function sV(t,e){var i=document.createElement("div"),n=this._zr=e.getZr();this.el=i,this._x=e.getWidth()/2,this._y=e.getHeight()/2,t.appendChild(i),this._container=t,this._show=!1,this._hideTimeout;var a=this;i.onmouseenter=function(){a._enterable&&(clearTimeout(a._hideTimeout),a._show=!0),a._inContent=!0},i.onmousemove=function(e){if(e=e||window.event,!a._enterable){var i=n.handler;tV.normalizeEvent(t,e,!0),i.dispatch("mousemove",e)}},i.onmouseleave=function(){a._enterable&&a._show&&a.hideLater(a._hideDelay),a._inContent=!1}}sV.prototype={constructor:sV,_enterable:!0,update:function(){var t=this._container,e=t.currentStyle||document.defaultView.getComputedStyle(t),i=t.style;"absolute"!==i.position&&"absolute"!==e.position&&(i.position="relative")},show:function(t){clearTimeout(this._hideTimeout);var e=this.el;e.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+rV(t)+";left:"+this._x+"px;top:"+this._y+"px;"+(t.get("extraCssText")||""),e.style.display=e.innerHTML?"block":"none",this._show=!0},setContent:function(t){this.el.innerHTML=null==t?"":t},setEnterable:function(t){this._enterable=t},getSize:function(){var t=this.el;return[t.clientWidth,t.clientHeight]},moveTo:function(t,e){var i,n=this._zr;n&&n.painter&&(i=n.painter.getViewportRootOffset())&&(t+=i.offsetLeft,e+=i.offsetTop);var a=this.el.style;a.left=t+"px",a.top=e+"px",this._x=t,this._y=e},hide:function(){this.el.style.display="none",this._show=!1},hideLater:function(t){!this._show||this._inContent&&this._enterable||(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(JN.bind(this.hide,this),t)):this.hide())},isShow:function(){return this._show}};var lV=m,hV=b,uV=_,cV=sV,dV=co,pV=po,fV=Bo,gV=Oz,mV=wu,vV=ou,yV=qz,xV=Rp,_V=yE,bV=hV.bind,wV=hV.each,SV=pV.parsePercent,MV=new fV.Rect({shape:{x:-1,y:-1,width:2,height:2}});function IV(t){for(var e=t.pop();t.length;){var i=t.pop();i&&(i instanceof vV&&(i=i.get("tooltip",!0)),"string"==typeof i&&(i={formatter:i}),e=new vV(i,e,e.ecModel))}return e}function AV(t,e){return t.dispatchAction||hV.bind(e.dispatchAction,e)}function TV(t){var e=t.clientWidth,i=t.clientHeight;if(document.defaultView&&document.defaultView.getComputedStyle){var n=document.defaultView.getComputedStyle(t);n&&(e+=parseInt(n.paddingLeft,10)+parseInt(n.paddingRight,10)+parseInt(n.borderLeftWidth,10)+parseInt(n.borderRightWidth,10),i+=parseInt(n.paddingTop,10)+parseInt(n.paddingBottom,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10))}return{width:e,height:i}}function CV(t){return"center"===t||"middle"===t}lV.extendComponentView({type:"tooltip",init:function(t,e){if(!uV.node){var i=new cV(e.getDom(),e);this._tooltipContent=i}},render:function(t,e,i){if(!uV.node){this.group.removeAll(),this._tooltipModel=t,this._ecModel=e,this._api=i,this._lastDataByCoordSys=null,this._alwaysShowContent=t.get("alwaysShowContent");var n=this._tooltipContent;n.update(),n.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow()}},_initGlobalListener:function(){var t=this._tooltipModel.get("triggerOn");yV.register("itemTooltip",this._api,bV((function(e,i,n){"none"!==t&&(t.indexOf(e)>=0?this._tryShow(i,n):"leave"===e&&this._hide(n))}),this))},_keepShow:function(){var t=this._tooltipModel,e=this._ecModel,i=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var n=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){n.manuallyShowTip(t,e,i,{x:n._lastX,y:n._lastY})}))}},manuallyShowTip:function(t,e,i,n){if(n.from!==this.uid&&!uV.node){var a=AV(n,i);this._ticket="";var o=n.dataByCoordSys;if(n.tooltip&&null!=n.x&&null!=n.y){var r=MV;r.position=[n.x,n.y],r.update(),r.tooltip=n.tooltip,this._tryShow({offsetX:n.x,offsetY:n.y,target:r},a)}else if(o)this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,event:{},dataByCoordSys:n.dataByCoordSys,tooltipOption:n.tooltipOption},a);else if(null!=n.seriesIndex){if(this._manuallyAxisShowTip(t,e,i,n))return;var s=gV(n,e),l=s.point[0],h=s.point[1];null!=l&&null!=h&&this._tryShow({offsetX:l,offsetY:h,position:n.position,target:s.el,event:{}},a)}else null!=n.x&&null!=n.y&&(i.dispatchAction({type:"updateAxisPointer",x:n.x,y:n.y}),this._tryShow({offsetX:n.x,offsetY:n.y,position:n.position,target:i.getZr().findHover(n.x,n.y).target,event:{}},a))}},manuallyHideTip:function(t,e,i,n){var a=this._tooltipContent;this._alwaysShowContent||a.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=null,n.from!==this.uid&&this._hide(AV(n,i))},_manuallyAxisShowTip:function(t,e,i,n){var a=n.seriesIndex,o=n.dataIndex,r=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=a&&null!=o&&null!=r){var s=e.getSeriesByIndex(a);if(s)if("axis"===(t=IV([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t])).get("trigger"))return i.dispatchAction({type:"updateAxisPointer",seriesIndex:a,dataIndex:o,position:n.position}),!0}},_tryShow:function(t,e){var i=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var n=t.dataByCoordSys;n&&n.length?this._showAxisTooltip(n,t):i&&null!=i.dataIndex?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,i,e)):i&&i.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,i,e)):(this._lastDataByCoordSys=null,this._hide(e))}},_showOrMove:function(t,e){var i=t.get("showDelay");e=hV.bind(e,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(e,i):e()},_showAxisTooltip:function(t,e){var i=this._ecModel,n=this._tooltipModel,a=[e.offsetX,e.offsetY],o=[],r=[],s=IV([e.tooltipOption,n]);wV(t,(function(t){wV(t.dataByAxis,(function(t){var e=i.getComponent(t.axisDim+"Axis",t.axisIndex),n=t.value,a=[];if(e&&null!=n){var s=_V.getValueLabel(n,e.axis,i,t.seriesDataIndices,t.valueLabelOpt);hV.each(t.seriesDataIndices,(function(o){var l=i.getSeriesByIndex(o.seriesIndex),h=o.dataIndexInside,u=l&&l.getDataParams(h);u.axisDim=t.axisDim,u.axisIndex=t.axisIndex,u.axisType=t.axisType,u.axisId=t.axisId,u.axisValue=xV.getAxisRawValue(e.axis,n),u.axisValueLabel=s,u&&(r.push(u),a.push(l.formatTooltip(h,!0)))}));var l=s;o.push((l?dV.encodeHTML(l)+"<br />":"")+a.join("<br />"))}}))}),this),o.reverse(),o=o.join("<br /><br />");var l=e.position;this._showOrMove(s,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(s,l,a[0],a[1],this._tooltipContent,r):this._showTooltipContent(s,o,r,Math.random(),a[0],a[1],l)}))},_showSeriesItemTooltip:function(t,e,i){var n=this._ecModel,a=e.seriesIndex,o=n.getSeriesByIndex(a),r=e.dataModel||o,s=e.dataIndex,l=e.dataType,h=r.getData(),u=IV([h.getItemModel(s),r,o&&(o.coordinateSystem||{}).model,this._tooltipModel]),c=u.get("trigger");if(null==c||"item"===c){var d=r.getDataParams(s,l),p=r.formatTooltip(s,!1,l),f="item_"+r.name+"_"+s;this._showOrMove(u,(function(){this._showTooltipContent(u,p,d,f,t.offsetX,t.offsetY,t.position,t.target)})),i({type:"showTip",dataIndexInside:s,dataIndex:h.getRawIndex(s),seriesIndex:a,from:this.uid})}},_showComponentItemTooltip:function(t,e,i){var n=e.tooltip;if("string"==typeof n){n={content:n,formatter:n}}var a=new vV(n,this._tooltipModel,this._ecModel),o=a.get("content"),r=Math.random();this._showOrMove(a,(function(){this._showTooltipContent(a,o,a.get("formatterParams")||{},r,t.offsetX,t.offsetY,t.position,e)})),i({type:"showTip",from:this.uid})},_showTooltipContent:function(t,e,i,n,a,o,r,s){if(this._ticket="",t.get("showContent")&&t.get("show")){var l=this._tooltipContent,h=t.get("formatter");r=r||t.get("position");var u=e;if(h&&"string"==typeof h)u=dV.formatTpl(h,i,!0);else if("function"==typeof h){var c=bV((function(e,n){e===this._ticket&&(l.setContent(n),this._updatePosition(t,r,a,o,l,i,s))}),this);this._ticket=n,u=h(i,n,c)}l.setContent(u),l.show(t),this._updatePosition(t,r,a,o,l,i,s)}},_updatePosition:function(t,e,i,n,a,o,r){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var h=a.getSize(),u=t.get("align"),c=t.get("verticalAlign"),d=r&&r.getBoundingRect().clone();if(r&&d.applyTransform(r.transform),"function"==typeof e&&(e=e([i,n],o,a.el,d,{viewSize:[s,l],contentSize:h.slice()})),hV.isArray(e))i=SV(e[0],s),n=SV(e[1],l);else if(hV.isObject(e)){e.width=h[0],e.height=h[1];var p=mV.getLayoutRect(e,{width:s,height:l});i=p.x,n=p.y,u=null,c=null}else if("string"==typeof e&&r){var f=function(t,e,i){var n=i[0],a=i[1],o=5,r=0,s=0,l=e.width,h=e.height;switch(t){case"inside":r=e.x+l/2-n/2,s=e.y+h/2-a/2;break;case"top":r=e.x+l/2-n/2,s=e.y-a-o;break;case"bottom":r=e.x+l/2-n/2,s=e.y+h+o;break;case"left":r=e.x-n-o,s=e.y+h/2-a/2;break;case"right":r=e.x+l+o,s=e.y+h/2-a/2}return[r,s]}(e,d,h);i=f[0],n=f[1]}else{f=function(t,e,i,n,a,o,r){var s=TV(i),l=s.width,h=s.height;null!=o&&(t+l+o>n?t-=l+o:t+=o);null!=r&&(e+h+r>a?e-=h+r:e+=r);return[t,e]}(i,n,a.el,s,l,u?null:20,c?null:20);i=f[0],n=f[1]}if(u&&(i-=CV(u)?h[0]/2:"right"===u?h[0]:0),c&&(n-=CV(c)?h[1]/2:"bottom"===c?h[1]:0),t.get("confine")){f=function(t,e,i,n,a){var o=TV(i),r=o.width,s=o.height;return t=Math.min(t+r,n)-r,e=Math.min(e+s,a)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(i,n,a.el,s,l);i=f[0],n=f[1]}a.moveTo(i,n)},_updateContentNotChangedOnAxis:function(t){var e=this._lastDataByCoordSys,i=!!e&&e.length===t.length;return i&&wV(e,(function(e,n){var a=e.dataByAxis||{},o=(t[n]||{}).dataByAxis||[];(i&=a.length===o.length)&&wV(a,(function(t,e){var n=o[e]||{},a=t.seriesDataIndices||[],r=n.seriesDataIndices||[];(i&=t.value===n.value&&t.axisType===n.axisType&&t.axisId===n.axisId&&a.length===r.length)&&wV(a,(function(t,e){var n=r[e];i&=t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex}))}))})),this._lastDataByCoordSys=t,!!i},_hide:function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},dispose:function(t,e){uV.node||(this._tooltipContent.hide(),yV.unregister("itemTooltip",e))}});var LV=m;LV.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},(function(){})),LV.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},(function(){}));var DV=b,PV=po.parsePercent;function kV(t){return t.get("stack")||"__ec_stack_"+t.seriesIndex}function OV(t){return t.dim}var zV=function(t,e,i){var n=i.getWidth(),a=i.getHeight(),o={},r={},s=function(t,e){var i={};DV.each(t,(function(t,e){var n=t.getData(),a=t.coordinateSystem.getBaseAxis(),o=a.getExtent(),r="category"===a.type?a.getBandWidth():Math.abs(o[1]-o[0])/n.count(),s=i[OV(a)]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},l=s.stacks;i[OV(a)]=s;var h=kV(t);l[h]||s.autoWidthCount++,l[h]=l[h]||{width:0,maxWidth:0};var u=PV(t.get("barWidth"),r),c=PV(t.get("barMaxWidth"),r),d=t.get("barGap"),p=t.get("barCategoryGap");u&&!l[h].width&&(u=Math.min(s.remainedWidth,u),l[h].width=u,s.remainedWidth-=u),c&&(l[h].maxWidth=c),null!=d&&(s.gap=d),null!=p&&(s.categoryGap=p)}));var n={};return DV.each(i,(function(t,e){n[e]={};var i=t.stacks,a=t.bandWidth,o=PV(t.categoryGap,a),r=PV(t.gap,1),s=t.remainedWidth,l=t.autoWidthCount,h=(s-o)/(l+(l-1)*r);h=Math.max(h,0),DV.each(i,(function(t,e){var i=t.maxWidth;i&&i<h&&(i=Math.min(i,s),t.width&&(i=Math.min(i,t.width)),s-=i,t.width=i,l--)})),h=(s-o)/(l+(l-1)*r),h=Math.max(h,0);var u,c=0;DV.each(i,(function(t,e){t.width||(t.width=h),u=t,c+=t.width*(1+r)})),u&&(c-=u.width*r);var d=-c/2;DV.each(i,(function(t,i){n[e][i]=n[e][i]||{offset:d,width:t.width},d+=t.width*(1+r)}))})),n}(DV.filter(e.getSeriesByType(t),(function(t){return!e.isSeriesFiltered(t)&&t.coordinateSystem&&"polar"===t.coordinateSystem.type})));e.eachSeriesByType(t,(function(t){if("polar"===t.coordinateSystem.type){var e=t.getData(),i=t.coordinateSystem,l=i.getAngleAxis(),h=i.getBaseAxis(),u=kV(t),c=s[OV(h)][u],d=c.offset,p=c.width,f=i.getOtherAxis(h),g=t.get("center")||["50%","50%"],m=PV(g[0],n),v=PV(g[1],a),y=t.get("barMinHeight")||0,x=t.get("barMinAngle")||0,_=f.getExtent()[0],b=f.model.get("max"),w=f.model.get("min"),S=[t.coordDimToDataDim("radius")[0],t.coordDimToDataDim("angle")[0]],M=e.mapArray(S,(function(t,e){return i.dataToPoint([t,e])}),!0);o[u]=o[u]||[],r[u]=r[u]||[],e.each(t.coordDimToDataDim(f.dim)[0],(function(t,n){if(!isNaN(t)){o[u][n]||(o[u][n]={p:_,n:_},r[u][n]={p:_,n:_});var a,s,h,c,g=t>=0?"p":"n",S=i.pointToCoord(M[n]),I=r[u][n][g];if("radius"===f.dim)a=I,s=S[0],c=(h=(-S[1]+d)*Math.PI/180)+p*Math.PI/180,Math.abs(s)<y&&(s=a+(s<0?-1:1)*y),r[u][n][g]=s;else{s=(a=S[0]+d)+p,null!=b&&(t=Math.min(t,b)),null!=w&&(t=Math.max(t,w));var A=l.dataToAngle(t);Math.abs(A-I)<x&&(A=I-(t<0?-1:1)*x),h=-I*Math.PI/180,c=-A*Math.PI/180;var T=l.getExtent(),C=A;C===T[0]&&t>0?C=T[1]:C===T[1]&&t<0&&(C=T[0]),r[u][n][g]=C}e.setItemLayout(n,{cx:m,cy:v,r0:a,r:s,startAngle:h,endAngle:c})}}),!0)}}),this)},EV=b,RV=gg;function NV(t,e){RV.call(this,"radius",t,e),this.type="category"}NV.prototype={constructor:NV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToRadius:RV.prototype.dataToCoord,radiusToData:RV.prototype.coordToData},EV.inherits(NV,RV);var VV=NV,BV=b,GV=gg;function WV(t,e){e=e||[0,360],GV.call(this,"angle",t,e),this.type="category"}WV.prototype={constructor:WV,pointToData:function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},dataToAngle:GV.prototype.dataToCoord,angleToData:GV.prototype.coordToData},BV.inherits(WV,GV);var HV=VV,FV=WV,ZV=function(t){this.name=t||"",this.cx=0,this.cy=0,this._radiusAxis=new HV,this._angleAxis=new FV,this._radiusAxis.polar=this._angleAxis.polar=this};ZV.prototype={type:"polar",axisPointerEnabled:!0,constructor:ZV,dimensions:["radius","angle"],model:null,containPoint:function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},containData:function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},getAxis:function(t){return this["_"+t+"Axis"]},getAxes:function(){return[this._radiusAxis,this._angleAxis]},getAxesByScale:function(t){var e=[],i=this._angleAxis,n=this._radiusAxis;return i.scale.type===t&&e.push(i),n.scale.type===t&&e.push(n),e},getAngleAxis:function(){return this._angleAxis},getRadiusAxis:function(){return this._radiusAxis},getOtherAxis:function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},getBaseAxis:function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},getTooltipAxes:function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},dataToPoint:function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},pointToData:function(t,e){var i=this.pointToCoord(t);return[this._radiusAxis.radiusToData(i[0],e),this._angleAxis.angleToData(i[1],e)]},pointToCoord:function(t){var e=t[0]-this.cx,i=t[1]-this.cy,n=this.getAngleAxis(),a=n.getExtent(),o=Math.min(a[0],a[1]),r=Math.max(a[0],a[1]);n.inverse?o=r-360:r=o+360;var s=Math.sqrt(e*e+i*i);e/=s,i/=s;for(var l=Math.atan2(-i,e)/Math.PI*180,h=l<o?1:-1;l<o||l>r;)l+=360*h;return[s,l]},coordToPoint:function(t){var e=t[0],i=t[1]/180*Math.PI;return[Math.cos(i)*e+this.cx,-Math.sin(i)*e+this.cy]}};var jV=ZV,UV=b,qV=wv,XV=Wf,YV=Zu.extend({type:"polarAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"polar",index:this.option.polarIndex,id:this.option.polarId})[0]}});UV.merge(YV.prototype,XV);var $V={splitNumber:5};function KV(t,e){return e.type||(e.data?"category":"value")}qV("angle",YV,KV,{startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:!1}}),qV("radius",YV,KV,$V),m.extendComponentModel({type:"polar",dependencies:["polarAxis","angleAxis"],coordinateSystem:null,findAxisModel:function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},defaultOption:{zlevel:0,z:0,center:["50%","50%"],radius:"80%"}});var JV=jV,QV=po.parsePercent,tB=Rp,eB=tB.createScaleByModel,iB=tB.niceScaleExtent,nB=_c;function aB(t,e){var i=this,n=i.getAngleAxis(),a=i.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===i){var e=t.getData();a.scale.unionExtentFromData(e,"radius"),n.scale.unionExtentFromData(e,"angle")}})),iB(n.scale,n.model),iB(a.scale,a.model),"category"===n.type&&!n.onBand){var o=n.getExtent(),r=360/n.scale.count();n.inverse?o[1]+=r:o[1]-=r,n.setExtent(o[0],o[1])}}function oB(t,e){if(t.type=e.get("type"),t.scale=eB(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),"angleAxis"===e.mainType){t.inverse^=e.get("clockwise");var i=e.get("startAngle");t.setExtent(i,i+(t.inverse?-360:360))}e.axis=t,t.model=e}var rB={dimensions:JV.prototype.dimensions,create:function(t,e){var i=[];return t.eachComponent("polar",(function(t,n){var a=new JV(n);a.update=aB;var o=a.getRadiusAxis(),r=a.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");oB(o,s),oB(r,l),function(t,e,i){var n=e.get("center"),a=i.getWidth(),o=i.getHeight();t.cx=QV(n[0],a),t.cy=QV(n[1],o);var r=t.getRadiusAxis(),s=Math.min(a,o)/2,l=QV(e.get("radius"),s);r.inverse?r.setExtent(l,0):r.setExtent(0,l)}(a,t,e),i.push(a),t.coordinateSystem=a,a.model=t})),t.eachSeries((function(e){if("polar"===e.get("coordinateSystem")){var i=t.queryComponents({mainType:"polar",index:e.get("polarIndex"),id:e.get("polarId")})[0];e.coordinateSystem=i.coordinateSystem}})),i}};nB.register("polar",rB);var sB=b,lB=Bo,hB=ou,uB=["axisLine","axisLabel","axisTick","splitLine","splitArea"];function cB(t,e,i){e[1]>e[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 dB(t){return t.getRadiusAxis().inverse?0:1}Oy.extend({type:"angleAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getRadiusAxis().getExtent(),o=i.getTicksCoords();"category"!==i.type&&o.pop(),sB.each(uB,(function(e){!t.get(e+".show")||i.scale.isBlank()&&"axisLine"!==e||this["_"+e](t,n,o,a)}),this)}},_axisLine:function(t,e,i,n){var a=t.getModel("axisLine.lineStyle"),o=new lB.Circle({shape:{cx:e.cx,cy:e.cy,r:n[dB(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[dB(e)],s=sB.map(i,(function(t){return new lB.Line({shape:cB(e,[r,r+o],t)})}));this.group.add(lB.mergePath(s,{style:sB.defaults(a.getModel("lineStyle").getLineStyle(),{stroke:t.get("axisLine.lineStyle.color")})}))},_axisLabel:function(t,e,i,n){for(var a=t.axis,o=t.get("data"),r=t.getModel("axisLabel"),s=t.getFormattedLabels(),l=r.get("margin"),h=a.getLabelsCoords(),u=0;u<i.length;u++){var c=n[dB(e)],d=e.coordToPoint([c+l,h[u]]),p=e.cx,f=e.cy,g=Math.abs(d[0]-p)/c<.3?"center":d[0]>p?"left":"right",m=Math.abs(d[1]-f)/c<.3?"middle":d[1]>f?"top":"bottom";o&&o[u]&&o[u].textStyle&&(r=new hB(o[u].textStyle,r,r.ecModel));var v=new lB.Text({silent:!0});this.group.add(v),lB.setTextStyle(v.style,r,{x:d[0],y:d[1],textFill:r.getTextColor()||t.get("axisLine.lineStyle.color"),text:s[u],textAlign:g,textVerticalAlign:m})}},_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;l<i.length;l++){var h=r++%o.length;s[h]=s[h]||[],s[h].push(new lB.Line({shape:cB(e,n,i[l])}))}for(l=0;l<s.length;l++)this.group.add(lB.mergePath(s[l],{style:sB.defaults({stroke:o[l%o.length]},a.getLineStyle()),silent:!0,z:t.get("z")}))},_splitArea:function(t,e,i,n){var a=t.getModel("splitArea").getModel("areaStyle"),o=a.get("color"),r=0;o=o instanceof Array?o:[o];for(var s=[],l=Math.PI/180,h=-i[0]*l,u=Math.min(n[0],n[1]),c=Math.max(n[0],n[1]),d=t.get("clockwise"),p=1;p<i.length;p++){var f=r++%o.length;s[f]=s[f]||[],s[f].push(new lB.Sector({shape:{cx:e.cx,cy:e.cy,r0:u,r:c,startAngle:h,endAngle:-i[p]*l,clockwise:d},silent:!0})),h=-i[p]*l}for(p=0;p<s.length;p++)this.group.add(lB.mergePath(s[p],{style:sB.defaults({fill:o[p%o.length]},a.getAreaStyle()),silent:!0}))}});var pB=b,fB=Bo,gB=yy,mB=["axisLine","axisTickLabel","axisName"],vB=["splitLine","splitArea"];Oy.extend({type:"radiusAxis",axisPointerClass:"PolarAxisPointer",render:function(t,e){if(this.group.removeAll(),t.get("show")){var i=t.axis,n=i.polar,a=n.getAngleAxis(),o=i.getTicksCoords(),r=a.getExtent()[0],s=i.getExtent(),l=function(t,e,i){return{position:[t.cx,t.cy],rotation:i/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}(n,t,r),h=new gB(t,l);pB.each(mB,h.add,h),this.group.add(h.getGroup()),pB.each(vB,(function(e){t.get(e+".show")&&!i.scale.isBlank()&&this["_"+e](t,n,r,s,o)}),this)}},_splitLine:function(t,e,i,n,a){var o=t.getModel("splitLine").getModel("lineStyle"),r=o.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],h=0;h<a.length;h++){var u=s++%r.length;l[u]=l[u]||[],l[u].push(new fB.Circle({shape:{cx:e.cx,cy:e.cy,r:a[h]},silent:!0}))}for(h=0;h<l.length;h++)this.group.add(fB.mergePath(l[h],{style:pB.defaults({stroke:r[h%r.length],fill:null},o.getLineStyle()),silent:!0}))},_splitArea:function(t,e,i,n,a){var o=t.getModel("splitArea").getModel("areaStyle"),r=o.get("color"),s=0;r=r instanceof Array?r:[r];for(var l=[],h=a[0],u=1;u<a.length;u++){var c=s++%r.length;l[c]=l[c]||[],l[c].push(new fB.Sector({shape:{cx:e.cx,cy:e.cy,r0:h,r:a[u],startAngle:0,endAngle:2*Math.PI},silent:!0})),h=a[u]}for(u=0;u<l.length;u++)this.group.add(fB.mergePath(l[u],{style:pB.defaults({fill:r[u%r.length]},o.getAreaStyle()),silent:!0}))}});var yB=co,xB=Bo,_B=yE,bB=mt,wB=yy,SB=Oy,MB=vE.extend({makeElOption:function(t,e,i,n,a){var o=i.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var r,s=o.polar,l=s.getOtherAxis(o).getExtent();r=o["dataTo"+yB.capitalFirst(o.dim)](e);var h=n.get("type");if(h&&"none"!==h){var u=_B.buildElStyle(n),c=IB[h](o,s,r,l,u);c.style=u,t.graphicKey=c.type,t.pointer=c}var d=function(t,e,i,n,a){var o=e.axis,r=o.dataToCoord(t),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,h,u,c=n.getRadiusAxis().getExtent();if("radius"===o.dim){var d=bB.create();bB.rotate(d,d,s),bB.translate(d,d,[n.cx,n.cy]),l=xB.applyTransform([r,-a],d);var p=e.getModel("axisLabel").get("rotate")||0,f=wB.innerTextLayout(s,p*Math.PI/180,-1);h=f.textAlign,u=f.textVerticalAlign}else{var g=c[1];l=n.coordToPoint([g+a,r]);var m=n.cx,v=n.cy;h=Math.abs(l[0]-m)/g<.3?"center":l[0]>m?"left":"right",u=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:h,verticalAlign:u}}(e,i,0,s,n.get("label.margin"));_B.buildLabelElOption(t,i,n,a,d)}});var IB={line:function(t,e,i,n,a){return"angle"===t.dim?{type:"Line",shape:_B.makeLineShape(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=t.getBandWidth(),r=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,n[0],n[1],(-i-o/2)*r,(o/2-i)*r)}:{type:"Sector",shape:_B.makeSectorShape(e.cx,e.cy,i-o/2,i+o/2,0,2*Math.PI)}}};SB.registerAxisPointerClass("PolarAxisPointer",MB);var AB=m,TB=b,CB=zV;AB.registerLayout(TB.curry(CB,"bar")),AB.extendComponentView({type:"polar"});var LB=b,DB=uo,PB=Zu,kB=ou,OB=Dx,zB=Ub,EB=PB.extend({type:"geo",coordinateSystem:null,layoutMode:"box",init:function(t){PB.prototype.init.apply(this,arguments),DB.defaultEmphasis(t.label,["show"])},optionUpdated:function(){var t=this.option,e=this;t.regions=zB.getFilledRegions(t.regions,t.map,t.nameMap),this._optionModelMap=LB.reduce(t.regions||[],(function(t,i){return i.name&&t.set(i.name,new kB(i,e)),t}),LB.createHashMap()),this.updateSelectedMap(t.regions)},defaultOption:{zlevel:0,z:0,show:!0,left:"center",top:"center",aspectScale:.75,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{normal:{show:!1,color:"#000"},emphasis:{show:!0,color:"rgb(100,0,0)"}},itemStyle:{normal:{borderWidth:.5,borderColor:"#444",color:"#eee"},emphasis:{color:"rgba(255,215,0,0.8)"}},regions:[]},getRegionModel:function(t){return this._optionModelMap.get(t)||new kB(null,this,this.ecModel)},getFormattedLabel:function(t,e){var i=this.getRegionModel(t).get("label."+e+".formatter"),n={name:t};return"function"==typeof i?(n.status=e,i(n)):"string"==typeof i?i.replace("{a}",null!=t?t:""):void 0},setZoom:function(t){this.option.zoom=t},setCenter:function(t){this.option.center=t}});LB.mixin(EB,OB);var RB=Dw;m.extendComponentView({type:"geo",init:function(t,e){var i=new RB(e,!0);this._mapDraw=i,this.group.add(i.group)},render:function(t,e,i,n){if(!n||"geoToggleSelect"!==n.type||n.from!==this.uid){var a=this._mapDraw;t.get("show")?a.draw(t,e,i,this,n):this._mapDraw.group.removeAll(),this.group.silent=t.get("silent")}},dispose:function(){this._mapDraw&&this._mapDraw.remove()}});var NB=m,VB=b;function BB(t,e){e.update="updateView",NB.registerAction(e,(function(e,i){var n={};return i.eachComponent({mainType:"geo",query:e},(function(i){i[t](e.name);var a=i.coordinateSystem;VB.each(a.regions,(function(t){n[t.name]=i.isSelected(t.name)||!1}))})),{selected:n,name:e.name}}))}BB("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),BB("select",{type:"geoSelect",event:"geoselected"}),BB("unSelect",{type:"geoUnSelect",event:"geounselected"});var GB=b,WB=["rect","polygon","keep","clear"];var HB=function(t,e){var i=t&&t.brush;if(GB.isArray(i)||(i=i?[i]:[]),i.length){var n=[];GB.each(i,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(n=n.concat(e))}));var a=t&&t.toolbox;GB.isArray(a)&&(a=a[0]),a||(a={feature:{}},t.toolbox=[a]);var o,r,s=a.feature||(a.feature={}),l=s.brush||(s.brush={}),h=l.type||(l.type=[]);h.push.apply(h,n),o=h,r={},GB.each(o,(function(t){r[t]=1})),o.length=0,GB.each(r,(function(t,e){o.push(e)})),e&&!h.length&&h.push.apply(h,WB)}},FB={},ZB=b,jB=cI,UB=ZB.each;function qB(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}FB.createVisualMappings=function(t,e,i){var n={};return UB(e,(function(e){var a,o=n[e]=((a=function(){}).prototype.__hidden=a.prototype,new a);UB(t[e],(function(t,n){if(jB.isValidType(n)){var a={type:n,visual:t};i&&i(a,e),o[n]=new jB(a),"opacity"===n&&((a=ZB.clone(a)).type="colorAlpha",o.__hidden.__alphaForOpacity=new jB(a))}}))})),n},FB.replaceVisualOption=function(t,e,i){var n;ZB.each(i,(function(t){e.hasOwnProperty(t)&&qB(e[t])&&(n=!0)})),n&&ZB.each(i,(function(i){e.hasOwnProperty(i)&&qB(e[i])?t[i]=ZB.clone(e[i]):delete t[i]}))},FB.applyVisual=function(t,e,i,n,a,o){var r,s={};function l(t){return i.getItemVisual(r,t)}function h(t,e){i.setItemVisual(r,t,e)}function u(t,u){r=null==o?t:u;var c=i.getRawDataItem(r);if(!c||!1!==c.visualMap)for(var d=n.call(a,t),p=e[d],f=s[d],g=0,m=f.length;g<m;g++){var v=f[g];p[v]&&p[v].applyVisual(t,l,h)}}ZB.each(t,(function(t){var i=jB.prepareVisualTypes(e[t]);s[t]=i})),null==o?i.each(u,!0):i.each([o],u,!0)};var XB=mg,YB=Je,$B={lineX:KB(0),lineY:KB(1),rect:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])},rect:function(t,e,i){return t&&i.boundingRect.intersect(t)}},polygon:{point:function(t,e,i){return t&&i.boundingRect.contain(t[0],t[1])&&XB.contain(i.range,t[0],t[1])},rect:function(t,e,i){var n=i.range;if(!t||n.length<=1)return!1;var a=t.x,o=t.y,r=t.width,s=t.height,l=n[0];return!!(XB.contain(n,a,o)||XB.contain(n,a+r,o)||XB.contain(n,a,o+s)||XB.contain(n,a+r,o+s)||YB.create(t).contain(l[0],l[1])||QB(a,o,a+r,o,n)||QB(a,o,a,o+s,n)||QB(a+r,o,a+r,o+s,n)||QB(a,o+s,a+r,o+s,n))||void 0}}};function KB(t){var e=["x","y"],i=["width","height"];return{point:function(e,i,n){if(e){var a=n.range;return JB(e[t],a)}},rect:function(n,a,o){if(n){var r=o.range,s=[n[e[t]],n[e[t]]+n[i[t]]];return s[1]<s[0]&&s.reverse(),JB(s[0],r)||JB(s[1],r)||JB(r[0],s)||JB(r[1],s)}}}}function JB(t,e){return e[0]<=t&&t<=e[1]}function QB(t,e,i,n,a){for(var o=0,r=a[a.length-1];o<a.length;o++){var s=a[o];if(tG(t,e,i,n,s[0],s[1],r[0],r[1]))return!0;r=s}}function tG(t,e,i,n,a,o,r,s){var l,h=eG(i-t,a-r,n-e,o-s);if((l=h)<=1e-6&&l>=-1e-6)return!1;var u=eG(a-t,a-r,o-e,o-s)/h;if(u<0||u>1)return!1;var c=eG(i-t,a-t,n-e,o-e)/h;return!(c<0||c>1)}function eG(t,e,i,n){return t*n-e*i}var iG=$B,nG=b,aG=Bo,oG=uo,rG=oD,sG=nG.each,lG=nG.indexOf,hG=nG.curry,uG=["dataToPoint","pointToData"],cG=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"];function dG(t,e,i){var n=this._targetInfoList=[],a={},o=gG(e,t);sG(mG,(function(t,e){(!i||!i.include||lG(i.include,e)>=0)&&t(o,n,a)}))}var pG=dG.prototype;function fG(t){return t[0]>t[1]&&t.reverse(),t}function gG(t,e){return oG.parseFinder(t,e,{includeMainTypes:cG})}pG.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=xG[t.brushType](0,i,e);t.__rangeOffset={offset:bG[t.brushType](n.values,t.range,[1,1]),xyMinMax:n.xyMinMax}}}))},pG.matchOutputRanges=function(t,e,i){sG(t,(function(t){var n=this.findTargetInfo(t,e);n&&!0!==n&&nG.each(n.coordSyses,(function(n){var a=xG[t.brushType](1,n,t.range);i(t,a.values,n,e)}))}),this)},pG.setInputRanges=function(t,e){sG(t,(function(t){var i,n,a,o,r,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=xG[t.brushType](0,s.coordSys,t.coordRange),h=t.__rangeOffset;t.range=h?bG[t.brushType](l.values,h.offset,(i=l.xyMinMax,n=h.xyMinMax,a=SG(i),o=SG(n),r=[a[0]/o[0],a[1]/o[1]],isNaN(r[0])&&(r[0]=1),isNaN(r[1])&&(r[1]=1),r)):l.values}}),this)},pG.makePanelOpts=function(t,e){return nG.map(this._targetInfoList,(function(i){var n=i.getPanelRect();return{panelId:i.panelId,defaultBrushType:e&&e(i),clipPath:rG.makeRectPanelClipPath(n),isTargetByCursor:rG.makeRectIsTargetByCursor(n,t,i.coordSysModel),getLinearBrushOtherExtent:rG.makeLinearBrushOtherExtent(n)}}))},pG.controlSeries=function(t,e,i){var n=this.findTargetInfo(t,i);return!0===n||n&&lG(n.coordSyses,e.coordinateSystem)>=0},pG.findTargetInfo=function(t,e){for(var i=this._targetInfoList,n=gG(e,t),a=0;a<i.length;a++){var o=i[a],r=t.panelId;if(r){if(o.panelId===r)return o}else for(a=0;a<vG.length;a++)if(vG[a](n,o))return o}return!0};var mG={grid:function(t,e){var i=t.xAxisModels,n=t.yAxisModels,a=t.gridModels,o=nG.createHashMap(),r={},s={};(i||n||a)&&(sG(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),r[e.id]=!0})),sG(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),sG(a,(function(t){o.set(t.id,t),r[t.id]=!0,s[t.id]=!0})),o.each((function(t){var a=t.coordinateSystem,o=[];sG(a.getCartesians(),(function(t,e){(lG(i,t.getAxis("x").model)>=0||lG(n,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:yG.grid,xAxisDeclared:r[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){sG(t.geoModels,(function(t){var i=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:i,coordSyses:[i],getPanelRect:yG.geo})}))}},vG=[function(t,e){var i=t.xAxisModel,n=t.yAxisModel,a=t.gridModel;return!a&&i&&(a=i.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(t,e){var i=t.geoModel;return i&&i===e.geoModel}],yG={grid:function(){return this.coordSys.grid.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(aG.getTransform(t)),e}},xG={lineX:hG(_G,0),lineY:hG(_G,1),rect:function(t,e,i){var n=e[uG[t]]([i[0][0],i[1][0]]),a=e[uG[t]]([i[0][1],i[1][1]]),o=[fG([n[0],a[0]]),fG([n[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,i){var n=[[1/0,-1/0],[1/0,-1/0]];return{values:nG.map(i,(function(i){var a=e[uG[t]](i);return n[0][0]=Math.min(n[0][0],a[0]),n[1][0]=Math.min(n[1][0],a[1]),n[0][1]=Math.max(n[0][1],a[0]),n[1][1]=Math.max(n[1][1],a[1]),a})),xyMinMax:n}}};function _G(t,e,i,n){var a=i.getAxis(["x","y"][t]),o=fG(nG.map([0,1],(function(t){return e?a.coordToData(a.toLocalCoord(n[t])):a.toGlobalCoord(a.dataToCoord(n[t]))}))),r=[];return r[t]=o,r[1-t]=[NaN,NaN],{values:o,xyMinMax:r}}var bG={lineX:hG(wG,0),lineY:hG(wG,1),rect:function(t,e,i){return[[t[0][0]-i[0]*e[0][0],t[0][1]-i[0]*e[0][1]],[t[1][0]-i[1]*e[1][0],t[1][1]-i[1]*e[1][1]]]},polygon:function(t,e,i){return nG.map(t,(function(t,n){return[t[0]-i[0]*e[n][0],t[1]-i[1]*e[n][1]]}))}};function wG(t,e,i,n){return[e[0]-n[t]*i[0],e[1]-n[t]*i[1]]}function SG(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var MG=dG,IG=m,AG=b,TG=Je,CG=FB,LG=iG,DG=Ed,PG=MG,kG=["inBrush","outOfBrush"],OG="__ecInBrushSelectEvent",zG=IG.PRIORITY.VISUAL.BRUSH;function EG(t,e){if(!t.isDisposed()){var i=t.getZr();i[OG]=!0,t.dispatchAction({type:"brushSelect",batch:e}),i[OG]=!1}}function RG(t,e,i,n){for(var a=0,o=e.length;a<o;a++){var r=e[a];if(t[r.brushType](n,i,r.selectors,r))return!0}}function NG(t){var e=t.brushSelector;if(AG.isString(e)){var i=[];return AG.each(LG,(function(t,n){i[n]=function(i,n,a,o){var r=n.getItemLayout(i);return t[e](r,a,o)}})),i}if(AG.isFunction(e)){var n={};return AG.each(LG,(function(t,i){n[i]=e})),n}return e}IG.registerLayout(zG,(function(t,e,i){t.eachComponent({mainType:"brush"},(function(e){i&&"takeGlobalCursor"===i.type&&e.setBrushOption("brush"===i.key?i.brushOption:{brushType:!1}),(e.brushTargetManager=new PG(e.option,t)).setInputRanges(e.areas,t)}))})),IG.registerVisual(zG,(function(t,e,i){var n,a,o=[];t.eachComponent({mainType:"brush"},(function(e,i){var r={brushId:e.id,brushIndex:i,brushName:e.name,areas:AG.clone(e.areas),selected:[]};o.push(r);var s=e.option,l=s.brushLink,h=[],u=[],c=[],d=0;i||(n=s.throttleType,a=s.throttleDelay);var p=AG.map(e.areas,(function(t){return function(t){var e=t.selectors={};return AG.each(LG[t.brushType],(function(i,n){e[n]=function(n){return i(n,e,t)}})),t}(AG.defaults({boundingRect:VG[t.brushType](t)},t))})),f=CG.createVisualMappings(e.option,kG,(function(t){t.mappingMethod="fixed"}));function g(t){return"all"===l||h[t]}function m(t){return!!t.length}AG.isArray(l)&&AG.each(l,(function(t){h[t]=1})),t.eachSeries((function(i,n){var a=c[n]=[];"parallel"===i.subType?function(t,e){var i=t.coordinateSystem;d|=i.hasAxisBrushed(),g(e)&&i.eachActiveState(t.getData(),(function(t,e){"active"===t&&(u[e]=1)}))}(i,n):function(i,n,a){var o=NG(i);if(!o||function(t,e){var i=t.option.seriesIndex;return null!=i&&"all"!==i&&(AG.isArray(i)?AG.indexOf(i,e)<0:e!==i)}(e,n))return;if(AG.each(p,(function(n){o[n.brushType]&&e.brushTargetManager.controlSeries(n,i,t)&&a.push(n),d|=m(a)})),g(n)&&m(a)){var r=i.getData();r.each((function(t){RG(o,a,r,t)&&(u[t]=1)}))}}(i,n,a)})),t.eachSeries((function(t,e){var i={seriesId:t.id,seriesIndex:e,seriesName:t.name,dataIndex:[]};r.selected.push(i);var n=NG(t),a=c[e],o=t.getData(),s=g(e)?function(t){return u[t]?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"}:function(t){return RG(n,a,o,t)?(i.dataIndex.push(o.getRawIndex(t)),"inBrush"):"outOfBrush"};(g(e)?d:m(a))&&CG.applyVisual(kG,f,o,s)}))})),function(t,e,i,n,a){if(!a)return;var o=t.getZr();if(o[OG])return;o.__ecBrushSelect||(o.__ecBrushSelect=EG);DG.createOrUpdate(o,"__ecBrushSelect",i,e)(t,n)}(e,n,a,o,i)}));var VG={lineX:AG.noop,lineY:AG.noop,rect:function(t){return BG(t.range)},polygon:function(t){for(var e,i=t.range,n=0,a=i.length;n<a;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var o=i[n];o[0]<e[0][0]&&(e[0][0]=o[0]),o[0]>e[0][1]&&(e[0][1]=o[0]),o[1]<e[1][0]&&(e[1][0]=o[1]),o[1]>e[1][1]&&(e[1][1]=o[1])}return e&&BG(e)}};function BG(t){return new TG(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var GG=b,WG=FB,HG=ou,FG=["#ddd"];function ZG(t,e){return GG.merge({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new HG(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}m.extendComponentModel({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&&WG.replaceVisualOption(i,t,["inBrush","outOfBrush"]),i.inBrush=i.inBrush||{},i.outOfBrush=i.outOfBrush||{color:FG}},setAreas:function(t){t&&(this.areas=GG.map(t,(function(t){return ZG(this.option,t)}),this))},setBrushOption:function(t){this.brushOption=ZG(this.option,t),this.brushType=this.brushOption.brushType}});var jG=b,UG=aD;function qG(t,e,i,n){(!n||n.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())}m.extendComponentView({type:"brush",init:function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new UG(e.getZr())).on("brush",jG.bind(this._onBrush,this)).mount()},render:function(t){return this.model=t,qG.apply(this,arguments)},updateView:qG,updateLayout:qG,updateVisual:qG,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:jG.clone(t),$from:i})}});var XG=m;XG.registerAction({type:"brush",event:"brush",update:"updateView"},(function(t,e){e.eachComponent({mainType:"brush",query:t},(function(e){e.setAreas(t.areas)}))})),XG.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},(function(){}));var YG={},$G={};YG.register=function(t,e){$G[t]=e},YG.get=function(t){return $G[t]};var KG={toolbox:{brush:{title:{rect:"",polygon:"",lineX:"",lineY:"",keep:"",clear:""}},dataView:{title:"",lang:["","",""]},dataZoom:{title:{zoom:"",back:""}},magicType:{title:{line:"线",bar:"",stack:"",tiled:""}},restore:{title:""},saveAsImage:{title:"",lang:[""]}}},JG=b,QG=YG,tW=KG.toolbox.brush;function eW(t,e,i){this.model=t,this.ecModel=e,this.api=i,this._brushType,this._brushMode}eW.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:JG.clone(tW.title)};var iW=eW.prototype;iW.render=iW.updateView=iW.updateLayout=function(t,e,i){var n,a,o;e.eachComponent({mainType:"brush"},(function(t){n=t.brushType,a=t.brushOption.brushMode||"single",o|=t.areas.length})),this._brushType=n,this._brushMode=a,JG.each(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===a:"clear"===e?o:e===n)?"emphasis":"normal")}))},iW.getIcons=function(){var t=this.model,e=t.get("icon",!0),i={};return JG.each(t.get("type",!0),(function(t){e[t]&&(i[t]=e[t])})),i},iW.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}})},QG.register("brush",eW),m.registerPreprocessor(HB);var nW=b,aW=wu,oW=po,rW=_c;function sW(t,e,i){this._model=t}function lW(t,e,i,n){var a=i.calendarModel,o=i.seriesModel,r=a?a.coordinateSystem:o?o.coordinateSystem:null;return r===this?r[t](n):null}sW.prototype={constructor:sW,type:"calendar",dimensions:["time","value"],getDimensionsInfo:function(){return[{name:"time",type:"time"}]},getRangeInfo:function(){return this._rangeInfo},getModel:function(){return this._model},getRect:function(){return this._rect},getCellWidth:function(){return this._sw},getCellHeight:function(){return this._sh},getOrient:function(){return this._orient},getFirstDayOfWeek:function(){return this._firstDayOfWeek},getDateInfo:function(t){var e=(t=oW.parseDate(t)).getFullYear(),i=t.getMonth()+1;i=i<10?"0"+i:i;var n=t.getDate();n=n<10?"0"+n:n;var a=t.getDay();return{y:e,m:i,d:n,day:a=Math.abs((a+7-this.getFirstDayOfWeek())%7),time:t.getTime(),formatedDate:e+"-"+i+"-"+n,date:t}},getNextNDay:function(t,e){return 0===(e=e||0)||(t=new Date(this.getDateInfo(t).time)).setDate(t.getDate()+e),this.getDateInfo(t)},update:function(t,e){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle.normal").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var i=this._rangeInfo.weeks||1,n=["width","height"],a=this._model.get("cellSize").slice(),o=this._model.getBoxLayoutParams(),r="horizontal"===this._orient?[i,7]:[7,i];nW.each([0,1],(function(t){h(a,t)&&(o[n[t]]=a[t]*r[t])}));var s={width:e.getWidth(),height:e.getHeight()},l=this._rect=aW.getLayoutRect(o,s);function h(t,e){return null!=t[e]&&"auto"!==t[e]}nW.each([0,1],(function(t){h(a,t)||(a[t]=l[n[t]]/r[t])})),this._sw=a[0],this._sh=a[1]},dataToPoint:function(t,e){nW.isArray(t)&&(t=t[0]),null==e&&(e=!0);var i=this.getDateInfo(t),n=this._rangeInfo,a=i.formatedDate;if(e&&!(i.time>=n.start.time&&i.time<=n.end.time))return[NaN,NaN];var o=i.day,r=this._getRangeInfo([n.start.time,a]).nthWeek;return"vertical"===this._orient?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+r*this._sh+this._sh/2]:[this._rect.x+r*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},pointToData:function(t){var e=this.pointToDate(t);return e&&e.time},dataToRect:function(t,e){var i=this.dataToPoint(t,e);return{contentShape:{x:i[0]-(this._sw-this._lineWidth)/2,y:i[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:i,tl:[i[0]-this._sw/2,i[1]-this._sh/2],tr:[i[0]+this._sw/2,i[1]-this._sh/2],br:[i[0]+this._sw/2,i[1]+this._sh/2],bl:[i[0]-this._sw/2,i[1]+this._sh/2]}},pointToDate:function(t){var e=Math.floor((t[0]-this._rect.x)/this._sw)+1,i=Math.floor((t[1]-this._rect.y)/this._sh)+1,n=this._rangeInfo.range;return"vertical"===this._orient?this._getDateByWeeksAndDay(i,e-1,n):this._getDateByWeeksAndDay(e,i-1,n)},convertToPixel:nW.curry(lW,"dataToPoint"),convertFromPixel:nW.curry(lW,"pointToData"),_initRangeOption:function(){var t=this._model.get("range"),e=t;if(nW.isArray(e)&&1===e.length&&(e=e[0]),/^\d{4}$/.test(e)&&(t=[e+"-01-01",e+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(e)){var i=this.getDateInfo(e),n=i.date;n.setMonth(n.getMonth()+1);var a=this.getNextNDay(n,-1);t=[i.formatedDate,a.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e)&&(t=[e,e]);var o=this._getRangeInfo(t);return o.start.time>o.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=n.getTime()-t[1].time>0?1:-1;n.getDate()!==o&&(n.getTime()-t[1].time)*r>0;)i-=r,n.setDate(a+i-1);var s=Math.floor((i+t[0].day+6)/7),l=e?1-s:s-1;return e&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:s,nthWeek:l,fweek:t[0].day,lweek:t[1].day}},_getDateByWeeksAndDay:function(t,e,i){var n=this._getRangeInfo(i);if(t>n.weeks||0===t&&e<n.fweek||t===n.weeks&&e>n.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)}},sW.dimensions=sW.prototype.dimensions,sW.getDimensionsInfo=sW.prototype.getDimensionsInfo,sW.create=function(t,e){var i=[];return t.eachComponent("calendar",(function(t){var e=new sW(t);i.push(e),t.coordinateSystem=e})),t.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},rW.register("calendar",sW);var hW=b,uW=Zu,cW=wu,dW=cW.getLayoutParams,pW=cW.sizeCalculable,fW=cW.mergeLayoutParam,gW=uW.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:{normal:{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=dW(t);gW.superApply(this,"init",arguments),mW(t,a)},mergeOption:function(t,e){gW.superApply(this,"mergeOption",arguments),mW(this.option,t)}});function mW(t,e){var i=t.cellSize;hW.isArray(i)?1===i.length&&(i[1]=i[0]):i=t.cellSize=[i,i];var n=hW.map([0,1],(function(t){return pW(e,t)&&(i[t]="auto"),null!=i[t]&&"auto"!==i[t]}));fW(t,e,{type:"box",ignoreSize:n})}var vW=b,yW=Bo,xW=co,_W=po,bW={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["","","","","","","","","","","",""]},wW={EN:["S","M","T","W","T","F","S"],CN:["","","","","","",""]};m.extendComponentView({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.normal").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,h=new yW.Rect({shape:{x:l[0],y:l[1],width:o,height:r},cursor:"default",style:a});i.add(h)}},_renderLines:function(t,e,i,n){var a=this,o=t.coordinateSystem,r=t.getModel("splitLine.lineStyle").getLineStyle(),s=t.get("splitLine.show"),l=r.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=e.start,u=0;h.time<=e.end.time;u++){d(h.formatedDate),0===u&&(h=o.getDateInfo(e.start.y+"-"+e.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=o.getDateInfo(c)}function d(e){a._firstDayOfMonth.push(o.getDateInfo(e)),a._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=a._getLinePointsOfOneWeek(t,e,i);a._tlpoints.push(l[0]),a._blpoints.push(l[l.length-1]),s&&a._drawSplitline(l,r,n)}d(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(a._getEdgesPoints(a._tlpoints,l,i),r,n),s&&this._drawSplitline(a._getEdgesPoints(a._blpoints,l,i),r,n)},_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 yW.Polyline({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?xW.formatTplSimple(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,h=(s[0][1]+s[1][1])/2,u="horizontal"===i?0:1,c={top:[l,s[u][1]],bottom:[l,s[1-u][1]],left:[s[1-u][0],h],right:[s[u][0],h]},d=e.start.y;+e.end.y>+e.start.y&&(d=d+"-"+e.end.y);var p=a.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:d},g=this._formatterLabel(p,f),m=new yW.Text({z2:30});yW.setTextStyle(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];vW.isString(a)&&(a=bW[a.toUpperCase()]||[]);var h="start"===r?0:1,u="horizontal"===e?0:1;o="start"===r?-o:o;for(var c="center"===s,d=0;d<l[h].length-1;d++){var p=l[h][d].slice(),f=this._firstDayOfMonth[d];if(c){var g=this._firstDayPoints[d];p[u]=(g[u]+l[0][d+1][u])/2}var m=n.get("formatter"),v=a[+f.m-1],y={yyyy:f.y,yy:(f.y+"").slice(2),MM:f.m,M:+f.m,nameMap:v},x=this._formatterLabel(m,y),_=new yW.Text({z2:30});vW.extend(yW.setTextStyle(_.style,n,{text:x}),this._monthTextPositionControl(p,c,e,r,o)),i.add(_)}}},_weekTextPositionControl:function(t,e,i,n,a){var o="center",r="middle",s=t[0],l=t[1],h="start"===i;return"horizontal"===e?(s=s+n+(h?1:-1)*a[0]/2,o=h?"right":"left"):(l=l+n+(h?1:-1)*a[1]/2,r=h?"bottom":"top"),{x:s,y:l,textAlign:o,textVerticalAlign:r}},_renderWeekText:function(t,e,i,n){var a=t.getModel("dayLabel");if(a.get("show")){var o=t.coordinateSystem,r=a.get("position"),s=a.get("nameMap"),l=a.get("margin"),h=o.getFirstDayOfWeek();vW.isString(s)&&(s=wW[s.toUpperCase()]||[]);var u=o.getNextNDay(e.end.time,7-e.lweek).time,c=[o.getCellWidth(),o.getCellHeight()];l=_W.parsePercent(l,c["horizontal"===i?0:1]),"start"===r&&(u=o.getNextNDay(e.start.time,-(7+e.fweek)).time,l=-l);for(var d=0;d<7;d++){var p,f=o.getNextNDay(u,d),g=o.dataToRect([f.time],!1).center;p=Math.abs((d+h)%7);var m=new yW.Text({z2:30});vW.extend(yW.setTextStyle(m.style,a,{text:s[p]}),this._weekTextPositionControl(g,i,r,l,c)),n.add(m)}}}});var SW=m,MW=Bo,IW=wu.getLayoutRect;SW.extendComponentModel({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"}}}),SW.extendComponentView({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=t.get("textBaseline"),l=new MW.Text({style:MW.setTextStyle({},a,{text:t.get("text"),textFill:a.getTextColor()},{disableBox:!0}),z2:10}),h=l.getBoundingRect(),u=t.get("subtext"),c=new MW.Text({style:MW.setTextStyle({},o,{text:u,textFill:o.getTextColor(),y:h.height+t.get("itemGap"),textVerticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink");l.silent=!d,c.silent=!p,d&&l.on("click",(function(){window.open(d,"_"+t.get("target"))})),p&&c.on("click",(function(){window.open(p,"_"+t.get("subtarget"))})),n.add(l),u&&n.add(c);var f=n.getBoundingRect(),g=t.getBoxLayoutParams();g.width=f.width,g.height=f.height;var m=IW(g,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));r||("middle"===(r=t.get("left")||t.get("right"))&&(r="center"),"right"===r?m.x+=m.width:"center"===r&&(m.x+=m.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?m.y+=m.height:"middle"===s&&(m.y+=m.height/2),s=s||"top"),n.attr("position",[m.x,m.y]);var v={textAlign:r,textVerticalAlign:s};l.setStyle(v),c.setStyle(v),f=n.getBoundingRect();var y=m.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var _=new MW.Rect({shape:{x:f.x-y[3],y:f.y-y[0],width:f.width+y[1]+y[3],height:f.height+y[0]+y[2],r:t.get("borderRadius")},style:x,silent:!0});MW.subPixelOptimizeRect(_),n.add(_)}}}),Zu.registerSubTypeDefaulter("dataZoom",(function(){return"slider"}));var AW={},TW=b,CW=co,LW=["cartesian2d","polar","singleAxis"];function DW(t,e){t=t.slice();var i=TW.map(t,CW.capitalFirst);e=(e||[]).slice();var n=TW.map(e,CW.capitalFirst);return function(a,o){TW.each(t,(function(t,r){for(var s={name:t,capital:i[r]},l=0;l<e.length;l++)s[e[l]]=t+n[l];a.call(o,s)}))}}var PW=DW(["x","y","z","radius","angle","single"],["axisIndex","axis","index","id"]);AW.isCoordSupported=function(t){return TW.indexOf(LW,t)>=0},AW.createNameEach=DW,AW.eachAxisDim=PW,AW.createLinkedNodesFinder=function(t,e,i){return function(a){var o,r={nodes:[],records:{}};if(e((function(t){r.records[t.name]={}})),!a)return r;n(a,r);do{o=!1,t(s)}while(o);function s(t){!function(t,e){return TW.indexOf(e.nodes,t)>=0}(t,r)&&function(t,n){var a=!1;return e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]&&(a=!0)}))})),a}(t,r)&&(n(t,r),o=!0)}return r};function n(t,n){n.nodes.push(t),e((function(e){TW.each(i(t,e)||[],(function(t){n.records[e.name][t]=!0}))}))}};var kW=b,OW=po,zW=AW,EW=kW.each,RW=OW.asc,NW=function(t,e,i,n){this._dimName=t,this._axisIndex=e,this._valueWindow,this._percentWindow,this._dataExtent,this._minMaxSpan,this.ecModel=n,this._dataZoomModel=i};function VW(t,e){var i=t.getAxisModel(),n=t._percentWindow,a=t._valueWindow;if(n){var o=OW.getPixelPrecision(a,[0,500]);o=Math.min(o,20);var r=e||0===n[0]&&100===n[1];i.setRange(r?null:+a[0].toFixed(o),r?null:+a[1].toFixed(o))}}NW.prototype={constructor:NW,hostedBy:function(t){return this._dataZoomModel===t},getDataValueWindow:function(){return this._valueWindow.slice()},getDataPercentWindow:function(){return this._percentWindow.slice()},getTargetSeriesModels:function(){var t=[],e=this.ecModel;return e.eachSeries((function(i){if(zW.isCoordSupported(i.get("coordinateSystem"))){var n=this._dimName,a=e.queryComponents({mainType:n+"Axis",index:i.get(n+"AxisIndex"),id:i.get(n+"AxisId")})[0];this._axisIndex===(a&&a.componentIndex)&&t.push(i)}}),this),t},getAxisModel:function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},getOtherAxisModel:function(){var t,e,i,n=this._dimName,a=this.ecModel,o=this.getAxisModel();return"x"===n||"y"===n?(e="gridIndex",t="x"===n?"y":"x"):(e="polarIndex",t="angle"===n?"radius":"angle"),a.eachComponent(t+"Axis",(function(t){(t.get(e)||0)===(o.get(e)||0)&&(i=t)})),i},getMinMaxSpan:function(){return kW.clone(this._minMaxSpan)},calculateDataWindow:function(t){var e=this._dataExtent,i=this.getAxisModel().axis.scale,n=this._dataZoomModel.getRangePropMode(),a=[0,100],o=[t.start,t.end],r=[];return EW(["startValue","endValue"],(function(e){r.push(null!=t[e]?i.parse(t[e]):null)})),EW([0,1],(function(t){var s=r[t],l=o[t];"percent"===n[t]?(null==l&&(l=a[t]),s=i.parse(OW.linearMap(l,a,e,!0))):l=OW.linearMap(s,e,a,!0),r[t]=s,o[t]=l})),{valueWindow:RW(r),percentWindow:RW(o)}},reset:function(t){if(t===this._dataZoomModel){this._dataExtent=function(t,e,i){var n=[1/0,-1/0];EW(i,(function(t){var i=t.getData();i&&EW(t.coordDimToDataDim(e),(function(t){var e=i.getDataExtent(t);e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1])}))})),n[1]<n[0]&&(n=[NaN,NaN]);return function(t,e){var i=t.getAxisModel(),n=i.getMin(!0),a="category"===i.get("type"),o=a&&(i.get("data")||[]).length;null!=n&&"dataMin"!==n&&"function"!=typeof n?e[0]=n:a&&(e[0]=o>0?0:NaN);var r=i.getMax(!0);null!=r&&"dataMax"!==r&&"function"!=typeof r?e[1]=r:a&&(e[1]=o>0?o-1:NaN);i.get("scale",!0)||(e[0]>0&&(e[0]=0),e[1]<0&&(e[1]=0))}(t,n),n}(this,this._dimName,this.getTargetSeriesModels());var e=this.calculateDataWindow(t.option);this._valueWindow=e.valueWindow,this._percentWindow=e.percentWindow,function(t){var e=t._minMaxSpan={},i=t._dataZoomModel;EW(["min","max"],(function(n){e[n+"Span"]=i.get(n+"Span");var a=i.get(n+"ValueSpan");if(null!=a&&(e[n+"ValueSpan"]=a,null!=(a=t.getAxisModel().axis.scale.parse(a)))){var o=t._dataExtent;e[n+"Span"]=OW.linearMap(o[0]+a,o,[0,100],!0)}}))}(this),VW(this)}},restore:function(t){t===this._dataZoomModel&&(this._valueWindow=this._percentWindow=null,VW(this,!0))},filterData:function(t){if(t===this._dataZoomModel){var e=this._dimName,i=this.getTargetSeriesModels(),n=t.get("filterMode"),a=this._valueWindow;if("none"!==n){var o=this.getOtherAxisModel();t.get("$fromToolbox")&&o&&"category"===o.get("type")&&(n="empty"),EW(i,(function(t){var i=t.getData(),o=t.coordDimToDataDim(e);"weakFilter"===n?i&&i.filterSelf((function(t){for(var e,n,r,s=0;s<o.length;s++){var l=i.get(o[s],t),h=!isNaN(l),u=l<a[0],c=l>a[1];if(h&&!u&&!c)return!0;h&&(r=!0),u&&(e=!0),c&&(n=!0)}return r&&e&&n})):i&&EW(o,(function(e){"empty"===n?t.setData(i.map(e,(function(t){return r(t)?t:NaN}))):i.filterSelf(e,r)}))}))}}function r(t){return t>=a[0]&&t<=a[1]}}};var BW=m,GW=b,WW=_,HW=uo,FW=AW,ZW=NW,jW=GW.each,UW=FW.eachAxisDim,qW=BW.extendComponentModel({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=XW(t);this.mergeDefaultAndTheme(t,i),this.doInit(n)},mergeOption:function(t){var e=XW(t);GW.merge(this.option,t,!0),this.doInit(e)},doInit:function(t){var e=this.option;WW.canvasSupported||(e.realtime=!1),this._setDefaultThrottle(t),YW(this,t),jW([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=null)}),this),this.textStyleModel=this.getModel("textStyle"),this._resetTarget(),this._giveAxisProxies()},_giveAxisProxies:function(){var t=this._axisProxies;this.eachTargetAxis((function(e,i,n,a){var o=this.dependentModels[e.axis][i],r=o.__dzAxisProxy||(o.__dzAxisProxy=new ZW(e.name,i,this,a));t[e.name+"_"+i]=r}),this)},_resetTarget:function(){var t=this.option,e=this._judgeAutoMode();UW((function(e){var i=e.axisIndex;t[i]=HW.normalizeToArray(t[i])}),this),"axisIndex"===e?this._autoSetAxisIndex():"orient"===e&&this._autoSetOrient()},_judgeAutoMode:function(){var t=this.option,e=!1;UW((function(i){null!=t[i.axisIndex]&&(e=!0)}),this);var i=t.orient;return null==i&&e?"orient":e?void 0:(null==i&&(t.orient="horizontal"),"axisIndex")},_autoSetAxisIndex:function(){var t=!0,e=this.get("orient",!0),i=this.option,n=this.dependentModels;if(t){var a="vertical"===e?"y":"x";n[a+"Axis"].length?(i[a+"AxisIndex"]=[0],t=!1):jW(n.singleAxis,(function(n){t&&n.get("orient",!0)===e&&(i.singleAxisIndex=[n.componentIndex],t=!1)}))}t&&UW((function(e){if(t){var n=[],a=this.dependentModels[e.axis];if(a.length&&!n.length)for(var o=0,r=a.length;o<r;o++)"category"===a[o].get("type")&&n.push(o);i[e.axisIndex]=n,n.length&&(t=!1)}}),this),t&&this.ecModel.eachSeries((function(t){this._isSeriesHasAllAxesTypeOf(t,"value")&&UW((function(e){var n=i[e.axisIndex],a=t.get(e.axisIndex),o=t.get(e.axisId);a=t.ecModel.queryComponents({mainType:e.axis,index:a,id:o})[0].componentIndex,GW.indexOf(n,a)<0&&n.push(a)}))}),this)},_autoSetOrient:function(){var t;this.eachTargetAxis((function(e){!t&&(t=e.name)}),this),this.option.orient="y"===t?"vertical":"horizontal"},_isSeriesHasAllAxesTypeOf:function(t,e){var i=!0;return UW((function(n){var a=t.get(n.axisIndex),o=this.dependentModels[n.axis][a];o&&o.get("type")===e||(i=!1)}),this),i},_setDefaultThrottle:function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},getFirstTargetAxisModel:function(){var t;return UW((function(e){if(null==t){var i=this.get(e.axisIndex);i.length&&(t=this.dependentModels[e.axis][i[0]])}}),this),t},eachTargetAxis:function(t,e){var i=this.ecModel;UW((function(n){jW(this.get(n.axisIndex),(function(a){t.call(e,n,a,this,i)}),this)}),this)},getAxisProxy:function(t,e){return this._axisProxies[t+"_"+e]},getAxisModel:function(t,e){var i=this.getAxisProxy(t,e);return i&&i.getAxisModel()},setRawRange:function(t,e){var i=this.option;jW([["start","startValue"],["end","endValue"]],(function(e){null==t[e[0]]&&null==t[e[1]]||(i[e[0]]=t[e[0]],i[e[1]]=t[e[1]])}),this),!e&&YW(this,t)},getPercentRange:function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},getValueRange:function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var i=this.findRepresentativeAxisProxy();return i?i.getDataValueWindow():void 0},findRepresentativeAxisProxy:function(t){if(t)return t.__dzAxisProxy;var e=this._axisProxies;for(var i in e)if(e.hasOwnProperty(i)&&e[i].hostedBy(this))return e[i];for(var i in e)if(e.hasOwnProperty(i)&&!e[i].hostedBy(this))return e[i]},getRangePropMode:function(){return this._rangePropMode.slice()}});function XW(t){var e={};return jW(["start","end","startValue","endValue","throttle"],(function(i){t.hasOwnProperty(i)&&(e[i]=t[i])})),e}function YW(t,e){var i=t._rangePropMode,n=t.get("rangeMode");jW([["start","startValue"],["end","endValue"]],(function(t,a){var o=null!=e[t[0]],r=null!=e[t[1]];o&&!r?i[a]="percent":!o&&r?i[a]="value":n?i[a]=n[a]:o&&(i[a]="percent")}))}var $W=qW,KW=Md.extend({type:"dataZoom",render:function(t,e,i,n){this.dataZoomModel=t,this.ecModel=e,this.api=i},getTargetCoordInfo:function(){var t=this.dataZoomModel,e=this.ecModel,i={};return t.eachTargetAxis((function(t,n){var a=e.getComponent(t.axis,n);if(a){var o=a.getCoordSysModel();o&&function(t,e,i,n){for(var a,o=0;o<i.length;o++)if(i[o].model===t){a=i[o];break}a||i.push(a={model:t,axisModels:[],coordIndex:n});a.axisModels.push(e)}(o,a,i[o.mainType]||(i[o.mainType]=[]),o.componentIndex)}}),this),i}}),JW=KW;$W.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 QW=b,tH=fa,eH=Bo,iH=Ed,nH=JW,aH=po,oH=wu,rH=RC,sH=eH.Rect,lH=aH.linearMap,hH=aH.asc,uH=QW.bind,cH=QW.each,dH=["line","bar","candlestick","scatter"],pH=nH.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){pH.superApply(this,"render",arguments),iH.createOrUpdate(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(){pH.superApply(this,"remove",arguments),iH.clear(this,"_dispatchZoomAction")},dispose:function(){pH.superApply(this,"dispose",arguments),iH.clear(this,"_dispatchZoomAction")},_buildView:function(){var t=this.group;t.removeAll(),this._resetLocation(),this._resetInterval();var e=this._displayables.barGroup=new eH.Group;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="horizontal"===this._orient?{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=oH.getLayoutParams(t.option);QW.each(["right","top","width","height"],(function(t){"ph"===o[t]&&(o[t]=a[t])}));var r=oH.getLayoutRect(o,n,t.padding);this._location={x:r.x,y:r.y},this._size=[r.width,r.height],"vertical"===this._orient&&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("horizontal"!==i||a?"horizontal"===i&&a?{scale:r?[-1,1]:[-1,-1]}:"vertical"!==i||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 sH({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40})),i.add(new sH({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:QW.bind(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]],h=[0,e[0]],u=[[e[0],0],[0,0]],c=[],d=h[1]/(n.count()-1),p=0,f=Math.round(n.count()/e[0]);n.each([a],(function(t,e){if(f>0&&e%f)p+=d;else{var i=null==t||isNaN(t)||""===t,n=i?0:lH(t,o,l,!0);i&&!s&&e?(u.push([u[u.length-1][0],0]),c.push([c[c.length-1][0],0])):!i&&s&&(u.push([p,0]),c.push([p,0])),u.push([p,n]),c.push([p,n]),p+=d,s=i}}));var g=this.dataZoomModel;this._displayables.barGroup.add(new eH.Polygon({shape:{points:u},style:QW.defaults({fill:g.get("dataBackgroundColor")},g.getModel("dataBackground.areaStyle").getAreaStyle()),silent:!0,z2:-20})),this._displayables.barGroup.add(new eH.Polyline({shape:{points:c},style:g.getModel("dataBackground.lineStyle").getLineStyle(),silent:!0,z2:-19}))}}},_prepareDataShadowInfo:function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var i,n=this.ecModel;return t.eachTargetAxis((function(a,o){var r=t.getAxisProxy(a.name,o).getTargetSeriesModels();QW.each(r,(function(t){if(!(i||!0!==e&&QW.indexOf(dH,t.get("type"))<0)){var r,s=n.getComponent(a.axis,o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[a.name],h=t.coordinateSystem;null!=l&&h.getOtherAxis&&(r=h.getOtherAxis(s).inverse),i={thisAxis:s,series:t,thisDim:a.name,otherDim:l,otherAxisInverse:r}}}),this)}),this),i}},_renderHandle:function(){var t=this._displayables,e=t.handles=[],i=t.handleLabels=[],n=this._displayables.barGroup,a=this._size,o=this.dataZoomModel;n.add(t.filler=new sH({draggable:!0,cursor:fH(this._orient),drift:uH(this._onDragMove,this,"all"),onmousemove:function(t){tH.stop(t.event)},ondragstart:uH(this._showDataInfo,this,!0),ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1),style:{fill:o.get("fillerColor"),textPosition:"inside"}})),n.add(new sH(eH.subPixelOptimizeRect({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{stroke:o.get("dataBackgroundColor")||o.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}}))),cH([0,1],(function(t){var a=eH.createIcon(o.get("handleIcon"),{cursor:fH(this._orient),draggable:!0,drift:uH(this._onDragMove,this,t),onmousemove:function(t){tH.stop(t.event)},ondragend:uH(this._onDragEnd,this),onmouseover:uH(this._showDataInfo,this,!0),onmouseout:uH(this._showDataInfo,this,!1)},{x:-1,y:0,width:2,height:2}),r=a.getBoundingRect();this._handleHeight=aH.parsePercent(o.get("handleSize"),this._size[1]),this._handleWidth=r.width/r.height*this._handleHeight,a.setStyle(o.getModel("handleStyle").getItemStyle());var s=o.get("handleColor");null!=s&&(a.style.fill=s),n.add(e[t]=a);var l=o.textStyleModel;this.group.add(i[t]=new eH.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textVerticalAlign:"middle",textAlign:"center",textFill:l.getTextColor(),textFont:l.getFont()},z2:10}))}),this)},_resetInterval:function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[lH(t[0],[0,100],e,!0),lH(t[1],[0,100],e,!0)]},_updateInterval:function(t,e){var i=this.dataZoomModel,n=this._handleEnds,a=this._getViewExtent(),o=i.findRepresentativeAxisProxy().getMinMaxSpan(),r=[0,100];rH(e,n,a,i.get("zoomLock")?"all":t,null!=o.minSpan?lH(o.minSpan,r,a,!0):null,null!=o.maxSpan?lH(o.maxSpan,r,a,!0):null),this._range=hH([lH(n[0],a,r,!0),lH(n[1],a,r,!0)])},_updateView:function(t){var e=this._displayables,i=this._handleEnds,n=hH(i.slice()),a=this._size;cH([0,1],(function(t){var n=e.handles[t],o=this._handleHeight;n.attr({scale:[o/2,o/2],position:[i[t],a[1]/2-o/2]})}),this),e.filler.setShape({x:n[0],y:0,width:n[1]-n[0],height:a[1]}),this._updateDataInfo(t)},_updateDataInfo:function(t){var e=this.dataZoomModel,i=this._displayables,n=i.handleLabels,a=this._orient,o=["",""];if(e.get("showDetail")){var r=e.findRepresentativeAxisProxy();if(r){var s=r.getAxisModel().axis,l=this._range,h=t?r.calculateDataWindow({start:l[0],end:l[1]}).valueWindow:r.getDataValueWindow();o=[this._formatLabel(h[0],s),this._formatLabel(h[1],s)]}}var u=hH(this._handleEnds.slice());function c(t){var e=eH.getTransform(i.handles[t].parent,this.group),r=eH.transformDirection(0===t?"right":"left",e),s=this._handleWidth/2+5,l=eH.applyTransform([u[t]+(0===t?-s:s),this._size[1]/2],e);n[t].setStyle({x:l[0],y:l[1],textVerticalAlign:"horizontal"===a?"middle":r,textAlign:"horizontal"===a?r:"center",text:o[t]})}c.call(this,0),c.call(this,1)},_formatLabel:function(t,e){var i=this.dataZoomModel,n=i.get("labelFormatter"),a=i.get("labelPrecision");null!=a&&"auto"!==a||(a=e.getPixelPrecision());var o=null==t||isNaN(t)?"":"category"===e.type||"time"===e.type?e.scale.getLabel(Math.round(t)):t.toFixed(Math.min(a,20));return QW.isFunction(n)?n(t,o):QW.isString(n)?n.replace("{value}",o):o},_showDataInfo:function(t){t=this._dragging||t;var e=this._displayables.handleLabels;e[0].attr("invisible",!t),e[1].attr("invisible",!t)},_onDragMove:function(t,e,i){this._dragging=!0;var n=this._displayables.barGroup.getLocalTransform(),a=eH.applyTransform([e,i],n,!0);this._updateInterval(t,a[0]);var o=this.dataZoomModel.get("realtime");this._updateView(!o),o&&o&&this._dispatchZoomAction()},_onDragEnd:function(){this._dragging=!1,this._showDataInfo(!1),this._dispatchZoomAction()},_onClickPanelClick:function(t){var e=this._size,i=this._displayables.barGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>e[0]||i[1]<0||i[1]>e[1])){var n=this._handleEnds,a=(n[0]+n[1])/2;this._updateInterval("all",i[0]-a),this._updateView(),this._dispatchZoomAction()}},_dispatchZoomAction:function(){var t=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,start:t[0],end:t[1]})},_findCoordRect:function(){var t;if(cH(this.getTargetCoordInfo(),(function(e){if(!t&&e.length){var i=e[0].model.coordinateSystem;t=i.getRect&&i.getRect()}})),!t){var e=this.api.getWidth(),i=this.api.getHeight();t={x:.2*e,y:.2*i,width:.6*e,height:.6*i}}return t}});function fH(t){return"vertical"===t?"ns-resize":"ew-resize"}$W.extend({type:"dataZoom.inside",defaultOption:{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,preventDefaultMouseMove:!0}});var gH={},mH=b,vH=yw,yH=Ed,xH=mH.curry,_H="\0_ec_dataZoom_roams";function bH(t){var e=t.getZr();return e[_H]||(e[_H]={})}function wH(t){mH.each(t,(function(e,i){e.count||(e.controller.dispose(),delete t[i])}))}function SH(t,e,i,n,a,o,r){IH(t,(function(s){return s.panGetRange(t.controller,e,i,n,a,o,r)}))}function MH(t,e,i,n){IH(t,(function(a){return a.zoomGetRange(t.controller,e,i,n)}))}function IH(t,e){var i=[];mH.each(t.dataZoomInfos,(function(t){var n=e(t);!t.disabled&&n&&i.push({dataZoomId:t.dataZoomId,start:n[0],end:n[1]})})),t.dispatchAction(i)}function AH(t,e){t.dispatchAction({type:"dataZoom",batch:e})}gH.register=function(t,e){var i=bH(t),n=e.dataZoomId,a=e.coordId;mH.each(i,(function(t,i){var o=t.dataZoomInfos;o[n]&&mH.indexOf(e.allCoordIds,a)<0&&(delete o[n],t.count--)})),wH(i);var o=i[a];o||((o=i[a]={coordId:a,dataZoomInfos:{},count:0}).controller=function(t,e){var i=new vH(t.getZr());return i.on("pan",xH(SH,e)),i.on("zoom",xH(MH,e)),i}(t,o),o.dispatchAction=mH.curry(AH,t)),!o.dataZoomInfos[n]&&o.count++,o.dataZoomInfos[n]=e;var r,s,l,h,u=(r=o.dataZoomInfos,l={},h={true:2,move:1,false:0,undefined:-1},mH.each(r,(function(t){var e=!t.disabled&&(!t.zoomLock||"move");h[e]>h[s]&&(s=e),mH.extend(l,t.roamControllerOpt)})),{controlType:s,opt:l});o.controller.enable(u.controlType,u.opt),o.controller.setPointerChecker(e.containsPoint),yH.createOrUpdate(o,"dispatchAction",e.throttleRate,"fixRate")},gH.unregister=function(t,e){var i=bH(t);mH.each(i,(function(t){t.controller.dispose();var i=t.dataZoomInfos;i[e]&&(delete i[e],t.count--)})),wH(i)},gH.shouldRecordRange=function(t,e){if(t&&"dataZoom"===t.type&&t.batch)for(var i=0,n=t.batch.length;i<n;i++)if(t.batch[i].dataZoomId===e)return!1;return!0},gH.generateCoordId=function(t){return t.type+"\0_"+t.id};var TH=b,CH=JW,LH=RC,DH=gH,PH=TH.bind,kH=CH.extend({type:"dataZoom.inside",init:function(t,e){this._range},render:function(t,e,i,n){kH.superApply(this,"render",arguments),DH.shouldRecordRange(n,t.id)&&(this._range=t.getPercentRange()),TH.each(this.getTargetCoordInfo(),(function(e,n){var a=TH.map(e,(function(t){return DH.generateCoordId(t.model)}));TH.each(e,(function(e){var o=e.model,r=t.option;DH.register(i,{coordId:DH.generateCoordId(o),allCoordIds:a,containsPoint:function(t,e,i){return o.coordinateSystem.containPoint([e,i])},dataZoomId:t.id,throttleRate:t.get("throttle",!0),panGetRange:PH(this._onPan,this,e,n),zoomGetRange:PH(this._onZoom,this,e,n),zoomLock:r.zoomLock,disabled:r.disabled,roamControllerOpt:{zoomOnMouseWheel:r.zoomOnMouseWheel,moveOnMouseMove:r.moveOnMouseMove,preventDefaultMouseMove:r.preventDefaultMouseMove}})}),this)}),this)},dispose:function(){DH.unregister(this.api,this.dataZoomModel.id),kH.superApply(this,"dispose",arguments),this._range=null},_onPan:function(t,e,i,n,a,o,r,s,l){var h=this._range.slice(),u=t.axisModels[0];if(u){var c=OH[e]([o,r],[s,l],u,i,t),d=c.signal*(h[1]-h[0])*c.pixel/c.pixelLength;return LH(d,h,[0,100],"all"),this._range=h}},_onZoom:function(t,e,i,n,a,o){var r=this._range.slice(),s=t.axisModels[0];if(s){var l=OH[e](null,[a,o],s,i,t),h=(l.signal>0?l.pixelStart+l.pixelLength-l.pixel:l.pixel-l.pixelStart)/l.pixelLength*(r[1]-r[0])+r[0];n=Math.max(1/n,0),r[0]=(r[0]-h)*n+h,r[1]=(r[1]-h)*n+h;var u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return LH(0,r,[0,100],0,u.minSpan,u.maxSpan),this._range=r}}}),OH={grid:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(r.pixel=e[0]-t[0],r.pixelLength=s.width,r.pixelStart=s.x,r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=s.height,r.pixelStart=s.y,r.signal=o.inverse?-1:1),r},polar:function(t,e,i,n,a){var o=i.axis,r={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),h=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===i.mainType?(r.pixel=e[0]-t[0],r.pixelLength=l[1]-l[0],r.pixelStart=l[0],r.signal=o.inverse?1:-1):(r.pixel=e[1]-t[1],r.pixelLength=h[1]-h[0],r.pixelStart=h[0],r.signal=o.inverse?-1:1),r},singleAxis:function(t,e,i,n,a){var o=i.axis,r=a.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=r.width,s.pixelStart=r.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=r.height,s.pixelStart=r.y,s.signal=o.inverse?-1:1),s}};function zH(t,e,i){i.getAxisProxy(t.name,e).reset(i)}function EH(t,e,i){i.getAxisProxy(t.name,e).filterData(i)}m.registerProcessor((function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis(zH),t.eachTargetAxis(EH)})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy(),i=e.getDataPercentWindow(),n=e.getDataValueWindow();t.setRawRange({start:i[0],end:i[1],startValue:n[0],endValue:n[1]},!0)}))}));var RH=b,NH=AW;m.registerAction("dataZoom",(function(t,e){var i=NH.createLinkedNodesFinder(RH.bind(e.eachComponent,e,"dataZoom"),NH.eachAxisDim,(function(t,e){return t.get(e.axisIndex)})),n=[];e.eachComponent({mainType:"dataZoom",query:t},(function(t,e){n.push.apply(n,i(t).nodes)})),RH.each(n,(function(e,i){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}));var VH=b,BH=VH.each;function GH(t,e){return t&&t.hasOwnProperty&&t.hasOwnProperty(e)}var WH=function(t){var e=t&&t.visualMap;VH.isArray(e)||(e=e?[e]:[]),BH(e,(function(t){if(t){GH(t,"splitList")&&!GH(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var e=t.pieces;e&&VH.isArray(e)&&BH(e,(function(t){VH.isObject(t)&&(GH(t,"start")&&!GH(t,"min")&&(t.min=t.start),GH(t,"end")&&!GH(t,"max")&&(t.max=t.end))}))}}))};Zu.registerSubTypeDefaulter("visualMap",(function(t){return t.categories||(t.pieces?t.pieces.length>0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"}));var HH=m,FH=b,ZH=FB,jH=cI;function UH(t,e,i,n){for(var a=e.targetVisuals[n],o=jH.prepareVisualTypes(a),r={color:t.getData().getVisual("color")},s=0,l=o.length;s<l;s++){var h=o[s],u=a["opacity"===h?"__alphaForOpacity":h];u&&u.applyVisual(i,c,d)}return r.color;function c(t){return r[t]}function d(t,e){r[t]=e}}HH.registerVisual(HH.PRIORITY.VISUAL.COMPONENT,(function(t){t.eachComponent("visualMap",(function(t){!function(t,e){t.eachTargetSeries((function(e){var i=e.getData();ZH.applyVisual(t.stateList,t.targetVisuals,i,t.getValueState,t,t.getDataDimension(i))}))}(t)})),function(t){t.eachSeries((function(e){var i=e.getData(),n=[];t.eachComponent("visualMap",(function(t){if(t.isTargetSeries(e)){var a=t.getVisualMeta(FH.bind(UH,null,e,t))||{stops:[],outerColors:[]};a.dimension=t.getDataDimension(i),n.push(a)}})),e.getData().setVisual("visualMeta",n)}))}(t)}));var qH=b,XH={get:function(t,e,i){var n=qH.clone((YH[t]||{})[e]);return i&&qH.isArray(n)?n[n.length-1]:n}},YH={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},$H=XH,KH=m,JH=b,QH=_,tF=$H,eF=cI,iF=FB,nF=uo,aF=po,oF=eF.mapVisual,rF=eF.eachVisual,sF=JH.isArray,lF=JH.each,hF=aF.asc,uF=aF.linearMap,cF=JH.noop,dF=["#f6efa6","#d88273","#bf444c"],pF=KH.extendComponentModel({type:"visualMap",dependencies:["series"],stateList:["inRange","outOfRange"],replacableOptionKeys:["inRange","outOfRange","target","controller","color"],dataBound:[-1/0,1/0],layoutMode:{type:"box",ignoreSize:!0},defaultOption:{show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,dimension:null,inRange:null,outOfRange:null,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,color:null,formatter:null,text:null,textStyle:{color:"#333"}},init:function(t,e,i){this._dataExtent,this.targetVisuals={},this.controllerVisuals={},this.textStyleModel,this.itemSize,this.mergeDefaultAndTheme(t,i)},optionUpdated:function(t,e){var i=this.option;QH.canvasSupported||(i.realtime=!1),!e&&iF.replaceVisualOption(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},resetVisual:function(t){var e=this.stateList;t=JH.bind(t,this),this.controllerVisuals=iF.createVisualMappings(this.option.controller,e,t),this.targetVisuals=iF.createVisualMappings(this.option.target,e,t)},getTargetSeriesIndices:function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,i){e.push(i)})):e=nF.normalizeToArray(t),e},eachTargetSeries:function(t,e){JH.each(this.getTargetSeriesIndices(),(function(i){t.call(e,this.ecModel.getSeriesByIndex(i))}),this)},isTargetSeries:function(t){var e=!1;return this.eachTargetSeries((function(i){i===t&&(e=!0)})),e},formatValueText:function(t,e,i){var n,a,o=this.option,r=o.precision,s=this.dataBound,l=o.formatter;return i=i||["<",">"],JH.isArray(t)&&(t=t.slice(),n=!0),a=e?t:n?[h(t[0]),h(t[1])]:h(t),JH.isString(l)?l.replace("{value}",n?a[0]:a).replace("{value2}",n?a[1]:a):JH.isFunction(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 h(t){return t===s[0]?"min":t===s[1]?"max":(+t).toFixed(Math.min(r,20))}},resetExtent:function(){var t=this.option,e=hF([t.min,t.max]);this._dataExtent=e},getDataDimension:function(t){var e=this.option.dimension;return null!=e?e:t.dimensions.length-1},getExtent:function(){return this._dataExtent.slice()},completeVisualOption:function(){var t=this.option,e={inRange:t.inRange,outOfRange:t.outOfRange},i=t.target||(t.target={}),n=t.controller||(t.controller={});JH.merge(i,e),JH.merge(n,e);var a=this.isCategory();function o(e){sF(t.color)&&!e.inRange&&(e.inRange={color:t.color.slice().reverse()}),e.inRange=e.inRange||{color:dF},lF(this.stateList,(function(t){var i=e[t];if(JH.isString(i)){var n=tF.get(i,"active",a);n?(e[t]={},e[t][i]=n):delete e[t]}}),this)}o.call(this,i),o.call(this,n),function(t,e,i){var n=t[e],o=t[i];n&&!o&&(o=t[i]={},lF(n,(function(t,e){if(eF.isValidType(e)){var i=tF.get(e,"inactive",a);null!=i&&(o[e]=i,"color"!==e||o.hasOwnProperty("opacity")||o.hasOwnProperty("colorAlpha")||(o.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,i=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,n=this.get("inactiveColor");lF(this.stateList,(function(o){var r=this.itemSize,s=t[o];s||(s=t[o]={color:a?n:[n]}),null==s.symbol&&(s.symbol=e&&JH.clone(e)||(a?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=i&&JH.clone(i)||(a?r[0]:[r[0],r[0]])),s.symbol=oF(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var h=-1/0;rF(l,(function(t){t>h&&(h=t)})),s.symbolSize=oF(l,(function(t){return uF(t,[0,h],[0,r[0]],!0)}))}}),this)}.call(this,n)},resetItemSize:function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},isCategory:function(){return!!this.option.categories},setSelected:cF,getValueState:cF,getVisualMeta:cF}),fF=pF,gF=b,mF=fF,vF=po,yF=[20,140],xF=mF.extend({type:"visualMap.continuous",defaultOption:{align:"auto",calculable:!1,range:null,realtime:!0,itemHeight:null,itemWidth:null,hoverLink:!0,hoverLinkDataSize:null,hoverLinkOnHandle:null},optionUpdated:function(t,e){xF.superApply(this,"optionUpdated",arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},resetItemSize:function(){xF.superApply(this,"resetItemSize",arguments);var t=this.itemSize;"horizontal"===this._orient&&t.reverse(),(null==t[0]||isNaN(t[0]))&&(t[0]=yF[0]),(null==t[1]||isNaN(t[1]))&&(t[1]=yF[1])},_resetRange:function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):gF.isArray(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},completeVisualOption:function(){mF.prototype.completeVisualOption.apply(this,arguments),gF.each(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=vF.asc((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]<t[0]&&(e[0]=t[0]),e[1]<t[0]&&(e[1]=t[0]),e},getValueState:function(t){var e=this.option.range,i=this.getExtent();return(e[0]<=i[0]||e[0]<=t)&&(e[1]>=i[1]||t<=e[1])?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){t[0]<=e&&e<=t[1]&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getVisualMeta:function(t){var e=_F(this,"outOfRange",this.getExtent()),i=_F(this,"inRange",this.option.range.slice()),n=[];function a(e,i){n.push({value:e,color:t(e,i)})}for(var o=0,r=0,s=i.length,l=e.length;r<l&&(!i.length||e[r]<=i[0]);r++)e[r]<i[o]&&a(e[r],"outOfRange");for(var h=1;o<s;o++,h=0)h&&n.length&&a(i[o],"outOfRange"),a(i[o],"inRange");for(h=1;r<l;r++)(!i.length||i[i.length-1]<e[r])&&(h&&(n.length&&a(n[n.length-1].value,"outOfRange"),h=0),a(e[r],"outOfRange"));var u=n.length;return{stops:n,outerColors:[u?n[0].color:"transparent",u?n[u-1].color:"transparent"]}}});function _F(t,e,i){if(i[0]===i[1])return i.slice();for(var n=(i[1]-i[0])/200,a=i[0],o=[],r=0;r<=200&&a<i[1];r++)o.push(a),a+=n;return o.push(i[1]),o}var bF=b,wF=Bo,SF=co,MF=wu,IF=cI,AF=m.extendComponentView({type:"visualMap",autoPositionValues:{left:1,right:1,top:1,bottom:1},init:function(t,e){this.ecModel=t,this.api=e,this.visualMapModel},render:function(t,e,i,n){this.visualMapModel=t,!1!==t.get("show")?this.doRender.apply(this,arguments):this.group.removeAll()},renderBackground:function(t){var e=this.visualMapModel,i=SF.normalizeCssArray(e.get("padding")||0),n=t.getBoundingRect();t.add(new wF.Rect({z2:-1,silent:!0,shape:{x:n.x-i[3],y:n.y-i[0],width:n.width+i[3]+i[1],height:n.height+i[0]+i[2]},style:{fill:e.get("backgroundColor"),stroke:e.get("borderColor"),lineWidth:e.get("borderWidth")}}))},getControllerVisual:function(t,e,i){var n=(i=i||{}).forceState,a=this.visualMapModel,o={};if("symbol"===e&&(o.symbol=a.get("itemSymbol")),"color"===e){var r=a.get("contentColor");o.color=r}function s(t){return o[t]}function l(t,e){o[t]=e}var h=a.controllerVisuals[n||a.getValueState(t)],u=IF.prepareVisualTypes(h);return bF.each(u,(function(n){var a=h[n];i.convertOpacityToAlpha&&"opacity"===n&&(n="colorAlpha",a=h.__alphaForOpacity),IF.dependsOn(n,e)&&a&&a.applyVisual(t,s,l)})),o[e]},positionGroup:function(t){var e=this.visualMapModel,i=this.api;MF.positionElement(t,e.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},doRender:bF.noop}),TF={},CF=b,LF=wu.getLayoutRect;TF.getItemAlign=function(t,e,i){var n=t.option,a=n.align;if(null!=a&&"auto"!==a)return a;for(var o={width:e.getWidth(),height:e.getHeight()},r="horizontal"===n.orient?1:0,s=[["left","right","width"],["top","bottom","height"]],l=s[r],h=[0,null,10],u={},c=0;c<3;c++)u[s[1-r][c]]=h[c],u[l[c]]=2===c?i[0]:n[l[c]];var d=[["x","width",3],["y","height",0]][r],p=LF(u,o,n.padding);return l[(p.margin[d[2]]||0)+p[d[0]]+.5*p[d[1]]<.5*o[d[1]]?0:1]},TF.convertDataIndex=function(t){return CF.each(t||[],(function(e){null!=t.dataIndex&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null)})),t};var DF=b,PF=Gl,kF=fa,OF=AF,zF=Bo,EF=RC,RF=TF,NF=uo,VF=po.linearMap,BF=DF.each,GF=Math.min,WF=Math.max,HF=OF.extend({type:"visualMap.continuous",init:function(){HF.superApply(this,"init",arguments),this._shapes={},this._dataInterval=[],this._handleEnds=[],this._orient,this._useHandle,this._hoverLinkDataIndices=[],this._dragging,this._hovering},doRender:function(t,e,i,n){n&&"selectDataRange"===n.type&&n.from===this.uid||this._buildView()},_buildView:function(){this.group.removeAll();var t=this.visualMapModel,e=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(e);var i=t.get("text");this._renderEndsText(e,i,0),this._renderEndsText(e,i,1),this._updateView(!0),this.renderBackground(e),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(e)},_renderEndsText:function(t,e,i){if(e){var n=e[1-i];n=null!=n?n+"":"";var a=this.visualMapModel,o=a.get("textGap"),r=a.itemSize,s=this._shapes.barGroup,l=this._applyTransform([r[0]/2,0===i?-o:r[1]+o],s),h=this._applyTransform(0===i?"bottom":"top",s),u=this._orient,c=this.visualMapModel.textStyleModel;this.group.add(new zF.Text({style:{x:l[0],y:l[1],textVerticalAlign:"horizontal"===u?"middle":h,textAlign:"horizontal"===u?h:"center",text:n,textFont:c.getFont(),textFill:c.getTextColor()}}))}},_renderBar:function(t){var e=this.visualMapModel,i=this._shapes,n=e.itemSize,a=this._orient,o=this._useHandle,r=RF.getItemAlign(e,this.api,n),s=i.barGroup=this._createBarGroup(r);s.add(i.outOfRange=FF()),s.add(i.inRange=FF(null,o?jF(this._orient):null,DF.bind(this._dragHandle,this,"all",!1),DF.bind(this._dragHandle,this,"all",!0)));var l=e.textStyleModel.getTextRect(""),h=WF(l.width,l.height);o&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(s,0,n,h,a,r),this._createHandle(s,1,n,h,a,r)),this._createIndicator(s,n,h,a),t.add(s)},_createHandle:function(t,e,i,n,a){var o=DF.bind(this._dragHandle,this,e,!1),r=DF.bind(this._dragHandle,this,e,!0),s=FF(function(t,e){return 0===t?[[0,0],[e,0],[e,-e]]:[[0,0],[e,0],[e,e]]}(e,n),jF(this._orient),o,r);s.position[0]=i[0],t.add(s);var l=this.visualMapModel.textStyleModel,h=new zF.Text({draggable:!0,drift:o,onmousemove:function(t){kF.stop(t.event)},ondragend:r,style:{x:0,y:0,text:"",textFont:l.getFont(),textFill:l.getTextColor()}});this.group.add(h);var u=["horizontal"===a?n/2:1.5*n,"horizontal"===a?0===e?-1.5*n:1.5*n:0===e?-n/2:n/2],c=this._shapes;c.handleThumbs[e]=s,c.handleLabelPoints[e]=u,c.handleLabels[e]=h},_createIndicator:function(t,e,i,n){var a=FF([[0,0]],"move");a.position[0]=e[0],a.attr({invisible:!0,silent:!0}),t.add(a);var o=this.visualMapModel.textStyleModel,r=new zF.Text({silent:!0,invisible:!0,style:{x:0,y:0,text:"",textFont:o.getFont(),textFill:o.getTextColor()}});this.group.add(r);var s=["horizontal"===n?i/2:9,0],l=this._shapes;l.indicator=a,l.indicatorLabel=r,l.indicatorLabelPoint=s},_dragHandle:function(t,e,i,n){if(this._useHandle){if(this._dragging=!e,!e){var a=this._applyTransform([i,n],this._shapes.barGroup,!0);this._updateInterval(t,a[1]),this._updateView()}e===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),e?!this._hovering&&this._clearHoverLinkToSeries():ZF(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},_resetInterval:function(){var t=this.visualMapModel,e=this._dataInterval=t.getSelected(),i=t.getExtent(),n=[0,t.itemSize[1]];this._handleEnds=[VF(e[0],i,n,!0),VF(e[1],i,n,!0)]},_updateInterval:function(t,e){e=e||0;var i=this.visualMapModel,n=this._handleEnds,a=[0,i.itemSize[1]];EF(e,n,a,t,0);var o=i.getExtent();this._dataInterval=[VF(n[0],a,o,!0),VF(n[1],a,o,!0)]},_updateView:function(t){var e=this.visualMapModel,i=e.getExtent(),n=this._shapes,a=[0,e.itemSize[1]],o=t?a:this._handleEnds,r=this._createBarVisual(this._dataInterval,i,o,"inRange"),s=this._createBarVisual(i,i,a,"outOfRange");n.inRange.setStyle({fill:r.barColor,opacity:r.opacity}).setShape("points",r.barPoints),n.outOfRange.setStyle({fill:s.barColor,opacity:s.opacity}).setShape("points",s.barPoints),this._updateHandle(o,r)},_createBarVisual:function(t,e,i,n){var a={forceState:n,convertOpacityToAlpha:!0},o=this._makeColorGradient(t,a),r=[this.getControllerVisual(t[0],"symbolSize",a),this.getControllerVisual(t[1],"symbolSize",a)],s=this._createBarPoints(i,r);return{barColor:new PF(0,0,0,1,o),barPoints:s,handlesColor:[o[0].color,o[o.length-1].color]}},_makeColorGradient:function(t,e){var i=[],n=(t[1]-t[0])/100;i.push({color:this.getControllerVisual(t[0],"color",e),offset:0});for(var a=1;a<100;a++){var o=t[0]+n*a;if(o>t[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 zF.Group("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(t,e){if(this._useHandle){var i=this._shapes,n=this.visualMapModel,a=i.handleThumbs,o=i.handleLabels;BF([0,1],(function(r){var s=a[r];s.setStyle("fill",e.handlesColor[r]),s.position[1]=t[r];var l=zF.applyTransform(i.handleLabelPoints[r],zF.getTransform(s,this.group));o[r].setStyle({x:l[0],y:l[1],text:n.formatValueText(this._dataInterval[r]),textVerticalAlign:"middle",textAlign:this._applyTransform("horizontal"===this._orient?0===r?"bottom":"top":"left",i.barGroup)})}),this)}},_showIndicator:function(t,e,i,n){var a=this.visualMapModel,o=a.getExtent(),r=a.itemSize,s=[0,r[1]],l=VF(t,o,s,!0),h=this._shapes,u=h.indicator;if(u){u.position[1]=l,u.attr("invisible",!1),u.setShape("points",function(t,e,i,n){return t?[[0,-GF(e,WF(i,0))],[6,0],[0,GF(e,WF(n-i,0))]]:[[0,0],[5,-5],[5,5]]}(!!i,n,l,r[1]));var c=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0});u.setStyle("fill",c);var d=zF.applyTransform(h.indicatorLabelPoint,zF.getTransform(u,this.group)),p=h.indicatorLabel;p.attr("invisible",!1);var f=this._applyTransform("left",h.barGroup),g=this._orient;p.setStyle({text:(i||"")+a.formatValueText(e),textVerticalAlign:"horizontal"===g?f:"middle",textAlign:"horizontal"===g?"center":f,x:d[0],y:d[1]})}},_enableHoverLinkToSeries:function(){var t=this;this._shapes.barGroup.on("mousemove",(function(e){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,n=t._applyTransform([e.offsetX,e.offsetY],t._shapes.barGroup,!0,!0);n[1]=GF(WF(0,n[1]),i[1]),t._doHoverLinkToSeries(n[1],0<=n[0]&&n[0]<=i[0])}})).on("mouseout",(function(){t._hovering=!1,!t._dragging&&t._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=GF(WF(a[0],t),a[1]);var r=function(t,e,i){var n=6,a=t.get("hoverLinkDataSize");a&&(n=VF(a,e,i,!0)/2);return n}(i,o,a),s=[t-r,t+r],l=VF(t,a,o,!0),h=[VF(s[0],a,o,!0),VF(s[1],a,o,!0)];s[0]<a[0]&&(h[0]=-1/0),s[1]>a[1]&&(h[1]=1/0),e&&(h[0]===-1/0?this._showIndicator(l,h[1],"< ",r):h[1]===1/0?this._showIndicator(l,h[0],"> ",r):this._showIndicator(l,l," ",r));var u=this._hoverLinkDataIndices,c=[];(e||ZF(i))&&(c=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var d=NF.compressBatches(u,c);this._dispatchHighDown("downplay",RF.convertDataIndex(d[0])),this._dispatchHighDown("highlight",RF.convertDataIndex(d[1]))}},_hoverLinkFromSeriesMouseOver:function(t){var e=t.target,i=this.visualMapModel;if(e&&null!=e.dataIndex){var n=this.ecModel.getSeriesByIndex(e.seriesIndex);if(i.isTargetSeries(n)){var a=n.getData(e.dataType),o=a.getDimension(i.getDataDimension(a)),r=a.get(o,e.dataIndex,!0);isNaN(r)||this._showIndicator(r,r)}}},_hideIndicator:function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0)},_clearHoverLinkToSeries:function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",RF.convertDataIndex(t)),t.length=0},_clearHoverLinkFromSeries:function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},_applyTransform:function(t,e,i,n){var a=zF.getTransform(e,n?null:this.group);return zF[DF.isArray(t)?"applyTransform":"transformDirection"](t,a,i)},_dispatchHighDown:function(t,e){e&&e.length&&this.api.dispatchAction({type:t,batch:e})},dispose:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},remove:function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()}});function FF(t,e,i,n){return new zF.Polygon({shape:{points:t},draggable:!!i,cursor:e,drift:i,onmousemove:function(t){kF.stop(t.event)},ondragend:n})}function ZF(t){var e=t.get("hoverLinkOnHandle");return!!(null==e?t.get("realtime"):e)}function jF(t){return"vertical"===t?"ns-resize":"ew-resize"}m.registerAction({type:"selectDataRange",event:"dataRangeSelected",update:"update"},(function(t,e){e.eachComponent({mainType:"visualMap",query:t},(function(e){e.setSelected(t.selected)}))})),m.registerPreprocessor(WH);var UF=b,qF=fF,XF=cI,YF=$H,$F=po.reformIntervals,KF=qF.extend({type:"visualMap.piecewise",defaultOption:{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieceList:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0,showLabel:null},optionUpdated:function(t,e){KF.superApply(this,"optionUpdated",arguments),this._pieceList=[],this.resetExtent();var i=this._mode=this._determineMode();JF[this._mode].call(this),this._resetSelected(t,e);var n=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=UF.clone(n)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=UF.map(this._pieceList,(function(t){t=UF.clone(t);return"inRange"!==e&&(t.visual=null),t})))}))},completeVisualOption:function(){var t=this.option,e={},i=XF.listVisualTypes(),n=this.isCategory();function a(t,e,i){return t&&t[e]&&(UF.isObject(t[e])?t[e].hasOwnProperty(i):t[e]===i)}UF.each(t.pieces,(function(t){UF.each(i,(function(i){t.hasOwnProperty(i)&&(e[i]=1)}))})),UF.each(e,(function(e,i){var o=0;UF.each(this.stateList,(function(e){o|=a(t,e,i)||a(t.target,e,i)}),this),!o&&UF.each(this.stateList,(function(e){(t[e]||(t[e]={}))[i]=YF.get(i,"inRange"===e?"active":"inactive",n)}))}),this),qF.prototype.completeVisualOption.apply(this,arguments)},_resetSelected:function(t,e){var i=this.option,n=this._pieceList,a=(e?i:t).selected||{};if(i.selected=a,UF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a.hasOwnProperty(i)||(a[i]=!0)}),this),"single"===i.selectedMode){var o=!1;UF.each(n,(function(t,e){var i=this.getSelectedMapKey(t);a[i]&&(o?a[i]=!1:o=!0)}),this)}},getSelectedMapKey:function(t){return"categories"===this._mode?t.value+"":t.index+""},getPieceList:function(){return this._pieceList},_determineMode:function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},setSelected:function(t){this.option.selected=UF.clone(t)},getValueState:function(t){var e=XF.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},findTargetDataIndices:function(t){var e=[];return this.eachTargetSeries((function(i){var n=[],a=i.getData();a.each(this.getDataDimension(a),(function(e,i){XF.findPieceIndex(e,this._pieceList)===t&&n.push(i)}),!0,this),e.push({seriesId:i.id,dataIndex:n})}),this),e},getRepresentValue:function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var i=t.interval||[];e=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return e},getVisualMeta:function(t){if(!this.isCategory()){var e=[],i=[],n=this,a=this._pieceList.slice();if(a.length){var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),(o=a[a.length-1].interval[1])!==1/0&&a.push({interval:[o,1/0]})}else a.push({interval:[-1/0,1/0]});var r=-1/0;return UF.each(a,(function(t){var e=t.interval;e&&(e[0]>r&&s([r,e[0]],"outOfRange"),s(e.slice()),r=e[1])}),this),{stops:e,outerColors:i}}function s(a,o){var r=n.getRepresentValue({interval:a});o||(o=n.getValueState(r));var s=t(r,o);a[0]===-1/0?i[0]=s:a[1]===1/0?i[1]=s:e.push({value:a[0],color:s},{value:a[1],color:s})}}}),JF={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<l;s+=o){var h=r===a-1?n[1]:s+o;e.push({index:r++,interval:[s,h],close:[1,1]})}t.maxOpen&&e.push({index:r++,interval:[n[1],1/0],close:[0,0]}),$F(e),UF.each(e,(function(t){t.text=this.formatValueText(t.interval)}),this)},categories:function(){var t=this.option;UF.each(t.categories,(function(t){this._pieceList.push({text:this.formatValueText(t,!0),value:t})}),this),QF(t,this._pieceList)},pieces:function(){var t=this.option,e=this._pieceList;UF.each(t.pieces,(function(t,i){UF.isObject(t)||(t={value:t});var n={text:"",index:i};if(null!=t.label&&(n.text=t.label),t.hasOwnProperty("value")){var a=n.value=t.value;n.interval=[a,a],n.close=[1,1]}else{for(var o=n.interval=[],r=n.close=[0,0],s=[1,0,1],l=[-1/0,1/0],h=[],u=0;u<2;u++){for(var c=[["gte","gt","min"],["lte","lt","max"]][u],d=0;d<3&&null==o[u];d++)o[u]=t[c[d]],r[u]=s[d],h[u]=2===d;null==o[u]&&(o[u]=l[u])}h[0]&&o[1]===1/0&&(r[0]=0),h[1]&&o[0]===-1/0&&(r[1]=0),o[0]===o[1]&&r[0]&&r[1]&&(n.value=o[0])}n.visual=XF.retrieveVisuals(t),e.push(n)}),this),QF(t,e),$F(e),UF.each(e,(function(t){var e=t.close,i=[["<",""][e[1]],[">",""][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,i)}),this)}};function QF(t,e){var i=t.inverse;("vertical"===t.orient?!i:i)&&e.reverse()}var tZ=b,eZ=AF,iZ=Bo,nZ=Hf.createSymbol,aZ=wu,oZ=TF;eZ.extend({type:"visualMap.piecewise",doRender:function(){var t=this.group;t.removeAll();var e=this.visualMapModel,i=e.get("textGap"),n=e.textStyleModel,a=n.getFont(),o=n.getTextColor(),r=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),h=l.endsText,u=tZ.retrieve(e.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],s,u,r),tZ.each(l.viewPieceList,(function(n){var l=n.piece,h=new iZ.Group;h.onclick=tZ.bind(this._onItemClick,this,l),this._enableHoverLink(h,n.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(h,c,[0,0,s[0],s[1]]),u){var d=this.visualMapModel.getValueState(c);h.add(new iZ.Text({style:{x:"right"===r?-i:s[0]+i,y:s[1]/2,text:l.text,textVerticalAlign:"middle",textAlign:r,textFont:a,textFill:o,opacity:"outOfRange"===d?.5:1}}))}t.add(h)}),this),h&&this._renderEndsText(t,h[1],s,u,r),aZ.box(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},_enableHoverLink:function(t,e){function i(t){var i=this.visualMapModel;i.option.hoverLink&&this.api.dispatchAction({type:t,batch:oZ.convertDataIndex(i.findTargetDataIndices(e))})}t.on("mouseover",tZ.bind(i,this,"highlight")).on("mouseout",tZ.bind(i,this,"downplay"))},_getItemAlign:function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return oZ.getItemAlign(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 iZ.Group,r=this.visualMapModel.textStyleModel;o.add(new iZ.Text({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=tZ.map(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(nZ(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=tZ.clone(i.selected),a=e.getSelectedMapKey(t);"single"===i.selectedMode?(n[a]=!0,tZ.each(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})}}),m.registerPreprocessor(WH);var rZ=m,sZ=b,lZ=_,hZ=uo,uZ=co,cZ=uZ.addCommas,dZ=uZ.encodeHTML;function pZ(t){hZ.defaultEmphasis(t.label,["show"])}var fZ=rZ.extendComponentModel({type:"marker",dependencies:["series","grid","polar","geo"],init:function(t,e,i,n){this.mergeDefaultAndTheme(t,i),this.mergeOption(t,i,n.createdBySelf,!0)},isAnimationEnabled:function(){if(lZ.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},mergeOption:function(t,e,i,n){var a=this.constructor,o=this.mainType+"Model";i||e.eachSeries((function(t){var i=t.get(this.mainType),r=t[o];i&&i.data?(r?r.mergeOption(i,e,!0):(n&&pZ(i),sZ.each(i.data,(function(t){t instanceof Array?(pZ(t[0]),pZ(t[1])):pZ(t)})),r=new a(i,this,e),sZ.extend(r,{mainType:this.mainType,seriesIndex:t.seriesIndex,name:t.name,createdBySelf:!0}),r.__hostSeries=t),t[o]=r):t[o]=null}),this)},formatTooltip:function(t){var e=this.getData(),i=this.getRawValue(t),n=sZ.isArray(i)?sZ.map(i,cZ).join(", "):cZ(i),a=e.getName(t),o=dZ(this.name);return(null!=i||a)&&(o+="<br />"),a&&(o+=dZ(a),null!=i&&(o+=" : ")),null!=i&&(o+=dZ(n)),o},getData:function(){return this._data},setData:function(t){this._data=t}});sZ.mixin(fZ,hZ.dataFormatMixin);var gZ=fZ;gZ.extend({type:"markPoint",defaultOption:{zlevel:0,z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"inside"},emphasis:{show:!0}},itemStyle:{normal:{borderWidth:2}}}});var mZ={},vZ=b,yZ=po,xZ=vZ.indexOf;function _Z(t,e,i,n,a,o){var r=[],s=MZ(e,n,t),l=e.indicesOfNearest(n,s,!0)[0];r[a]=e.get(i,l,!0),r[o]=e.get(n,l,!0);var h=function(t,e,i){var n=-1;do{n=Math.max(yZ.getPrecision(t.get(e,i)),n),t=t.stackedOn}while(t);return n}(e,n,l);return(h=Math.min(h,20))>=0&&(r[o]=+r[o].toFixed(h)),r}var bZ=vZ.curry,wZ={min:bZ(_Z,"min"),max:bZ(_Z,"max"),average:bZ(_Z,"average")};function SZ(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(n.dataDimToCoordDim(a.valueDataDim)),a.baseAxis=i.getOtherAxis(a.valueAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0]):(a.baseAxis=n.getBaseAxis(),a.valueAxis=i.getOtherAxis(a.baseAxis),a.baseDataDim=n.coordDimToDataDim(a.baseAxis.dim)[0],a.valueDataDim=n.coordDimToDataDim(a.valueAxis.dim)[0]),a}function MZ(t,e,i){if("average"===i){var n=0,a=0;return t.each(e,(function(t,e){isNaN(t)||(n+=t,a++)}),!0),n/a}return t.getDataExtent(e,!0)["max"===i?1:0]}mZ.dataTransform=function(t,e){var i=t.getData(),n=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!vZ.isArray(e.coord)&&n){var a=n.dimensions,o=SZ(e,i,n,t);if((e=vZ.clone(e)).type&&wZ[e.type]&&o.baseAxis&&o.valueAxis){var r=xZ(a,o.baseAxis.dim),s=xZ(a,o.valueAxis.dim);e.coord=wZ[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],h=0;h<2;h++)if(wZ[l[h]]){var u=t.coordDimToDataDim(a[h])[0];l[h]=MZ(i,u,l[h])}e.coord=l}}return e},mZ.getAxisInfo=SZ,mZ.dataFilter=function(t,e){return!(t&&t.containData&&e.coord&&!function(t){return!(isNaN(parseFloat(t.x))&&isNaN(parseFloat(t.y)))}(e))||t.containData(e.coord)},mZ.dimValueGetter=function(t,e,i,n){return n<2?t.coord&&t.coord[n]:t.value},mZ.numCalculate=MZ;var IZ=b,AZ=m.extendComponentView({type:"marker",init:function(){this.markerGroupMap=IZ.createHashMap()},render:function(t,e,i){var n=this.markerGroupMap;n.each((function(t){t.__keep=!1}));var a=this.type+"Model";e.eachSeries((function(t){var n=t[a];n&&this.renderSeries(t,n,e,i)}),this),n.each((function(t){!t.__keep&&this.group.remove(t.group)}),this)},renderSeries:function(){}}),TZ=b,CZ=pm,LZ=po,DZ=dp,PZ=mZ;function kZ(t,e,i){var n=e.coordinateSystem;t.each((function(a){var o,r=t.getItemModel(a),s=LZ.parsePercent(r.get("x"),i.getWidth()),l=LZ.parsePercent(r.get("y"),i.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,a));else if(n){var h=t.get(n.dimensions[0],a),u=t.get(n.dimensions[1],a);o=n.dataToPoint([h,u])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(a,o)}))}AZ.extend({type:"markPoint",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markPointModel;e&&(kZ(e.getData(),t,i),this.markerGroupMap.get(t.id).updateLayout(e))}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new CZ),h=function(t,e,i){var n;n=t?TZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new DZ(n,i),o=TZ.map(i.get("data"),TZ.curry(PZ.dataTransform,e));t&&(o=TZ.filter(o,TZ.curry(PZ.dataFilter,t)));return a.initData(o,null,t?PZ.dimValueGetter:function(t){return t.value}),a}(a,t,e);e.setData(h),kZ(e.getData(),t,n),h.each((function(t){var i=h.getItemModel(t),n=i.getShallow("symbolSize");"function"==typeof n&&(n=n(e.getRawValue(t),e.getDataParams(t))),h.setItemVisual(t,{symbolSize:n,color:i.get("itemStyle.normal.color")||r.getVisual("color"),symbol:i.getShallow("symbol")})})),l.updateData(h),this.group.add(l.group),h.eachItemGraphicEl((function(t){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markPoint=t.markPoint||{}})),gZ.extend({type:"markLine",defaultOption:{zlevel:0,z:5,symbol:["circle","arrow"],symbolSize:[8,16],precision:2,tooltip:{trigger:"item"},label:{normal:{show:!0,position:"end"},emphasis:{show:!0}},lineStyle:{normal:{type:"dashed"},emphasis:{width:3}},animationEasing:"linear"}});var OZ=b,zZ=dp,EZ=po,RZ=mZ,NZ=BA,VZ=function(t,e,i,n){var a=t.getData(),o=n.type;if(!OZ.isArray(n)&&("min"===o||"max"===o||"average"===o||null!=n.xAxis||null!=n.yAxis)){var r,s;if(null!=n.yAxis||null!=n.xAxis)r=null!=n.yAxis?"y":"x",e.getAxis(r),s=OZ.retrieve(n.yAxis,n.xAxis);else{var l=RZ.getAxisInfo(n,a,e,t);r=l.valueDataDim,l.valueAxis,s=RZ.numCalculate(a,r,o)}var h="x"===r?0:1,u=1-h,c=OZ.clone(n),d={};c.type=null,c.coord=[],d.coord=[],c.coord[u]=-1/0,d.coord[u]=1/0;var p=i.get("precision");p>=0&&"number"==typeof s&&(s=+s.toFixed(Math.min(p,20))),c.coord[h]=d.coord[h]=s,n=[c,d,{type:o,valueIndex:n.valueIndex,value:s}]}return(n=[RZ.dataTransform(t,n[0]),RZ.dataTransform(t,n[1]),OZ.extend({},n[2])])[2].type=n[2].type||"",OZ.merge(n[2],n[0]),OZ.merge(n[2],n[1]),n};function BZ(t){return!isNaN(t)&&!isFinite(t)}function GZ(t,e,i,n){var a=1-t,o=n.dimensions[t];return BZ(e[a])&&BZ(i[a])&&e[t]===i[t]&&n.getAxis(o).containData(e[t])}function WZ(t,e){if("cartesian2d"===t.type){var i=e[0].coord,n=e[1].coord;if(i&&n&&(GZ(1,i,n,t)||GZ(0,i,n,t)))return!0}return RZ.dataFilter(t,e[0])&&RZ.dataFilter(t,e[1])}function HZ(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=EZ.parsePercent(s.get("x"),a.getWidth()),h=EZ.parsePercent(s.get("y"),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(t.dimensions,e));else{var u=r.dimensions,c=t.get(u[0],e),d=t.get(u[1],e);o=r.dataToPoint([c,d])}if("cartesian2d"===r.type){var p=r.getAxis("x"),f=r.getAxis("y");u=r.dimensions;BZ(t.get(u[0],e))?o[0]=p.toGlobalCoord(p.getExtent()[i?0:1]):BZ(t.get(u[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[i?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];t.setItemLayout(e,o)}AZ.extend({type:"markLine",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markLineModel;if(e){var n=e.getData(),a=e.__from,o=e.__to;a.each((function(e){HZ(a,e,!0,t,i),HZ(o,e,!1,t,i)})),n.each((function(t){n.setItemLayout(t,[a.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.id,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new NZ);this.group.add(l.group);var h=function(t,e,i){var n;n=t?OZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})):[{name:"value",type:"float"}];var a=new zZ(n,i),o=new zZ(n,i),r=new zZ([],i),s=OZ.map(i.get("data"),OZ.curry(VZ,e,t,i));t&&(s=OZ.filter(s,OZ.curry(WZ,t)));var l=t?RZ.dimValueGetter:function(t){return t.value};return a.initData(OZ.map(s,(function(t){return t[0]})),null,l),o.initData(OZ.map(s,(function(t){return t[1]})),null,l),r.initData(OZ.map(s,(function(t){return t[2]}))),r.hasItemOption=!0,{from:a,to:o,line:r}}(a,t,e),u=h.from,c=h.to,d=h.line;e.__from=u,e.__to=c,e.setData(d);var p=e.get("symbol"),f=e.get("symbolSize");function g(e,i,a){var o=e.getItemModel(i);HZ(e,i,a,t,n),e.setItemVisual(i,{symbolSize:o.get("symbolSize")||f[a?0:1],symbol:o.get("symbol",!0)||p[a?0:1],color:o.get("itemStyle.normal.color")||r.getVisual("color")})}OZ.isArray(p)||(p=[p,p]),"number"==typeof f&&(f=[f,f]),h.from.each((function(t){g(u,t,!0),g(c,t,!1)})),d.each((function(t){var e=d.getItemModel(t).get("lineStyle.normal.color");d.setItemVisual(t,{color:e||u.getItemVisual(t,"color")}),d.setItemLayout(t,[u.getItemLayout(t),c.getItemLayout(t)]),d.setItemVisual(t,{fromSymbolSize:u.getItemVisual(t,"symbolSize"),fromSymbol:u.getItemVisual(t,"symbol"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol")})})),l.updateData(d),h.line.eachItemGraphicEl((function(t,i){t.traverse((function(t){t.dataModel=e}))})),l.__keep=!0,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markLine=t.markLine||{}})),gZ.extend({type:"markArea",defaultOption:{zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{normal:{show:!0,position:"top"},emphasis:{show:!0,position:"top"}},itemStyle:{normal:{borderWidth:0}}}});var FZ=b,ZZ=Pt,jZ=dp,UZ=po,qZ=Bo,XZ=mZ,YZ=function(t,e,i,n){var a=XZ.dataTransform(t,n[0]),o=XZ.dataTransform(t,n[1]),r=FZ.retrieve,s=a.coord,l=o.coord;s[0]=r(s[0],-1/0),s[1]=r(s[1],-1/0),l[0]=r(l[0],1/0),l[1]=r(l[1],1/0);var h=FZ.mergeAll([{},a,o]);return h.coord=[a.coord,o.coord],h.x0=a.x,h.y0=a.y,h.x1=o.x,h.y1=o.y,h};function $Z(t){return!isNaN(t)&&!isFinite(t)}function KZ(t,e,i,n){var a=1-t;return $Z(e[a])&&$Z(i[a])}function JZ(t,e){var i=e.coord[0],n=e.coord[1];return!("cartesian2d"!==t.type||!i||!n||!KZ(1,i,n)&&!KZ(0,i,n))||(XZ.dataFilter(t,{coord:i,x:e.x0,y:e.y0})||XZ.dataFilter(t,{coord:n,x:e.x1,y:e.y1}))}function QZ(t,e,i,n,a){var o,r=n.coordinateSystem,s=t.getItemModel(e),l=UZ.parsePercent(s.get(i[0]),a.getWidth()),h=UZ.parsePercent(s.get(i[1]),a.getHeight());if(isNaN(l)||isNaN(h)){if(n.getMarkerPosition)o=n.getMarkerPosition(t.getValues(i,e));else{var u=t.get(i[0],e),c=t.get(i[1],e);o=r.dataToPoint([u,c],!0)}if("cartesian2d"===r.type){var d=r.getAxis("x"),p=r.getAxis("y");u=t.get(i[0],e),c=t.get(i[1],e);$Z(u)?o[0]=d.toGlobalCoord(d.getExtent()["x0"===i[0]?0:1]):$Z(c)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===i[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(h)||(o[1]=h)}else o=[l,h];return o}var tj=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]];AZ.extend({type:"markArea",updateLayout:function(t,e,i){e.eachSeries((function(t){var e=t.markAreaModel;if(e){var n=e.getData();n.each((function(e){var a=FZ.map(tj,(function(a){return QZ(n,e,a,t,i)}));n.setItemLayout(e,a),n.getItemGraphicEl(e).setShape("points",a)}))}}),this)},renderSeries:function(t,e,i,n){var a=t.coordinateSystem,o=t.name,r=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new qZ.Group});this.group.add(l.group),l.__keep=!0;var h=function(t,e,i){var n,a,o=["x0","y0","x1","y1"];t?(n=FZ.map(t&&t.dimensions,(function(t){var i=e.getData().getDimensionInfo(e.coordDimToDataDim(t)[0])||{};return i.name=t,i})),a=new jZ(FZ.map(o,(function(t,e){return{name:t,type:n[e%2].type}})),i)):a=new jZ(n=[{name:"value",type:"float"}],i);var r=FZ.map(i.get("data"),FZ.curry(YZ,e,t,i));t&&(r=FZ.filter(r,FZ.curry(JZ,t)));var s=t?function(t,e,i,n){return t.coord[Math.floor(n/2)][n%2]}:function(t){return t.value};return a.initData(r,null,s),a.hasItemOption=!0,a}(a,t,e);e.setData(h),h.each((function(e){h.setItemLayout(e,FZ.map(tj,(function(i){return QZ(h,e,i,t,n)}))),h.setItemVisual(e,{color:r.getVisual("color")})})),h.diff(l.__data).add((function(t){var e=new qZ.Polygon({shape:{points:h.getItemLayout(t)}});h.setItemGraphicEl(t,e),l.group.add(e)})).update((function(t,i){var n=l.__data.getItemGraphicEl(i);qZ.updateProps(n,{shape:{points:h.getItemLayout(t)}},e,t),l.group.add(n),h.setItemGraphicEl(t,n)})).remove((function(t){var e=l.__data.getItemGraphicEl(t);l.group.remove(e)})).execute(),h.eachItemGraphicEl((function(t,i){var n=h.getItemModel(i),a=n.getModel("label.normal"),o=n.getModel("label.emphasis"),r=h.getItemVisual(i,"color");t.useStyle(FZ.defaults(n.getModel("itemStyle.normal").getItemStyle(),{fill:ZZ.modifyAlpha(r,.4),stroke:r})),t.hoverStyle=n.getModel("itemStyle.emphasis").getItemStyle(),qZ.setLabelStyle(t.style,t.hoverStyle,a,o,{labelFetcher:e,labelDataIndex:i,defaultText:h.getName(i)||"",isRectText:!0,autoColor:r}),qZ.setHoverStyle(t,{}),t.dataModel=e})),l.__data=h,l.group.silent=e.get("silent")||t.get("silent")}}),m.registerPreprocessor((function(t){t.markArea=t.markArea||{}}));var ej=b;function ij(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};ej.each(n,(function(t,e){o[e]||nj(a,e)||(a[e]=t)})),i.label&&!nj(n,"emphasis")&&(n.emphasis=i.label,delete i.label)}function nj(t,e){return t.hasOwnProperty(e)}var aj=function(t){var e=t&&t.timeline;ej.isArray(e)||(e=e?[e]:[]),ej.each(e,(function(t){t&&function(t){var e=t.type,i={number:"value",time:"time"};i[e]&&(t.axisType=i[e],delete t.type);if(ij(t),nj(t,"controlPosition")){var n=t.controlStyle||(t.controlStyle={});nj(n,"position")||(n.position=t.controlPosition),"none"!==n.position||nj(n,"show")||(n.show=!1,delete n.position),delete t.controlPosition}ej.each(t.data||[],(function(t){ej.isObject(t)&&!ej.isArray(t)&&(!nj(t,"value")&&nj(t,"name")&&(t.value=t.name),ij(t))}))}(t)}))};Zu.registerSubTypeDefaulter("timeline",(function(){return"slider"}));var oj=m,rj=b;oj.registerAction({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"),rj.defaults({currentIndex:i.option.currentIndex},t)})),oj.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},(function(t,e){var i=e.getComponent("timeline");i&&null!=t.playState&&i.setPlayState(t.playState)}));var sj=b,lj=dp,hj=uo,uj=Zu.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:{normal:{},emphasis:{}},label:{normal:{color:"#000"},emphasis:{}},data:[]},init:function(t,e,i){this._data,this._names,this.mergeDefaultAndTheme(t,i),this._initData()},mergeOption:function(t){uj.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:(t>=e&&(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,n=this._names=[];if("category"===i){var a=[];sj.each(e,(function(t,e){var i,o=hj.getDataItemValue(t);sj.isObject(t)?(i=sj.clone(t)).value=e:i=e,a.push(i),sj.isString(o)||null!=o&&!isNaN(o)||(o=""),n.push(o+"")})),e=a}var o={category:"ordinal",time:"time"}[i]||"number";(this._data=new lj([{name:"value",type:o}],this)).initData(e,n)},getData:function(){return this._data},getCategories:function(){if("category"===this.get("axisType"))return this._names.slice()}}),cj=b,dj=uo,pj=uj.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",normal:{show:!0,interval:"auto",rotate:0,color:"#304654"},emphasis:{show:!0,color:"#c23531"}},itemStyle:{normal:{color:"#304654",borderWidth:1},emphasis:{color:"#c23531"}},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",normal:{color:"#304654",borderColor:"#304654",borderWidth:1},emphasis:{color:"#c23531",borderColor:"#c23531",borderWidth:2}},data:[]}});cj.mixin(pj,dj.dataFormatMixin);var fj=Md.extend({type:"timeline"}),gj=b,mj=gg,vj=Rp,yj=function(t,e,i,n){mj.call(this,t,e,i),this.type=n||"value",this._autoLabelInterval,this.model=null};yj.prototype={constructor:yj,getLabelInterval:function(){var t,e=this.model,i=e.getModel("label.normal");return null!=(t=i.get("interval"))&&"auto"!=t||(t=this._autoLabelInterval)||(t=this._autoLabelInterval=vj.getAxisLabelInterval(gj.map(this.scale.getTicks(),this.dataToCoord,this),vj.getFormattedLabels(this,i.get("formatter")),i.getFont(),"horizontal"===e.get("orient")?0:90,i.get("rotate"))),t},isLabelIgnored:function(t){if("category"===this.type){var e=this.getLabelInterval();return"function"==typeof e&&!e(t,this.scale.getLabel(t))||t%(e+1)}}},gj.inherits(yj,mj);var xj=b,_j=Je,bj=mt,wj=Bo,Sj=wu,Mj=fj,Ij=yj,Aj=Hf.createSymbol,Tj=Rp,Cj=po,Lj=co.encodeHTML,Dj=xj.bind,Pj=xj.each,kj=Math.PI;function Oj(t,e,i,n,a,o){var r=e.get("color");if(a)a.setColor(r),i.add(a),o&&o.onUpdate(a);else{var s=t.get("symbol");(a=Aj(s,-1,-1,2,2,r)).setStyle("strokeNoScale",!0),i.add(a),o&&o.onCreate(a)}var l=e.getItemStyle(["color","symbol","symbolSize"]);a.setStyle(l),n=xj.merge({rectHover:!0,z2:100},n,!0);var h=t.get("symbolSize");(h=h instanceof Array?h.slice():[+h,+h])[0]/=2,h[1]/=2,n.scale=h;var u=t.get("symbolOffset");if(u){var c=n.position=n.position||[0,0];c[0]+=Cj.parsePercent(u[0],h[0]),c[1]+=Cj.parsePercent(u[1],h[1])}var d=t.get("symbolRotate");return n.rotation=(d||0)*Math.PI/180||0,a.attr(n),a.updateTransform(),a}function zj(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)))}}Mj.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(t,e,i,n){if(this.model=t,this.api=i,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("mainGroup"),r=this._createGroup("labelGroup"),s=this._axis=this._createAxis(a,t);t.formatTooltip=function(t){return Lj(s.scale.getLabel(t))},Pj(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](a,o,s,t)}),this),this._renderAxisLabel(a,r,s,t),this._position(a,t)}this._doPlayStop()},remove:function(){this._clearTimer(),this.group.removeAll()},dispose:function(){this._clearTimer()},_layout:function(t,e){var i=t.get("label.normal.position"),n=t.get("orient"),a=function(t,e){return Sj.getLayoutRect(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e);null==i||"auto"===i?i="horizontal"===n?a.y+a.height/2<e.getHeight()/2?"-":"+":a.x+a.width/2<e.getWidth()/2?"+":"-":isNaN(i)&&(i={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[n][i]);var o,r,s,l,h={horizontal:"center",vertical:i>=0||"+"===i?"left":"right"},u={horizontal:i>=0||"+"===i?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:kj/2},d="vertical"===n?a.height:a.width,p=t.getModel("controlStyle"),f=(y=p.get("show"))?p.get("itemSize"):0,g=y?p.get("itemGap"):0,m=f+g,v=t.get("label.normal.rotate")||0;v=v*kj/180;var y,x=p.get("position",!0),_=(y=p.get("show",!0))&&p.get("showPlayBtn",!0),b=y&&p.get("showPrevBtn",!0),w=y&&p.get("showNextBtn",!0),S=0,M=d;return"left"===x||"bottom"===x?(_&&(o=[0,0],S+=m),b&&(r=[S,0],S+=m),w&&(s=[M-f,0],M-=m)):(_&&(o=[M-f,0],M-=m),b&&(r=[0,0],S+=m),w&&(s=[M-f,0],M-=m)),l=[S,M],t.get("inverse")&&l.reverse(),{viewRect:a,mainLength:d,orient:n,rotation:c[n],labelRotation:v,labelPosOpt:i,labelAlign:t.get("label.normal.align")||h[n],labelBaseline:t.get("label.normal.verticalAlign")||t.get("label.normal.baseline")||u[n],playPosition:o,prevBtnPosition:r,nextBtnPosition:s,axisExtent:l,controlSize:f,controlGap:g}},_position:function(t,e){var i=this._mainGroup,n=this._labelGroup,a=t.viewRect;if("vertical"===t.orient){var o=bj.create(),r=a.x,s=a.y+a.height;bj.translate(o,o,[-r,-s]),bj.rotate(o,o,-kj/2),bj.translate(o,o,[r,s]),(a=a.clone()).applyTransform(o)}var l=m(a),h=m(i.getBoundingRect()),u=m(n.getBoundingRect()),c=i.position,d=n.position;d[0]=c[0]=l[0][0];var p,f=t.labelPosOpt;isNaN(f)?(v(c,h,l,1,p="+"===f?0:1),v(d,u,l,1,1-p)):(v(c,h,l,1,p=f>=0?0:1),d[1]=c[1]+f);function g(t){var e=t.position;t.origin=[l[0][0]-e[0],l[1][0]-e[1]]}function m(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,i,n,a){t[n]+=i[n][a]-e[n][a]}i.attr("position",c),n.attr("position",d),i.rotation=n.rotation=t.rotation,g(i),g(n)},_createAxis:function(t,e){var i=e.getData(),n=e.get("axisType"),a=Tj.createScaleByModel(e,n),o=i.getDataExtent("value");a.setExtent(o[0],o[1]),this._customizeScale(a,i),a.niceTicks();var r=new Ij("value",a,t.axisExtent,n);return r.model=e,r},_customizeScale:function(t,e){t.getTicks=function(){return e.mapArray(["value"],(function(t){return t}))},t.getTicksLabels=function(){return xj.map(this.getTicks(),t.getLabel,t)}},_createGroup:function(t){var e=this["_"+t]=new wj.Group;return this.group.add(e),e},_renderAxisLine:function(t,e,i,n){var a=i.getExtent();n.get("lineStyle.show")&&e.add(new wj.Line({shape:{x1:a[0],y1:0,x2:a[1],y2:0},style:xj.extend({lineCap:"round"},n.getModel("lineStyle").getLineStyle()),silent:!0,z2:1}))},_renderAxisTick:function(t,e,i,n){var a=n.getData(),o=i.scale.getTicks();Pj(o,(function(t,o){var r=i.dataToCoord(t),s=a.getItemModel(o),l=s.getModel("itemStyle.normal"),h=s.getModel("itemStyle.emphasis"),u={position:[r,0],onclick:Dj(this._changeTimeline,this,o)},c=Oj(s,l,e,u);wj.setHoverStyle(c,h.getItemStyle()),s.get("tooltip")?(c.dataIndex=o,c.dataModel=n):c.dataIndex=c.dataModel=null}),this)},_renderAxisLabel:function(t,e,i,n){var a=n.getModel("label.normal");if(a.get("show")){var o=n.getData(),r=i.scale.getTicks(),s=Tj.getFormattedLabels(i,a.get("formatter")),l=i.getLabelInterval();Pj(r,(function(n,a){if(!i.isLabelIgnored(a,l)){var r=o.getItemModel(a),h=r.getModel("label.normal"),u=r.getModel("label.emphasis"),c=i.dataToCoord(n),d=new wj.Text({position:[c,0],rotation:t.labelRotation-t.rotation,onclick:Dj(this._changeTimeline,this,a),silent:!1});wj.setTextStyle(d.style,h,{text:s[a],textAlign:t.labelAlign,textVerticalAlign:t.labelBaseline}),e.add(d),wj.setHoverStyle(d,wj.setTextStyle({},u))}}),this)}},_renderControl:function(t,e,i,n){var a=t.controlSize,o=t.rotation,r=n.getModel("controlStyle.normal").getItemStyle(),s=n.getModel("controlStyle.emphasis").getItemStyle(),l=[0,-a/2,a,a],h=n.getPlayState(),u=n.get("inverse",!0);function c(t,i,h,u){if(t){var c=function(t,e,i,n){return wj.makePath(t.get(e).replace(/^path:\/\//,""),xj.clone(n||{}),new _j(i[0],i[1],i[2],i[3]),"center")}(n,i,l,{position:t,origin:[a/2,0],rotation:u?-o:0,rectHover:!0,style:r,onclick:h});e.add(c),wj.setHoverStyle(c,s)}}c(t.nextBtnPosition,"controlStyle.nextIcon",Dj(this._changeTimeline,this,u?"-":"+")),c(t.prevBtnPosition,"controlStyle.prevIcon",Dj(this._changeTimeline,this,u?"+":"-")),c(t.playPosition,"controlStyle."+(h?"stopIcon":"playIcon"),Dj(this._handlePlayClick,this,!h),!0)},_renderCurrentPointer:function(t,e,i,n){var a=n.getData(),o=n.getCurrentIndex(),r=a.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=Dj(s._handlePointerDrag,s),t.ondragend=Dj(s._handlePointerDragend,s),zj(t,o,i,n,!0)},onUpdate:function(t){zj(t,o,i,n)}};this._currentPointer=Oj(r,r,this._mainGroup,{},this._currentPointer,l)},_handlePlayClick:function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},_handlePointerDrag:function(t,e,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},_handlePointerDragend:function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},_pointerChangeTimeline:function(t,e){var i=this._toAxisCoord(t)[0],n=this._axis,a=Cj.asc(n.getExtent().slice());i>a[1]&&(i=a[1]),i<a[0]&&(i=a[0]),this._currentPointer.position[0]=i,this._currentPointer.dirty();var o=this._findNearestTick(i),r=this.model;(e||o!==r.getCurrentIndex()&&r.get("realtime"))&&this._changeTimeline(o)},_doPlayStop:function(){this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(Dj((function(){var t=this.model;this._changeTimeline(t.getCurrentIndex()+(t.get("rewind",!0)?-1:1))}),this),this.model.get("playInterval")))},_toAxisCoord:function(t){var e=this._mainGroup.getLocalTransform();return wj.applyTransform(t,e,!0)},_findNearestTick:function(t){var e,i=this.model.getData(),n=1/0,a=this._axis;return i.each(["value"],(function(i,o){var r=a.dataToCoord(i),s=Math.abs(r-t);s<n&&(n=s,e=o)})),e},_clearTimer:function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},_changeTimeline:function(t){var e=this.model.getCurrentIndex();"+"===t?t=e+1:"-"===t&&(t=e-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})}}),m.registerPreprocessor(aj);var Ej=b,Rj=YG,Nj=m.extendComponentModel({type:"toolbox",layoutMode:{type:"box",ignoreSize:!0},mergeDefaultAndTheme:function(t){Nj.superApply(this,"mergeDefaultAndTheme",arguments),Ej.each(this.option.feature,(function(t,e){var i=Rj.get(e);i&&Ej.merge(t,i.defaultOption)}))},defaultOption:{show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{normal:{borderColor:"#666",color:"none"},emphasis:{borderColor:"#3E98C5"}}}}),Vj=b,Bj=Ni,Gj=YG,Wj=Bo,Hj=ou,Fj=$d,Zj=mN;m.extendComponentView({type:"toolbox",render:function(t,e,i,n){var a=this.group;if(a.removeAll(),t.get("show")){var o=+t.get("itemSize"),r=t.get("feature")||{},s=this._features||(this._features={}),l=[];Vj.each(r,(function(t,e){l.push(e)})),new Fj(this._featureNames||[],l).add(h).update(h).remove(Vj.curry(h,null)).execute(),this._featureNames=l,Zj.layout(a,t,i),a.add(Zj.makeBackground(a.getBoundingRect(),t)),a.eachChild((function(t){var e=t.__title,n=t.hoverStyle;if(n&&e){var r=Bj.getBoundingRect(e,Bj.makeFont(n)),s=t.position[0]+a.position[0],l=!1;t.position[1]+a.position[1]+o+r.height>i.getHeight()&&(n.textPosition="top",l=!0);var h=l?-5-r.height:o+8;s+r.width/2>i.getWidth()?(n.textPosition=["100%",h],n.textAlign="right"):s-r.width/2<0&&(n.textPosition=[0,h],n.textAlign="left")}}))}function h(h,u){var c,d=l[h],p=l[u],f=r[d],g=new Hj(f,t,t.ecModel);if(d&&!p){if(function(t){return 0===t.indexOf("my")}(d))c={model:g,onclick:g.option.onclick,featureName:d};else{var m=Gj.get(d);if(!m)return;c=new m(g,e,i)}s[d]=c}else{if(!(c=s[p]))return;c.model=g,c.ecModel=e,c.api=i}d||!p?g.get("show")&&!c.unusable?(!function(n,r,s){var l=n.getModel("iconStyle"),h=r.getIcons?r.getIcons():n.get("icon"),u=n.get("title")||{};if("string"==typeof h){var c=h,d=u;u={},(h={})[s]=c,u[s]=d}var p=n.iconPaths={};Vj.each(h,(function(s,h){var c=Wj.createIcon(s,{},{x:-o/2,y:-o/2,width:o,height:o});c.setStyle(l.getModel("normal").getItemStyle()),c.hoverStyle=l.getModel("emphasis").getItemStyle(),Wj.setHoverStyle(c),t.get("showTitle")&&(c.__title=u[h],c.on("mouseover",(function(){var t=l.getModel("emphasis").getItemStyle();c.setStyle({text:u[h],textPosition:t.textPosition||"bottom",textFill:t.fill||t.stroke||"#000",textAlign:t.textAlign||"center"})})).on("mouseout",(function(){c.setStyle({textFill:null})}))),c.trigger(n.get("iconStatus."+h)||"normal"),a.add(c),c.on("click",Vj.bind(r.onclick,r,e,i,h)),p[h]=c}))}(g,c,d),g.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)},c.render&&c.render(g,e,i,n)):c.remove&&c.remove(e,i):c.dispose&&c.dispose(e,i)}},updateView:function(t,e,i,n){Vj.each(this._features,(function(t){t.updateView&&t.updateView(t.model,e,i,n)}))},updateLayout:function(t,e,i,n){Vj.each(this._features,(function(t){t.updateLayout&&t.updateLayout(t.model,e,i,n)}))},remove:function(t,e){Vj.each(this._features,(function(i){i.remove&&i.remove(t,e)})),this.group.removeAll()},dispose:function(t,e){Vj.each(this._features,(function(i){i.dispose&&i.dispose(t,e)}))}});var jj=_,Uj=YG,qj=KG.toolbox.saveAsImage;function Xj(t){this.model=t}Xj.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:qj.title,type:"png",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:qj.lang.slice()},Xj.prototype.unusable=!jj.canvasSupported,Xj.prototype.onclick=function(t,e){var i=this.model,n=i.get("name")||t.get("title.0.text")||"echarts",a=document.createElement("a"),o=i.get("type",!0)||"png";a.download=n+"."+o,a.target="_blank";var r=e.getConnectedDataURL({type:o,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")});if(a.href=r,"function"!=typeof MouseEvent||jj.browser.ie||jj.browser.edge)if(window.navigator.msSaveOrOpenBlob){for(var s=atob(r.split(",")[1]),l=s.length,h=new Uint8Array(l);l--;)h[l]=s.charCodeAt(l);var u=new Blob([h]);window.navigator.msSaveOrOpenBlob(u,n+"."+o)}else{var c=i.get("lang"),d='<body style="margin:0;"><img src="'+r+'" style="max-width:100%;" title="'+(c&&c[0]||"")+'" /></body>';window.open().document.write(d)}else{var p=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!1});a.dispatchEvent(p)}},Uj.register("saveAsImage",Xj);var Yj=m,$j=b,Kj=YG,Jj=KG.toolbox.magicType;function Qj(t){this.model=t}Qj.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:$j.clone(Jj.title),option:{},seriesIndex:{}};var tU=Qj.prototype;tU.getIcons=function(){var t=this.model,e=t.get("icon"),i={};return $j.each(t.get("type"),(function(t){e[t]&&(i[t]=e[t])})),i};var eU={line:function(t,e,i,n){if("bar"===t)return $j.merge({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 $j.merge({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 $j.merge({id:e,stack:"__ec_magicType_stack__"},n.get("option.stack")||{},!0)},tiled:function(t,e,i,n){if("line"===t||"bar"===t)return $j.merge({id:e,stack:""},n.get("option.tiled")||{},!0)}},iU=[["line","bar"],["stack","tiled"]];tU.onclick=function(t,e,i){var n=this.model,a=n.get("seriesIndex."+i);if(eU[i]){var o={series:[]};$j.each(iU,(function(t){$j.indexOf(t,i)>=0&&$j.each(t,(function(t){n.setIconStatus(t,"normal")}))})),n.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:null==a?null:{seriesIndex:a}},(function(e){var a=e.subType,r=e.id,s=eU[i](a,r,e,n);s&&($j.defaults(s,e.option),o.series.push(s));var l=e.coordinateSystem;if(l&&"cartesian2d"===l.type&&("line"===i||"bar"===i)){var h=l.getAxesByScale("ordinal")[0];if(h){var u=h.dim+"Axis",c=t.queryComponents({mainType:u,index:e.get(name+"Index"),id:e.get(name+"Id")})[0].componentIndex;o[u]=o[u]||[];for(var d=0;d<=c;d++)o[u][c]=o[u][c]||{};o[u][c].boundaryGap="bar"===i}}})),e.dispatchAction({type:"changeMagicType",currentType:i,newOption:o})}},Yj.registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)})),Kj.register("magicType",Qj);var nU=m,aU=b,oU=fa,rU=YG,sU=KG.toolbox.dataView,lU=new Array(60).join("-");function hU(t){return aU.map(t,(function(t){var e=t.getRawData(),i=[t.name],n=[];return e.each(e.dimensions,(function(){for(var t=arguments.length,a=arguments[t-1],o=e.getName(a),r=0;r<t-1;r++)n[r]=arguments[r];i.push((o?o+"\t":"")+n.join("\t"))})),i.join("\n")})).join("\n\n"+lU+"\n\n")}function uU(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var cU=new RegExp("[\t]+","g");function dU(t,e){var i=t.split(new RegExp("\n*"+lU+"\n*","g")),n={series:[]};return aU.each(i,(function(t,i){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf("\t")>=0)return!0}(t)){var a=function(t){for(var e=t.split(/\n+/g),i=uU(e.shift()).split(cU),n=[],a=aU.map(i,(function(t){return{name:t,data:[]}})),o=0;o<e.length;o++){var r=uU(e[o]).split(cU);n.push(r.shift());for(var s=0;s<r.length;s++)a[s]&&(a[s].data[o]=r[s])}return{series:a,categories:n}}(t),o=e[i],r=o.axisDim+"Axis";o&&(n[r]=n[r]||[],n[r][o.axisIndex]={data:a.categories},n.series=n.series.concat(a.series))}else{a=function(t){for(var e=t.split(/\n+/g),i=uU(e.shift()),n=[],a=0;a<e.length;a++){var o,r=uU(e[a]).split(cU),s="",l=!1;isNaN(r[0])?(l=!0,s=r[0],r=r.slice(1),n[a]={name:s,value:[]},o=n[a].value):o=n[a]=[];for(var h=0;h<r.length;h++)o.push(+r[h]);1===o.length&&(l?n[a].value=o[0]:n[a]=o[0])}return{name:i,data:n}}(t);n.series.push(a)}})),n}function pU(t){this._dom=null,this.model=t}function fU(t,e){return aU.map(t,(function(t,i){var n=e&&e[i];return aU.isObject(n)&&!aU.isArray(n)?(aU.isObject(t)&&!aU.isArray(t)&&(t=t.value),aU.defaults({value:t},n)):t}))}pU.defaultOption={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:aU.clone(sU.title),lang:aU.clone(sU.lang),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"},pU.prototype.onclick=function(t,e){var i=e.getDom(),n=this.model;this._dom&&i.removeChild(this._dom);var a=document.createElement("div");a.style.cssText="position:absolute;left:5px;top:5px;bottom:5px;right:5px;",a.style.backgroundColor=n.get("backgroundColor")||"#fff";var o=document.createElement("h4"),r=n.get("lang")||[];o.innerHTML=r[0]||n.get("title"),o.style.cssText="margin: 10px 20px;",o.style.color=n.get("textColor");var s=document.createElement("div"),l=document.createElement("textarea");s.style.cssText="display:block;width:100%;overflow:auto;";var h=n.get("optionToContent"),u=n.get("contentToOption"),c=function(t){var e,i,n=function(t){var e={},i=[],n=[];return t.eachRawSeries((function(t){var a=t.coordinateSystem;if(!a||"cartesian2d"!==a.type&&"polar"!==a.type)i.push(t);else{var o=a.getBaseAxis();if("category"===o.type){var r=o.dim+"_"+o.index;e[r]||(e[r]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[r].series.push(t)}else i.push(t)}})),{seriesGroupByCategoryAxis:e,other:i,meta:n}}(t);return{value:aU.filter([(e=n.seriesGroupByCategoryAxis,i=[],aU.each(e,(function(t,e){var n=t.categoryAxis,a=t.valueAxis.dim,o=[" "].concat(aU.map(t.series,(function(t){return t.name}))),r=[n.model.getCategories()];aU.each(t.series,(function(t){r.push(t.getRawData().mapArray(a,(function(t){return t})))}));for(var s=[o.join("\t")],l=0;l<r[0].length;l++){for(var h=[],u=0;u<r.length;u++)h.push(r[u][l]);s.push(h.join("\t"))}i.push(s.join("\n"))})),i.join("\n\n"+lU+"\n\n")),hU(n.other)],(function(t){return t.replace(/[\n\t\s]/g,"")})).join("\n\n"+lU+"\n\n"),meta:n.meta}}(t);if("function"==typeof h){var d=h(e.getOption());"string"==typeof d?s.innerHTML=d:aU.isDom(d)&&s.appendChild(d)}else s.appendChild(l),l.readOnly=n.get("readOnly"),l.style.cssText="width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;",l.style.color=n.get("textColor"),l.style.borderColor=n.get("textareaBorderColor"),l.style.backgroundColor=n.get("textareaColor"),l.value=c.value;var p=c.meta,f=document.createElement("div");f.style.cssText="position:absolute;bottom:0;left:0;right:0;";var g="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",m=document.createElement("div"),v=document.createElement("div");g+=";background-color:"+n.get("buttonColor"),g+=";color:"+n.get("buttonTextColor");var y=this;function x(){i.removeChild(a),y._dom=null}oU.addEventListener(m,"click",x),oU.addEventListener(v,"click",(function(){var t;try{t="function"==typeof u?u(s,e.getOption()):dU(l.value,p)}catch(i){throw x(),new Error("Data view format error "+i)}t&&e.dispatchAction({type:"changeDataView",newOption:t}),x()})),m.innerHTML=r[1],v.innerHTML=r[2],v.style.cssText=g,m.style.cssText=g,!n.get("readOnly")&&f.appendChild(v),f.appendChild(m),oU.addEventListener(l,"keydown",(function(t){if(9===(t.keyCode||t.which)){var e=this.value,i=this.selectionStart,n=this.selectionEnd;this.value=e.substring(0,i)+"\t"+e.substring(n),this.selectionStart=this.selectionEnd=i+1,oU.stop(t)}})),a.appendChild(o),a.appendChild(s),a.appendChild(f),s.style.height=i.clientHeight-80+"px",i.appendChild(a),this._dom=a},pU.prototype.remove=function(t,e){this._dom&&e.getDom().removeChild(this._dom)},pU.prototype.dispose=function(t,e){this.remove(t,e)},rU.register("dataView",pU),nU.registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},(function(t,e){var i=[];aU.each(t.newOption.series,(function(t){var n=e.getSeriesByName(t.name)[0];if(n){var a=n.get("data");i.push({name:t.name,data:fU(t.data,a)})}else i.push(aU.extend({type:"scatter"},t))})),e.mergeOption(aU.defaults({series:i},t.newOption))}));var gU={},mU=b.each,vU="\0_ec_hist_store";function yU(t){var e=t[vU];return e||(e=t[vU]=[{}]),e}gU.push=function(t,e){var i=yU(t);mU(e,(function(e,n){for(var a=i.length-1;a>=0;a--){if(i[a][n])break}if(a<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(o){var r=o.getPercentRange();i[0][n]={dataZoomId:n,start:r[0],end:r[1]}}}})),i.push(e)},gU.pop=function(t){var e=yU(t),i=e[e.length-1];e.length>1&&e.pop();var n={};return mU(i,(function(t,i){for(var a=e.length-1;a>=0;a--){if(t=e[a][i]){n[i]=t;break}}})),n},gU.clear=function(t){t[vU]=null},gU.count=function(t){return yU(t).length},$W.extend({type:"dataZoom.select"}),JW.extend({type:"dataZoom.select"});var xU=m,_U=b,bU=aD,wU=MG,SU=gU,MU=RC,IU=YG,AU=KG.toolbox.dataZoom,TU=_U.each;function CU(t,e,i){(this._brushController=new bU(i.getZr())).on("brush",_U.bind(this._onBrush,this)).mount(),this._isZoomActive}CU.defaultOption={show:!0,icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:_U.clone(AU.title)};var LU=CU.prototype;LU.render=function(t,e,i,n){this.model=t,this.ecModel=e,this.api=i,function(t,e,i,n,a){var o=i._isZoomActive;n&&"takeGlobalCursor"===n.type&&(o="dataZoomSelect"===n.key&&n.dataZoomSelectActive);i._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var r=new wU(PU(t.option),e,{include:["grid"]});i._brushController.setPanels(r.makePanelOpts(a,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}))).enableBrush(!!o&&{brushType:"auto",brushStyle:{lineWidth:0,fill:"rgba(0,0,0,0.2)"}})}(t,e,this,n,i),function(t,e){t.setIconStatus("back",SU.count(e)>1?"emphasis":"normal")}(t,e)},LU.onclick=function(t,e,i){DU[i].call(this)},LU.remove=function(t,e){this._brushController.unmount()},LU.dispose=function(t,e){this._brushController.dispose()};var DU={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(SU.pop(this.ecModel))}};function PU(t){var e={};return _U.each(["xAxisIndex","yAxisIndex"],(function(i){e[i]=t[i],null==e[i]&&(e[i]="all"),(!1===e[i]||"none"===e[i])&&(e[i]=[])})),e}LU._onBrush=function(t,e){if(e.isEnd&&t.length){var i={},n=this.ecModel;this._brushController.updateCovers([]),new wU(PU(this.model.option),n,{include:["grid"]}).matchOutputRanges(t,n,(function(t,e,i){if("cartesian2d"===i.type){var n=t.brushType;"rect"===n?(a("x",i,e[0]),a("y",i,e[1])):a({lineX:"x",lineY:"y"}[n],i,e)}})),SU.push(n,i),this._dispatchZoomAction(i)}function a(t,e,a){var o=e.getAxis(t),r=o.model,s=function(t,e,i){var n;return i.eachComponent({mainType:"dataZoom",subType:"select"},(function(i){i.getAxisModel(t,e.componentIndex)&&(n=i)})),n}(t,r,n),l=s.findRepresentativeAxisProxy(r).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(a=MU(0,a.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(i[s.id]={dataZoomId:s.id,startValue:a[0],endValue:a[1]})}},LU._dispatchZoomAction=function(t){var e=[];TU(t,(function(t,i){e.push(_U.clone(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},IU.register("dataZoom",CU),xU.registerPreprocessor((function(t){if(t){var e=t.dataZoom||(t.dataZoom=[]);_U.isArray(e)||(t.dataZoom=e=[e]);var i=t.toolbox;if(i&&(_U.isArray(i)&&(i=i[0]),i&&i.feature)){var n=i.feature.dataZoom;a("xAxis",n),a("yAxis",n)}}function a(i,n){if(n){var a=i+"Index",o=n[a];null==o||"all"==o||_U.isArray(o)||(o=!1===o||"none"===o?[]:[o]),function(e,i){var n=t[e];_U.isArray(n)||(n=n?[n]:[]);TU(n,i)}(i,(function(t,n){if(null==o||"all"==o||-1!==_U.indexOf(o,n)){var r={type:"select",$fromToolbox:!0,id:"\0_ec_\0toolbox-dataZoom_"+i+n};r[a]=n,e.push(r)}}))}}}));var kU=m,OU=gU,zU=YG,EU=KG.toolbox.restore;function RU(t){this.model=t}RU.defaultOption={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:EU.title},RU.prototype.onclick=function(t,e,i){OU.clear(t),e.dispatchAction({type:"restore",from:this.uid})},zU.register("restore",RU),kU.registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},(function(t,e){e.resetOption("recreate")}));var NU,VU={},BU=_,GU="urn:schemas-microsoft-com:vml",WU="undefined"==typeof window?null:window,HU=!1,FU=WU&&WU.document;if(FU&&!BU.canvasSupported)try{!FU.namespaces.zrvml&&FU.namespaces.add("zrvml",GU),NU=function(t){return FU.createElement("<zrvml:"+t+' class="zrvml">')}}catch(PY){NU=function(t){return FU.createElement("<"+t+' xmlns="'+GU+'" class="zrvml">')}}VU.doc=FU,VU.createNode=function(t){return NU(t)},VU.initVML=function(){if(!HU&&FU){HU=!0;var t=FU.styleSheets;t.length<31?FU.createStyleSheet().addRule(".zrvml","behavior:url(#default#VML)"):t[0].addRule(".zrvml","behavior:url(#default#VML)")}};var ZU=_,jU=j.applyTransform,UU=Je,qU=Pt,XU=Ni,YU=Ri,$U=Gn,KU=Un,JU=Jn,QU=Hs,tq=ms,eq=Or,iq=Rl,nq=VU,aq=eq.CMD,oq=Math.round,rq=Math.sqrt,sq=Math.abs,lq=Math.cos,hq=Math.sin,uq=Math.max;if(!ZU.canvasSupported){var cq=21600,dq=cq/2,pq=function(t){t.style.cssText="position:absolute;left:0;top:0;width:1px;height:1px;",t.coordsize=cq+","+cq,t.coordorigin="0,0"},fq=function(t,e,i){return"rgb("+[t,e,i].join(",")+")"},gq=function(t,e){e&&t&&e.parentNode!==t&&t.appendChild(e)},mq=function(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)},vq=function(t,e,i){return 1e5*(parseFloat(t)||0)+1e3*(parseFloat(e)||0)+i},yq=function(t,e){return"string"==typeof t?t.lastIndexOf("%")>=0?parseFloat(t)/100*e:parseFloat(t):t},xq=function(t,e,i){var n=qU.parse(e);i=+i,isNaN(i)&&(i=1),n&&(t.color=fq(n[0],n[1],n[2]),t.opacity=i*n[3])},_q=function(t){var e=qU.parse(t);return[fq(e[0],e[1],e[2]),e[3]]},bq=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 iq&&mq(t,o),o||(o=nq.createNode(e)),a?function(t,e,i){var n=e.fill;if(null!=n)if(n instanceof iq){var a,o=0,r=[0,0],s=0,l=1,h=i.getBoundingRect(),u=h.width,c=h.height;if("linear"===n.type){a="gradient";var d=i.transform,p=[n.x*u,n.y*c],f=[n.x2*u,n.y2*c];d&&(jU(p,p,d),jU(f,f,d));var g=f[0]-p[0],m=f[1]-p[1];(o=180*Math.atan2(g,m)/Math.PI)<0&&(o+=360),o<1e-6&&(o=0)}else{a="gradientradial",p=[n.x*u,n.y*c],d=i.transform;var v=i.scale,y=u,x=c;r=[(p[0]-h.x)/y,(p[1]-h.y)/x],d&&jU(p,p,d),y/=v[0]*cq,x/=v[1]*cq;var _=uq(y,x);s=0/_,l=2*n.r/_-s}var b=n.colorStops.slice();b.sort((function(t,e){return t.offset-e.offset}));for(var w=b.length,S=[],M=[],I=0;I<w;I++){var A=b[I],T=_q(A.color);M.push(A.offset*l+s+" "+T[0]),0!==I&&I!==w-1||S.push(T)}if(w>=2){var C=S[0][0],L=S[1][0],D=S[0][1]*e.opacity,P=S[1][1]*e.opacity;t.type=a,t.method="none",t.focus="100%",t.angle=o,t.color=C,t.color2=L,t.colors=M.join(","),t.opacity=P,t.opacity2=D}"radial"===a&&(t.focusposition=r.join(","))}else xq(t,n,e.opacity)}(o,i,n):function(t,e){null!=e.lineDash&&(t.dashstyle=e.lineDash.join(" ")),null==e.stroke||e.stroke instanceof iq||xq(t,e.stroke,e.opacity)}(o,i),gq(t,o)):(t[a?"filled":"stroked"]="false",mq(t,o))},wq=[[],[],[]];tq.prototype.brushVML=function(t){var e=this.style,i=this._vmlEl;i||(i=nq.createNode("shape"),pq(i),this._vmlEl=i),bq(i,"fill",e,this),bq(i,"stroke",e,this);var n=this.transform,a=null!=n,o=i.getElementsByTagName("stroke")[0];if(o){var r=e.lineWidth;if(a&&!e.strokeNoScale){var s=n[0]*n[3]-n[1]*n[2];r*=rq(sq(s))}o.weight=r+"px"}var l=this.path||(this.path=new eq);this.__dirtyPath&&(l.beginPath(),this.buildPath(l,this.shape),l.toStatic(),this.__dirtyPath=!1),i.path=function(t,e){var i,n,a,o,r,s,l=aq.M,h=aq.C,u=aq.L,c=aq.A,d=aq.Q,p=[],f=t.data,g=t.len();for(o=0;o<g;){switch(n="",i=0,a=f[o++]){case l:n=" m ",i=1,r=f[o++],s=f[o++],wq[0][0]=r,wq[0][1]=s;break;case u:n=" l ",i=1,r=f[o++],s=f[o++],wq[0][0]=r,wq[0][1]=s;break;case d:case h:n=" c ",i=3;var m,v,y=f[o++],x=f[o++],_=f[o++],b=f[o++];a===d?(m=_,v=b,_=(_+2*y)/3,b=(b+2*x)/3,y=(r+2*y)/3,x=(s+2*x)/3):(m=f[o++],v=f[o++]),wq[0][0]=y,wq[0][1]=x,wq[1][0]=_,wq[1][1]=b,wq[2][0]=m,wq[2][1]=v,r=m,s=v;break;case c:var w=0,S=0,M=1,I=1,A=0;e&&(w=e[4],S=e[5],M=rq(e[0]*e[0]+e[1]*e[1]),I=rq(e[2]*e[2]+e[3]*e[3]),A=Math.atan2(-e[1]/I,e[0]/M));var T=f[o++],C=f[o++],L=f[o++],D=f[o++],P=f[o++]+A,k=f[o++]+P+A;o++;var O=f[o++],z=T+lq(P)*L,E=C+hq(P)*D,R=(y=T+lq(k)*L,x=C+hq(k)*D,O?" wa ":" at ");Math.abs(z-y)<1e-4&&(Math.abs(k-P)>.01?O&&(z+=270/cq):Math.abs(E-C)<1e-4?O&&z<T||!O&&z>T?x-=270/cq:x+=270/cq:O&&E<C||!O&&E>C?y+=270/cq:y-=270/cq),p.push(R,oq(((T-L)*M+w)*cq-dq),",",oq(((C-D)*I+S)*cq-dq),",",oq(((T+L)*M+w)*cq-dq),",",oq(((C+D)*I+S)*cq-dq),",",oq((z*M+w)*cq-dq),",",oq((E*I+S)*cq-dq),",",oq((y*M+w)*cq-dq),",",oq((x*I+S)*cq-dq)),r=y,s=x;break;case aq.R:var N=wq[0],V=wq[1];N[0]=f[o++],N[1]=f[o++],V[0]=N[0]+f[o++],V[1]=N[1]+f[o++],e&&(jU(N,N,e),jU(V,V,e)),N[0]=oq(N[0]*cq-dq),V[0]=oq(V[0]*cq-dq),N[1]=oq(N[1]*cq-dq),V[1]=oq(V[1]*cq-dq),p.push(" m ",N[0],",",N[1]," l ",V[0],",",N[1]," l ",V[0],",",V[1]," l ",N[0],",",V[1]);break;case aq.Z:p.push(" x ")}if(i>0){p.push(n);for(var B=0;B<i;B++){var G=wq[B];e&&jU(G,G,e),p.push(oq(G[0]*cq-dq),",",oq(G[1]*cq-dq),B<i-1?",":"")}}}return p.join("")}(l,this.transform),i.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,i),null!=e.text?this.drawRectText(t,this.getBoundingRect()):this.removeRectText(t)},tq.prototype.onRemove=function(t){mq(t,this._vmlEl),this.removeRectText(t)},tq.prototype.onAdd=function(t){gq(t,this._vmlEl),this.appendRectText(t)};JU.prototype.brushVML=function(t){var e,i,n,a=this.style,o=a.image;if("object"==typeof(n=o)&&n.tagName&&"IMG"===n.tagName.toUpperCase()){var r=o.src;if(r===this._imageSrc)e=this._imageWidth,i=this._imageHeight;else{var s=o.runtimeStyle,l=s.width,h=s.height;s.width="auto",s.height="auto",e=o.width,i=o.height,s.width=l,s.height=h,this._imageSrc=r,this._imageWidth=e,this._imageHeight=i}o=r}else o===this._imageSrc&&(e=this._imageWidth,i=this._imageHeight);if(o){var u=a.x||0,c=a.y||0,d=a.width,p=a.height,f=a.sWidth,g=a.sHeight,m=a.sx||0,v=a.sy||0,y=f&&g,x=this._vmlEl;x||(x=nq.doc.createElement("div"),pq(x),this._vmlEl=x);var _,b=x.style,w=!1,S=1,M=1;if(this.transform&&(_=this.transform,S=rq(_[0]*_[0]+_[1]*_[1]),M=rq(_[2]*_[2]+_[3]*_[3]),w=_[1]||_[2]),w){var I=[u,c],A=[u+d,c],T=[u,c+p],C=[u+d,c+p];jU(I,I,_),jU(A,A,_),jU(T,T,_),jU(C,C,_);var L=uq(I[0],A[0],T[0],C[0]),D=uq(I[1],A[1],T[1],C[1]),P=[];P.push("M11=",_[0]/S,",","M12=",_[2]/M,",","M21=",_[1]/S,",","M22=",_[3]/M,",","Dx=",oq(u*S+_[4]),",","Dy=",oq(c*M+_[5])),b.padding="0 "+oq(L)+"px "+oq(D)+"px 0",b.filter="progid:DXImageTransform.Microsoft.Matrix("+P.join("")+", SizingMethod=clip)"}else _&&(u=u*S+_[4],c=c*M+_[5]),b.filter="",b.left=oq(u)+"px",b.top=oq(c)+"px";var k=this._imageEl,O=this._cropEl;k||(k=nq.doc.createElement("div"),this._imageEl=k);var z=k.style;if(y){if(e&&i)z.width=oq(S*e*d/f)+"px",z.height=oq(M*i*p/g)+"px";else{var E=new Image,R=this;E.onload=function(){E.onload=null,e=E.width,i=E.height,z.width=oq(S*e*d/f)+"px",z.height=oq(M*i*p/g)+"px",R._imageWidth=e,R._imageHeight=i,R._imageSrc=o},E.src=o}O||((O=nq.doc.createElement("div")).style.overflow="hidden",this._cropEl=O);var N=O.style;N.width=oq((d+m*d/f)*S),N.height=oq((p+v*p/g)*M),N.filter="progid:DXImageTransform.Microsoft.Matrix(Dx="+-m*d/f*S+",Dy="+-v*p/g*M+")",O.parentNode||x.appendChild(O),k.parentNode!=O&&O.appendChild(k)}else z.width=oq(S*d)+"px",z.height=oq(M*p)+"px",x.appendChild(k),O&&O.parentNode&&(x.removeChild(O),this._cropEl=null);var V="",B=a.opacity;B<1&&(V+=".Alpha(opacity="+oq(100*B)+") "),V+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src="+o+", SizingMethod=scale)",z.filter=V,x.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,x),null!=a.text&&this.drawRectText(t,this.getBoundingRect())}},JU.prototype.onRemove=function(t){mq(t,this._vmlEl),this._vmlEl=null,this._cropEl=null,this._imageEl=null,this.removeRectText(t)},JU.prototype.onAdd=function(t){gq(t,this._vmlEl),this.appendRectText(t)};var Sq,Mq={},Iq=0,Aq=document.createElement("div");XU.$override("measureText",(function(t,e){var i=nq.doc;Sq||((Sq=i.createElement("div")).style.cssText="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;",nq.doc.body.appendChild(Sq));try{Sq.style.font=e}catch(n){}return Sq.innerHTML="",Sq.appendChild(i.createTextNode(t)),{width:Sq.offsetWidth}}));for(var Tq=new UU,Cq=function(t,e,i,n){var a=this.style;this.__dirty&&YU.normalizeTextStyle(a,!0);var o=a.text;if(null!=o&&(o+=""),o){if(a.rich){var r=XU.parseRichText(o,a);o=[];for(var s=0;s<r.lines.length;s++){for(var l=r.lines[s].tokens,h=[],u=0;u<l.length;u++)h.push(l[u].text);o.push(h.join(""))}o=o.join("\n")}var c,d,p=a.textAlign,f=a.textVerticalAlign,g=function(t){var e=Mq[t];if(!e){Iq>100&&(Iq=0,Mq={});var i,n=Aq.style;try{n.font=t,i=n.fontFamily.split(",")[0]}catch(PY){}e={style:n.fontStyle||"normal",variant:n.fontVariant||"normal",weight:n.fontWeight||"normal",size:0|parseFloat(n.fontSize||12),family:i||"Microsoft YaHei"},Mq[t]=e,Iq++}return e}(a.font),m=g.style+" "+g.variant+" "+g.weight+" "+g.size+'px "'+g.family+'"';i=i||XU.getBoundingRect(o,m,p,f);var v=this.transform;if(v&&!n&&(Tq.copy(e),Tq.applyTransform(v),e=Tq),n)c=e.x,d=e.y;else{var y=a.textPosition,x=a.textDistance;if(y instanceof Array)c=e.x+yq(y[0],e.width),d=e.y+yq(y[1],e.height),p=p||"left";else{var _=XU.adjustTextPositionOnRect(y,e,x);c=_.x,d=_.y,p=p||_.textAlign,f=f||_.textVerticalAlign}}c=XU.adjustTextX(c,i.width,p),d=XU.adjustTextY(d,i.height,f),d+=i.height/2;var b,w,S,M=nq.createNode,I=this._textVmlEl;I?w=(b=(S=I.firstChild).nextSibling).nextSibling:(I=M("line"),b=M("path"),w=M("textpath"),S=M("skew"),w.style["v-text-align"]="left",pq(I),b.textpathok=!0,w.on=!0,I.from="0 0",I.to="1000 0.05",gq(I,S),gq(I,b),gq(I,w),this._textVmlEl=I);var A=[c,d],T=I.style;v&&n?(jU(A,A,v),S.on=!0,S.matrix=v[0].toFixed(3)+","+v[2].toFixed(3)+","+v[1].toFixed(3)+","+v[3].toFixed(3)+",0,0",S.offset=(oq(A[0])||0)+","+(oq(A[1])||0),S.origin="0 0",T.left="0px",T.top="0px"):(S.on=!1,T.left=oq(c)+"px",T.top=oq(d)+"px"),w.string=String(o).replace(/&/g,"&amp;").replace(/"/g,"&quot;");try{w.style.font=m}catch(PY){}bq(I,"fill",{fill:a.textFill,opacity:a.opacity},this),bq(I,"stroke",{stroke:a.textStroke,opacity:a.opacity,lineDash:a.lineDash},this),I.style.zIndex=vq(this.zlevel,this.z,this.z2),gq(t,I)}},Lq=function(t){mq(t,this._textVmlEl),this._textVmlEl=null},Dq=function(t){gq(t,this._textVmlEl)},Pq=[$U,KU,JU,tq,QU],kq=0;kq<Pq.length;kq++){var Oq=Pq[kq].prototype;Oq.drawRectText=Cq,Oq.removeRectText=Lq,Oq.appendRectText=Dq}QU.prototype.brushVML=function(t){var e=this.style;null!=e.text?this.drawRectText(t,{x:e.x||0,y:e.y||0,width:0,height:0},this.getBoundingRect(),!0):this.removeRectText(t)},QU.prototype.onRemove=function(t){this.removeRectText(t)},QU.prototype.onAdd=function(t){this.appendRectText(t)}}var zq=Ae,Eq=VU,Rq=b.each;function Nq(t){return parseInt(t,10)}function Vq(t,e){Eq.initVML(),this.root=t,this.storage=e;var i=document.createElement("div"),n=document.createElement("div");i.style.cssText="display:inline-block;overflow:hidden;position:relative;width:300px;height:150px;",n.style.cssText="position:absolute;left:0;top:0;",t.appendChild(i),this._vmlRoot=n,this._vmlViewport=i,this.resize();var a=e.delFromStorage,o=e.addToStorage;e.delFromStorage=function(t){a.call(e,t),t&&t.onRemove&&t.onRemove(n)},e.addToStorage=function(t){t.onAdd&&t.onAdd(n),o.call(e,t)},this._firstPaint=!0}Vq.prototype={constructor:Vq,getType:function(){return"vml"},getViewportRoot:function(){return this._vmlViewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0,!0);this._paintList(t)},_paintList:function(t){for(var e=this._vmlRoot,i=0;i<t.length;i++){var n=t[i];n.invisible||n.ignore?(n.__alreadyNotVisible||n.onRemove(e),n.__alreadyNotVisible=!0):(n.__alreadyNotVisible&&n.onAdd(e),n.__alreadyNotVisible=!1,n.__dirty&&(n.beforeBrush&&n.beforeBrush(),(n.brushVML||n.brush).call(n,e),n.afterBrush&&n.afterBrush())),n.__dirty=!1}this._firstPaint&&(this._vmlViewport.appendChild(e),this._firstPaint=!1)},resize:function(t,e){t=null==t?this._getWidth():t,e=null==e?this._getHeight():e;if(this._width!=t||this._height!=e){this._width=t,this._height=e;var i=this._vmlViewport.style;i.width=t+"px",i.height=e+"px"}},dispose:function(){this.root.innerHTML="",this._vmlRoot=this._vmlViewport=this.storage=null},getWidth:function(){return this._width},getHeight:function(){return this._height},clear:function(){this._vmlViewport&&this.root.removeChild(this._vmlViewport)},_getWidth:function(){var t=this.root,e=t.currentStyle;return(t.clientWidth||Nq(e.width))-Nq(e.paddingLeft)-Nq(e.paddingRight)|0},_getHeight:function(){var t=this.root,e=t.currentStyle;return(t.clientHeight||Nq(e.height))-Nq(e.paddingTop)-Nq(e.paddingBottom)|0}},Rq(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;Vq.prototype[t]=(e=t,function(){zq('In IE8.0 VML mode painter not support method "'+e+'"')})}));var Bq=Vq;(0,v.registerPainter)("vml",Bq);var Gq={},Wq={};Wq.createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)};var Hq=Wq.createElement,Fq=Je,Zq=Ni,jq=Ri,Uq=Hs,qq=Or.CMD,Xq=Array.prototype.join,Yq="none",$q=Math.round,Kq=Math.sin,Jq=Math.cos,Qq=Math.PI,tX=2*Math.PI,eX=180/Qq;function iX(t){return $q(1e4*t)/1e4}function nX(t){return t<1e-4&&t>-1e-4}function aX(t,e){e&&oX(t,"transform","matrix("+Xq.call(e,",")+")")}function oX(t,e,i){(!i||"linear"!==i.type&&"radial"!==i.type)&&t.setAttribute(e,i)}function rX(t,e,i){if(function(t,e){var i=e?t.textFill:t.fill;return null!=i&&i!==Yq}(e,i)){var n=i?e.textFill:e.fill;n="transparent"===n?Yq:n,"none"!==t.getAttribute("clip-path")&&n===Yq&&(n="rgba(0, 0, 0, 0.002)"),oX(t,"fill",n),oX(t,"fill-opacity",e.opacity)}else oX(t,"fill",Yq);if(function(t,e){var i=e?t.textStroke:t.stroke;return null!=i&&i!==Yq}(e,i)){var a=i?e.textStroke:e.stroke;oX(t,"stroke",a="transparent"===a?Yq:a),oX(t,"stroke-width",(i?e.textStrokeWidth:e.lineWidth)/(e.strokeNoScale?e.host.getLineScale():1)),oX(t,"paint-order","stroke"),oX(t,"stroke-opacity",e.opacity),e.lineDash?(oX(t,"stroke-dasharray",e.lineDash.join(",")),oX(t,"stroke-dashoffset",$q(e.lineDashOffset||0))):oX(t,"stroke-dasharray",""),e.lineCap&&oX(t,"stroke-linecap",e.lineCap),e.lineJoin&&oX(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&oX(t,"stroke-miterlimit",e.miterLimit)}else oX(t,"stroke",Yq)}var sX={};sX.brush=function(t){var e=t.style,i=t.__svgEl;i||(i=Hq("path"),t.__svgEl=i),t.path||t.createPathProxy();var n=t.path;if(t.__dirtyPath){n.beginPath(),t.buildPath(n,t.shape),t.__dirtyPath=!1;var a=function(t){for(var e=[],i=t.data,n=t.len(),a=0;a<n;){var o="",r=0;switch(i[a++]){case qq.M:o="M",r=2;break;case qq.L:o="L",r=2;break;case qq.Q:o="Q",r=4;break;case qq.C:o="C",r=6;break;case qq.A:var s=i[a++],l=i[a++],h=i[a++],u=i[a++],c=i[a++],d=i[a++],p=i[a++],f=i[a++],g=Math.abs(d),m=nX(g%tX)&&!nX(g),v=!1;v=g>=tX||!nX(g)&&(d>-Qq&&d<0||d>Qq)==!!f;var y=iX(s+h*Jq(c)),x=iX(l+u*Kq(c));m&&(d=f?tX-1e-4:1e-4-tX,v=!0,9===a&&e.push("M",y,x));var _=iX(s+h*Jq(c+d)),b=iX(l+u*Kq(c+d));e.push("A",iX(h),iX(u),$q(p*eX),+v,+f,_,b);break;case qq.Z:o="Z";break;case qq.R:_=iX(i[a++]),b=iX(i[a++]);var w=iX(i[a++]),S=iX(i[a++]);e.push("M",_,b,"L",_+w,b,"L",_+w,b+S,"L",_,b+S,"L",_,b)}o&&e.push(o);for(var M=0;M<r;M++)e.push(iX(i[a++]))}return e.join(" ")}(n);a.indexOf("NaN")<0&&oX(i,"d",a)}rX(i,e),aX(i,t.transform),null!=e.text&&cX(t,t.getBoundingRect())};var lX={brush:function(t){var e=t.style,i=e.image;i instanceof HTMLImageElement&&(i=i.src);if(i){var n=e.x||0,a=e.y||0,o=e.width,r=e.height,s=t.__svgEl;s||(s=Hq("image"),t.__svgEl=s),i!==t.__imageSrc&&(!function(t,e,i){t.setAttributeNS("http://www.w3.org/1999/xlink",e,i)}(s,"href",i),t.__imageSrc=i),oX(s,"width",o),oX(s,"height",r),oX(s,"x",n),oX(s,"y",a),aX(s,t.transform),null!=e.text&&cX(t,t.getBoundingRect())}}},hX={},uX=new Fq,cX=function(t,e,i){var n=t.style;t.__dirty&&jq.normalizeTextStyle(n,!0);var a=n.text;if(null!=a){a+="";var o,r,s=t.__textSvgEl;if(s||(s=Hq("text"),t.__textSvgEl=s),rX(s,n,!0),t instanceof Uq||t.style.transformText)aX(s,t.transform);else if(t.transform)uX.copy(e),uX.applyTransform(t.transform),e=uX;else{var l=t.transformCoordToGlobal(e.x,e.y);e.x=l[0],e.y=l[1]}var h=n.textPosition,u=n.textDistance,c=n.textAlign||"left";"number"==typeof n.fontSize&&(n.fontSize+="px");var d=n.font||[n.fontStyle||"",n.fontWeight||"",n.fontSize||"",n.fontFamily||""].join(" ")||Zq.DEFAULT_FONT,p=dX(n.textVerticalAlign),f=(i=Zq.getBoundingRect(a,d,c,p)).lineHeight;if(h instanceof Array)o=e.x+h[0],r=e.y+h[1];else{var g=Zq.adjustTextPositionOnRect(h,e,u);o=g.x,r=g.y,p=dX(g.textVerticalAlign),c=g.textAlign}oX(s,"alignment-baseline",p),d&&(s.style.font=d);var m=n.textPadding;oX(s,"x",o),oX(s,"y",r);var v=a.split("\n"),y=v.length,x=c;"left"===x?(x="start",m&&(o+=m[3])):"right"===x?(x="end",m&&(o-=m[1])):"center"===x&&(x="middle",m&&(o+=(m[3]-m[1])/2));var _=0;if("baseline"===p?(_=-i.height+f,m&&(_-=m[2])):"middle"===p?(_=(-i.height+f)/2,m&&(r+=(m[0]-m[2])/2)):m&&(_+=m[0]),t.__text!==a||t.__textFont!==d){var b=t.__tspanList||[];t.__tspanList=b;for(var w=0;w<y;w++){(M=b[w])?M.innerHTML="":(M=b[w]=Hq("tspan"),s.appendChild(M),oX(M,"alignment-baseline",p),oX(M,"text-anchor",x)),oX(M,"x",o),oX(M,"y",r+w*f+_),M.appendChild(document.createTextNode(v[w]))}for(;w<b.length;w++)s.removeChild(b[w]);b.length=y,t.__text=a,t.__textFont=d}else if(t.__tspanList.length){var S=t.__tspanList.length;for(w=0;w<S;++w){var M;(M=t.__tspanList[w])&&(oX(M,"x",o),oX(M,"y",r+w*f+_))}}}};function dX(t){return"middle"===t?"middle":"bottom"===t?"baseline":"hanging"}function pX(){}function fX(t,e,i,n){for(var a=0,o=e.length,r=0,s=0;a<o;a++){var l=e[a];if(l.removed){for(h=[],u=s;u<s+l.count;u++)h.push(u);l.indices=h,s+=l.count}else{for(var h=[],u=r;u<r+l.count;u++)h.push(u);l.indices=h,r+=l.count,l.added||(s+=l.count)}}return e}hX.drawRectText=cX,hX.brush=function(t){var e=t.style;null!=e.text&&(e.textPosition=[0,0],cX(t,{x:e.x||0,y:e.y||0,width:0,height:0},t.getBoundingRect()))},Gq.path=sX,Gq.image=lX,Gq.text=hX,pX.prototype={diff:function(t,e,i){i||(i=function(t,e){return t===e}),this.equals=i;var n=this;t=t.slice();var a=(e=e.slice()).length,o=t.length,r=1,s=a+o,l=[{newPos:-1,components:[]}],h=this.extractCommon(l[0],e,t,0);if(l[0].newPos+1>=a&&h+1>=o){for(var u=[],c=0;c<e.length;c++)u.push(c);return[{indices:u,count:e.length}]}function d(){for(var i=-1*r;i<=r;i+=2){var s,h=l[i-1],u=l[i+1],c=(u?u.newPos:0)-i;h&&(l[i-1]=void 0);var d=h&&h.newPos+1<a,p=u&&0<=c&&c<o;if(d||p){if(!d||p&&h.newPos<u.newPos?(s={newPos:(f=u).newPos,components:f.components.slice(0)},n.pushComponent(s.components,void 0,!0)):((s=h).newPos++,n.pushComponent(s.components,!0,void 0)),c=n.extractCommon(s,e,t,i),s.newPos+1>=a&&c+1>=o)return fX(n,s.components);l[i]=s}else l[i]=void 0}var f;r++}for(;r<=s;){var p=d();if(p)return p}},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<a&&s+1<o&&this.equals(e[r+1],i[s+1]);)r++,s++,l++;return l&&t.components.push({count:l}),t.newPos=r,s},tokenize:function(t){return t.slice()},join:function(t){return t.slice()}};var gX=new pX;var mX=function(t,e,i){return gX.diff(t,e,i)},vX=Wq.createElement,yX=b,xX=ms,_X=Jn,bX=Hs,wX=Gq,SX=wX.path,MX=wX.image,IX=wX.text;function AX(t,e,i){this._svgRoot=t,this._tagNames="string"==typeof e?[e]:e,this._markLabel=i,this.nextId=0}AX.prototype.createElement=vX,AX.prototype.getDefs=function(t){var e=this._svgRoot,i=this._svgRoot.getElementsByTagName("defs");return 0===i.length?t?((i=e.insertBefore(this.createElement("defs"),e.firstChild)).contains||(i.contains=function(t){var e=i.children;if(!e)return!1;for(var n=e.length-1;n>=0;--n)if(e[n]===t)return!0;return!1}),i):null:i[0]},AX.prototype.update=function(t,e){if(t){var i=this.getDefs(!1);if(t._dom&&i.contains(t._dom))"function"==typeof e&&e();else{var n=this.add(t);n&&(t._dom=n)}}},AX.prototype.addDom=function(t){this.getDefs(!0).appendChild(t)},AX.prototype.removeDom=function(t){this.getDefs(!1).removeChild(t._dom)},AX.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return yX.each(this._tagNames,(function(i){var n=t.getElementsByTagName(i);e=e.concat([].slice.call(n))})),e},AX.prototype.markAllUnused=function(){var t=this.getDoms(),e=this;yX.each(t,(function(t){t[e._markLabel]="0"}))},AX.prototype.markUsed=function(t){t&&(t[this._markLabel]="1")},AX.prototype.removeUnused=function(){var t=this.getDefs(!1);if(t){var e=this.getDoms(),i=this;yX.each(e,(function(e){"1"!==e[i._markLabel]&&t.removeChild(e)}))}},AX.prototype.getSvgProxy=function(t){return t instanceof xX?SX:t instanceof _X?MX:t instanceof bX?IX:SX},AX.prototype.getTextSvgElement=function(t){return t.__textSvgEl},AX.prototype.getSvgElement=function(t){return t.__svgEl};var TX=AX,CX=TX,LX=b,DX=Ae;function PX(t){CX.call(this,t,["linearGradient","radialGradient"],"__gradient_in_use__")}LX.inherits(PX,CX),PX.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var i=this;LX.each(["fill","stroke"],(function(n){if(e.style[n]&&("linear"===e.style[n].type||"radial"===e.style[n].type)){var a,o=e.style[n],r=i.getDefs(!0);o._dom?(a=o._dom,r.contains(o._dom)||i.addDom(a)):a=i.add(o),i.markUsed(e);var s=a.getAttribute("id");t.setAttribute(n,"url(#"+s+")")}}))}},PX.prototype.add=function(t){var e;if("linear"===t.type)e=this.createElement("linearGradient");else{if("radial"!==t.type)return DX("Illegal gradient type."),null;e=this.createElement("radialGradient")}return t.id=t.id||this.nextId++,e.setAttribute("id","zr-gradient-"+t.id),this.updateDom(t,e),this.addDom(e),e},PX.prototype.update=function(t){var e=this;CX.prototype.update.call(this,t,(function(){var i=t.type,n=t._dom.tagName;"linear"===i&&"linearGradient"===n||"radial"===i&&"radialGradient"===n?e.updateDom(t,t._dom):(e.removeDom(t),e.add(t))}))},PX.prototype.updateDom=function(t,e){if("linear"===t.type)e.setAttribute("x1",t.x),e.setAttribute("y1",t.y),e.setAttribute("x2",t.x2),e.setAttribute("y2",t.y2);else{if("radial"!==t.type)return void DX("Illegal gradient type.");e.setAttribute("cx",t.x),e.setAttribute("cy",t.y),e.setAttribute("r",t.r)}t.global?e.setAttribute("gradientUnits","userSpaceOnUse"):e.setAttribute("gradientUnits","objectBoundingBox"),e.innerHTML="";for(var i=t.colorStops,n=0,a=i.length;n<a;++n){var o=this.createElement("stop");o.setAttribute("offset",100*i[n].offset+"%"),o.setAttribute("stop-color",i[n].color),e.appendChild(o)}t._dom=e},PX.prototype.markUsed=function(t){if(t.style){var e=t.style.fill;e&&e._dom&&CX.prototype.markUsed.call(this,e._dom),(e=t.style.stroke)&&e._dom&&CX.prototype.markUsed.call(this,e._dom)}};var kX=PX,OX=TX,zX=b,EX=mt;function RX(t){OX.call(this,t,"clipPath","__clippath_in_use__")}zX.inherits(RX,OX),RX.prototype.update=function(t){var e=this.getSvgElement(t);e&&this.updateDom(e,t.__clipPaths,!1);var i=this.getTextSvgElement(t);i&&this.updateDom(i,t.__clipPaths,!0),this.markUsed(t)},RX.prototype.updateDom=function(t,e,i){if(e&&e.length>0){var n,a,o=this.getDefs(!0),r=e[0],s=i?"_textDom":"_dom";r[s]?(a=r[s].getAttribute("id"),n=r[s],o.contains(n)||o.appendChild(n)):(a="zr-clip-"+this.nextId,++this.nextId,(n=this.createElement("clipPath")).setAttribute("id",a),o.appendChild(n),r[s]=n);var l=this.getSvgProxy(r);if(r.transform&&r.parent.invTransform&&!i){var h=Array.prototype.slice.call(r.transform);EX.mul(r.transform,r.parent.invTransform,r.transform),l.brush(r),r.transform=h}else l.brush(r);var u=this.getSvgElement(r);n.appendChild(u.cloneNode()),t.setAttribute("clip-path","url(#"+a+")"),e.length>1&&this.updateDom(n,e.slice(1),i)}else t&&t.setAttribute("clip-path","none")},RX.prototype.markUsed=function(t){var e=this;t.__clipPaths&&t.__clipPaths.length>0&&zX.each(t.__clipPaths,(function(t){t._dom&&OX.prototype.markUsed.call(e,t._dom),t._textDom&&OX.prototype.markUsed.call(e,t._textDom)}))};var NX=RX,VX=Wq.createElement,BX=b,GX=BX.each,WX=Ae,HX=ms,FX=Jn,ZX=Hs,jX=mX,UX=kX,qX=NX,XX=Gq,YX=XX.path,$X=XX.image,KX=XX.text;function JX(t){return parseInt(t,10)}function QX(t,e){return e&&t&&e.parentNode!==t}function tY(t,e,i){if(QX(t,e)&&i){var n=i.nextSibling;n?t.insertBefore(e,n):t.appendChild(e)}}function eY(t,e){if(QX(t,e)){var i=t.firstChild;i?t.insertBefore(e,i):t.appendChild(e)}}function iY(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function nY(t){return t.__textSvgEl}function aY(t){return t.__svgEl}var oY=function(t,e,i){this.root=t,this.storage=e,this._opts=i=BX.extend({},i||{});var n=VX("svg");n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("version","1.1"),n.setAttribute("baseProfile","full"),n.style["user-select"]="none",n.style.cssText="position:absolute;left:0;top:0;",this.gradientManager=new UX(n),this.clipPathManager=new qX(n);var a=document.createElement("div");a.style.cssText="overflow:hidden;position:relative",this._svgRoot=n,this._viewport=a,t.appendChild(a),a.appendChild(n),this.resize(i.width,i.height),this._visibleList=[]};oY.prototype={constructor:oY,getType:function(){return"svg"},getViewportRoot:function(){return this._viewport},getViewportRootOffset:function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},refresh:function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},_paintList:function(t){this.gradientManager.markAllUnused(),this.clipPathManager.markAllUnused();var e,i,n=this._svgRoot,a=this._visibleList,o=t.length,r=[];for(e=0;e<o;e++){var s=t[e],l=(i=s)instanceof HX?YX:i instanceof FX?$X:i instanceof ZX?KX:YX;s.invisible||(s.__dirty&&(l&&l.brush(s),this.clipPathManager.update(s),s.style&&(this.gradientManager.update(s.style.fill),this.gradientManager.update(s.style.stroke)),s.__dirty=!1),r.push(s))}var h,u=jX(a,r);for(e=0;e<u.length;e++){if((f=u[e]).removed)for(var c=0;c<f.count;c++){var d=aY(s=a[f.indices[c]]),p=nY(s);iY(n,d),iY(n,p)}}for(e=0;e<u.length;e++){var f;if((f=u[e]).added)for(c=0;c<f.count;c++){d=aY(s=r[f.indices[c]]),p=nY(s);h?tY(n,d,h):eY(n,d),d?tY(n,p,d):h?tY(n,p,h):eY(n,p),tY(n,p,d),h=p||d||h,this.gradientManager.addWithoutUpdate(d,s),this.clipPathManager.markUsed(s)}else if(!f.removed)for(c=0;c<f.count;c++){h=d=nY(s=r[f.indices[c]])||aY(s)||h,this.gradientManager.markUsed(s),this.gradientManager.addWithoutUpdate(d,s),this.clipPathManager.markUsed(s)}}this.gradientManager.removeUnused(),this.clipPathManager.removeUnused(),this._visibleList=r},_getDefs:function(t){var e,i=this._svgRoot;return 0===(e=this._svgRoot.getElementsByTagName("defs")).length?t?((e=i.insertBefore(VX("defs"),i.firstChild)).contains||(e.contains=function(t){var i=e.children;if(!i)return!1;for(var n=i.length-1;n>=0;--n)if(i[n]===t)return!0;return!1}),e):null:e[0]},resize:function(t,e){var i=this._viewport;i.style.display="none";var n=this._opts;if(null!=t&&(n.width=t),null!=e&&(n.height=e),t=this._getSize(0),e=this._getSize(1),i.style.display="",this._width!==t&&this._height!==e){this._width=t,this._height=e;var a=i.style;a.width=t+"px",a.height=e+"px";var o=this._svgRoot;o.setAttribute("width",t),o.setAttribute("height",e)}},getWidth:function(){return this._width},getHeight:function(){return this._height},_getSize:function(t){var e=this._opts,i=["width","height"][t],n=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[i]&&"auto"!==e[i])return parseFloat(e[i]);var r=this.root,s=document.defaultView.getComputedStyle(r);return(r[n]||JX(s[i])||JX(r.style[i]))-(JX(s[a])||0)-(JX(s[o])||0)|0},dispose:function(){this.root.innerHTML="",this._svgRoot=this._viewport=this.storage=null},clear:function(){this._viewport&&this.root.removeChild(this._viewport)},pathToSvg:function(){this.refresh();var t=this._svgRoot.outerHTML;return"data:img/svg+xml;utf-8,"+unescape(t)}},GX(["getLayer","insertLayer","eachLayer","eachBuiltinLayer","eachOtherLayer","getLayers","modLayer","delLayer","clearLayer","toDataURL","pathToImage"],(function(t){var e;oY.prototype[t]=(e=t,function(){WX('In SVG mode painter not support method "'+e+'"')})}));var rY=oY;(0,v.registerPainter)("svg",rY),function(t){var e=m;!function(){for(var i in e){if(null==e||!e.hasOwnProperty(i)||"default"===i||"__esModule"===i)return;t[i]=e[i]}}();var i=jd;!function(){for(var e in i){if(null==i||!i.hasOwnProperty(e)||"default"===e||"__esModule"===e)return;t[e]=i[e]}}()}(g);const sY={class:"market-temperature"},lY={class:"container"},hY={class:"border3"},uY={class:"chart-section"},cY={class:"border4"},dY={class:"border1"},pY={class:"title"},fY=["src"],gY={class:"titleContent"},mY={class:"secondTitle"},vY={class:"secondTitleItem"},yY={class:"calendar"},xY={key:0,class:"month"},_Y={class:"monthContent"},bY={class:"calendarItemTitle"},wY={key:1,class:"calendarItemContent"},SY=["src"],MY={key:2,class:"calendarItemContent"},IY={key:3,class:"calendarItemContent"},AY={key:0},TY={key:1},CY={__name:"marketTemperature",props:{companyName:{type:String,default:""},stockCode:{type:String,default:""}},setup(t,{expose:f}){const m=t,v=e(["#32A3FF","#2BD977","#A239FF","#FF7945","#FF5289","#5791CB"]),y=e(["1","2","3","4","5","6","7","8","9","10","11","12"]),x=e(),_=e(["","","","","","",""]),b=e(),w=e([]),S=e([]);let M=null;const I=["NDX","DJIA","SPX","STI","KLSE","TSX","N225","KS11","JKSE","1A0001","HSI","I63","VNINDE"],A=i((()=>I.includes(m.stockCode))),T=e([]);function C(){const t=document.querySelector(".border4 .el-table");if(t){const e=t.offsetWidth/7,i=Math.min(.15*e,20),n=document.querySelectorAll(".WDRL_date"),a=document.querySelectorAll(".WDRL_data");n.forEach((t=>{t.style.fontSize=`${i}px`})),a.forEach((t=>{t.style.fontSize=.8*i+"px"}))}}return n((()=>{M&&(M.dispose(),M=null),window.marketTempResizeHandler&&(window.removeEventListener("resize",window.marketTempResizeHandler),window.marketTempResizeHandler=null),window.marketTempContainerObserver&&(window.marketTempContainerObserver.disconnect(),window.marketTempContainerObserver=null)})),f({initChart:function(t,i,n){if(!t||!i||!n)return;M&&(M.dispose(),M=null);const a=i.map((t=>[t[1],t[2],t[3],t[4]]));let o=1/0,r=-1/0;i.forEach((t=>{const e=t[3],i=t[4];o=Math.min(o,e),r=Math.max(r,i)}));const s=Math.floor(o),l=Math.ceil(r);w.value=n,S.value=i,(()=>{const t=e([]);T.value=JSON.parse(JSON.stringify(w.value));for(let e=0;e<T.value.length;e++){const i=p(T.value[e].date).date();T.value[e].day=i,0!=e&&1!=i||(t.value.push({year:p(T.value[e].date).year(),month:p(T.value[e].date).month()+1}),T.value[e].month=p(T.value[e].date).month()+1);const n=T.value[e].stock_temperature;""==n||null==n||""==n?T.value[e].color=v.value[5]:n<="20"?T.value[e].color=v.value[0]:parseInt(n)<="50"?T.value[e].color=v.value[1]:parseInt(n)<="70"?T.value[e].color=v.value[2]:parseInt(n)<="90"?T.value[e].color=v.value[3]:T.value[e].color=v.value[4]}const i=t.value[0],n=t.value[t.value.length-1];x.value=`${i.year}${i.month} ~`,i.year!=n.year?x.value+=`${n.year}${n.month}`:x.value+=`${n.month}`})();const h=t.map((t=>t[0])),u=t.map((t=>Math.round(t[1]))),c=t.map((t=>Math.round(t[2]))),d=c.every(((t,e)=>t===u[e])),f=d?c.map((()=>null)):c;M=g.init(b.value),M.setOption({tooltip:{trigger:"axis",confine:!0,position:function(t,e,i,n,a){const o=a.viewSize[0],r=a.viewSize[1],s=a.contentSize[0],l=a.contentSize[1];if(window.innerWidth<=768)return{top:10,left:Math.max(10,(o-s)/2)};{let e=t[0],i=t[1];return e+s>o&&(e=o-s-10),i+l>r&&(i=r-l-10),[Math.max(10,e),Math.max(10,i)]}},axisPointer:{type:"cross",crossStyle:{color:"#999",width:1,type:"dashed"},lineStyle:{color:"#999",width:1,type:"dashed"}},backgroundColor:"#646E71",borderColor:"#fff",borderWidth:1,padding:[8,12],textStyle:{color:"#fff",fontSize:window.innerWidth<=768?10:12},extraCssText:window.innerWidth<=768?"max-width: 280px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);":"max-width: 350px; word-wrap: break-word; white-space: normal; box-shadow: 0 2px 8px rgba(0,0,0,0.3);",formatter:function(t){if(t&&t.length>0){const e=window.innerWidth<=768,i=e?"10px":"12px",n=e?"1.3":"1.5",a=e?"4px":"6px";let o=`<div style="font-weight: bold; color: #fff; margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">: ${t[0].name}</div>`;return t.forEach((t=>{if("candlestick"===t.seriesType){const r=t.data[1],s=t.data[2],l=t.data[3],h=t.data[4];e?(o+=`<div style="margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">`,o+=`<div style="color: #fff; font-weight: bold; margin-bottom: 2px;">${t.seriesName}</div>`,o+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${r}</span></div>`,o+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${s}</span></div>`,o+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${l}</span></div>`,o+=`<div style="color: #fff; display: flex; justify-content: space-between;"><span>:</span><span>${h}</span></div>`,o+="</div>"):(o+=`<div style="margin-bottom: ${a}; font-size: ${i}; line-height: ${n};">`,o+=`<div style="color: #fff; font-weight: bold;">${t.seriesName}</div>`,o+=`<div style="color: #fff;">: ${r}</div>`,o+=`<div style="color: #fff;">: ${s}</div>`,o+=`<div style="color: #fff;">: ${l}</div>`,o+=`<div style="color: #fff;">: ${h}</div>`,o+="</div>")}else"line"===t.seriesType&&(o+=`<div style="color: #fff; margin-bottom: 2px; font-size: ${i}; line-height: ${n};">${t.seriesName}: ${t.value}</div>`)})),o}return""}},legend:{data:["K线","",""],textStyle:{color:"white",fontSize:window.innerWidth<=768?14:18}},grid:{left:window.innerWidth<=768?"15%":"100px",right:window.innerWidth<=768?"40px":"100px",top:window.innerWidth<=768?"40px":"60px",bottom:window.innerWidth<=768?"60px":"80px",containLabel:!1,height:window.innerWidth<=768?"200px":"300px",width:window.innerWidth<=768?"70%":"80%"},xAxis:{type:"category",data:h,axisLine:{lineStyle:{color:"#00BFFF"}},axisLabel:{color:"#FFFFFF",fontSize:12,fontWeight:"bold"},axisTick:{show:!0,alignWithLabel:!0,lineStyle:{color:"white",width:1,type:"dashed"}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}},splitLine:{show:!1,lineStyle:{color:"#999",width:1,type:"dashed",opacity:.3}}},yAxis:[{min:s,max:l,axisLine:{lineStyle:{color:"#00FF7F"}},axisLabel:{color:"#FFFFFF",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",formatter:function(t){return t.toString()},margin:8},axisTick:{lineStyle:{color:"#00FF7F"}},splitLine:{show:!1,lineStyle:{color:"#333333",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",label:{show:!0,color:"black"},lineStyle:{color:"#999",width:1,type:"dashed"}}},{min:0,max:100,position:"right",axisLabel:{color:"#FFFF00",fontSize:window.innerWidth<=768?10:12,fontWeight:"bold",margin:8},axisLine:{lineStyle:{color:"#FF1493",width:2}},axisTick:{lineStyle:{color:"#FF1493"}},splitLine:{show:!1,lineStyle:{color:"#444444",type:"solid",opacity:.3}},axisPointer:{show:!0,type:"line",lineStyle:{color:"#999",width:1,type:"dashed"},label:{show:!0,color:"black"}}}],color:["#f00","white"],series:[{name:"K线",type:"candlestick",data:a,z:1,itemStyle:{normal:{color:"#00FF00",color0:"#FF0000",borderColor:"#00FF00",borderColor0:"#FF0000"}}},{name:"",type:"line",yAxisIndex:1,data:f,z:2,connectNulls:!1,lineStyle:{width:2},symbol:"circle",symbolSize:4},{name:"",type:"line",yAxisIndex:1,data:u,z:3,lineStyle:{width:2},symbol:"circle",symbolSize:4}],dataZoom:[{type:"slider",xAxisIndex:0,filterMode:"filter",textStyle:{color:"white"},start:50,end:100,bottom:"0%"},{type:"inside",xAxisIndex:0,filterMode:"filter"}]}),M&&(M.on("dataZoom",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousewheel",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mousedown",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})),M.on("mouseup",(()=>{window.handleChartInteractionEnd&&window.handleChartInteractionEnd()})),M.on("click",(()=>{window.handleChartInteractionStart&&window.handleChartInteractionStart()})));const m=(t,e)=>{let i;return function(...n){clearTimeout(i),i=setTimeout((()=>{clearTimeout(i),t(...n)}),e)}},y=m((()=>{if(M&&!M.isDisposed())try{M.resize(),C()}catch(t){}}),100);window.marketTempResizeHandler&&window.removeEventListener("resize",window.marketTempResizeHandler),window.addEventListener("resize",y),window.marketTempResizeHandler=y;const _=document.querySelector(".KlineClass");if(_&&window.ResizeObserver){const t=new ResizeObserver(m((()=>{if(M&&!M.isDisposed())try{M.resize()}catch(t){}}),100));t.observe(_),window.marketTempContainerObserver=t}C()}}),(t,e)=>(a(),o("div",sY,[r("div",lY,[r("div",hY,[r("section",uY,[r("div",null,[r("div",{ref_key:"KlineCanvs",ref:b,class:"KlineClass"},null,512)])])]),r("div",cY,[r("div",dY,[r("div",pY,[r("img",{src:s("/aixiaocaishen/static/images/-d851a441.png"),alt:"",class:"titleImg"},null,8,fY),r("div",gY,l(x.value),1)]),r("div",mY,[(a(!0),o(h,null,u(_.value,(t=>(a(),o("div",{key:t,class:"secondTitleItems"},[r("div",vY,l(t),1)])))),128))]),r("div",yY,[(a(),o(h,null,u(5,(t=>r("div",{key:t,class:"calendarCol"},[(a(!0),o(h,null,u(T.value.slice(7*(t-1),7*t),(t=>(a(),o("div",{key:t,class:"calendarRow"},[r("div",{class:"calendarItem",style:c({backgroundColor:t.color})},[t.month?(a(),o("div",xY,[r("div",_Y,l(y.value[t.month-1]),1)])):d("",!0),r("div",bY,l(t.day),1),""==t.stock_temperature?(a(),o("div",wY,[r("img",{src:s("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAAAXNSR0IArs4c6QAAAj5JREFUWEftl7FrFEEUxr93im/mbjEolkpQQdRCJHaCCgrxHzBYphJsRAKKgq2FhQGxsFY7UVtBE0GxtbEQBEEjKkEQDIi3M4e7n6zkjs3e3d7c7QkWN+XOe9/+eG/eezOCIZf3fj/JcwBOAZgGYACsisirNE3vW2ufDykJCXUgqd77RQDnAWwq8VtKkmS+0WishmoHQawDPAFwMlD4K8lj1tqPIfZBEM65WwAuhgjmbN6q6oyItAb5DYRwzu0F8A7A5pzYZxG52mq1lqMo8nEcH6zVagsA5go/vGyMuVkZwnt/jeT1nNAaycPW2k9FcefcbQAXct/fG2P2VYZwzj0EcCYntGiMudRLmOSU9/4bAG3vq+o2EVkrAwlJxwsAJ9oiIjKnqo/6iTrnXgM40t4nudtau1IV4iWA4zmR08aYZyUQWZ/oVBHJPYOqJCQSRYhZY8xSCcTyeiP7azKByJ2J6ukgWS+06VhEfvdLRw/7XyKSjnQwSW4BUBtU40PsexFhL/uugxnH8bSIPAYwA4QPuACYHyQXrLX3irZdEN77uyTnA0RHMWmp6g4R+Zl37oJwzm1oTqP8qTT/IgdUNZtFnTWB6IyCYugm6WhHZBKJSST+1+p4CmB23J2yrZem6a56vf5lUMe8AeDKP4L4YIzJnhAbVlfbbjabO0XkjYhsHzMIReSsqma393KIbNd7f4jkHQBHxzTOV7LHkqo+CLpP5I1Ibo3jeKpKRJIkcVEUfe93ocm0B962qwCE+v4BZnoUMEqdbwsAAAAASUVORK5CYII="),alt:"",class:"ciImg"},null,8,SY)])):""==t.stock_temperature?(a(),o("div",MY," ")):(a(),o("div",IY,[A.value?(a(),o("div",AY,l(t.market_temperature),1)):(a(),o("div",TY,l(t.market_temperature)+" | "+l(t.stock_temperature),1))]))],4)])))),128))]))),64))])])])])]))}};var LY=f(CY,[["__scopeId","data-v-d0e9080c"]]),DY=Object.freeze(Object.defineProperty({__proto__:null,default:LY},Symbol.toStringTag,{value:"Module"}));export{DY as a,g as e,LY as m};