commit ec2bbe1b83d19f5793acb89f30144acc3ac1226b Author: liuhanqing Date: Wed Feb 4 15:09:53 2026 +0800 大屏项目初始化 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..024ffd5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +# idea +/.idea/ +**/target/ + +/log/ diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..4fea3b2 --- /dev/null +++ b/css/index.css @@ -0,0 +1,293 @@ +* { + margin: 0; + padding: 0; +} + +body { + position: absolute; + height: 100%; + width: 100%; + transform: scale(0.8); + background-image: url('../img/bj.png'); + background-size: 1920px 1080px; + /* 背景图片覆盖整个元素 */ + background-repeat: no-repeat; + /* 背景图片不重复 */ +} + +.riqi { + font-size: 20px; + color: rgb(255, 255, 255); + text-align: right; + margin-top: 5px; +} + +.shijian { + text-align: right; + font-size: 45px; + color: rgb(254, 254, 254); + font-weight: bold; +} + +.datetime-box { + position: absolute; + top: 1%; + right: 1%; + display: flex; + flex-direction: column; + align-items: flex-end; + z-index: 10; +} + +.header-container { + position: relative; + width: 100%; + height: 100px; +} + +.zi { + width: 100%; + margin-top: 15px; + text-align: center; + position: absolute; + font-size: 55px; + font-weight: bold; + background: linear-gradient(0deg, #fff, #00fff9, #fff); + -webkit-background-clip: text; + background-clip: text; + -webkit-text-fill-color: transparent; + text-fill-color: transparent; + +} + +.zi::before { + z-index: -1; + content: '数 据 可 视 化 看 板'; + position: absolute; + text-shadow: 1px 1px 10px #00ddcf; +} + +.content-wrapper { + position: absolute; + top: 100px; + width: 96%; + left: 2%; + height: 88%; + display: flex; + flex-direction: column; +} + +.lanes-container { + display: flex; + justify-content: space-between; + height: 75%; + width: 100%; +} + +.lane-column { + width: 32%; + height: 100%; + display: flex; + flex-direction: column; +} + +.lane-header { + text-align: center; + color: #00fff9; + font-size: 30px; + font-weight: bold; + margin-bottom: 5px; + background: rgba(0, 255, 255, 0.1); + padding: 5px; + border-radius: 5px; +} + +.lane-part { + flex: 1; + position: relative; + background-image: url('../img/kuang.png'); + background-size: 100% 100%; + background-repeat: no-repeat; + margin-bottom: 10px; +} + +.lane-part .divHead { + position: absolute; + width: 84%; + height: 1px; + top: 6%; /* Changed from margin-top to top for height-relative positioning */ + left: 8%; + margin-top: 0; + margin-left: 0; + background-image: url('../img/kuang_tou.png'); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.alarm-section { + height: 23%; + width: 100%; + background-image: url('../img/kuang.png'); + background-size: 100% 100%; + position: relative; + margin-top: 1%; +} + +.alarm-section .divHead { + position: absolute; + width: 20%; + height: 1px; + top: 10%; /* Changed from margin-top to top for height-relative positioning */ + left: 1%; + margin-top: 0; + margin-left: 0; + background-image: url('../img/kuang_tou.png'); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.divHead { + /* Fallback/Original definition if needed, but overridden above */ + position: absolute; + width: 84%; + height: 1px; + margin-top: 16%; + margin-left: 8%; + background-image: url('../img/kuang_tou.png'); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.name { + position: absolute; + color: #0dede4; + font-weight: bold; + bottom: 5px; + font-size: 26px; +} + +.name1 { + position: absolute; + width: 35px; + height: 15px; + bottom: 10px; + right: 2px; + background-image: url('../img/kuang_you.png'); + background-size: 100% 100%; + background-repeat: no-repeat; +} + +.part-content { + width: 100%; + height: 80%; + position: absolute; + top: 15%; +} + +.alarm-list-container { + position: absolute; + top: 30%; /* Moved down to prevent overlap with title */ + width: 96%; + left: 2%; + height: 65%; /* Adjusted height */ + overflow: hidden; +} + +.alarm-content-scroll { + height: calc(100% - 40px); + overflow: hidden; + position: relative; + width: 100%; +} + +.alarm-items { + list-style: none; + padding: 0; + margin: 0; +} + +.alarm-item { + display: flex; + flex-flow: row nowrap; + justify-content: space-around; + border-bottom: 1px solid #00ffff57; + color: #fff; +} + +.alarm-item p { + margin: 0; + padding-top: 4px; + padding-bottom: 2px; + width: 25%; + text-align: center; + word-break: break-all; + height: 35px; + font-size: 26px; +} + +/* Reuse existing list styles for alarm */ +.kuang { + width: 100%; + margin: 0; + padding: 0; +} + +.kuang>li { + color: #fff; + width: 100%; + display: flex; + flex-flow: row nowrap; + justify-content: space-around; + border-bottom: 1px solid #00ffff57; +} + + +.kuang>li>p { + margin: 0; + padding-top: 4px; + padding-bottom: 2px; + width: 25%; /* 4 columns for alarm list */ + text-align: center; + word-break: break-all; + height: 35px; + font-size: 26px; +} +.kuang>li:first-child { + color: #ffb742; + text-align: center; + height: 40px; + background: #013132; + /* font-weight: bold; */ + font-size: 30px; + position: relative; +} + +/* Lane list styles */ +.lane-list { + width: 90%; + margin-left: 5%; + padding: 0; + list-style: none; +} + +.lane-item { + display: flex; + justify-content: space-around; + border-bottom: 1px solid #00ffff57; + color: #fff; +} + +.lane-item p { + margin: 0; + padding: 5px 0; + width: 25%; + text-align: center; + font-size: 26px; +} + +.lane-item.header { + background: #013132; + color: #ffb742; + font-weight: bold; + font-size: 30px; +} diff --git a/img/bj.png b/img/bj.png new file mode 100644 index 0000000..61aa8d4 Binary files /dev/null and b/img/bj.png differ diff --git a/img/kuang.png b/img/kuang.png new file mode 100644 index 0000000..e0f46cf Binary files /dev/null and b/img/kuang.png differ diff --git a/img/kuang_tou.png b/img/kuang_tou.png new file mode 100644 index 0000000..520fbd0 Binary files /dev/null and b/img/kuang_tou.png differ diff --git a/img/kuang_you.png b/img/kuang_you.png new file mode 100644 index 0000000..c2a152b Binary files /dev/null and b/img/kuang_you.png differ diff --git a/img/quan.png b/img/quan.png new file mode 100644 index 0000000..044fd7f Binary files /dev/null and b/img/quan.png differ diff --git a/img/tou.png b/img/tou.png new file mode 100644 index 0000000..1f9da18 Binary files /dev/null and b/img/tou.png differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..fc332cf --- /dev/null +++ b/index.html @@ -0,0 +1,94 @@ + + + + + + + + + + + + 大屏监控 + + + +
+
+
数 据 可 视 化 看 板
+ +
+
+
+
+
+
+ +
+
+ +
+
1巷道
+
+
+
任务监控
+
+
+
+
+
+ + +
+
2巷道
+
+
+
任务监控
+
+
+
+
+
+ + +
+
3巷道
+
+
+
任务监控
+
+
+
+
+
+
+ + +
+
+
报警信息
+
+
+
+
    +
  • +

    任务号

    +

    时间

    +

    类型

    +

    详情

    +
  • +
+
+
    + +
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/js/echarts.min.js b/js/echarts.min.js new file mode 100644 index 0000000..7d450a9 --- /dev/null +++ b/js/echarts.min.js @@ -0,0 +1,45 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},e(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);var o="sans-serif",a="12px "+o;var s,l,u=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var c=0;c>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,d=h.top;a.push(p,d),l=l&&o&&p===o[c]&&d===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?$t(s,a):$t(a,s))}(s,a,o);if(l)return l(t,n,i),!0}return!1}function ee(t){return"CANVAS"===t.nodeName.toUpperCase()}var ne=/([&<>"'])/g,ie={"&":"&","<":"<",">":">",'"':""","'":"'"};function re(t){return null==t?"":(t+"").replace(ne,(function(t,e){return ie[e]}))}var oe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ae=[],se=r.browser.firefox&&+r.browser.version.split(".")[0]<39;function le(t,e,n,i){return n=n||{},i?ue(t,e,n):se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ue(t,e,n),n}function ue(t,e,n){if(r.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(ee(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=o-a.top)}if(te(ae,t,i,o))return n.zrX=ae[0],void(n.zrY=ae[1])}n.zrX=n.zrY=0}function he(t){return t||window.event}function ce(t,e,n){if(null!=(e=he(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&le(t,r,e,n)}else{le(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&oe.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pe(t,e,n,i){t.addEventListener(e,n,i)}var de=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function fe(t){return 2===t.which||3===t.which}var ge=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=ye(r)/ye(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function me(){return[1,0,0,1,0,0]}function xe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function _e(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function be(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function we(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Se(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(n),c=Math.cos(n);return t[0]=r*c+s*h,t[1]=-r*h+s*c,t[2]=o*c+l*h,t[3]=-o*h+c*l,t[4]=c*(a-i[0])+h*(u-i[1])+i[0],t[5]=c*(u-i[1])-h*(a-i[0])+i[1],t}function Me(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Ie(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Te(t){var e=[1,0,0,1,0,0];return _e(e,t),e}var Ce=Object.freeze({__proto__:null,create:me,identity:xe,copy:_e,mul:be,translate:we,rotate:Se,scale:Me,invert:Ie,clone:Te}),De=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Ae=Math.min,ke=Math.max,Le=new De,Pe=new De,Oe=new De,Re=new De,Ne=new De,Ee=new De,ze=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Ae(t.x,this.x),n=Ae(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ke(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=ke(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return we(r,r,[-e.x,-e.y]),Me(r,r,[n,i]),we(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=x,gf&&(f=_,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Le.x=Oe.x=n.x,Le.y=Re.y=n.y,Pe.x=Re.x=n.x+n.width,Pe.y=Oe.y=n.y+n.height,Le.transform(i),Re.transform(i),Pe.transform(i),Oe.transform(i),e.x=Ae(Le.x,Pe.x,Oe.x,Re.x),e.y=Ae(Le.y,Pe.y,Oe.y,Re.y);var l=ke(Le.x,Pe.x,Oe.x,Re.x),u=ke(Le.y,Pe.y,Oe.y,Re.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Ve="silent";function Be(){de(this.event)}var Fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(jt),Ge=function(t,e){this.x=t,this.y=e},We=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],He=new ze(0,0,0,0),Ye=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new Ge(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new Fe,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new Zt(a),a}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(E(We,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=Ze(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Ge(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ge(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Be}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new Ge(t,e);if(Ue(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new ze(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(He.copy(h.getBoundingRect()),h.transform&&He.applyTransform(h.transform),He.intersect(l)&&o.push(h))}if(o.length)for(var c=Math.PI/12,p=2*Math.PI,d=0;d=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=Xe(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Ve)){e.target=a;break}}}function Ze(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ye.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=Ze(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Vt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function je(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function qe(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ke(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function $e(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Je(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=$e(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=Ke(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-Ke(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=je(t,n,i,e))s&&(l=s),qe(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var tn=!1;function en(){tn||(tn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var rn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nn}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(en(),u.z=0),isNaN(u.z2)&&(en(),u.z2=0),isNaN(u.zlevel)&&(en(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),on=r.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},an={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.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-an.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*an.bounceIn(2*t):.5*an.bounceOut(2*t-1)+.5}},sn=Math.pow,ln=Math.sqrt,un=1e-8,hn=1e-4,cn=ln(3),pn=1/3,dn=Mt(),fn=Mt(),gn=Mt();function yn(t){return t>-1e-8&&tun||t<-1e-8}function mn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function xn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function _n(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(yn(h)&&yn(c)){if(yn(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(yn(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=ln(f),m=h*s+1.5*a*(-c+v),x=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-sn(-m,pn):sn(m,pn))+(x=x<0?-sn(-x,pn):sn(x,pn))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var _=(2*h*s-3*a*c)/(2*ln(h*h*h)),b=Math.acos(_)/3,w=ln(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+cn*Math.sin(b)))/(3*a),(-s+w*(S-cn*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function bn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(yn(a)){if(vn(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(yn(u))r[0]=-o/(2*a);else if(u>0){var h,c=ln(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function wn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Sn(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;dn[0]=l,dn[1]=u;for(var m=0;m<1;m+=.05)fn[0]=mn(t,n,r,a,m),fn[1]=mn(e,i,o,s,m),(f=Ft(dn,fn))=0&&f=0&&y=1?1:_n(0,i,o,1,t,s)&&mn(0,r,a,1,s[0])}}}var On=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||bt,this.ondestroy=t.ondestroy||bt,this.onrestart=t.onrestart||bt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=X(t)?t:an[t]||Pn(t)},t}(),Rn=function(t){this.value=t},Nn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Rn(t);return this.insertEntry(e),e},t.prototype.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),En=function(){function t(t){this._list=new Nn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Rn(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),zn={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 Vn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Bn(t){return t<0?0:t>1?1:t}function Fn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Vn(parseFloat(e)/100*255):Vn(parseInt(e,10))}function Gn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Bn(parseFloat(e)/100):Bn(parseFloat(e))}function Wn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Hn(t,e,n){return t+(e-t)*n}function Yn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Xn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Un=new En(20),Zn=null;function jn(t,e){Zn&&Xn(Zn,e),Zn=Un.put(t,Zn||e.slice())}function qn(t,e){if(t){e=e||[];var n=Un.get(t);if(n)return Xn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in zn)return Xn(e,zn[i]),jn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Yn(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),jn(t,e),e):void Yn(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Yn(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),jn(t,e),e):void Yn(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Yn(e,+u[0],+u[1],+u[2],1):Yn(e,0,0,0,1);h=Gn(u.pop());case"rgb":return u.length>=3?(Yn(e,Fn(u[0]),Fn(u[1]),Fn(u[2]),3===u.length?h:Gn(u[3])),jn(t,e),e):void Yn(e,0,0,0,1);case"hsla":return 4!==u.length?void Yn(e,0,0,0,1):(u[3]=Gn(u[3]),Kn(u,e),jn(t,e),e);case"hsl":return 3!==u.length?void Yn(e,0,0,0,1):(Kn(u,e),jn(t,e),e);default:return}}Yn(e,0,0,0,1)}}function Kn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Gn(t[1]),r=Gn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Yn(e=e||[],Vn(255*Wn(a,o,n+1/3)),Vn(255*Wn(a,o,n)),Vn(255*Wn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $n(t,e){var n=qn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return ri(n,4===n.length?"rgba":"rgb")}}function Jn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Vn(Hn(a[0],s[0],l)),n[1]=Vn(Hn(a[1],s[1],l)),n[2]=Vn(Hn(a[2],s[2],l)),n[3]=Bn(Hn(a[3],s[3],l)),n}}var Qn=Jn;function ti(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=qn(e[r]),s=qn(e[o]),l=i-r,u=ri([Vn(Hn(a[0],s[0],l)),Vn(Hn(a[1],s[1],l)),Vn(Hn(a[2],s[2],l)),Bn(Hn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var ei=ti;function ni(t,e,n,i){var r=qn(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Gn(n)),null!=i&&(r[2]=Gn(i)),ri(Kn(r),"rgba")}function ii(t,e){var n=qn(t);if(n&&null!=e)return n[3]=Bn(e),ri(n,"rgba")}function ri(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function oi(t,e){var n=qn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var ai=new En(100);function si(t){if(U(t)){var e=ai.get(t);return e||(e=$n(t,-.1),ai.put(t,e)),e}if(Q(t)){var n=A({},t);return n.colorStops=z(t.colorStops,(function(t){return{offset:t.offset,color:$n(t.color,-.1)}})),n}return t}var li=Object.freeze({__proto__:null,parse:qn,lift:$n,toHex:function(t){var e=qn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:Jn,fastMapToColor:Qn,lerp:ti,mapToColor:ei,modifyHSL:ni,modifyAlpha:ii,stringify:ri,lum:oi,random:function(){return ri([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},liftColor:si}),ui=Math.round;function hi(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=qn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var ci=1e-4;function pi(t){return t-1e-4}function di(t){return ui(1e3*t)/1e3}function fi(t){return ui(1e4*t)/1e4}var gi={left:"start",right:"end",center:"middle",middle:"middle"};function yi(t){return t&&!!t.image}function vi(t){return yi(t)||function(t){return t&&!!t.svgElement}(t)}function mi(t){return"linear"===t.type}function xi(t){return"radial"===t.type}function _i(t){return t&&("linear"===t.type||"radial"===t.type)}function bi(t){return"url(#"+t+")"}function wi(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Si(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*wt,r=rt(t.scaleX,1),o=rt(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+ui(a*wt)+"deg, "+ui(s*wt)+"deg)"),l.join(" ")}var Mi=r.hasGlobalWindow&&X(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},Ii=Array.prototype.slice;function Ti(t,e,n){return(e-t)*n+t}function Ci(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(N(e)){var l=function(t){return N(t&&t[0])?2:1}(e);a=l,(1===l&&!j(e[0])||2===l&&!j(e[0][0]))&&(o=!0)}else if(j(e)&&!nt(e))a=0;else if(U(e))if(isNaN(+e)){var u=qn(e);u&&(s=u,a=3)}else a=0;else if(Q(e)){var h=A({},s);h.colorStops=z(e.colorStops,(function(t){return{offset:t.offset,color:qn(t.color)}})),mi(e)?a=4:xi(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=X(n)?n:an[n]||Pn(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Ni(i),l=Ri(i),u=0;u=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var y=o?this._additiveValue:c?Ei:t[h];if(!Ni(s)&&!c||y||(y=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(Ni(s))1===s?Ci(y,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,Pi(l),i),this._trackKeys.push(a)}s.addKeyframe(t,Pi(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Bi(){return(new Date).getTime()}var Fi,Gi,Wi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Bi()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,on((function e(){t._running&&(on(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Bi(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Bi(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Bi()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Vi(t,e.loop);return this.addAnimator(n),n},e}(jt),Hi=r.domSupported,Yi=(Gi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Fi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:z(Fi,(function(t){var e=t.replace("mouse","pointer");return Gi.hasOwnProperty(e)?e:t}))}),Xi=["mousemove","mouseup"],Ui=["pointermove","pointerup"],Zi=!1;function ji(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qi(t){t&&(t.zrByTouch=!0)}function Ki(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var $i=function(t,e){this.stopPropagation=bt,this.stopImmediatePropagation=bt,this.preventDefault=bt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Ji={mousedown:function(t){t=ce(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ce(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ce(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ki(this,(t=ce(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Zi=!0,t=ce(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Zi||(t=ce(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){qi(t=ce(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ji.mousemove.call(this,t),Ji.mousedown.call(this,t)},touchmove:function(t){qi(t=ce(this.dom,t)),this.handler.processGesture(t,"change"),Ji.mousemove.call(this,t)},touchend:function(t){qi(t=ce(this.dom,t)),this.handler.processGesture(t,"end"),Ji.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Ji.click.call(this,t)},pointerdown:function(t){Ji.mousedown.call(this,t)},pointermove:function(t){ji(t)||Ji.mousemove.call(this,t)},pointerup:function(t){Ji.mouseup.call(this,t)},pointerout:function(t){ji(t)||Ji.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],(function(t){Ji[t]=function(e){e=ce(this.dom,e),this.trigger(t,e)}}));var Qi={pointermove:function(t){ji(t)||Qi.mousemove.call(this,t)},pointerup:function(t){Qi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function tr(t,e){var n=e.domHandlers;r.pointerEventsSupported?E(Yi.pointer,(function(i){nr(e,i,(function(e){n[i].call(t,e)}))})):(r.touchEventsSupported&&E(Yi.touch,(function(i){nr(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),E(Yi.mouse,(function(i){nr(e,i,(function(r){r=he(r),e.touching||n[i].call(t,r)}))})))}function er(t,e){function n(n){nr(e,n,(function(i){i=he(i),Ki(t,i.target)||(i=function(t,e){return ce(t.dom,new $i(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.pointerEventsSupported?E(Ui,n):r.touchEventsSupported||E(Xi,n)}function nr(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,pe(t.domTarget,e,n,i)}function ir(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],e.removeEventListener(n,i,r));t.mounted={}}var rr=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},or=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new rr(e,Ji),Hi&&(i._globalHandlerScope=new rr(document,Qi)),tr(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){ir(this._localHandlerScope),Hi&&ir(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Hi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?er(this,e):ir(e)}},e}(jt),ar=1;r.hasGlobalWindow&&(ar=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var sr=ar,lr="#333",ur="#ccc",hr=xe,cr=5e-5;function pr(t){return t>cr||t<-5e-5}var dr=[],fr=[],gr=[1,0,0,1,0,0],yr=Math.abs,vr=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return pr(this.rotation)||pr(this.x)||pr(this.y)||pr(this.scaleX-1)||pr(this.scaleY-1)||pr(this.skewX)||pr(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):hr(n),t&&(e?be(n,t,n):_e(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(hr(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(dr);var n=dr[0]<0?-1:1,i=dr[1]<0?-1:1,r=((dr[0]-n)*e+n)/dr[0]||0,o=((dr[1]-i)*e+i)/dr[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ie(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],be(fr,t.invTransform,e),e=fr);var n=this.originX,i=this.originY;(n||i)&&(gr[4]=n,gr[5]=i,be(fr,e,gr),fr[4]-=n,fr[5]-=i,e=fr),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Wt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Wt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&yr(t[0]-1)>1e-10&&yr(t[3]-1)>1e-10?Math.sqrt(yr(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){xr(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&Se(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),mr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function xr(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Dr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Cr(i[0],n.width),u+=Cr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Ar="__zr_normal__",kr=mr.concat(["ignore"]),Lr=V(mr,(function(t,e){return t[e]=!0,t}),{ignore:!1}),Pr={},Or=new ze(0,0,0,0),Rr=function(){function t(t){this.id=M(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=Or;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Pr,n,u):Dr(Pr,n,u),r.x=Pr.x,r.y=Pr.y,o=Pr.align,a=Pr.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Cr(h[0],u.width),p=Cr(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ur:lr},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&qn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,ri(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},A(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(q(t))for(var n=G(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Ar,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===Ar;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(P(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}I("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=P(i,t),o=P(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){var w,S=void 0,M=void 0,I=void 0;if(s){M={},p&&(S={});for(_=0;_=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=P(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=P(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function $r(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 U(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Jr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Qr(t){return t.sort((function(t,e){return t-e})),t}function to(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return eo(t)}function eo(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function no(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function io(t,e){var n=V(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var i=Math.pow(10,e),r=z(t,(function(t){return(isNaN(t)?0:t)/n*i*100})),o=100*i,a=z(r,(function(t){return Math.floor(t)})),s=V(a,(function(t,e){return t+e}),0),l=z(r,(function(t,e){return t-a[e]}));su&&(u=l[c],h=c);++a[h],l[h]=0,++s}return z(a,(function(t){return t/i}))}function ro(t,e){var n=Math.max(to(t),to(e)),i=t+e;return n>20?i:Jr(i,n)}var oo=9007199254740991;function ao(t){var e=2*Math.PI;return(t%e+e)%e}function so(t){return t>-1e-4&&t=10&&e++,e}function po(t,e){var n=co(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function fo(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function go(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&P(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ra=ia([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),oa=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ra(this,t,e)},t}(),aa=new En(50);function sa(t){if("string"==typeof t){var e=aa.get(t);return e&&e.image}return t}function la(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=aa.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!ha(e=o.image)&&o.pending.push(a):((e=h.loadImage(t,ua,ua)).__zrImageSrc=t,aa.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function ua(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=br(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function fa(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=br(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ga(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=br(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ga(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=wa(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!_a[t]}function wa(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var Sa="__zr_style_"+Math.round(10*Math.random()),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ia={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[Sa]=!0;var Ta=["z","z2","invisible"],Ca=["invisible"],Da=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=G(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Ea[0]=Ra(r)*n+t,Ea[1]=Oa(r)*i+e,za[0]=Ra(o)*n+t,za[1]=Oa(o)*i+e,u(s,Ea,za),h(l,Ea,za),(r%=Na)<0&&(r+=Na),(o%=Na)<0&&(o+=Na),r>o&&!a?o+=Na:rr&&(Va[0]=Ra(d)*n+t,Va[1]=Oa(d)*i+e,u(s,Va,s),h(l,Va,l))}var Ua={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Za=[],ja=[],qa=[],Ka=[],$a=[],Ja=[],Qa=Math.min,ts=Math.max,es=Math.cos,ns=Math.sin,is=Math.abs,rs=Math.PI,os=2*rs,as="undefined"!=typeof Float32Array,ss=[];function ls(t){return Math.round(t/rs*1e8)/1e8%2*rs}function us(t,e){var n=ls(t[0]);n<0&&(n+=os);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=os?r=n+os:e&&n-r>=os?r=n-os:!e&&n>r?r=n+(os-ls(n-r)):e&&n0&&(this._ux=is(n/sr/t)||0,this._uy=is(n/sr/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ua.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=is(t-this._xi),i=is(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Ua.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Ua.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ua.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),ss[0]=i,ss[1]=r,us(ss,o),i=ss[0];var a=(r=ss[1])-i;return this.addData(Ua.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=es(r)*n+t,this._yi=ns(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ua.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ua.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!as||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){qa[0]=qa[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ka[0]=Ka[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||is(y)>i||c===e-1)&&(f=Math.sqrt(A*A+y*y),r=g,o=x);break;case Ua.C:var v=t[c++],m=t[c++],x=(g=t[c++],t[c++]),_=t[c++],b=t[c++];f=Mn(r,o,v,m,g,x,_,b,10),r=_,o=b;break;case Ua.Q:f=kn(r,o,v=t[c++],m=t[c++],g=t[c++],x=t[c++],10),r=g,o=x;break;case Ua.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],D=C+T;c+=1,d&&(a=es(T)*M+w,s=ns(T)*I+S),f=ts(M,I)*Qa(os,Math.abs(C)),r=es(D)*M+w,o=ns(D)*I+S;break;case Ua.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case Ua.Z:var A=a-r;y=s-o;f=Math.sqrt(A*A+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,x=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var _=0;_0&&(t.lineTo(h,c),x=0),b){case Ua.M:n=r=p[_++],i=o=p[_++],t.moveTo(r,o);break;case Ua.L:a=p[_++],s=p[_++];var S=is(a-r),M=is(s-o);if(S>d||M>f){if(y){if(v+(j=l[m++])>u){var I=(u-v)/j;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}v+=j}t.lineTo(a,s),r=a,o=s,x=0}else{var T=S*S+M*M;T>x&&(h=a,c=s,x=T)}break;case Ua.C:var C=p[_++],D=p[_++],A=p[_++],k=p[_++],L=p[_++],P=p[_++];if(y){if(v+(j=l[m++])>u){wn(r,C,A,L,I=(u-v)/j,Za),wn(o,D,k,P,I,ja),t.bezierCurveTo(Za[1],ja[1],Za[2],ja[2],Za[3],ja[3]);break t}v+=j}t.bezierCurveTo(C,D,A,k,L,P),r=L,o=P;break;case Ua.Q:C=p[_++],D=p[_++],A=p[_++],k=p[_++];if(y){if(v+(j=l[m++])>u){Dn(r,C,A,I=(u-v)/j,Za),Dn(o,D,k,I,ja),t.quadraticCurveTo(Za[1],ja[1],Za[2],ja[2]);break t}v+=j}t.quadraticCurveTo(C,D,A,k),r=A,o=k;break;case Ua.A:var O=p[_++],R=p[_++],N=p[_++],E=p[_++],z=p[_++],V=p[_++],B=p[_++],F=!p[_++],G=N>E?N:E,W=is(N-E)>.001,H=z+V,Y=!1;if(y)v+(j=l[m++])>u&&(H=z+V*(u-v)/j,Y=!0),v+=j;if(W&&t.ellipse?t.ellipse(O,R,N,E,B,z,H,F):t.arc(O,R,G,z,H,F),Y)break t;w&&(n=es(z)*N+O,i=ns(z)*E+R),r=es(H)*N+O,o=ns(H)*E+R;break;case Ua.R:n=r=p[_],i=o=p[_+1],a=p[_++],s=p[_++];var X=p[_++],U=p[_++];if(y){if(v+(j=l[m++])>u){var Z=u-v;t.moveTo(a,s),t.lineTo(a+Qa(Z,X),s),(Z-=X)>0&&t.lineTo(a+X,s+Qa(Z,U)),(Z-=U)>0&&t.lineTo(a+ts(X-Z,0),s+U),(Z-=X)>0&&t.lineTo(a,s+ts(U-Z,0));break t}v+=j}t.rect(a,s,X,U);break;case Ua.Z:if(y){var j;if(v+(j=l[m++])>u){I=(u-v)/j;t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}v+=j}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Ua,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function cs(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=ys);var p=Math.atan2(l,s);return p<0&&(p+=ys),p>=i&&p<=r||p+ys>=i&&p+ys<=r}function ms(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var xs=hs.CMD,_s=2*Math.PI;var bs=[-1,-1,-1],ws=[-1,-1];function Ss(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ws[0],ws[0]=ws[1],ws[1]=h),f=mn(e,i,o,s,ws[0]),d>1&&(g=mn(e,i,o,s,ws[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(yn(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=ln(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,bs);if(0===l)return 0;var u=Cn(e,i,o);if(u>=0&&u<=1){for(var h=0,c=In(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);bs[0]=-l,bs[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=_s-1e-4){i=0,r=_s;var h=o?1:-1;return a>=bs[0]+t&&a<=bs[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=_s,r+=_s);for(var p=0,d=0;d<2;d++){var f=bs[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=_s+g),(g>=i&&g<=r||g+_s>=i&&g+_s<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Ts(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=ms(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case xs.M:p=f=u[y++],d=g=u[y++];break;case xs.L:if(n){if(cs(p,d,u[y],u[y+1],e,i,r))return!0}else c+=ms(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.C:if(n){if(ps(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ss(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.Q:if(n){if(ds(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ms(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.A:var x=u[y++],_=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,m?(f=o,g=a):c+=ms(p,d,o,a,i,r);var T=(i-x)*w/b+x;if(n){if(vs(x,_,w,S,S+M,I,e,T,r))return!0}else c+=Is(x,_,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+x,d=Math.sin(S+M)*w+_;break;case xs.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(cs(f,g,o,g,e,i,r)||cs(o,g,o,a,e,i,r)||cs(o,a,f,a,e,i,r)||cs(f,a,f,g,e,i,r))return!0}else c+=ms(o,g,o,a,i,r),c+=ms(f,a,f,g,i,r);break;case xs.Z:if(n){if(cs(p,d,f,g,e,i,r))return!0}else c+=ms(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=ms(p,d,f,g,i,r)||0),0!==c}var Cs=k({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),Ds={style:k({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ia.style)},As=mr.concat(["invisible","culling","z","z2","zlevel","parent"]),ks=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?lr:e>.2?"#eee":ur}if(t)return ur}return lr},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(U(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===oi(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new hs(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Ts(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Ts(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:A(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return mt(Cs,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=A({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=A({},i.shape),A(s,n.shape)):(s=A({},r?this.shape:i.shape),A(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=A({},this.shape);for(var u={},h=G(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return mt(Ls,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=Sr(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Da);Ps.prototype.type="tspan";var Os=k({x:0,y:0},Ma),Rs={style:k({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ia.style)};var Ns=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return mt(Os,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Rs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ze(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Da);Ns.prototype.type="image";var Es=Math.round;function zs(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Es(2*i)===Es(2*r)&&(t.x1=t.x2=Bs(i,s,!0)),Es(2*o)===Es(2*a)&&(t.y1=t.y2=Bs(o,s,!0)),t):t}}function Vs(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Bs(i,s,!0),t.y=Bs(r,s,!0),t.width=Math.max(Bs(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Bs(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Bs(t,e,n){if(!e)return t;var i=Es(2*t);return(i+Es(e))%2==0?i/2:(i+(n?1:-1))/2}var Fs=function(){this.x=0,this.y=0,this.width=0,this.height=0},Gs={},Ws=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Fs},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Vs(Gs,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ks);Ws.prototype.type="rect";var Hs={fill:"#000"},Ys={style:k({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Ia.style)},Xs=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Hs,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&h){var f=Math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=da(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y=0;y0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=i.calculatedLineHeight,D=0;Dl&&xa(n,t.substring(l,u),e,s),xa(n,i[2],e,s,i[1]),l=ca.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,D=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=br(P.text,I);else{if(D){var A=w.backgroundColor,k=A&&A.image;k&&ha(k=sa(k))&&(P.width=Math.max(P.width,k.width*T/k.height))}var L=f&&null!=r?r-_:null;null!=L&&L=0&&"right"===(C=x[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=x[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,h=i+n/2;"top"===u?h=i+t.height/2:"bottom"===u&&(h=i+n-t.height/2),!t.isLineHolder&&il(l)&&this._renderBackground(l,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!l.backgroundColor,p=t.textPadding;p&&(r=el(r,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ps),f=d.createStyle();d.useStyle(f);var g=this._defaultStyle,y=!1,v=0,m=tl("fill"in l?l.fill:"fill"in e?e.fill:(y=!0,g.fill)),x=Qs("stroke"in l?l.stroke:"stroke"in e?e.stroke:c||s||g.autoStroke&&!y?null:(v=2,g.stroke)),_=l.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=h,_&&(f.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,f.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||a,f.opacity=ot(l.opacity,e.opacity,1),Ks(f,l),x&&(f.lineWidth=ot(l.lineWidth,e.lineWidth,v),f.lineDash=rt(l.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=x),m&&(f.fill=m);var b=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new ze(Mr(f.x,b,f.textAlign),Ir(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;if(d||t.lineHeight||h&&c){(a=this._getOrCreateChild(Ws)).useStyle(a.createStyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=i,y.width=r,y.height=o,y.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=rt(t.fillOpacity,1);else if(p){(s=this._getOrCreateChild(Ns)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=rt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=ot(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return $s(t)&&(e=[t.fontStyle,t.fontWeight,qs(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ut(e)||t.textFont||t.font},e}(Da),Us={left:!0,right:1,center:1},Zs={top:1,bottom:1,middle:1},js=["fontStyle","fontWeight","fontSize","fontFamily"];function qs(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function Ks(t,e){for(var n=0;n=0,o=!1;if(t instanceof ks){var a=ll(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(ml(s)||ml(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=A({},i),(u=A({},u)).fill=s):!ml(u.fill)&&ml(s)?(o=!0,i=A({},i),(u=A({},u)).fill=si(s)):!ml(u.stroke)&&ml(l)&&(o||(i=A({},i),u=A({},u)),u.stroke=si(l)),i.style=u}}if(i&&null==i.z2){o||(i=A({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:pl)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=P(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Ul(t,e,n){Jl(t,!0),Cl(t,kl),jl(t,e,n)}function Zl(t,e,n,i){i?function(t){Jl(t,!1)}(t):Ul(t,e,n)}function jl(t,e,n){var i=rl(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var ql=["emphasis","blur","select"],Kl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function $l(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=su(f),s*=su(f));var g=(r===o?-1:1)*su((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+uu(c)*y-lu(c)*v,x=(e+i)/2+lu(c)*y+uu(c)*v,_=du([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=du(b,w);if(pu(b,w)<=-1&&(S=hu),pu(b,w)>=1&&(S=0),S<0){var M=Math.round(S/hu*1e6)/1e6;S=2*hu+M%2*hu}h.addData(u,m,x,a,s,_,S,c,o)}var gu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,yu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(ks);function mu(t){return null!=t.setData}function xu(t,e){var n=function(t){var e=new hs;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=hs.CMD,l=t.match(gu);if(!l)return e;for(var u=0;uk*k+L*L&&(M=T,I=C),{cx:M,cy:I,x0:-h,y0:-c,x1:M*(r/b-1),y1:I*(r/b-1)}}function Vu(t,e){var n,i=Ru(e.r,0),r=Ru(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,p=Pu(l-s),d=p>Cu&&p%Cu;if(d>Eu&&(p=d),i>Eu)if(p>Cu-Eu)t.moveTo(u+i*Au(s),h+i*Du(s)),t.arc(u,h,i,s,l,!c),r>Eu&&(t.moveTo(u+r*Au(l),h+r*Du(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,T=void 0,C=void 0,D=void 0,A=void 0,k=i*Au(s),L=i*Du(s),P=r*Au(l),O=r*Du(l),R=p>Eu;if(R){var N=e.cornerRadius;N&&(n=function(t){var e;if(Y(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),f=n[0],g=n[1],y=n[2],v=n[3]);var E=Pu(i-r)/2;if(m=Nu(E,y),x=Nu(E,v),_=Nu(E,f),b=Nu(E,g),M=w=Ru(m,x),I=S=Ru(_,b),(w>Eu||S>Eu)&&(T=i*Au(l),C=i*Du(l),D=r*Au(s),A=r*Du(s),pEu){var X=Nu(y,M),U=Nu(v,M),Z=zu(D,A,k,L,i,X,c),j=zu(T,C,P,O,i,U,c);t.moveTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),M0&&t.arc(u+Z.cx,h+Z.cy,X,Lu(Z.y0,Z.x0),Lu(Z.y1,Z.x1),!c),t.arc(u,h,i,Lu(Z.cy+Z.y1,Z.cx+Z.x1),Lu(j.cy+j.y1,j.cx+j.x1),!c),U>0&&t.arc(u+j.cx,h+j.cy,U,Lu(j.y1,j.x1),Lu(j.y0,j.x0),!c))}else t.moveTo(u+k,h+L),t.arc(u,h,i,s,l,!c);else t.moveTo(u+k,h+L);if(r>Eu&&R)if(I>Eu){X=Nu(f,I),Z=zu(P,O,T,C,r,-(U=Nu(g,I)),c),j=zu(k,L,D,A,r,-X,c);t.lineTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),I0&&t.arc(u+Z.cx,h+Z.cy,U,Lu(Z.y0,Z.x0),Lu(Z.y1,Z.x1),!c),t.arc(u,h,r,Lu(Z.cy+Z.y1,Z.cx+Z.x1),Lu(j.cy+j.y1,j.cx+j.x1),c),X>0&&t.arc(u+j.cx,h+j.cy,X,Lu(j.y1,j.x1),Lu(j.y0,j.x0),!c))}else t.lineTo(u+P,h+O),t.arc(u,h,r,l,s,c);else t.lineTo(u+P,h+O)}else t.moveTo(u,h);t.closePath()}}}var Bu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Fu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Bu},e.prototype.buildPath=function(t,e){Vu(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ks);Fu.prototype.type="sector";var Gu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Wu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Gu},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(ks);function Hu(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;plh[1]){if(a=!1,r)return a;var u=Math.abs(lh[0]-sh[1]),h=Math.abs(sh[0]-lh[1]);Math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function vh(t,e,n,i,r,o){yh("update",t,e,n,i,r,o)}function mh(t,e,n,i,r,o){yh("enter",t,e,n,i,r,o)}function xh(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Wh(t){return!t.isGroup}function Hh(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Wh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Wh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),vh(t,i,n,rl(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=A({},t.shape)),e}}function Yh(t,e){return z(t,(function(t){var n=t[0];n=Mh(n,e.x),n=Ih(n,e.x+e.width);var i=t[1];return i=Mh(i,e.y),[n,i=Ih(i,e.y+e.height)]}))}function Xh(t,e){var n=Mh(t.x,e.x),i=Ih(t.x+t.width,e.x+e.width),r=Mh(t.y,e.y),o=Ih(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Uh(t,e,n){var i=A({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),k(r,n),new Ns(i)):Ph(t.replace("path://",""),i,n,"center")}function Zh(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=qh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=qh(f,g,c,p)/d;return!(v<0||v>1)}function qh(t,e,n,i){return t*i-n*e}function Kh(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=U(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&E(G(l),(function(t){_t(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=rl(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:k({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function $h(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Jh(t,e){if(t)if(Y(t))for(var n=0;n-1?Lc:Oc;function zc(t,e){t=t.toUpperCase(),Nc[t]=new Cc(e),Rc[t]=e}function Vc(t){return Nc[t]}zc(Pc,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),zc(Lc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Bc=1e3,Fc=6e4,Gc=36e5,Wc=864e5,Hc=31536e6,Yc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Xc="{yyyy}-{MM}-{dd}",Uc={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xc,hour:Xc+" "+Yc.hour,minute:Xc+" "+Yc.minute,second:Xc+" "+Yc.second,millisecond:Yc.none},Zc=["year","month","day","hour","minute","second","millisecond"],jc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function qc(t,e){return"0000".substr(0,e-(t+="").length)+t}function Kc(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function $c(t){return t===Kc(t)}function Jc(t,e,n,i){var r=uo(t),o=r[ep(n)](),a=r[np(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[ip(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[rp(n)](),c=(h-1)%12+1,p=r[op(n)](),d=r[ap(n)](),f=r[sp(n)](),g=h>=12?"pm":"am",y=g.toUpperCase(),v=(i instanceof Cc?i:Vc(i||Ec)||Nc[Oc]).getModel("time"),m=v.get("month"),x=v.get("monthAbbr"),_=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,qc(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,qc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,qc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qc(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,qc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,qc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,qc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,qc(f,3)).replace(/{S}/g,f+"")}function Qc(t,e){var n=uo(t),i=n[np(e)]()+1,r=n[ip(e)](),o=n[rp(e)](),a=n[op(e)](),s=n[ap(e)](),l=0===n[sp(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function tp(t,e,n){var i=j(t)?uo(t):t;switch(e=e||Qc(t,n)){case"year":return i[ep(n)]();case"half-year":return i[np(n)]()>=6?1:0;case"quarter":return Math.floor((i[np(n)]()+1)/4);case"month":return i[np(n)]();case"day":return i[ip(n)]();case"half-day":return i[rp(n)]()/24;case"hour":return i[rp(n)]();case"minute":return i[op(n)]();case"second":return i[ap(n)]();case"millisecond":return i[sp(n)]()}}function ep(t){return t?"getUTCFullYear":"getFullYear"}function np(t){return t?"getUTCMonth":"getMonth"}function ip(t){return t?"getUTCDate":"getDate"}function rp(t){return t?"getUTCHours":"getHours"}function op(t){return t?"getUTCMinutes":"getMinutes"}function ap(t){return t?"getUTCSeconds":"getSeconds"}function sp(t){return t?"getUTCMilliseconds":"getMilliseconds"}function lp(t){return t?"setUTCFullYear":"setFullYear"}function up(t){return t?"setUTCMonth":"setMonth"}function hp(t){return t?"setUTCDate":"setDate"}function cp(t){return t?"setUTCHours":"setHours"}function pp(t){return t?"setUTCMinutes":"setMinutes"}function dp(t){return t?"setUTCSeconds":"setSeconds"}function fp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function gp(t){if(!vo(t))return U(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function yp(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}var vp=st;function mp(t,e,n){function i(t){return t&&ut(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?uo(t):t;if(!isNaN(+s))return Jc(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return Z(t)?i(t):j(t)&&r(t)?t+"":"-";var l=yo(t);return r(l)?gp(l):Z(t)?i(t):"boolean"==typeof t?t+"":"-"}var xp=["a","b","c","d","e","f","g"],_p=function(t,e){return"{"+t+(null==e?"":e)+"}"};function bp(t,e,n){Y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Sp(t,e){return e=e||"transparent",U(t)?t:q(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Mp(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Ip=E,Tp=["left","right","top","bottom","width","height"],Cp=[["width","left","right"],["height","top","bottom"]];function Dp(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Ap=Dp;H(Dp,"vertical"),H(Dp,"horizontal");function kp(t,e,n){n=vp(n||0);var i=e.width,r=e.height,o=$r(t.left,i),a=$r(t.top,r),s=$r(t.right,i),l=$r(t.bottom,r),u=$r(t.width,i),h=$r(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ze(o+n[3],a+n[0],u,h);return f.margin=n,f}function Lp(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new ze(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var c=kp(k({width:a.width,height:a.height},e),n,i),p=s?c.x-a.x:0,d=l?c.y-a.y:0;return"raw"===u?(o.x=p,o.y=d):(o.x+=p,o.y+=d),o===t&&t.markRedraw(),!0}function Pp(t){var e=t.layoutMode||t.constructor.layoutMode;return q(e)?e:e?{type:e}:null}function Op(t,e,n){var i=n&&n.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(Cp[0],0),o=a(Cp[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Ip(n,(function(e){u[e]=t[e]})),Ip(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=C(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Yo(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Cc);Jo(zp,Cc),na(zp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Ko(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Ko(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(zp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return E(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return E(t,(function(t){P(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),E(s,(function(t){P(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);P(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(E(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),E(c.successor,p?f:d)}E(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(zp,(function(t){var e=[];E(zp.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=z(e,(function(t){return Ko(t).main})),"dataset"!==t&&P(e,"dataset")<=0&&e.unshift("dataset");return e}));var Vp="";"undefined"!=typeof navigator&&(Vp=navigator.platform||"");var Bp="rgba(0, 0, 0, 0.2)",Fp={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Bp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Bp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Bp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Bp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Bp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Bp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Vp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Gp=yt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Wp="original",Hp="arrayRows",Yp="objectRows",Xp="keyedColumns",Up="typedArray",Zp="unknown",jp="column",qp="row",Kp=1,$p=2,Jp=3,Qp=Vo();function td(t,e,n){var i={},r=nd(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=Qp(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;E(t=t.slice(),(function(e,n){var r=q(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var fd="\0_ec_inner";var gd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Cc(i),this._locale=new Cc(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=md(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,md(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ld(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&E(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=yt(),s=e&&e.replaceMergeMainTypeMap;Qp(this).datasetMap=yt(),E(t,(function(t,e){null!=t&&(zp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?T(t):C(n[e],t,!0))})),s&&s.each((function(t,e){zp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),zp.topologicalTravel(o,zp.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=od.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,To(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Lo(a,o,l);(function(t,e,n){E(t,(function(t){var i=t.newOption;q(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,zp),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],p=[],d=0;E(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=zp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(h)return void 0;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=A({componentIndex:n},t.keyInfo);A(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),p.push(i),d++):(c.push(void 0),p.push(void 0))}),this),n[e]=c,i.set(e,p),r.set(e,d),"series"===e&&ad(this)}),this),this._seriesIndices||ad(this)},e.prototype.getOption=function(){var t=T(this.option);return E(t,(function(e,n){if(zp.hasClass(n)){for(var i=To(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Eo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t[fd],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Td=E,Cd=q,Dd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ad(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Dd.length;n=0;g--){var y=t[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var v=y.data.getByRawIndex(y.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&d>=0&&v>0||"samesign"===l&&d<=0&&v<0){d=ro(d,v),f=v;break}}}return i[0]=d,i[1]=f,i}))}))}var Zd,jd,qd,Kd,$d,Jd=function(t){this.data=t.data||(t.sourceFormat===Xp?{}:[]),this.sourceFormat=t.sourceFormat||Zp,this.seriesLayoutBy=t.seriesLayoutBy||jp,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return mf(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function bf(t){var e,n;return q(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function wf(t){return new Sf(t)}var Sf=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Af=function(){function t(t,e){if(!j(e)){var n="";0,wo(n)}this._opFn=Df[t],this._rvalFloat=yo(e)}return t.prototype.evaluate=function(t){return j(t)?this._opFn(t,this._rvalFloat):this._opFn(yo(t),this._rvalFloat)},t}(),kf=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=j(t)?t:yo(t),i=j(e)?e:yo(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=U(t),s=U(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}(),Lf=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=yo(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=yo(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Pf(t,e){return"eq"===t||"ne"===t?new Lf("eq"===t,e):_t(Df,t)?new Af(t,e):null}var Of=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return If(t,e)},t}();function Rf(t){var e=t.sourceFormat;if(!Ff(e)){var n="";0,wo(n)}return t.data}function Nf(t){var e=t.sourceFormat,n=t.data;if(!Ff(e)){var i="";0,wo(i)}if(e===Hp){for(var r=[],o=0,a=n.length;o65535?Hf:Yf}function qf(t,e,n,i,r){var o=Zf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=z(o,(function(t){return t.property})),u=0;uy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&x<=h||isNaN(x))&&(a[s++]=d),d++}p=!0}else if(2===r){f=c[i[0]];var y=c[i[1]],v=t[i[1]][0],m=t[i[1]][1];for(g=0;g=u&&x<=h||isNaN(x))&&(_>=v&&_<=m||isNaN(_))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(g=0;g=u&&x<=h||isNaN(x))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(jf(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var p=1;pn&&(n=i,r=I)}M>0&&M<_-x&&(c[l++]=Math.min(S,r),r=Math.max(S,r)),c[l++]=r,h=r}return c[l++]=this.getRawIndex(s-1),o._count=l,o._indices=c,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=r._rawExtent[t]=[1/0,-1/0],c=new(jf(this._rawCount))(Math.ceil(u/s)),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return If(t[i],this._dimensions[i])}Gf={arrayRows:t,objectRows:function(t,e,n,i){return If(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return If(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),$f=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(Qf(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=$(a=o.get("data",!0))?Up:Wp,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},p=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=rt(h.sourceHeader,c.sourceHeader),f=rt(h.dimensions,c.dimensions);t=p!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f?[tf(a,{seriesLayoutBy:p,sourceHeader:d,dimensions:f},s)]:[]}else{var g=n;if(r){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{t=[tf(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&tg(o)}var a,s=[],l=[];return E(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||tg(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=To(t),r=i.length,o="";r||wo(o);for(var a=0,s=r;a1||n>0&&!t.noHeader;return E(t.blocks,(function(t){var n=lg(t);n>=e&&(e=n+ +(i&&(!n||ag(t)&&!t.noHeader)))})),e}return 0}function ug(t,e,n,i){var r,o=e.noHeader,a=(r=lg(e),{html:ig[r],richText:rg[r]}),s=[],l=e.blocks||[];lt(!l||Y(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(_t(h,u)){var c=new kf(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}E(l,(function(n,r){var o=e.valueFormatter,l=sg(n)(o?A(A({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var p="richText"===t.renderMode?s.join(a.richText):pg(s.join(""),o?n:a.html);if(o)return p;var d=mp(e.header,"ordinal",t.useUTC),f=ng(i,t.renderMode).nameStyle;return"richText"===t.renderMode?dg(t,d,f)+a.richText+p:pg('
'+re(d)+"
"+p,n)}function hg(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return z(t=Y(t)?t:[t],(function(t,e){return mp(t,Y(d)?d[e]:d,u)}))};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":mp(l,"ordinal",u),d=e.valueType,f=a?[]:h(e.value,e.dataIndex),g=!s||!o,y=!s&&o,v=ng(i,r),m=v.nameStyle,x=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":dg(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Y(e)?e.join(" "):e,o)}(t,f,g,y,x)):pg((s?"":c)+(o?"":function(t,e,n){return''+re(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=Y(t)?t:[t],''+z(t,(function(t){return re(t)})).join("  ")+""}(f,g,y,x)),n)}}function cg(t,e,n,i,r,o){if(t)return sg(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function pg(t,e){return'
'+t+'
'}function dg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function fg(t,e){return Sp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function gg(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var yg=function(){function t(){this.richTextStyles={},this._nextStyleNameId=mo()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=wp({color:e,type:t,renderMode:n,markerId:i});return U(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};Y(e)?E(e,(function(t){return A(n,t)})):A(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function vg(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=Y(c),d=fg(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=V(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(og("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?E(i,(function(t){h(mf(o,n,t),t)})):E(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=mf(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=No(o),v=y&&o.name||"",m=l.getName(a),x=s?v:m;return og("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[og("nameValue",{markerType:"item",markerColor:d,name:x,noName:!ut(x),value:e,valueType:n,dataIndex:a})].concat(i||[])})}var mg=Vo();function xg(t,e){return t.getName(e)||t.getId(e)}var _g="__universalTransitionEnabled",bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=wf({count:Sg,reset:Mg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(mg(this).sourceManager=new $f(this)).prepareSource();var i=this.getInitialData(t,n);Tg(i,this),this.dataTask.context.data=i,mg(this).dataBeforeProcessed=i,wg(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Pp(this),i=n?Rp(t):{},r=this.subType;zp.hasClass(r)&&(r+="Series"),C(t,e.getTheme().get(this.subType)),C(t,this.getDefaultOption()),Co(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Op(t,i,n)},e.prototype.mergeOption=function(t,e){t=C(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Pp(this);n&&Op(this.option,t,n);var i=mg(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Tg(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,mg(this).dataBeforeProcessed=r,wg(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!$(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=cd.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[xg(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[_g])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){q(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return zp.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(zp);function wg(t){var e=t.name;No(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return E(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Sg(t){return t.model.getRawData().count()}function Mg(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ig}function Ig(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Tg(t,e){E(vt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,H(Cg,e))}))}function Cg(t,e){var n=Dg(t);return n&&n.setOutputEnd((e||this).count()),e}function Dg(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}R(bg,_f),R(bg,cd),Jo(bg,zp);var Ag=function(){function t(){this.group=new Br,this.uid=Ac("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function kg(){var t=Vo();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}$o(Ag),na(Ag);var Lg=Vo(),Pg=kg(),Og=function(){function t(){this.group=new Br,this.uid=Ac("viewChart"),this.renderTask=wf({plan:Eg,reset:zg}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Ng(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Ng(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Jh(this.group,t)},t.markUpdateMethod=function(t,e){Lg(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Rg(t,e,n){t&&Ql(t)&&("emphasis"===e?Ol:Rl)(t,n)}function Ng(t,e,n){var i=zo(t,e),r=e&&null!=e.highlightKey?function(t){var e=sl[t];return null==e&&al<=32&&(e=sl[t]=al++),e}(e.highlightKey):null;null!=i?E(To(i),(function(e){Rg(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Rg(t,n,r)}))}function Eg(t){return Pg(t.model)}function zg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Lg(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Vg[l]}$o(Og),na(Og);var Vg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Bg="\0__throttleOriginMethod",Fg="\0__throttleRate",Gg="\0__throttleType";function Wg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function Hg(t,e,n,i){var r=t[e];if(r){var o=r[Bg]||r,a=r[Gg];if(r[Fg]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Wg(o,n,"debounce"===i))[Bg]=o,r[Gg]=i,r[Fg]=n}return r}}function Yg(t,e){var n=t[e];n&&n[Bg]&&(n.clear&&n.clear(),t[e]=n[Bg])}var Xg=Vo(),Ug={itemStyle:ia(Mc,!0),lineStyle:ia(bc,!0)},Zg={lineStyle:"stroke",itemStyle:"fill"};function jg(t,e){var n=t.visualStyleMapper||Ug[e];return n||(console.warn("Unknown style type '"+e+"'."),Ug.itemStyle)}function qg(t,e){var n=t.visualDrawType||Zg[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Kg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=jg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=qg(t,i),l=o[s],u=X(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||X(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||X(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=A({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},$g=new Cc,Jg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=jg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){$g.option=n[i];var a=r($g);A(t.ensureUniqueItemVisual(e,"style"),a),$g.option.decal&&(t.setItemVisual(e,"decal",$g.option.decal),$g.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Qg={performRawSeries:!0,overallReset:function(t){var e=yt();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),Xg(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Xg(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=qg(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},ty=Math.PI;var ey=function(){function t(t,e,n,i){this._stageTaskMap=yt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=yt();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;E(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";lt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=yt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||wf({plan:ay,reset:sy,count:hy}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||wf({reset:ny});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=yt(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,wf({reset:iy,onDirty:oy})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}lt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,E(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return X(t)&&(t={overallReset:t,seriesType:cy(t)}),t.uid=Ac("stageHandler"),e&&(t.visualType=e),t},t}();function ny(t){t.overallReset(t.ecModel,t.api,t.payload)}function iy(t){return t.overallProgress&&ry}function ry(){this.agent.dirty(),this.getDownstream().dirty()}function oy(){this.agent&&this.agent.dirty()}function ay(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function sy(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=To(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?z(e,(function(t,e){return uy(e)})):ly}var ly=uy(0);function uy(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),My=["symbol","symbolSize","symbolRotate","symbolOffset"],Iy=My.concat(["symbolKeepAspect"]),Ty={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&jy(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=jy(i)?i:0,r=jy(r)?r:1,o=jy(o)?o:0,a=jy(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:j(e)?[e]:Y(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=z(r,(function(t){return t/a})),o/=a)}return[r,o]}var Qy=new hs(!0);function tv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function ev(t){return"string"==typeof t&&"none"!==t}function nv(t){var e=t.fill;return null!=e&&"none"!==e}function iv(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function rv(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function ov(t,e,n){var i=la(e.image,e.__image,n);if(ha(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*wt),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var av=["shadowBlur","shadowOffsetX","shadowOffsetY"],sv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function lv(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){cv(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Ma.opacity:a}(i||e.blend!==n.blend)&&(o||(cv(t,r),o=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Dv])if(this._disposed)om(this.id);else{var i,r,o;if(q(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Dv]=!0,!this._model||e){var a=new Md(this._api),s=this._theme,l=this._model=new gd;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},um);var u={seriesTransition:o,optionChanged:!0};if(n)this[Av]={silent:i,updateParams:u},this[Dv]=!1,this.getZr().wakeUp();else{try{Ev(this),Bv.update.call(this,null,u)}catch(t){throw this[Av]=null,this[Dv]=!1,t}this._ssr||this._zr.flush(),this[Av]=null,this[Dv]=!1,Hv.call(this,i),Yv.call(this,i)}}},e.prototype.setTheme=function(){bo()},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||r.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(r.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;E(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return E(i,(function(t){t.group.ignore=!1})),o}om(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(fm[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();E(dm,(function(o,h){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(T(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),c.push({dom:p,left:d.left,top:d.top})}}));var d=(l*=p)-(a*=p),f=(u*=p)-(s*=p),g=h.createCanvas(),y=Yr(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return E(c,(function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new Ws({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),E(c,(function(t){var e=new Ns({style:{x:t.left*p-a,y:t.top*p-s,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}om(this.id)},e.prototype.convertToPixel=function(t,e){return Fv(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Fv(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return E(Fo(this._model,t),(function(t,i){i.indexOf("Models")>=0&&E(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;om(this.id)},e.prototype.getVisual=function(t,e){var n=Fo(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?Dy(r,o,e):Ay(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;E(rm,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Oy(o,(function(t){var e=rl(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=A({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),E(sm,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),E(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(Py("map","selectchanged",e,i,t),Py("pie","selectchanged",e,i,t)):"select"===t.fromAction?(Py("map","selected",e,i,t),Py("pie","selected",e,i,t)):"unselect"===t.fromAction&&(Py("map","unselected",e,i,t),Py("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?om(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)om(this.id);else{this._disposed=!0,this.getDom()&&Xo(this.getDom(),vm,"");var t=this,e=t._api,n=t._model;E(t._componentsViews,(function(t){t.dispose(n,e)})),E(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete dm[t.id]}},e.prototype.resize=function(t){if(!this[Dv])if(this._disposed)om(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Av]&&(null==i&&(i=this[Av].silent),n=!0,this[Av]=null),this[Dv]=!0;try{n&&Ev(this),Bv.update.call(this,{type:"resize",animation:A({duration:0},t&&t.animation)})}catch(t){throw this[Dv]=!1,t}this[Dv]=!1,Hv.call(this,i),Yv.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)om(this.id);else if(q(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pm[t]){var n=pm[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?om(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=A({},t);return e.type=sm[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)om(this.id);else if(q(e)||(e={silent:!!e}),am[t.type]&&this._model)if(this[Dv])this._pendingActions.push(t);else{var n=e.silent;Wv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.browser.weChat&&this._throttledZrFlush(),Hv.call(this,n),Yv.call(this,n)}},e.prototype.updateLabelLayout=function(){wv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)om(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(xh(t))return;if(t instanceof ks&&function(t){var e=ll(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ev=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),zv(t,!0),zv(t,!1),e.plan()},zv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!r.node&&!r.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),wv.trigger("series:afterupdate",e,n,l)},Jv=function(t){t[kv]=!0,t.getZr().wakeUp()},Qv=function(t){t[kv]&&(t.getZr().storage.traverse((function(t){xh(t)||e(t)})),t[kv]=!1)},Kv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){Ol(e,n),Jv(t)},i.prototype.leaveEmphasis=function(e,n){Rl(e,n),Jv(t)},i.prototype.enterBlur=function(e){Nl(e),Jv(t)},i.prototype.leaveBlur=function(e){El(e),Jv(t)},i.prototype.enterSelect=function(e){zl(e),Jv(t)},i.prototype.leaveSelect=function(e){Vl(e),Jv(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(_d))(t)},$v=function(t){function e(t,e){for(var n=0;n=0)){Lm.push(n);var o=ey.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Om(t,e){pm[t]=e}function Rm(t,e,n){var i=Mv("registerMap");i&&i(t,e,n)}var Nm=function(t){var e=(t=T(t)).type,n="";e||wo(n);var i=e.split(":");2!==i.length&&wo(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Vf.set(e,t)};km(Iv,Kg),km(Tv,Jg),km(Tv,Qg),km(Iv,Ty),km(Tv,Cy),km(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=mv(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=mv(r,e)}}))})),wm(Xd),Sm(900,(function(t){var e=yt();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Ud)})),Om("default",(function(t,e){k(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Br,i=new Ws({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Xs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Ws({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new nh({shape:{startAngle:-ty/2,endAngle:-ty/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*ty/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*ty/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Cm({type:dl,event:dl,update:dl},bt),Cm({type:fl,event:fl,update:fl},bt),Cm({type:gl,event:gl,update:gl},bt),Cm({type:yl,event:yl,update:yl},bt),Cm({type:vl,event:vl,update:vl},bt),bm("light",vy),bm("dark",wy);var Em=[],zm={registerPreprocessor:wm,registerProcessor:Sm,registerPostInit:Mm,registerPostUpdate:Im,registerUpdateLifecycle:Tm,registerAction:Cm,registerCoordinateSystem:Dm,registerLayout:Am,registerVisual:km,registerTransform:Nm,registerLoading:Om,registerMap:Rm,registerImpl:function(t,e){Sv[t]=e},PRIORITY:Cv,ComponentModel:zp,ComponentView:Ag,SeriesModel:bg,ChartView:Og,registerComponentModel:function(t){zp.registerClass(t)},registerComponentView:function(t){Ag.registerClass(t)},registerSeriesModel:function(t){bg.registerClass(t)},registerChartView:function(t){Og.registerClass(t)},registerSubTypeDefaulter:function(t,e){zp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Xr(t,e)}};function Vm(t){Y(t)?E(t,(function(t){Vm(t)})):P(Em,t)>=0||(Em.push(t),X(t)&&(t={install:t}),t.install(zm))}function Bm(t){return null==t?0:t.length||1}function Fm(t){return t}var Gm=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Fm,this._newKeyGetter=i||Fm,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;a30}var Qm,tx,ex,nx,ix,rx,ox,ax=q,sx=z,lx="undefined"==typeof Int32Array?Array:Int32Array,ux=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],hx=["_approximateExtent"],cx=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;qm(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===Wp&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(Y(r=this.getVisual(e))?r=r.slice():ax(r)&&(r=A({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ax(e)?A(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){ax(t)?A(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?A(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;ol(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){E(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:sx(this.dimensions,this._getDimInfo,this),this.hostModel)),ix(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];X(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(at(arguments)))})},t.internalField=(Qm=function(t){var e=t._invertedIndicesMap;E(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new lx(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function px(t,e){Qd(t)||(t=ef(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=yt(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return E(e,(function(t){var e;q(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Jm(a),l=i===t.dimensionsDefine,u=l?$m(t):Km(i),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,a));for(var c=yt(h),p=new Xf(a),d=0;d0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new jm({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function dx(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var fx=function(t){this.coordSysDims=[],this.axisMap=yt(),this.categoryAxisMap=yt(),this.coordSysName=t};var gx={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Wo).models[0],o=t.getReferringComponents("yAxis",Wo).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),yx(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),yx(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Wo).models[0];e.coordSysDims=["single"],n.set("single",r),yx(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Wo).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),yx(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),yx(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();E(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),yx(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function yx(t){return"category"===t.get("type")}function vx(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!qm(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,p=!(!t||!t.get("stack"));if(E(i,(function(t,e){U(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;E(i,(function(t){t.coordDim===d&&g++}));var y={name:h,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(c,f),v.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(v)):(i.push(y),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function mx(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function xx(t,e){return mx(t,e)?t.getCalculationInfo("stackResultDimension"):e}function _x(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=ef(t)):o=(i=r.getSource()).sourceFormat===Wp;var a=function(t){var e=t.get("coordinateSystem"),n=new fx(e),i=gx[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=wd.get(i);return e&&e.coordSysDims&&(n=z(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=Ym(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=X(l)?l:l?H(td,s,e):null,h=px(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),c=function(t,e,n){var i,r;return n&&E(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(h.dimensions,n.createInvertedIndices,a),p=o?null:r.getSharedDataStore(h),d=vx(e,{schema:h,store:p}),f=new cx(h,e);f.setCalculationInfo(d);var g=null!=c&&function(t){if(t.sourceFormat===Wp){var e=function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();na(bx);var Sx=0,Mx=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Sx}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&z(i,Ix);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!U(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=yt(this.categories))},t}();function Ix(t){return q(t)&&null!=t.value?t.value:t+""}function Tx(t){return"interval"===t.type||"log"===t.type}function Cx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=po(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Ax(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),kx(t,0,e),kx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[Jr(Math.ceil(t[0]/a)*a,s),Jr(Math.floor(t[1]/a)*a,s)],t),r}function Dx(t){var e=Math.pow(10,co(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Jr(n*e)}function Ax(t){return to(t)+2}function kx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Lx(t,e){return t>=e[0]&&t<=e[1]}function Px(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Ox(t,e){return t*(e[1]-e[0])+e[0]}var Rx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Mx({})),Y(i)&&(i=new Mx({categories:z(i,(function(t){return q(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return null==t?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Lx(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return Px(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Ox(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(bx);bx.registerClass(Rx);var Nx=Jr,Ex=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lx(t,this._extent)},e.prototype.normalize=function(t){return Px(t,this._extent)},e.prototype.scale=function(t){return Ox(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ax(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:Nx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return E(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=$r(t.get("barWidth"),i),d=$r(t.get("barMaxWidth"),i),f=$r(t.get("barMinWidth")||(qx(t)?.5:1),i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:Wx(r),stackId:Gx(t)})})),Xx(n)}function Xx(t){var e={};E(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return E(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=G(i).length;o=Math.max(35-4*a,15)+"%"}var s=$r(o,r),l=$r(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),E(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;E(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;E(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function Ux(t,e){var n=Hx(t,e),i=Yx(n);E(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=Gx(t),o=i[Wx(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function Zx(t){return{seriesType:t,plan:kg(),reset:function(t){if(jx(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),h=mx(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=r.isHorizontal(),p=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,r),d=qx(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=d&&Bx(3*r),u=d&&s&&Bx(3*r),m=d&&Bx(r),x=n.master.getRect(),_=c?x.width:x.height,b=e.getStore(),w=0;null!=(i=t.next());){var S=b.get(h?g:o,i),M=b.get(a,i),I=p,T=void 0;h&&(T=+S-b.get(o,i));var C=void 0,D=void 0,A=void 0,k=void 0;if(c){var L=n.dataToPoint([S,M]);if(h)I=n.dataToPoint([T,M])[0];C=I,D=L[1]+v,A=L[0]-I,k=y,Math.abs(A)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Y(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Jc(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=jc,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var x=B(z(u,(function(t){return B(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),_=[],b=x.length-1;for(d=0;dn&&(this._approxInterval=n);var o=$x.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Qx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function t_(t){return(t/=Gc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function e_(t,e){return(t/=e?Fc:Bc)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function n_(t){return po(t,!0)}function i_(t,e,n){var i=new Date(t);switch(Kc(e)){case"year":case"month":i[up(n)](0);case"day":i[hp(n)](1);case"hour":i[cp(n)](0);case"minute":i[pp(n)](0);case"second":i[dp(n)](0),i[fp(n)](0)}return i.getTime()}bx.registerClass(Kx);var r_=bx.prototype,o_=Ex.prototype,a_=Jr,s_=Math.floor,l_=Math.ceil,u_=Math.pow,h_=Math.log,c_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ex,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return z(o_.getTicks.call(this,t),(function(t){var e=t.value,r=Jr(u_(this.base,e));return r=e===n[0]&&this._fixMin?d_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?d_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=h_(this.base);t=h_(Math.max(0,t))/n,e=h_(Math.max(0,e))/n,o_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=r_.getExtent.call(this);e[0]=u_(t,e[0]),e[1]=u_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=d_(e[0],n[0])),this._fixMax&&(e[1]=d_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=h_(t[0])/h_(e),t[1]=h_(t[1])/h_(e),r_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=ho(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Jr(l_(e[0]/i)*i),Jr(s_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){o_.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lx(t=h_(t)/h_(this.base),this._extent)},e.prototype.normalize=function(t){return Px(t=h_(t)/h_(this.base),this._extent)},e.prototype.scale=function(t){return t=Ox(t,this._extent),u_(this.base,t)},e.type="log",e}(bx),p_=c_.prototype;function d_(t,e){return a_(t,to(e))}p_.getMinorTicks=o_.getMinorTicks,p_.getLabel=o_.getLabel,bx.registerClass(c_);var f_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[y_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=g_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),g_={min:"_determinedMin",max:"_determinedMax"},y_={min:"_dataMin",max:"_dataMax"};function v_(t,e,n){var i=t.rawExtentInfo;return i||(i=new f_(t,e,n),t.rawExtentInfo=i,i)}function m_(t,e){return null==e?null:nt(e)?NaN:t.parse(e)}function x_(t,e){var n=t.type,i=v_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Hx("bar",a),l=!1;if(E(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=Yx(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[Wx(e)];return null!=i&&null!=n?i[Gx(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;E(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;E(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function __(t,e){var n=e,i=x_(t,n),r=i.extent,o=n.get("splitNumber");t instanceof c_&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function b_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Rx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Kx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(bx.getClass(e)||Ex)}}function w_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):U(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):X(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(S_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function S_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function M_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new ze(t.x,t.y,o,a)}function I_(t){var e=t.get("interval");return null==e?"auto":e}function T_(t){return"category"===t.type&&0===I_(t.getLabelModel())}function C_(t,e){var n={};return E(t.mapDimensionsAll(e),(function(e){n[xx(t,e)]=!0})),G(n)}var D_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var A_={isDimensionStacked:mx,enableDataStack:vx,getStackedDimension:xx};var k_=Object.freeze({__proto__:null,createList:function(t){return _x(null,t)},getLayoutRect:kp,dataStack:A_,createScale:function(t,e){var n=e;e instanceof Cc||(n=new Cc(e));var i=b_(n);return i.setExtent(t[0],t[1]),__(i,n),i},mixinAxisModelCommonMethods:function(t){R(t,D_)},getECData:rl,createTextStyle:function(t,e){return oc(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:function(t,e){return px(t,e).dimensions},createSymbol:Xy,enableHoverEmphasis:Ul});function L_(t,e){return Math.abs(t-e)<1e-8}function P_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function H_(t,e){return z(B((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),E(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=W_(r,i,n);break;case"Polygon":case"MultiLineString":G_(r,i,n);break;case"MultiPolygon":E(r,(function(t,e){return G_(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new z_(o[0],o.slice(1)));break;case"MultiPolygon":E(i.coordinates,(function(t){t[0]&&r.push(new z_(t[0],t.slice(1)))}));break;case"LineString":r.push(new V_([i.coordinates]));break;case"MultiLineString":r.push(new V_(i.coordinates))}var a=new B_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var Y_=Object.freeze({__proto__:null,linearMap:Kr,round:Jr,asc:Qr,getPrecision:to,getPrecisionSafe:eo,getPixelPrecision:no,getPercentWithPrecision:function(t,e,n){return t[e]&&io(t,n)[e]||0},MAX_SAFE_INTEGER:oo,remRadian:ao,isRadianAroundZero:so,parseDate:uo,quantity:ho,quantityExponent:co,nice:po,quantile:fo,reformIntervals:go,isNumeric:vo,numericToNumber:yo}),X_=Object.freeze({__proto__:null,parse:uo,format:Jc}),U_=Object.freeze({__proto__:null,extendShape:Ch,extendPath:Ah,makePath:Ph,makeImage:Oh,mergePath:Nh,resizePath:Eh,createIcon:Uh,updateProps:vh,initProps:mh,getTransform:Bh,clipPointsByRect:Yh,clipRectByRect:Xh,registerShape:kh,getShapeClass:Lh,Group:Br,Image:Ns,Text:Xs,Circle:Su,Ellipse:Iu,Sector:Fu,Ring:Wu,Polygon:Xu,Polyline:Zu,Rect:Ws,Line:Ku,BezierCurve:th,Arc:nh,IncrementalDisplayable:dh,CompoundPath:ih,LinearGradient:oh,RadialGradient:ah,BoundingRect:ze}),Z_=Object.freeze({__proto__:null,addCommas:gp,toCamelCase:yp,normalizeCssArray:vp,encodeHTML:re,formatTpl:bp,getTooltipMarker:wp,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=uo(e),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),h=i[r+"Seconds"](),c=i[r+"Milliseconds"]();return t=t.replace("MM",qc(a,2)).replace("M",a).replace("yyyy",o).replace("yy",qc(o%100+"",2)).replace("dd",qc(s,2)).replace("d",s).replace("hh",qc(l,2)).replace("h",l).replace("mm",qc(u,2)).replace("m",u).replace("ss",qc(h,2)).replace("s",h).replace("SSS",qc(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:pa,getTextRect:function(t,e,n,i,r,o,a,s){return new Xs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),j_=Object.freeze({__proto__:null,map:z,each:E,indexOf:P,inherits:O,reduce:V,filter:B,bind:W,curry:H,isArray:Y,isString:U,isObject:q,isFunction:X,extend:A,defaults:k,clone:T,merge:C}),q_=Vo();function K_(t,e){var n=z(e,(function(e){return t.scale.parse(e)}));return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function $_(t){var e=t.getLabelModel().get("customValues");if(e){var n=w_(t);return{labels:K_(t,e).map((function(e){var i={value:e};return{formattedLabel:n(i),rawLabel:t.scale.getLabel(i),tickValue:e}}))}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=Q_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=w_(t);return{labels:z(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function J_(t,e){var n=t.getTickModel().get("customValues");return n?{ticks:K_(t,n)}:"category"===t.type?function(t,e){var n,i,r=tb(t,"ticks"),o=I_(e),a=eb(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(X(o))n=rb(t,o,!0);else if("auto"===o){var s=Q_(t,t.getLabelModel());i=s.labelCategoryInterval,n=z(s.labels,(function(t){return t.tickValue}))}else n=ib(t,i=o,!0);return nb(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:z(t.scale.getTicks(),(function(t){return t.value}))}}function Q_(t,e){var n,i,r=tb(t,"labels"),o=I_(e),a=eb(r,o);return a||(X(o)?n=rb(t,o):(i="auto"===o?function(t){var e=q_(t).autoInterval;return null!=e?e:q_(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=ib(t,i)),nb(r,o,{labels:n,labelCategoryInterval:i}))}function tb(t,e){return q_(t)[e]||(q_(t)[e]=[])}function eb(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=T_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function rb(t,e,n){var i=t.scale,r=w_(t),o=[];return E(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var ob=[0,1],ab=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return no(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&sb(n=n.slice(),i.count()),Kr(t,ob,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&sb(n=n.slice(),i.count());var r=Kr(t,n,ob,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=z(J_(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[1]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;E(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=Jr(t),e=Jr(e),h?t>e:t0&&t<100||(t=5),z(this.scale.getMinorTicks(t),(function(t){return z(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return $_(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=w_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=Sr(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var x=Math.max(0,Math.floor(Math.min(v,m))),_=q_(t.model),b=t.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}();function sb(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var lb=2*Math.PI,ub=hs.CMD,hb=["top","right","bottom","left"];function cb(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function pb(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%lb<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=gs(r),r=gs(p)}else i=gs(i),r=gs(r);i>r&&(r+=lb);var d=Math.atan2(s,a);if(d<0&&(d+=lb),d>=i&&d<=r||d+lb>=i&&d+lb<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(v-s)*(v-s);return m0){e=e/180*Math.PI,mb.fromArray(t[0]),xb.fromArray(t[1]),_b.fromArray(t[2]),De.sub(bb,mb,xb),De.sub(wb,_b,xb);var n=bb.len(),i=wb.len();if(!(n<.001||i<.001)){bb.scale(1/n),wb.scale(1/i);var r=bb.dot(wb);if(Math.cos(e)1&&De.copy(Ib,_b),Ib.toArray(t[1])}}}}function Cb(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,mb.fromArray(t[0]),xb.fromArray(t[1]),_b.fromArray(t[2]),De.sub(bb,xb,mb),De.sub(wb,_b,xb);var i=bb.len(),r=wb.len();if(!(i<.001||r<.001))if(bb.scale(1/i),wb.scale(1/r),bb.dot(e)=a)De.copy(Ib,_b);else{Ib.scaleAndAdd(wb,o/Math.tan(Math.PI/2-s));var l=_b.x!==xb.x?(Ib.x-xb.x)/(_b.x-xb.x):(Ib.y-xb.y)/(_b.y-xb.y);if(isNaN(l))return;l<0?De.copy(Ib,xb):l>1&&De.copy(Ib,_b)}Ib.toArray(t[1])}}}function Db(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Ab(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Vt(i[0],i[1]),o=Vt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Gt([],i[1],i[0],a/r),l=Gt([],i[1],i[2],a/o),u=Gt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&_(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),x(f,g,1),x(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function x(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){_(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function _(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){_(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(t-=n)<=0)return}}function Rb(t,e,n,i){return Ob(t,"y","height",e,n,i)}function Nb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new ze(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(d.oldLayoutSelect),P(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),vh(n,s,e,a)}else if(n.attr(s),!pc(n).valueAnimation){var h=rt(n.style.opacity,1);n.style.opacity=0,mh(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Wb(c,s,Hb),Wb(c,n.states.select,Hb)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Wb(p,s,Hb),Wb(p,n.states.emphasis,Hb)}fc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=Gb(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),vh(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,mh(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}(),Xb=Vo();var Ub=Math.sin,Zb=Math.cos,jb=Math.PI,qb=2*Math.PI,Kb=180/jb,$b=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=Math.abs(l),c=pi(h-qb)||(u?l>=qb:-l>=qb),p=l>0?l%qb:l%qb+qb,d=!1;d=!!c||!pi(h)&&p>=jb==!!u;var f=t+n*Zb(o),g=e+i*Ub(o);this._start&&this._add("M",f,g);var y=Math.round(r*Kb);if(c){var v=1/this._p,m=(u?1:-1)*(qb-v);this._add("A",n,i,y,1,+u,t+n*Zb(o+m),e+i*Ub(o+m)),v>.01&&this._add("A",n,i,y,0,+u,f,g)}else{var x=t+n*Zb(a),_=e+i*Ub(a);this._add("A",n,i,y,+d,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,o)+("style"!==r?re(a):a||"")+(i?""+n+z(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function uw(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function hw(t,e,n,i){return sw("svg","root",{width:t,height:e,xmlns:iw,"xmlns:xlink":rw,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var cw=0;function pw(){return cw++}var dw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},fw="transform-origin";function gw(t,e,n){var i=A({},t.shape);A(i,e),t.buildPath(n,i);var r=new $b;return r.reset(wi(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function yw(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[fw]=n+"px "+i+"px")}var vw={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function mw(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function xw(t){return U(t)?dw[t]?"cubic-bezier("+dw[t]+")":Pn(t)?t:"":""}function _w(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof ih){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(E(o,(function(t){var e=uw(n.zrId);e.animation=!0,_w(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=G(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=mw(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return mw(h,n)+" "+r[0]+" both"}for(var y in l){(s=g(l[y]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+pw();n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}function bw(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+pw(),n.cssStyleCache[r]=o,n.cssNodes["."+o+(i?":hover":"")]=t),e.class=e.class?e.class+" "+o:o}var ww=Math.round;function Sw(t){return t&&U(t.src)}function Mw(t){return t&&X(t.toDataURL)}function Iw(t,e,n,i){nw((function(r,o){var a="fill"===r||"stroke"===r;a&&_i(o)?Ew(e,t,r,i):a&&vi(o)?zw(n,t,r,i):t[r]=a&&"none"===o?"transparent":o}),e,n,!1),function(t,e,n){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var r=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[r];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,p=i.shadowBlur,d=hi(i.shadowColor),f=d.opacity,g=d.color,y=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=sw("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[sw("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:y,"flood-color":g,"flood-opacity":f})]),o[r]=a}e.filter=bi(a)}}(n,t,i)}function Tw(t,e){var n=Ur(e);n&&(n.each((function(e,n){null!=e&&(t[(ow+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[ow+"silent"]="true"))}function Cw(t){return pi(t[0]-1)&&pi(t[1])&&pi(t[2])&&pi(t[3]-1)}function Dw(t,e,n){if(e&&(!function(t){return pi(t[4])&&pi(t[5])}(e)||!Cw(e))){var i=n?10:1e4;t.transform=Cw(e)?"translate("+ww(e[4]*i)/i+" "+ww(e[5]*i)/i+")":function(t){return"matrix("+di(t[0])+","+di(t[1])+","+di(t[2])+","+di(t[3])+","+fi(t[4])+","+fi(t[5])+")"}(e)}}function Aw(t,e,n){for(var i=t.points,r=[],o=0;o=0&&a||o;s&&(r=si(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};r&&(u.fill=r),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),bw(u,e,n,!0)}}(t,o,e),sw(s,t.id+"",o)}function Nw(t,e){return t instanceof ks?Rw(t,e):t instanceof Ns?function(t,e){var n=t.style,i=n.image;if(i&&!U(i)&&(Sw(i)?i=i.src:Mw(i)&&(i=i.toDataURL())),i){var r=n.x||0,o=n.y||0,a={href:i,width:n.width,height:n.height};return r&&(a.x=r),o&&(a.y=o),Dw(a,t.transform),Iw(a,n,t,e),Tw(a,t),e.animation&&_w(t,a,e),sw("image",t.id+"",a)}}(t,e):t instanceof Ps?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var r=n.font||a,s=n.x||0,l=function(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}(n.y||0,Tr(r),n.textBaseline),u={"dominant-baseline":"central","text-anchor":gi[n.textAlign]||n.textAlign};if($s(n)){var h="",c=n.fontStyle,p=qs(n.fontSize);if(!parseFloat(p))return;var d=n.fontFamily||o,f=n.fontWeight;h+="font-size:"+p+";font-family:"+d+";",c&&"normal"!==c&&(h+="font-style:"+c+";"),f&&"normal"!==f&&(h+="font-weight:"+f+";"),u.style=h}else u.style="font: "+r;return i.match(/\s/)&&(u["xml:space"]="preserve"),s&&(u.x=s),l&&(u.y=l),Dw(u,t.transform),Iw(u,n,t,e),Tw(u,t),e.animation&&_w(t,u,e),sw("text",t.id+"",u,void 0,i)}}(t,e):void 0}function Ew(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(mi(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!xi(o))return void 0;r="radialGradient",a.cx=rt(o.x,.5),a.cy=rt(o.y,.5),a.r=rt(o.r,.5)}for(var s=o.colorStops,l=[],u=0,h=s.length;ul?Jw(t,null==n[c+1]?null:n[c+1].elm,n,s,c):Qw(t,e,a,l))}(n,i,r):jw(r)?(jw(t.text)&&Xw(n,""),Jw(n,null,r,0,r.length-1)):jw(i)?Qw(n,i,0,i.length-1):jw(t.text)&&Xw(n,""):t.text!==e.text&&(jw(i)&&Qw(n,i,0,i.length-1),Xw(n,e.text)))}var nS=0,iS=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=rS("refreshHover"),this.configLayer=rS("configLayer"),this.storage=e,this._opts=n=A({},n),this.root=t,this._id="zr"+nS++,this._oldVNode=hw(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=aw("svg");tS(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Kw(t,e))eS(t,e);else{var n=t.elm,i=Hw(n);$w(e),null!==i&&(Fw(i,e.elm,Yw(n)),Qw(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Nw(t,uw(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=uw(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=sw("rect","bg",{width:t,height:e,x:"0",y:"0"}),_i(n))Ew({fill:n},r.attrs,"fill",i);else if(vi(n))zw({style:{fill:n},dirty:bt,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=hi(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=sw("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=z(G(r.defs),(function(t){return r.defs[t]}));if(l.length&&o.push(sw("defs","defs",{},l)),t.animation){var u=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=z(G(t),(function(e){return e+r+z(G(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=z(G(e),(function(t){return"@keyframes "+t+r+z(G(e[t]),(function(n){return n+r+z(G(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var h=sw("style","stl",{},[],u);o.push(h)}}return hw(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},lw(this.renderToVNode({animation:rt(t.cssAnimation,!0),emphasis:rt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:rt(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var y=f+1;y=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var _=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?uS:0),this._needsManuallyCompositing),u.__builtin__||I("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?C(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(bg);function pS(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=mf(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var fS=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return n(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=Xy(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=gS,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ol(this.childAt(0))},e.prototype.downplay=function(){Rl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(p=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(c):vh(p,c,a,n),Sh(p)}if(this._updateCommon(t,n,s,i,r),l){var p=this.childAt(0);if(!u){c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,mh(p,c,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,p=i.hoverScale,d=i.cursorStyle,h=i.emphasisDisabled),!i||t.hasItemOption){var y=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=y.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),h=v.get("disabled"),c=rc(y),p=v.getShallow("scale"),d=y.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var x=Zy(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),d&&f.attr("cursor",d);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof Ns){var w=f.style;f.useStyle(A({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(A({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=r&&r.useNameLabel;ic(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return I?t.getName(e):pS(t,e)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");T.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var C=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;T.scaleX=this._sizeX*C,T.scaleY=this._sizeY*C,this.setSymbolScale(1),Zl(this,l,u,h)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=rl(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&_h(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();_h(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return Uy(t.getItemVisual(e,"symbolSize"))},e}(Br);function gS(t,e){this.parent.drift(t,e)}function yS(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function vS(t){return null==t||q(t)||(t={isIgnore:t}),t||{}}function mS(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:rc(e),cursorStyle:e.get("cursor")}}var xS=function(){function t(t){this.group=new Br,this._SymbolCtor=t||fS}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=vS(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=mS(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(yS(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,c){var p=r.getItemGraphicEl(c),d=u(h);if(yS(t,d,h,e)){var f=t.getItemVisual(h,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(t,h,s,l)).setPosition(d);else{p.updateData(t,h,s,l);var y={x:d[0],y:d[1]};a?p.attr(y):vh(p,y,i)}n.add(p),t.setItemGraphicEl(h,p)}else n.remove(p)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=mS(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=vS(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=z(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return mx(e,c[0])&&(p=!0,c[0]=d),mx(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function bS(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var wS=Math.min,SS=Math.max;function MS(t,e){return isNaN(t)||isNaN(e)}function IS(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(MS(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var x=v-u,_=m-h;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===m&&y=i||MS(w,S))d=v,f=m;else{T=w-u,C=S-h;var k=v-u,L=w-v,P=m-h,O=S-m,R=void 0,N=void 0;if("x"===s){var E=T>0?1:-1;d=v-E*(R=Math.abs(k))*a,f=m,D=v+E*(N=Math.abs(L))*a,A=m}else if("y"===s){var z=C>0?1:-1;d=v,f=m-z*(R=Math.abs(P))*a,D=v,A=m+z*(N=Math.abs(O))*a}else R=Math.sqrt(k*k+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(L*L+O*O))/(N+R))),f=m-C*a*(1-I),A=m+C*a*I,D=wS(D=v+T*a*I,SS(w,v)),A=wS(A,SS(S,m)),D=SS(D,wS(w,v)),f=m-(C=(A=SS(A,wS(S,m)))-m)*R/N,d=wS(d=v-(T=D-v)*R/N,SS(u,v)),f=wS(f,SS(h,m)),D=v+(T=v-(d=SS(d,wS(u,v))))*N/R,A=m+(C=m-(f=SS(f,wS(h,m))))*N/R}t.bezierCurveTo(c,p,d,f,v,m),c=D,p=A}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var TS=function(){this.smooth=0,this.smoothConstraint=!0},CS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new TS},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&MS(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?_n(n,u,c,d,t,s):_n(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?mn(i,h,p,f,x):mn(n,u,c,d,x);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(ks),DS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(TS),AS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new DS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&MS(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=z(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:ti((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=p[0].coord-10,g=p[d-1].coord+10,y=g-f;if(y<.001)return"transparent";E(p,(function(t){t.offset=(t.coord-f)/y})),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var v=new oh(0,0,0,0,p,!0);return v[r]=f,v[r+"2"]=g,v}}}function FS(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return E(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function GS(t,e){return[t[2*e],t[2*e+1]]}function WS(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);rl(d).seriesIndex=t.seriesIndex,Zl(d,L,P,O);var R=zS(t.get("smooth")),N=t.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var E=a.getCalculationInfo("stackedOnSeries"),z=0;f.useStyle(k(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(z=zS(E.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:z,smoothMonotone:N,connectNulls:w}),$l(f,t,"areaStyle"),rl(f).seriesIndex=t.seriesIndex,Zl(f,L,P,O)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){rl(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=zo(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel")||0,c=t.get("z")||0;(s=new fS(r,o)).x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Og.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=zo(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Og.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Dl(this._polyline,t),e&&Dl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new CS({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new AS({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");X(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=X(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var x=X(u)?u(o):l*m+h,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(WS(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Xs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(ic(o,rc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?dS(r,n):pS(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?d:0)*(y?-1:1),_=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=GS(u,S[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+x,y:T[1]+_});var C=h.getRawValue(S[0]),D=h.getRawValue(S[1]);r&&(I=Zo(n,p,C,D,w.t))}i.lastFrameIndex=S[0]}else{var A=1===t||i.lastFrameIndex>0?S[0]:0;T=GS(u,A);r&&(I=h.getRawValue(A)),s.attr({x:T[0]+x,y:T[1]+_})}if(r){var k=pc(s);"function"==typeof k.setLabelText&&k.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=_S(r,e,a),v=t.getLayout("points")||[],m=e.getLayout("points")||[],x=0;x3e3||l&&ES(p,f)>3e3)return s.stopAnimation(),s.setShape({points:d}),void(l&&(l.stopAnimation(),l.setShape({points:d,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),vh(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:p}),l.stopAnimation(),vh(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=h.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne&&(e=o,n=r)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},ZS=function(t){return Math.round(t.length/2)};function jS(t){return{seriesType:t,reset:function(t,e,n){var i=t.getData(),r=t.get("sampling"),o=t.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;U(r)?d=US[r]:X(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,ZS))}}}}}var qS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return _x(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)E(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,h=void 0,c=1,p=0;ps){h=(d+u)/2;break}1===p&&(c=f-i[0].tickValue)}null==h&&(u?u&&(h=i[i.length-1].coord):h=i[0].coord),o[n]=t.toGlobalCoord(h)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(bg);bg.registerClass(qS);var KS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return _x(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=kc(qS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(qS),$S=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},JS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new $S},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){wh(e,t,rl(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Og),oM={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=nM(e.x,t.x),s=iM(e.x+e.width,r),l=nM(e.y,t.y),u=iM(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=iM(e.r,t.r),o=nM(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},aM={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new Ws({shape:A({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?JS:Fu,h=new u({shape:i,z2:1});h.name="item";var c,p,d=dM(r);if(h.calculateTextPosition=(c=d,p=({isRoundCap:u===JS}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Dr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,v=p?Math.abs(u-h)/2:0,m=Math.cos,x=Math.sin,_=s+u*m(f),b=l+u*x(f),w="left",S="top";switch(r){case"startArc":_=s+(h-o)*m(y),b=l+(h-o)*x(y),w="center",S="top";break;case"insideStartArc":_=s+(h+o)*m(y),b=l+(h+o)*x(y),w="center",S="bottom";break;case"startAngle":_=s+d*m(f)+QS(f,o+v,!1),b=l+d*x(f)+tM(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+d*m(f)+QS(f,-o+v,!1),b=l+d*x(f)+tM(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+d*m(y),b=l+d*x(y),w="center",S="middle";break;case"endArc":_=s+(u+o)*m(y),b=l+(u+o)*x(y),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*m(y),b=l+(u-o)*x(y),w="center",S="top";break;case"endAngle":_=s+d*m(g)+QS(g,o+v,!0),b=l+d*x(g)+tM(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+d*m(g)+QS(g,-o+v,!0),b=l+d*x(g)+tM(g,-o+v,!0),w="right",S="middle";break;default:return Dr(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?vh:mh)(h,{shape:g},o)}return h}};function sM(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?vh:mh)(n,{shape:l},e,r,null),(a?vh:mh)(n,{shape:u},e?t.baseAxis.model:null,r)}function lM(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function dM(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function fM(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;A(u,eM(i.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var h=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var c=i.getShallow("cursor");c&&t.attr("cursor",c);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=rc(i);ic(t,d,{labelFetcher:o,labelDataIndex:n,defaultText:pS(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=t.getTextContent();if(s&&f){var g=i.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,i){if(j(i))t.setTextConfig({rotation:i});else if(Y(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===g?p:g,dM(a),i.get(["label","rotate"]))}dc(f,d,o.getRawValue(n),(function(t){return dS(e,t)}));var y=i.getModel(["emphasis"]);Zl(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),$l(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",E(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var gM=function(){},yM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new gM},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);rl(this).dataIndex=e>=0?e:null}),30,!1);function xM(t,e,n){if(OS(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var _M=2*Math.PI,bM=Math.PI/180;function wM(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SM(t,e){var n=wM(t,e),i=t.get("center"),r=t.get("radius");Y(r)||(r=[0,r]);var o,a,s=$r(n.width,e.getWidth()),l=$r(n.height,e.getHeight()),u=Math.min(s,l),h=$r(r[0],u/2),c=$r(r[1],u/2),p=t.coordinateSystem;if(p){var d=p.dataToPoint(i);o=d[0]||0,a=d[1]||0}else Y(i)||(i=[i,i]),o=$r(i[0],s)+n.x,a=$r(i[1],l)+n.y;return{cx:o,cy:a,r0:h,r:c}}function MM(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=wM(t,n),o=SM(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*bM,c=t.get("endAngle"),p=t.get("padAngle")*bM;c="auto"===c?h-_M:-c*bM;var d=t.get("minAngle")*bM+p,f=0;e.each(i,(function(t){!isNaN(t)&&f++}));var g=e.getSum(i),y=Math.PI/(g||f)*2,v=t.get("clockwise"),m=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=v?1:-1,w=[h,c],S=b*p/2;us(w,!v),h=w[0],c=w[1];var M=IM(t);M.startAngle=h,M.endAngle=c,M.clockwise=v;var I=Math.abs(c-h),T=I,C=0,D=h;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===g&&x?y:t*y:I/f)i?h=o=D+b*i/2:(o=D+S,h=r-S),e.setItemLayout(n,{angle:i,startAngle:o,endAngle:h,clockwise:v,cx:a,cy:s,r0:u,r:m?Kr(t,_,[u,l]):l}),D=r}})),T<_M&&f)if(T<=.001){var A=I/f;e.each(i,(function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=A;var r=0,o=0;An?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-c)/2}}}function kM(t){return"center"===t.position}function LM(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*CM,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,p=s.height;function d(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),y=g.getModel("label"),v=y.get("position")||g.get(["emphasis","label","position"]),m=y.get("distanceToLabelLine"),x=y.get("alignTo"),_=$r(y.get("edgeDistance"),u),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=$r(S,u);var M=w.get("length2");if(M=$r(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":k>0?"left":"right"}var B=Math.PI,F=0,G=y.get("rotate");if(j(G))F=G*(B/180);else if("center"===v)F=0;else if("radial"===G||!0===G){F=k<0?-A+B:-A}else if("tangential"===G&&"outside"!==v&&"outer"!==v){var W=Math.atan2(k,L);W<0&&(W=2*B+W),L>0&&(W=B+W),F=W-B}if(o=!!F,p.x=I,p.y=T,p.rotation=F,p.setStyle({verticalAlign:"middle"}),P){p.setStyle({align:D});var H=p.states.select;H&&(H.x+=p.x,H.y+=p.y)}else{var Y=p.getBoundingRect().clone();Y.applyTransform(p.getComputedTransform());var X=(p.style.margin||0)+2.1;Y.y-=X/2,Y.height+=X,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new De(k,L),linePoints:C,textAlign:D,labelDistance:m,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Og);function RM(t,e,n){e=Y(e)&&{coordDimensions:e}||A({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=px(i,e).dimensions,o=new cx(r,t);return o.initData(i,n),o}var NM=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),EM=Vo(),zM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new NM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return RM(this,{coordDimensions:["value"],encodeDefaulter:H(ed,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=EM(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),r=i.seats=io(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){Co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(bg);var VM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return _x(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(bg),BM=function(){},FM=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.getDefaultShape=function(){return new BM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),WM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=XS("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new GM:new xS,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Og),HM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(zp),YM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Wo).models[0]},e.type="cartesian2dAxis",e}(zp);R(YM,D_);var XM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},UM=C({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},XM),ZM=C({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},XM),jM={category:UM,value:ZM,time:C({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ZM),log:k({logBase:10},ZM)},qM={value:1,category:1,time:1,log:1};function KM(t,e,i,r){E(qM,(function(o,a){var s=C(C({},jM[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var n=Pp(this),i=n?Rp(t):{};C(t,e.getTheme().get(a+"Axis")),C(t,this.getDefaultOption()),t.type=$M(t),n&&Op(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Mx.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=e+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",$M)}function $M(t){return t.type||(t.data?"category":"value")}var JM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return z(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),B(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),QM=["x","y"];function tI(t){return"interval"===t.type||"time"===t.type}var eI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=QM,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(tI(t)&&tI(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invTransform=Ie([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new ze(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Wt(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Wt(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new ze(i,r,o,a)},e}(JM),nI=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(ab);function iI(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),it(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function rI(t){return"cartesian2d"===t.get("coordinateSystem")}function oI(t){var e={xAxisModel:null,yAxisModel:null};return E(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Wo).models[0];e[i]=o})),e}var aI=Math.log;function sI(t,e,n){var i=Ex.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=x_(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var p=aI(t.base);u=[aI(u[0])/p,aI(u[1])/p]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var d=i.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var f=i.getInterval.call(t),g=u[0],y=u[1];if(h&&c)f=(y-g)/a;else if(h)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=Dx(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Dx(f));var v=f*a;(g=Jr((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=Jr(v)):y>0&&u[1]<=0&&(y=0,g=-Jr(v))}var m=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*m,y+f*x),i.setInterval.call(t,f),(m||x)&&i.setNiceExtent.call(t,g+f,y-f)}var lI=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=QM,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=G(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;Tx(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(__(l,s),Tx(l)&&(e=a))}r.length&&(e||__((e=r.pop()).scale,e.model),E(r,(function(t){sI(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};E(n.x,(function(t){hI(n,"y",t,r)})),E(n.y,(function(t){hI(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=kp(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){E(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(E(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Rx?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=w_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var pI=Math.PI,dI=function(){function t(t,e){this.group=new Br,this.opt=e,this.axisModel=t,k(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Br({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!fI[t]},t.prototype.add=function(t){fI[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=ao(e-t);return so(o)?(r=n>0?"top":"bottom",i="center"):so(o-pI)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),fI={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Wt(s,s,a),Wt(l,l,a));var h=A({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ku({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});zh(c.shape,c.style.lineWidth),c.anid="line",n.add(c);var p=e.get(["axisLine","symbol"]);if(null!=p){var d=e.get(["axisLine","symbolSize"]);U(p)&&(p=[p,p]),(U(d)||j(d))&&(d=[d,d]);var f=Zy(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],y=d[1];E([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==p[i]&&null!=p[i]){var r=Xy(p[i],-g/2,-y/2,g,y,h.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=mI(r.getTicksCoords(),e.transform,l,k(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,vI(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*pI/180),vI(s)?o=dI.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=ao(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;so(a-pI/2)?(o=l?"bottom":"top",r="center"):so(a-1.5*pI)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*pI&&a>pI/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=it(t.nameTruncateMaxWidth,y.maxWidth,a),x=new Xs({x:d[0],y:d[1],rotation:o.rotation,silent:dI.isLabelSilent(e),style:oc(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Kh({el:x,componentModel:e,itemName:r}),x.__fullText=r,x.anid="name",e.get("triggerEvent")){var _=dI.makeAxisEventDataBase(e);_.targetType="axisName",_.name=r,rl(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function gI(t){t&&(t.ignore=!0)}function yI(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=xe([]);return Se(r,r,-t.rotation),n.applyTransform(be([],r,t.getLocalTransform())),i.applyTransform(be([],r,e.getLocalTransform())),n.intersect(i)}}function vI(t){return"middle"===t||"center"===t}function mI(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function bI(t){var e=wI(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=SI(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=k({color:c.color},a));var d=C(T(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(U(l)){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else X(l)&&(d.name=l(d.name,d));var g=new Cc(d,null,this.ecModel);return R(g,D_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:C({lineStyle:{color:"#bbb"}},XI.axisLine),axisLabel:UI(XI.axisLabel,!1),axisTick:UI(XI.axisTick,!1),splitLine:UI(XI.splitLine,!0),splitArea:UI(XI.splitArea,!0),indicator:[]},e}(zp),jI=["axisLine","axisTickLabel","axisName"],qI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;E(z(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new dI(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){E(jI,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=Y(h)?h:[h],d=Y(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,x=0;x3?1.4:r>1?1.2:1.1;iT(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);iT(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){tT(this._zr,"globalPan")||iT(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(jt);function iT(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(de(i.event),rT(t,e,n,i,r))}function rT(t,e,n,i,r){r.isAvailableBehavior=W(oT,null,n,i),t.trigger(e,r)}function oT(t,e,n){var i=n[t];return!t||i&&(!U(i)||e.event[i+"Key"])}function aT(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function sT(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var lT,uT={axisPointer:1,tooltip:1,brush:1};function hT(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!uT.hasOwnProperty(i.mainType)&&r&&r.model!==n}function cT(t){U(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var pT={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},dT=G(pT),fT={"alignment-baseline":"textBaseline","stop-color":"stopColor"},gT=G(fT),yT=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=cT(t);this._defsUsePending=[];var i=new Br;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),wT(n,i,null,!0,!1);for(var l,u,h=n.firstChild;h;)this._parseNode(h,i,r,null,!1,!1),h=h.nextSibling;if(function(t,e){for(var n=0;n=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(u=LT(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new Br).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new Ws({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=lT[s];if(u&&_t(lT,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var p=vT[s];if(p&&_t(vT,s)){var d=p.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=d)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new Ps({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});_T(e,n),wT(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(lT={g:function(t,e){var n=new Br;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Ws;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Su;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Ku;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Iu;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=bT(i));var r=new Xu({shape:{points:n||[]},silent:!0});return _T(e,r),wT(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=bT(i));var r=new Zu({shape:{points:n||[]},silent:!0});return _T(e,r),wT(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new Ns;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Br;return _T(e,a),wT(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Br;return _T(e,a),wT(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=_u(t.getAttribute("d")||"");return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),vT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new oh(e,n,i,r);return mT(t,o),xT(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new ah(e,n,i);return mT(t,r),xT(t,r),r}};function mT(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function xT(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};kT(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function _T(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),k(e.__inheritedStyle,t.__inheritedStyle))}function bT(t){for(var e=TT(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=TT(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":we(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Me(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Se(r,r,-parseFloat(l[0])*DT,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":be(r,[1,0,Math.tan(parseFloat(l[0])*DT),1,0,0],r);break;case"skewY":be(r,[1,Math.tan(parseFloat(l[0])*DT),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),kT(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=yt(),n=yt(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;ic(e,rc(i),{labelFetcher:p,labelDataIndex:c,defaultText:n},d);var f=e.getTextContent();if(f&&(JT(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function rC(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):rl(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function oC(t,e,n,i,r){t.data||Kh({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function aC(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Zl(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var i=rl(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}function sC(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),E(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(bg);function hC(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),E(e,(function(t,e){for(var n,i,r,o=(n=z(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},E(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(d.width=p,d.height=p/x):(d.height=p,d.width=p*x),d.y=c[1]-d.height/2,d.x=c[0]-d.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,d=kp(b,{width:v,height:m})}this.setViewRect(d.x,d.y,d.width,d.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}R(vC,dC);var _C=function(){function t(){this.dimensions=yC}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new vC(o+r,o,A({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=xC,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),E(r,(function(t,r){var o=z(t,(function(t){return t.get("nameMap")})),a=new vC(r,r,A({nameMap:D(o)},i(t[0])));a.zoomLimit=it.apply(null,z(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=xC,a.resize(t[0],e),E(t,(function(t){t.coordinateSystem=a,function(t,e){E(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=yt(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=PC(s),o=OC(o),s&&o;){r=PC(r),a=OC(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(NC(RC(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!PC(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!OC(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function AC(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function kC(t){return arguments.length?t:EC}function LC(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function PC(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function OC(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function RC(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function NC(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function EC(t,e){return t.parentNode===e.parentNode?1:2}var zC=function(){this.parentPoint=[],this.childPoints=[]},VC=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zC},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=$r(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(_-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),T=I*(Math.PI/180),C=y.getTextContent();C&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-_:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),A="relative"===D?vt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;A&&(rl(n).focus=A),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new th({shape:XC(h,c,p,r,r)})),vh(g,{shape:XC(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(U(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function rD(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function oD(t,e){return P(rD(t),e)>=0}function aD(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var sD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return n(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Cc(n,this,this.ecModel),r=nD.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return og("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=aD(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(bg);function lD(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function uD(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=kC((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=kC());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),lD(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=LC(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),lD(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),lD(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function hD(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();A(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var cD=["treemapZoomToNode","treemapRender","treemapMove"];function pD(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=pd(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var dD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};fD(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Cc({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=To(e.get("color")),o=To(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],E(t,(function(t){var e=new Cc(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=z(i||[],(function(t){return new Cc(t,o,e)}),this),s=nD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return og("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=aD(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},A(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=yt(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){pD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(bg);function fD(t){var e=0;E(t.children,(function(t){fD(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var gD=function(){function t(t){this.group=new Br,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),h={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,l),this._renderContent(t,h,a,s,l,u,i),Lp(o,h.pos,h.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Ro(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r,o,a){for(var s,l,u,h,c,p,d,f,g,y=0,v=e.emptyItemWidth,m=t.get(["breadcrumb","height"]),x=(s=e.pos,l=e.box,h=l.width,c=l.height,p=$r(s.left,h),d=$r(s.top,c),f=$r(s.right,h),g=$r(s.bottom,c),(isNaN(p)||isNaN(parseFloat(s.left)))&&(p=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=h),(isNaN(d)||isNaN(parseFloat(s.top)))&&(d=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=c),u=vp(u||0),{width:Math.max(f-p-u[1]-u[3],0),height:Math.max(g-d-u[0]-u[2],0)}),_=e.totalWidth,b=e.renderList,w=i.getModel("itemStyle").getItemStyle(),S=b.length-1;S>=0;S--){var M=b[S],I=M.node,T=M.width,C=M.text;_>x.width&&(_-=T-v,T=v,C=null);var D=new Xu({shape:{points:yD(y,0,T,m,S===b.length-1,0===S)},style:k(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xs({style:oc(r,{text:C})}),textConfig:{position:"inside"},z2:1e5,onclick:H(a,I)});D.disableLabelAnimation=!0,D.getTextContent().ensureState("emphasis").style=oc(o,{text:C}),D.ensureState("emphasis").style=w,Zl(D,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(D),vD(D,t,I),y+=T+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function yD(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function vD(t,e,n){rl(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&aD(n,e)}}var mD=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a,s=new ze(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var h=a.min||0,c=a.max||1/0;u=Math.max(Math.min(c,u),h)}var p=u/l.zoom;l.zoom=u;var d=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];we(f,f,[-(e-=d.x),-(n-=d.y)]),Me(f,f,[p,p]),we(f,f,[e,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Mp(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new gD(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(oD(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(Og);var CD=E,DD=q,AD=-1,kD=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=T(e);this.type=i,this.mappingMethod=n,this._normalizeData=FD[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(LD(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,E(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(CD(e,(function(t,e){n[t]=e})),!Y(i)){var r=[];q(i)?CD(i,(function(t,e){var i=n[e];r[null!=i?i:AD]=t})):r[-1]=i,i=BD(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):LD(r,!0):(lt("linear"!==n||r.dataExtent),LD(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return W(this._normalizeData,this)},t.listVisualTypes=function(){return G(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){q(t)?E(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=Y(e)?[]:q(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&CD(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!DD(t))return[];var e=[];CD(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new kD(c);return WD(p).drColorMappingBy=h,p}(0,r,o,0,u,d);E(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=A({},e);if(r){var s=r.type,l="color"===s&&WD(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);YD(t,o,n,i)}}))}else s=XD(u),h.fill=s}}function XD(t){var e=UD(t,"color");if(e){var n=UD(t,"colorAlpha"),i=UD(t,"colorSaturation");return i&&(e=ni(e,null,null,i)),n&&(e=ii(e,n)),e}}function UD(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ZD(t,e){var n=t.get(e);return Y(n)&&n.length?{name:e,range:n}:null}var jD=Math.max,qD=Math.min,KD=it,$D=E,JD=["itemStyle","borderWidth"],QD=["itemStyle","gapWidth"],tA=["upperLabel","show"],eA=["upperLabel","height"],nA={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=kp(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=$r(KD(s.width,l[0]),r),h=$r(KD(s.height,l[1]),o),c=i&&i.type,p=iD(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=rD(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;poo&&(u=oo),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?jD(u*i/l,l/(u*r)):1/0}function oA(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*_,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Br),YA=function(){function t(t){this.group=new Br,this._LineCtor=t||HA}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=XA(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=XA(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function ek(t,e){var n=[],i=Dn,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[Tt(l[0]),Tt(l[1])],l[2]&&l.__original.push(Tt(l[2])));var c=l.__original;if(null!=l[2]){if(It(r[0],c[0]),It(r[1],c[2]),It(r[2],c[1]),u&&"none"!==u){var p=SA(t.node1),d=tk(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=SA(t.node2),d=tk(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}It(l[0],r[0]),It(l[1],r[2]),It(l[2],r[1])}else{if(It(o[0],c[0]),It(o[1],c[1]),kt(a,o[1],o[0]),Et(a,a),u&&"none"!==u){p=SA(t.node1);At(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=SA(t.node2);At(o[1],o[1],a,-p*e)}It(l[0],o[0]),It(l[1],o[1])}}))}function nk(t){return"view"===t.type}var ik=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new xS,i=new YA,r=this.group;this._controller=new nT(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(nk(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):vh(s,l,t)}ek(t.getGraph(),wA(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,r=e.getGraphicEl(),o=e.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",(function(o){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),e.setLayout({fixed:!0},!0),TA(t,"symbolSize",e,[o.offsetX,o.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[r.x,r.y]),_A(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){c&&c.setUnfixed(n)})),r.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(rl(r).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(rl(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){DA(t,f,g,y)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},e.prototype._updateController=function(t,e,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker((function(e,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!hT(e,n,t)})),nk(t.coordinateSystem)?(r.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(e){aT(o,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){sT(o,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),ek(t.getGraph(),wA(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):r.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=wA(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){ek(t.getGraph(),wA(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Og);function rk(t){return"_EC_"+t}var ok=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[rk(t)]){var i=new ak(t,e);return i.hostGraph=this,this.nodes.push(i),n[rk(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[rk(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if(j(t)&&(t=this.nodes[t]),j(e)&&(e=this.nodes[e]),t instanceof ak||(t=i[rk(t)]),e instanceof ak||(e=i[rk(e)]),t&&e){var o=t.id+"-"+e.id,a=new sk(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof ak&&(t=t.id),e instanceof ak&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof ak||(e=this._nodesMap[rk(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},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)}}}function uk(t,e,n,i,r){for(var o=new ok(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=_x(t,n);else{var g=wd.get(f),y=g&&g.dimensions||[];P(y,"value")<0&&y.concat(["value"]);var v=px(t,{coordDimensions:y,encodeDefine:n.getEncode()}).dimensions;(d=new cx(v,n)).initData(t)}var m=new cx(["value"],n);return m.initData(l,s),r&&r(d,m),ZC({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}R(ak,lk("hostGraph","data")),R(sk,lk("hostGraph","edgeData"));var hk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new NM(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Co(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){dA(n=this)&&(n.__curvenessList=[],n.__edgeMap={},fA(n));var a=uk(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Cc.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return E(a.edges,(function(t){!function(t,e,n,i){if(dA(n)){var r=gA(t,e,n),o=n.__edgeMap,a=o[yA(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),og("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return vg({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=z(this.option.categories||[],(function(t){return null!=t.value?t:A({value:0},t)})),e=new cx(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bg),ck={type:"graphRoam",event:"graphRoam",update:"none"};var pk=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},dk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new pk},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(ks);function fk(t,e){var n=null==t?"":t+"";return e&&(U(e)?n=e.replace("{value}",n):X(e)&&(n=e(t))),n}var gk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:$r(n[0],e.getWidth()),cy:$r(n[1],e.getHeight()),r:$r(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?JS:Fu,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=[s,l];us(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,v=[],m=0;c&&m=t&&(0===e?0:i[e-1][0])Math.PI/2&&(V+=Math.PI):"tangential"===z?V=-M-Math.PI/2:j(z)&&(V=z*Math.PI/180),0===V?c.add(new Xs({style:oc(x,{text:O,x:N,y:E,verticalAlign:h<-.8?"top":h>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):c.add(new Xs({style:oc(x,{text:O,x:N,y:E,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:N,originY:E,rotation:V}))}if(m.get("show")&&k!==_){P=(P=m.get("distance"))?P+l:l;for(var B=0;B<=b;B++){u=Math.cos(M),h=Math.sin(M);var F=new Ku({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:D});"auto"===D.stroke&&F.setStyle({stroke:i((k+B/b)/_)}),c.add(F),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),x=+t.get("max"),_=[m,x],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=$r(o.get("width"),r.r),s=$r(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=$r(u[0],r.r),c=$r(u[1],r.r),p=o.get("keepAspect");return(i=l?Xy(l,h-a/2,c-s,a,s,null,p):new dk({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?JS:Fu,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=x-y.get(v,t)%x),c}(g||d)&&(y.diff(h).add((function(e){var n=y.get(v,e);if(d){var i=w(e,o);mh(i,{rotation:-((isNaN(+n)?b[0]:Kr(n,_,b,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(g){var r=S(e,o),a=f.get("clip");mh(r,{shape:{endAngle:Kr(n,_,b,a)}},t),u.add(r),ol(t.seriesIndex,y.dataType,e,r),p[e]=r}})).update((function(e,n){var i=y.get(v,e);if(d){var r=h.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,vh(s,{rotation:-((isNaN(+i)?b[0]:Kr(i,_,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(g){var l=c[n],m=S(e,l?l.shape.endAngle:o),x=f.get("clip");vh(m,{shape:{endAngle:Kr(i,_,b,x)}},t),u.add(m),ol(t.seriesIndex,y.dataType,e,m),p[e]=m}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(d){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof Ns){var h=s.style;s.useStyle(A({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Kr(y.get(v,t),_,[0,1],!0))),s.z2EmphasisLift=0,$l(s,e),Zl(s,r,o,a)}if(g){var c=p[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,$l(c,e),Zl(c,r,o,a)}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Xy(r,e.cx-i/2+$r(o[0],e.r),e.cy-i/2+$r(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new Br,c=[],p=[],d=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){c[t]=new Xs({silent:!0}),p[t]=new Xs({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new Br,y=i(Kr(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var m=v.get("offsetCenter"),x=r.cx+$r(m[0],r.r),_=r.cy+$r(m[1],r.r);(D=c[e]).attr({z2:f?0:2,style:oc(v,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(D)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=r.cx+$r(w[0],r.r),M=r.cy+$r(w[1],r.r),I=$r(b.get("width"),r.r),T=$r(b.get("height"),r.r),C=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,D=p[e],A=b.get("formatter");D.attr({z2:f?0:2,style:oc(b,{x:S,y:M,text:fk(o,A),width:isNaN(I)?null:I,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:C})}),dc(D,{normal:b},o,(function(t){return fk(t,A)})),d&&fc(D,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return fk(a?a.interpolatedValue:o,A)}}),g.add(D)}h.add(g)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Og),yk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return n(e,t),e.prototype.getInitialData=function(t,e){return RM(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(bg);var vk=["itemStyle","opacity"],mk=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new Zu,a=new Xs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(vk);l=null==l?1:l,n||Sh(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,mh(i,{style:{opacity:l}},r,e)):vh(i,{style:{opacity:l},shape:{points:a.points}},r,e),$l(i,o),this._updateLabel(t,e),Zl(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;ic(r,rc(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new De(h[0][0],h[0][1]):null},vh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),kb(n,Lb(a),{stroke:u})},e}(Xu),xk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new mk(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){wh(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Og),_k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new NM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return RM(this,{coordDimensions:["value"],encodeDefaulter:H(ed,this)})},e.prototype._defaultLabelLine=function(t){Co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bg);function bk(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Rk(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Rk(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var Nk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&C(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];E(B(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={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},e}(zp),Ek=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(ab);function zk(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=Bk(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=Bk(s,[0,a]),r=o=Bk(s,[r,o]),i=0}e[0]=Bk(e[0],n),e[1]=Bk(e[1],n);var l=Vk(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=Bk(e[i],c),u=Vk(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function Vk(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function Bk(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var Fk=E,Gk=Math.min,Wk=Math.max,Hk=Math.floor,Yk=Math.ceil,Xk=Jr,Uk=Math.PI,Zk=function(){function t(t,e,n){this.type="parallel",this._axesMap=yt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Fk(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new Ek(t,b_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Fk(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),__(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=jk(e.get("axisExpandWidth"),l),c=jk(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=jk(d[1]-d[0],l),d[1]=d[0]+t):(t=jk(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||Hk(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Hk(Xk(d[0]/h,1))+1,Yk(Xk(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Fk(n,(function(e,n){var o=(i.axisExpandable?Kk:qk)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Uk/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];Se(h,h,u),we(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];E(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?zk(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[Wk(0,o[1]*s/p-p/2)])[1]=Gk(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function jk(t,e){return Gk(Wk(t,e[0]),e[1])}function qk(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function Kk(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Qr(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&vL(t);var l=T(s);l.brushType=RL(l.brushType,a),l.panelId=a===Qk?null:a.panelId,o=t._creatingCover=uL(t,l),t._covers.push(o)}if(o){var u=zL[RL(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(kL(t,o,t._track)),i&&(hL(t,o),u.updateCommon(t,o)),cL(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&gL(t,e,n)&&vL(t)&&(r={isEnd:i,removeOnClick:!0});return r}function RL(t,e){return"auto"===t?e.defaultBrushType:t}var NL={mousedown:function(t){if(this._dragging)EL(this,t);else if(!t.target||!t.target.draggable){LL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=gL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=gL(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new Cc(r[a],this,e));if(i&&n){var s=uk(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return og("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return og("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(bg);function QL(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){E(t,(function(t){var e=uP(t.outEdges,lP),n=uP(t.inEdges,lP),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)nP(s,l*=.99,a),eP(s,r,n,i,a),hP(s,l,a),eP(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";E(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),E(t,(function(t){var e=0,n=0;E(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),E(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==B(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function tP(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function eP(t,e,n,i,r){var o="vertical"===r?"x":"y";E(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function nP(t,e,n){E(t.slice().reverse(),(function(t){E(t,(function(t){if(t.outEdges.length){var i=uP(t.outEdges,iP,n)/uP(t.outEdges,lP);if(isNaN(i)){var r=t.outEdges.length;i=r?uP(t.outEdges,rP,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-sP(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-sP(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function iP(t,e){return sP(t.node2,e)*t.getValue()}function rP(t,e){return sP(t.node2,e)}function oP(t,e){return sP(t.node1,e)*t.getValue()}function aP(t,e){return sP(t.node1,e)}function sP(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function lP(t){return t.getValue()}function uP(t,e,n){for(var i=0,r=t.length,o=-1;++oo&&(o=e)})),E(n,(function(e){var n=new kD({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&E(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var pP=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];E(g,(function(t,e){var n;Y(t)?(n=t.slice(),t.unshift(e)):Y(t.value)?((n=A({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:Ym(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ym(f),dimsDef:v.slice()}];return RM(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:H(td,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),dP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(bg);R(dP,pP,!0);var fP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=vP(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(Sh(n),mP(s,n,i,t)):n=vP(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(Og),gP=function(){},yP=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new gP},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var _=[v,x];i.push(_)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var SP=["color","borderColor"],MP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Jh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&DP(s,a))return;var l=CP(a,n,!0);mh(l,{shape:{points:a.ends}},t,n),AP(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&DP(s,h)?i.remove(u):(u?(vh(u,{shape:{points:h.ends}},t,a),Sh(u)):u=CP(h),AP(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),OP(t,this.group);var e=t.get("clip",!0)?PS(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=CP(i.getItemLayout(n));AP(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){OP(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Og),IP=function(){},TP=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new IP},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ks);function CP(t,e,n){var i=t.ends;return new TP({shape:{points:n?kP(i,t):i},z2:100})}function DP(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(r=n.get(["itemStyle","borderColorDoji"]));var o=n.getModel("itemStyle").getItemStyle(SP);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var NP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(bg);function EP(t){t&&Y(t.series)&&E(t.series,(function(t){q(t)&&"k"===t.type&&(t.type="candlestick")}))}R(NP,pP,!0);var zP=["itemStyle","borderColor"],VP=["itemStyle","borderColor0"],BP=["itemStyle","borderColorDoji"],FP=["itemStyle","color"],GP=["itemStyle","color0"],WP={seriesType:"candlestick",plan:kg(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?FP:GP)}function i(t,e){return e.get(0===t?BP:t>0?zP:VP)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,A(e.ensureUniqueItemVisual(r,"style"),s)}}}}},HP={seriesType:"candlestick",plan:kg(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=$r(rt(t.get("barMaxWidth"),r),r),a=$r(rt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?$r(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=z(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(n,i){var r,a,c=Bx(4*n.count),p=0,d=[],f=[],g=i.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(o,a),m=g.get(s,a),x=g.get(l,a),_=g.get(u,a),b=g.get(h,a);isNaN(v)||isNaN(_)||isNaN(b)?(c[p++]=NaN,p+=3):(c[p++]=YP(g,a,m,x,l,y),d[0]=v,d[1]=_,r=e.dataToPoint(d,null,f),c[p++]=r?r[0]:NaN,c[p++]=r?r[1]:NaN,d[1]=b,r=e.dataToPoint(d,null,f),c[p++]=r?r[1]:NaN)}i.setLayout("largePoints",c)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),p=a.get(s,r),d=a.get(l,r),f=a.get(u,r),g=a.get(h,r),y=Math.min(p,d),v=Math.max(p,d),m=M(y,c),x=M(v,c),_=M(f,c),b=M(g,c),w=[];I(w,x,0),I(w,m,1),w.push(C(b),C(x),C(_),C(m));var S=!!n.getItemModel(r).get(["itemStyle","borderColorDoji"]);n.setItemLayout(r,{sign:YP(a,r,p,d,l,S),initBaseline:p>d?x[1]:m[1],ends:w,brushRect:T(f,g,c)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var r=e.slice(),o=e.slice();r[0]=Vh(r[0]+i/2,1,!1),o[0]=Vh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function T(t,e,n){var r=M(t,n),o=M(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=Vh(t[0],1),t}}}}};function YP(t,e,n,i,r,o){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function XP(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var UP=function(t){function e(e,n){var i=t.call(this)||this,r=new fS(e,n),o=new Br;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var h=void 0;h=X(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,r){if(e>0){t.__t=0;var o=this,a=t.animate("",i).when(r?2*e:e,{__t:r?2:1}).delay(n).during((function(){o._updateSymbolPosition(t)}));i||a.done((function(){o.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Vt(t.__p1,t.__cp1)+Vt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice(),s=In,l=Tn;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=t.__t<1?l(e[0],i[0],n[0],r):l(n[0],i[0],e[0],1-r),h=t.__t<1?l(e[1],i[1],n[1],r):l(n[1],i[1],e[1],1-r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=t.__t<1?u[0]-l[0]:l[0]-u[0],c=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(qP),JP=function(){this.polyline=!1,this.curveness=0,this.segs=[]},QP=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new JP},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,p=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(ds(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(cs(u,h,p,d,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),eO={seriesType:"lines",plan:kg(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&PS(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=eO.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new tO:new YA(r?i?$P:KP:i?qP:HA),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(Og),iO="undefined"==typeof Uint32Array?Array:Uint32Array,rO="undefined"==typeof Float64Array?Array:Float64Array;function oO(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=z(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),D([e,t[0],t[1]])})))}var aO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return n(e,t),e.prototype.init=function(e){e.data=e.data||[],oO(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(oO(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=vt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=vt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(bg);function sO(t){return t instanceof Array||(t=[t,t]),t}var lO={seriesType:"lines",reset:function(t){var e=sO(t.get("symbol")),n=sO(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=sO(n.getShallow("symbol",!0)),r=sO(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var uO=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=h.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){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(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=h.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function hO(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var cO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):hO(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(hO(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Jh(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=OS(u,"cartesian2d");if(h){var c=u.getAxis("x"),p=u.getAxis("y");0,o=c.getBandWidth()+.5,a=p.getBandWidth()+.5,s=c.scale.getExtent(),l=p.scale.getExtent()}for(var d=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),m=t.get(["itemStyle","borderRadius"]),x=rc(t),_=t.getModel("emphasis"),b=_.get("focus"),w=_.get("blurScope"),S=_.get("disabled"),M=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Al[1])continue;var k=u.dataToPoint([D,A]);T=new Ws({shape:{x:k[0]-o/2,y:k[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(M[1],I)))continue;T=new Ws({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:C})}if(f.hasItemOption){var L=f.getItemModel(I),P=L.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=L.getModel(["blur","itemStyle"]).getItemStyle(),v=L.getModel(["select","itemStyle"]).getItemStyle(),m=L.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),x=rc(L)}T.shape.r=m;var O=t.getRawValue(I),R="-";O&&null!=O[2]&&(R=O[2]+""),ic(T,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:C.opacity,defaultText:R}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=y,T.ensureState("select").style=v,Zl(T,b,w,S),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),d.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new uO;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(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=z(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=Y(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=$r(h[p.index],d),h[c.index]=$r(h[c.index],i?d:Math.abs(o)),u.symbolSize=h;var g=u.symbolScale=[h[0]/s,h[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(dO)||0;o&&(gO.attr({scaleX:e[0],scaleY:e[1],rotation:n}),gO.updateTransform(),o/=gO.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=Zy(n.get("symbolOffset"),p);return function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=it(t.get("symbolMargin"),"15%")+"",x=!1;m.lastIndexOf("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var _=$r(m,e[d.index]),b=Math.max(g+2*_,0),w=x?0:2*_,S=vo(i),M=S?i:OO((v+w)/b);b=g+2*(_=(v-M*g)/2/(x?M:Math.max(M-1,1))),w=x?0:2*_,S||"fixed"===i||(M=u?OO((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=_}var I=f*(y/2),T=c.pathPosition=[];T[p.index]=n[p.wh]/2,T[d.index]="start"===a?I:"end"===a?l-I:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var C=c.bundlePosition=[];C[p.index]=n[p.xy],C[d.index]=n[d.xy];var D=c.barRectShape=A({},n);D[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(T[d.index]+I)),D[p.wh]=n[p.wh];var k=c.clipShape={};k[p.xy]=-n[p.xy],k[p.wh]=h.ecSize[p.wh],k[d.xy]=0,k[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function mO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function xO(t){var e=t.symbolPatternSize,n=Xy(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function _O(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(kO(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bO(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?LO(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=xO(n),r.add(o),LO(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function wO(t,e,n){var i=A({},e.barRectShape),r=t.__pictorialBarRect;r?LO(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new Ws({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function SO(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=A({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)vh(r,{shape:o},s,l);else{o[a.wh]=0,r=new Ws({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],Qh[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function MO(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=IO,n.isAnimationEnabled=TO,n}function IO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function TO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function CO(t,e,n,i){var r=new Br,o=new Br;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?_O(r,e,n):bO(r,0,n),wO(r,n,i),SO(r,e,n,i),r.__pictorialShapeStr=AO(t,n),r.__pictorialSymbolMeta=n,r}function DO(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];kO(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),E(o,(function(t){_h(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function AO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function kO(t,e,n){E(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function LO(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&Qh[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function PO(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");kO(t,(function(t){if(t instanceof Ns){var e=t.style;t.useStyle(A({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,ic(f,rc(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:pS(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),Zl(t,h,c,o.get("disabled"))}function OO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var RO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=kc(qS.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%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(qS);var NO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new Gm(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fI&&!so(C-I)&&C0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new BO(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)Mp(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:FO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Og),HO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};YO(n);var i=this._levelModels=z(t.levels||[],(function(t){return new Cc(t,this,e)}),this),r=nD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=aD(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){pD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(bg);function YO(t){var e=0;E(t.children,(function(t){YO(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var XO=Math.PI/180;function UO(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");Y(i)||(i=[0,i]),Y(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=$r(e[0],r),l=$r(e[1],o),u=$r(i[0],a/2),h=$r(i[1],a/2),c=-t.get("startAngle")*XO,p=t.get("minAngle")*XO,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&ZO(f,y);var v=0;E(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),x=Math.PI/(m||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(e,n){if(e){var i=n;if(e!==d){var r=e.getValue(),o=0===m&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&U(o)&&(o=$n(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),A(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}var qO={color:"fill",borderColor:"stroke"},KO={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$O=Vo(),JO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return _x(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=$O(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(bg);function QO(t,e){return e=e||[0,0],z(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function tR(t,e){return e=e||[0,0],z([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function eR(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function nR(t,e){return e=e||[0,0],z(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function iR(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||_t(t,"text")))}function rR(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},_t(a,"text")&&(o.text=a.text),_t(a,"rich")&&(o.rich=a.rich),_t(a,"textFill")&&(o.fill=a.textFill),_t(a,"textStroke")&&(o.stroke=a.textStroke),_t(a,"fontFamily")&&(o.fontFamily=a.fontFamily),_t(a,"fontSize")&&(o.fontSize=a.fontSize),_t(a,"fontStyle")&&(o.fontStyle=a.fontStyle),_t(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=_t(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),_t(a,"textPosition")&&(i.position=a.textPosition),_t(a,"textOffset")&&(i.offset=a.textOffset),_t(a,"textRotation")&&(i.rotation=a.textRotation),_t(a,"textDistance")&&(i.distance=a.textDistance)}return oR(o,t),E(o.rich,(function(t){oR(t,t)})),{textConfig:i,textContent:r}}function oR(t,e){e&&(e.font=e.textFont||e.font,_t(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),_t(e,"textAlign")&&(t.align=e.textAlign),_t(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),_t(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),_t(e,"textWidth")&&(t.width=e.textWidth),_t(e,"textHeight")&&(t.height=e.textHeight),_t(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),_t(e,"textPadding")&&(t.padding=e.textPadding),_t(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),_t(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),_t(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),_t(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),_t(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),_t(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),_t(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function aR(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";sR(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,E(e.rich,(function(t){sR(t,t)})),i}function sR(t,e){e&&(_t(e,"fill")&&(t.textFill=e.fill),_t(e,"stroke")&&(t.textStroke=e.fill),_t(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),_t(e,"font")&&(t.font=e.font),_t(e,"fontStyle")&&(t.fontStyle=e.fontStyle),_t(e,"fontWeight")&&(t.fontWeight=e.fontWeight),_t(e,"fontSize")&&(t.fontSize=e.fontSize),_t(e,"fontFamily")&&(t.fontFamily=e.fontFamily),_t(e,"align")&&(t.textAlign=e.align),_t(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),_t(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),_t(e,"width")&&(t.textWidth=e.width),_t(e,"height")&&(t.textHeight=e.height),_t(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),_t(e,"padding")&&(t.textPadding=e.padding),_t(e,"borderColor")&&(t.textBorderColor=e.borderColor),_t(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),_t(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),_t(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),_t(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),_t(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),_t(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),_t(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),_t(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),_t(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),_t(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var lR={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},uR=G(lR),hR=(V(mr,(function(t,e){return t[e]=1,t}),{}),mr.join(", "),["","style","shape","extra"]),cR=Vo();function pR(t,e,n,i,r){var o=t+"Animation",a=gh(t,i,r)||{},s=cR(e).userDuring;return a.duration>0&&(a.during=s?W(xR,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),A(a,n[o]),a}function dR(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=cR(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),p=c?c.style:null;if(p){!r&&(r=i.style={});var d=G(n);for(u=0;u0&&t.animateFrom(p,d)}else!function(t,e,n,i,r){if(r){var o=pR("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);fR(t,e),u?t.dirty():t.markRedraw()}function fR(t,e){for(var n=cR(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var p=G(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:W(nR,t)}}},calendar:function(t){var e=t.getRect(),n=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:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function zR(t){return t instanceof ks}function VR(t){return t instanceof Da}var BR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=YR(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){UR(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);n&&gR(n,$O(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);UR(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?PS(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=YR(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=m(i,CR).getItemStyle(),o=x(i,CR),a=oc(o,null,null,!0,!0);a.text=o.getShallow("show")?ot(t.getFormattedLabel(i,CR),t.getFormattedLabel(i,DR),pS(e,i)):null;var l=ac(o,null,!0);return b(n,r),r=aR(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),_t(qO,t)){var i=e.getItemVisual(n,"style");return i?i[qO[t]]:null}if(_t(KO,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o=c;f--){var g=e.childAt(f);JR(e,g,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function jR(t,e,n){var i,r=$O(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(_t(i,"pathData")||_t(i,"d")))&&nN(a)!==r.customPathData||"image"===o&&_t(s,"image")&&s.image!==r.customImagePath}function qR(t,e,n){var i=e?KR(t,e):t,r=e?$R(t,i,CR):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?KR(s,e):s:null;if(r&&(n.isLegacy||iR(r,o,!!a,!!l))){n.isLegacy=!0;var u=rR(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function KR(t,e){return e?t?t[e]:null:t}function $R(t,e,n){var i=e&&e.style;return null==i&&n===CR&&t&&(i=t.styleEmphasis),i}function JR(t,e,n){e&&gR(e,$O(t).option,n)}function QR(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function tN(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ZR(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function eN(t){var e=this.context,n=e.oldChildren[t];n&&gR(n,$O(n).option,e.seriesModel)}function nN(t){return t&&(t.pathData||t.d)}var iN=Vo(),rN=T,oN=W,aN=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=H(sN,e,h);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new Br,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);cN(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=wI(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=iN(t).pointerEl=new Qh[r.type](rN(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=iN(t).labelEl=new Xs(rN(e.label));t.add(r),uN(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=iN(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=iN(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),uN(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Uh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){de(t.event)},onmousedown:oN(this._onHandleDragMove,this,0,0),drift:oN(this._onHandleDragMove,this),ondragend:oN(this._onHandleDragEnd,this)}),i.add(r)),cN(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Y(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Hg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){sN(this._axisPointerModel,!e&&this._moveAnimation,this._handle,hN(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(hN(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(hN(i)),iN(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._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}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Yg(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function sN(t,e,n,i){lN(iN(n).lastProp,i)||(iN(n).lastProp=i,e?vh(n,i,t):(n.stopAnimation(),n.attr(i)))}function lN(t,e){if(q(t)&&q(e)){var n=!0;return E(e,(function(e,i){n=n&&lN(t[i],e)})),!!n}return t===e}function uN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function hN(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function cN(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function pN(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function dN(t,e,n,i,r){var o=fN(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=vp(a.get("padding")||0),l=a.getFont(),u=Sr(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:oc(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function fN(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:S_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),U(a)?o=a.replace("{value}",o):X(a)&&(o=a(s))}return o}function gN(t,e,n){var i=[1,0,0,1,0,0];return Se(i,i,n.rotation),we(i,i,n.position),Fh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function yN(t,e,n,i,r,o){var a=dI.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),dN(e,i,r,o,{position:gN(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function vN(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function mN(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function xN(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var _N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=bN(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=pN(i),c=wN[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}yN(e,t,iI(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=iI(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=gN(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=bN(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(aN);function bN(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var wN={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vN([e,n[0]],[e,n[1]],SN(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:mN([e-i/2,n[0]],[i,r],SN(t))}}};function SN(t){return"x"===t.dim?0:1}var MN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(zp),IN=Vo(),TN=E;function CN(t,e,n){if(!r.node){var i=e.getZr();IN(i).records||(IN(i).records={}),function(t,e){if(IN(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);TN(IN(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}IN(t).initialized=!0,n("click",H(AN,"click")),n("mousemove",H(AN,"mousemove")),n("globalout",DN)}(i,e),(IN(i).records[t]||(IN(i).records[t]={})).handler=n}}function DN(t,e,n){t.handler("leave",null,n)}function AN(t,e,n,i){e.handler(t,n,i)}function kN(t,e){if(!r.node){var n=e.getZr();(IN(n).records||{})[t]&&(IN(n).records[t]=null)}}var LN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";CN("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){kN("axisPointer",e)},e.prototype.dispose=function(t,e){kN("axisPointer",e)},e.type="axisPointer",e}(Ag);function PN(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=zo(o,t);if(null==a||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(z(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var ON=Vo();function RN(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||W(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){BN(r)&&(r=PN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=BN(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||BN(r),p={},d={},f={list:[],map:{}},g={showPointer:H(EN,d),showTooltip:H(zN,f)};E(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);E(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&NN(t,a,g,!1,p)}}))}));var y={};return E(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&E(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,VN(e),VN(t)))),y[t.key]=o}}))})),E(y,(function(t,e){NN(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];E(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(BN(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=ON(i)[r]||{},a=ON(i)[r]={};E(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&E(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];E(o,(function(t,e){!a[e]&&l.push(t)})),E(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function NN(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return E(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),E(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&A(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function EN(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function zN(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=MI(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function VN(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function BN(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function FN(t){TI.registerAxisPointerClass("CartesianAxisPointer",_N),t.registerComponentModel(MN),t.registerComponentView(LN),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=xI(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},RN)}var GN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=pN(i),c=WN[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];Se(p,p,s),we(p,p,[i.cx,i.cy]),l=Fh([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=dI.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));dN(t,n,i,r,p)},e}(aN);var WN={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:vN(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:xN(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:xN(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},HN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(zp),YN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Wo).models[0]},e.type="polarAxis",e}(zp);R(YN,D_);var XN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(YN),UN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(YN),ZN=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(ab);ZN.prototype.dataToRadius=ab.prototype.dataToCoord,ZN.prototype.radiusToData=ab.prototype.coordToData;var jN=Vo(),qN=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Sr(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=jN(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(ab);qN.prototype.dataToAngle=ab.prototype.dataToCoord,qN.prototype.angleToData=ab.prototype.coordToData;var KN=["radius","angle"],$N=function(){function t(t){this.dimensions=KN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ZN,this._angleAxis=new qN,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return JN(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return JN(e)===this?this.pointToData(n):null},t}();function JN(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function QN(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();E(C_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),E(C_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),__(i.scale,i.model),__(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function tE(t,e){var n;if(t.type=e.get("type"),t.scale=b_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,r)}e.axis=t,t.model=e}var eE={dimensions:KN,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new $N(i+"");r.update=QN;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");tE(o,s),tE(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=$r(i[0],r),t.cy=$r(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:Y(l)||(l=[0,l]);var u=[$r(l[0],s),$r(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Wo).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},nE=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iE(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function rE(t){return t.getRadiusAxis().inverse?0:1}function oE(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var aE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=z(n.getViewLabels(),(function(t){t=T(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));oE(s),oE(o),E(nE,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||sE[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(TI),sE={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,h=l.getExtent(),c=rE(n),p=c?0:1,d=360===Math.abs(h[1]-h[0])?"Circle":"Arc";(a=0===o[p]?new Qh[d]({shape:{cx:n.cx,cy:n.cy,r:o[c],startAngle:-h[0]*u,endAngle:-h[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Wu({shape:{cx:n.cx,cy:n.cy,r:o[c],r0:o[p]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[rE(n)],u=z(i,(function(t){return new Ku({shape:iE(n,[l,l+s],t.coord)})}));t.add(Nh(u,{style:k(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[rE(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];q(m)&&m.textStyle&&(a=new Cc(m.textStyle,l,l.ecModel))}var x=new Xs({silent:dI.isLabelSilent(e),style:oc(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(x),h){var _=dI.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,rl(x).eventData=_}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",C=b;m&&(i[s][I]||(i[s][I]={p:b,n:b}),C=i[s][I][T]);var D=void 0,A=void 0,k=void 0,L=void 0;if("radius"===c.dim){var P=c.dataToCoord(M)-b,O=o.dataToCoord(I);Math.abs(P)=L})}}}))}var gE={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},yE={splitNumber:5},vE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="polar",e}(Ag);function mE(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),it(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var xE=["axisLine","axisTickLabel","axisName"],_E=["splitArea","splitLine"],bE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return n(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Br;var s=mE(e),l=new dI(e,s);E(xE,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),E(_E,(function(t){e.get([t,"show"])&&wE[t](this,this.group,this._axisGroup,e)}),this),Hh(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){AI(this)},e.type="singleAxis",e}(TI),wE={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),h=r.isHorizontal(),c=[],p=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],y=0;y=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return CE(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return CE(e)===this?this.pointToData(n):null},t}();function CE(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var DE={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new TE(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Wo).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:IE},AE=["x","y"],kE=["width","height"],LE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=RE(a,1-OE(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=pN(i),c=PE[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}yN(e,t,mE(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=mE(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=gN(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=OE(r),s=RE(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=RE(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(aN),PE={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vN([e,n[0]],[e,n[1]],OE(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:mN([e-i/2,n[0]],[i,r],OE(t))}}};function OE(t){return t.isHorizontal()?0:1}function RE(t,e){var n=t.getRect();return[n[AE[e]],n[AE[e]]+n[kE[e]]]}var NE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(Ag);var EE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Rp(e);t.prototype.init.apply(this,arguments),zE(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),zE(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(zp);function zE(t,e){var n,i=t.cellSize;1===(n=Y(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=z([0,1],(function(t){return function(t,e){return null!=t[Cp[e][0]]||null!=t[Cp[e][1]]&&null!=t[Cp[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Op(t,e,{type:"box",ignoreSize:r})}var VE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Ws({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new Zu({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return U(t)&&t?(n=t,E(e,(function(t,e){n=n.replace("{"+e+"}",i?re(t):t)})),n):X(t)?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new Xs({z2:30,style:oc(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!U(o)||(o&&(e=Vc(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/BE)-Math.floor(n[0].time/BE)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function GE(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function WE(t,e){var n;return E(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var HE=["transition","enterFrom","leaveTo"],YE=HE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function XE(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?HE:YE,r=0;r=0;l--){var p,d,f;if(f=null!=(d=Ro((p=n[l]).id,null))?r.get(d):null){var g=f.parent,y=(c=jE(g),{}),v=Lp(f,p,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:p.hv,boundingMode:p.bounding},y);if(!jE(f).isNew&&v){for(var m=p.transition,x={},_=0;_=0)?x[b]=w:f[b]=w}vh(f,x,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){JE(n,jE(n).option,e,t._lastGraphicModel)})),this._elMap=yt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ag);function KE(t){var e=_t(ZE,t)?ZE[t]:Lh(t);var n=new e({});return jE(n).type=t,n}function $E(t,e,n,i){var r=KE(n);return e.add(r),i.set(t,r),jE(r).id=t,jE(r).isNew=!0,r}function JE(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){JE(t,e,n,i)})),gR(t,e,i),n.removeKey(jE(t).id))}function QE(t,e,n,i){t.isGroup||E([["cursor",Da.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];_t(e,i)?t[i]=rt(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),E(G(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=X(i)?i:null}})),_t(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var tz=["x","y","radius","angle","single"],ez=["cartesian2d","polar","singleAxis"];function nz(t){return t+"Axis"}function iz(t,e){var n,i=yt(),r=[],o=yt();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function rz(t){var e=t.ecModel,n={infoList:[],infoMap:yt()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(nz(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var oz=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=sz(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=sz(t);C(this.option,t,!0),C(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=yt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return E(tz,(function(n){var i=this.getReferringComponents(nz(n),Ho);if(i.specified){e=!0;var r=new oz;E(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new oz;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Wo).models[0];a&&E(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Wo).models[0]&&o.add(t.componentIndex)}))}}}i&&E(tz,(function(e){if(i){var r=n.findComponents({mainType:nz(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new oz;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._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}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(nz(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){E(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(nz(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;E(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=nz(this._dimName),i=e.getReferringComponents(n,Wo).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return T(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];cz(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Kr(h,o,n))):(e=!0,h=Kr(c=null==c?n[u]:i.parse(c),n,o)),s[u]=null==c||isNaN(c)?n[u]:c,a[u]=null==h||isNaN(h)?o[u]:h})),pz(s),pz(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";zk(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Kr(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];cz(n,(function(t){!function(t,e,n){e&&E(C_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=v_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&cz(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=z(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!p)return!0;h&&(r=!0),c&&(e=!0),p&&(n=!0)}return r&&e&&n}))}else cz(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));cz(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;cz(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Kr(n[0]+o,n,[0,100],!0):null!=r&&(o=Kr(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=no(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var fz={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(nz(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new dz(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=yt();return E(n,(function(t){E(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var gz=!1;function yz(t){gz||(gz=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,fz),function(t){t.registerAction("dataZoom",(function(t,e){E(iz(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function vz(t){t.registerComponentModel(lz),t.registerComponentView(hz),yz(t)}var mz=function(){},xz={};function _z(t,e){xz[t]=e}function bz(t){return xz[t]}var wz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;E(this.option.feature,(function(t,n){var i=bz(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),C(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(zp);function Sz(t,e){var n=vp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Ws({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var Mz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];E(s,(function(t,e){u.push(e)})),new Gm(this._featureNames||[],u).add(h).update(h).remove(H(h,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=kp(i,o,r);Ap(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Lp(t,i,o,r)}(r,t,n),r.add(Sz(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!X(l)&&e){var u=l.style||(l.style={}),h=Sr(e,Xs.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+10;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function h(h,c){var p,d=u[h],f=u[c],g=s[d],y=new Cc(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(g.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))p={onclick:y.option.onclick,featureName:d};else{var v=bz(d);if(!v)return;p=new v}l[d]=p}else if(!(p=l[f]))return;p.uid=Ac("toolbox-feature"),p.model=y,p.ecModel=e,p.api=n;var m=p instanceof mz;d||!f?!y.get("show")||m&&p.unusable?m&&p.remove&&p.remove(e,n):(!function(i,s,l){var u,h,c=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=s instanceof mz&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};U(d)?(u={})[l]=d:u=d;U(f)?(h={})[l]=f:h=f;var g=i.iconPaths={};E(u,(function(l,u){var d=Uh(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=p.getItemStyle();var f=new Xs({style:{text:h[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null,font:cc({fontStyle:p.get("textFontStyle"),fontFamily:p.get("textFontFamily"),fontSize:p.get("textFontSize"),fontWeight:p.get("textFontWeight")},e)},ignore:!0});d.setTextContent(f),Kh({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",(function(){var e=p.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?Ol:Rl)(d),r.add(d),d.on("click",W(s.onclick,s,e,n,u)),g[u]=d}))}(y,p,d),y.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Ol:Rl)(i[t])},p instanceof mz&&p.render&&p.render(y,e,n,i)):m&&p.dispose&&p.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){E(this._features,(function(t){t instanceof mz&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){E(this._features,(function(n){n instanceof mz&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){E(this._features,(function(n){n instanceof mz&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Ag);var Iz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=r.browser;if("function"!=typeof MouseEvent||!l.newEdge&&(l.ie||l.edge))if(window.navigator.msSaveOrOpenBlob||o){var u=s.split(","),h=u[0].indexOf("base64")>-1,c=o?decodeURIComponent(u[1]):u[1];h&&(c=window.atob(c));var p=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var d=c.length,f=new Uint8Array(d);d--;)f[d]=c.charCodeAt(d);var g=new Blob([f]);window.navigator.msSaveOrOpenBlob(g,p)}else{var y=document.createElement("iframe");document.body.appendChild(y);var v=y.contentWindow,m=v.document;m.open("image/svg+xml","replace"),m.write(c),m.close(),v.focus(),m.execCommand("SaveAs",!0,p),document.body.removeChild(y)}}else{var x=n.get("lang"),_='',b=window.open();b.document.write(_),b.document.title=i}else{var w=document.createElement("a");w.download=i+"."+a,w.target="_blank",w.href=s;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(mz),Tz="__ec_magicType_stack__",Cz=[["line","bar"],["stack"]],Dz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(Az[n]){var o,a={series:[]};E(Cz,(function(t){P(t,n)>=0&&E(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=Az[n](e,r,t,i);o&&(k(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Wo).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=C({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(mz),Az={line:function(t,e,n,i){if("bar"===t)return C({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return C({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===Tz;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),C({id:e,stack:r?"":Tz},i.get(["option","stack"])||{},!0)}};Cm({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var kz=new Array(60).join("-"),Lz="\t";function Pz(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Oz=new RegExp("[\t]+","g");function Rz(t,e){var n=t.split(new RegExp("\n*"+kz+"\n*","g")),i={series:[]};return E(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(Lz)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=z(Pz(e.shift()).split(Oz),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=jz[t.brushType](0,n,e);t.__rangeOffset={offset:Kz[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){E(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&E(i.coordSyses,(function(i){var r=jz[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){E(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=jz[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?Kz[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=Jz(n),o=Jz(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return z(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:BL(i),isTargetByCursor:GL(i,t,n.coordSysModel),getLinearBrushOtherExtent:FL(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&P(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Yz(e,t),r=0;rt[1]&&t.reverse(),t}function Yz(t,e){return Fo(t,e,{includeMainTypes:Gz})}var Xz={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=yt(),a={},s={};(n||i||r)&&(E(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),E(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),E(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];E(r.getCartesians(),(function(t,e){(P(n,t.getAxis("x").model)>=0||P(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:Zz.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){E(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Zz.geo})}))}},Uz=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],Zz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Bh(t)),e}},jz={lineX:H(qz,0),lineY:H(qz,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[Hz([r[0],o[0]]),Hz([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:z(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function qz(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=Hz(z([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var Kz={lineX:H($z,0),lineY:H($z,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return z(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function $z(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Jz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var Qz,tV,eV=E,nV=Io+"toolbox-dataZoom_",iV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new lL(n.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Wz(oV(t),e,{include:["grid"]}),s=a.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return Bz(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){rV[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new Wz(oV(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=Bz(t);zz(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=zk(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];eV(t,(function(t,n){e.push(T(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(mz),rV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=Bz(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return zz(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function oV(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}Qz="dataZoom",tV=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Fo(t,oV(i));return eV(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),eV(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:nV+e+o};a[n]=o,r.push(a)}},lt(null==od.get(Qz)&&tV),od.set(Qz,tV);var aV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(zp);function sV(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function lV(t){if(r.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,p=l+r,d=p*Math.abs(Math.cos(c))+p*Math.abs(Math.sin(c)),f=e+" solid "+r+"px;";return'
'}(n,i,r)),U(t))o.innerHTML=t+a;else if(t){o.innerHTML="",Y(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!r.node&&n.getDom()){var o=IV(i,n);this._ticket="";var a=i.dataByCoordSys,s=function(t,e,n){var i=Go(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=Yo(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=rl(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:r,componentIndex:a.componentIndex,el:s}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=wV;u.x=i.x,u.y=i.y,u.update(),rl(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=PN(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryShow({offsetX:c,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(IV(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===MV([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;if("legend"===rl(n).ssrType)return;this._lastDataByCoordSys=null,Oy(n,(function(t){return null!=rl(t).dataIndex?(r=t,!0):null!=rl(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=W(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=MV([e.tooltipOption],i),a=this._renderMode,s=[],l=og("section",{blocks:[],noHeader:!0}),u=[],h=new yg;E(t,(function(t){E(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=fN(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=og("section",{header:o,noHeader:!ut(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),E(t.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),d=l.dataIndexInside,f=p.getDataParams(d);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=S_(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",Sp(f.color),a);var g=bf(p.formatTooltip(d,!0,null)),y=g.frag;if(y){var v=MV([p],i).get("valueFormatter");c.blocks.push(v?A({valueFormatter:v},y):y)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=cg(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=rl(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=MV([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),y=new yg;g.marker=y.makeTooltipMarker("item",Sp(g.color),c);var v=bf(s.formatTooltip(l,!1,u)),m=d.get("order"),x=d.get("valueFormatter"),_=v.frag,b=_?cg(x?A({valueFormatter:x},_):_,y,c,m,i.get("useUTC"),d.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,b,g,w,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=rl(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(U(o)){o={content:o,formatter:o},a=!0}a&&i&&o.content&&((o=T(o)).content=re(o.content));var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=t.positionDefault,h=MV(s,this._tooltipModel,u?{position:u}:null),c=h.get("content"),p=Math.random()+"",d=new yg;this._showOrMove(h,(function(){var n=T(h.get("formatterParams")||{});this._showTooltipContent(h,c,n,p,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h)if(U(h)){var d=t.ecModel.get("useUTC"),f=Y(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Jc(f.axisValue,c,d)),c=bp(c,n,!0)}else if(X(h)){var g=W((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||Y(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:Y(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),X(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),Y(e))n=$r(e[0],s),i=$r(e[1],l);else if(q(e)){var d=e;d.width=u[0],d.height=u[1];var f=kp(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(U(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=TV(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=TV(c)?u[1]/2:"bottom"===c?u[1]:0),sV(t)){g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&E(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&E(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&E(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&E(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!r.node&&e.getDom()&&(Yg(this,"_updatePosition"),this._tooltipContent.dispose(),kN("itemTooltip",e))},e.type="tooltip",e}(Ag);function MV(t,e,n){var i,r=e.ecModel;n?(i=new Cc(n,r,r),i=new Cc(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof Cc&&(a=a.get("tooltip",!0)),U(a)&&(a={formatter:a}),a&&(i=new Cc(a,i,r)))}return i}function IV(t,e){return t.dispatchAction||W(e.dispatchAction,e)}function TV(t){return"center"===t||"middle"===t}var CV=["rect","polygon","keep","clear"];function DV(t,e){var n=To(t?t.brush:[]);if(n.length){var i=[];E(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;Y(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};E(t,(function(t){e[t]=1})),t.length=0,E(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,CV)}}var AV=E;function kV(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function LV(t,e,n){var i={};return AV(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);AV(t[e],(function(t,i){if(kD.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new kD(r),"opacity"===i&&((r=T(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new kD(r))}}))})),i}function PV(t,e,n){var i;E(n,(function(t){e.hasOwnProperty(t)&&kV(e[t])&&(i=!0)})),i&&E(n,(function(n){e.hasOwnProperty(n)&&kV(e[n])?t[n]=T(e[n]):delete t[n]}))}var OV={lineX:RV(0),lineY:RV(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&P_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(P_(i,r,o)||P_(i,r+a,o)||P_(i,r,o+s)||P_(i,r+a,o+s)||ze.create(t).contain(l[0],l[1])||Zh(r,o,r+a,o,i)||Zh(r,o,r,o+s,i)||Zh(r+a,o,r+a,o+s,i)||Zh(r,o+s,r+a,o+s,i))||void 0}}};function RV(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return NV(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&YV(e)}};function YV(t){return new ze(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var XV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new lL(e.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){BV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:T(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:T(n),$from:e})},e.type="brush",e}(Ag),UV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&PV(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=z(t,(function(t){return ZV(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=ZV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(zp);function ZV(t,e){return C({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cc(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var jV=["rect","polygon","lineX","lineY","keep","clear"],qV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,E(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:jV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(mz);var KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(zp),$V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=rt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Xs({style:oc(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Xs({style:oc(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){Mp(p,"_"+t.get("target"))})),d&&c.on("click",(function(){Mp(d,"_"+t.get("subtarget"))})),rl(l).eventData=rl(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=kp(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new Ws({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(Ag);var JV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],E(n,(function(e,n){var i,o=Ro(Ao(e),"");q(e)?(i=T(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new cx([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(zp),QV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=kc(JV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(JV);R(QV,_f.prototype);var tB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(Ag),eB=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(ab),nB=Math.PI,iB=Vo(),rB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return og("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},E(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:nB/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*nB/180;var x=d.get("position",!0),_=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===x||"bottom"===x?(_&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(_&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;we(o,o,[-a,-s]),Se(o,o,-nB/2),we(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||U(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Rx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Kx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ex}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new eB("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Br;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new Ku({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:A({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new Ku({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:k({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],E(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:W(r._changeTimeline,r,t.value)},p=oB(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),Ul(p);var d=rl(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],E(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new Xs({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:W(r._changeTimeline,r,a),silent:!1,style:oc(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=oc(u),p.ensureState("progress").style=oc(h),e.add(p),Ul(p),iB(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=Cr(rt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Uh(t.get(["controlStyle",e]),i||{},new ze(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Ul(c)}}h(t.nextBtnPosition,"next",W(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",W(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",W(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=W(s._handlePointerDrag,s),t.ondragend=W(s._handlePointerDragend,s),aB(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){aB(t,s._progressLine,o,n,i)}};this._currentPointer=oB(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=Qr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var vB={min:H(yB,"min"),max:H(yB,"max"),average:H(yB,"average"),median:H(yB,"median")};function mB(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Y(e.coord)&&Y(r)){var o=xB(e,n,i,t);if((e=T(e)).type&&vB[e.type]&&o.baseAxis&&o.valueAxis){var a=P(r,o.baseAxis.dim),s=P(r,o.valueAxis.dim),l=vB[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&Y(r))for(var u=e.coord,h=0;h<2;h++)vB[u[h]]&&(u[h]=wB(n,n.mapDimension(r[h]),u[h]));else e.coord=[];return e}}function xB(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function _B(t,e){return!(t&&t.containData&&e.coord&&!gB(e))||t.containData(e.coord)}function bB(t,e){return t?function(t,n,i,r){return If(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return If(t.value,e[r])}}function wB(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var SB=Vo(),MB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this.markerGroupMap=yt()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){SB(t).keep=!1})),e.eachSeries((function(t){var r=dB.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!SB(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){SB(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;E(t,(function(t){var i=dB.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Nl(t):El(t))}))}))},e.type="marker",e}(Ag);function IB(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=$r(a.get("x"),n.getWidth()),l=$r(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var TB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markPoint");e&&(IB(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new xS),u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new cx(i,n),o=z(n.get("data"),H(mB,e));t&&(o=B(o,H(_B,t)));var a=bB(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),IB(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(X(i)||X(r)||X(o)||X(s)){var h=e.getRawValue(t),c=e.getDataParams(t);X(i)&&(i=i(h,c)),X(r)&&(r=r(h,c)),X(o)&&(o=o(h,c)),X(s)&&(s=s(h,c))}var p=n.getModel("itemStyle").getItemStyle(),d=Ay(a,"color");p.fill||(p.fill=d),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){rl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(MB);var CB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(dB),DB=Vo(),AB=function(t,e,n,i){var r,o=t.getData();if(Y(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=it(i.yAxis,i.xAxis);else{var u=xB(i,o,e,t);s=u.valueAxis,l=wB(o,xx(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,p=T(i),d={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,d.coord[c]=1/0;var f=n.get("precision");f>=0&&j(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[mB(t,r[0]),mB(t,r[1]),A({},r[2])];return g[2].type=g[2].type||null,C(g[2],g[0]),C(g[2],g[1]),g};function kB(t){return!isNaN(t)&&!isFinite(t)}function LB(t,e,n,i){var r=1-t,o=i.dimensions[t];return kB(e[r])&&kB(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function PB(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(LB(1,n,i,t)||LB(0,n,i,t)))return!0}return _B(t,e[0])&&_B(t,e[1])}function OB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=$r(s.get("x"),r.getWidth()),u=$r(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(OS(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;kB(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):kB(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var RB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=DB(e).from,o=DB(e).to;r.each((function(e){OB(r,e,!0,t,n),OB(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new YA);this.group.add(l.group);var u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new cx(i,n),o=new cx(i,n),a=new cx([],n),s=z(n.get("data"),H(AB,e,t,n));t&&(s=B(s,H(PB,t)));var l=bB(!!t,i);return r.initData(z(s,(function(t){return t[0]})),null,l),o.initData(z(s,(function(t){return t[1]})),null,l),a.initData(z(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;DB(e).from=h,DB(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),y=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);OB(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Ay(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:rt(o.get("symbolOffset",!0),y[r?0:1]),symbolRotate:rt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:rt(o.get("symbolSize"),f[r?0:1]),symbol:rt(o.get("symbol",!0),d[r?0:1]),style:s})}Y(d)||(d=[d,d]),Y(f)||(f=[f,f]),Y(g)||(g=[g,g]),Y(y)||(y=[y,y]),u.from.each((function(t){v(h,t,!0),v(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t){rl(t).dataModel=e,t.traverse((function(t){rl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(MB);var NB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(dB),EB=Vo(),zB=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=mB(t,r),s=mB(t,o),l=a.coord,u=s.coord;l[0]=it(l[0],-1/0),l[1]=it(l[1],-1/0),u[0]=it(u[0],1/0),u[1]=it(u[1],1/0);var h=D([{},a,s]);return h.coord=[a.coord,s.coord],h.x0=a.x,h.y0=a.y,h.x1=s.x,h.y1=s.y,h}};function VB(t){return!isNaN(t)&&!isFinite(t)}function BB(t,e,n,i){var r=1-t;return VB(e[r])&&VB(n[r])}function FB(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return OS(t,"cartesian2d")?!(!n||!i||!BB(1,n,i)&&!BB(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!gB(e)&&!gB(n))||t.containZone(e.coord,n.coord)}(t,r,o):_B(t,r)||_B(t,o)}function GB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=$r(s.get(n[0]),r.getWidth()),u=$r(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),p=a.clampData(h),d=a.clampData(c),f=[];"x0"===n[0]?f[0]=p[0]>d[0]?c[0]:h[0]:f[0]=p[0]>d[0]?h[0]:c[0],"y0"===n[1]?f[1]=p[1]>d[1]?c[1]:h[1]:f[1]=p[1]>d[1]?h[1]:c[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[m=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(OS(a,"cartesian2d")){var y=a.getAxis("x"),v=a.getAxis("y"),m=t.get(n[0],e),x=t.get(n[1],e);VB(m)?o[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):VB(x)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var WB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],HB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=z(WB,(function(r){return GB(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Br});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=z(t&&t.dimensions,(function(t){var n=e.getData();return A(A({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=z(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new cx(r,n)}else i=new cx(r=[{name:"value",type:"float"}],n);var s=z(n.get("data"),H(zB,e,t,n));t&&(s=B(s,H(FB,t)));var l=t?function(t,e,n,i){return If(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return If(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=z(WB,(function(n){return GB(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Qr(c),Qr(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(zp),XB=H,UB=E,ZB=Br,jB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new ZB),this.group.add(this._selectorGroup=new ZB),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=kp(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=kp(k({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Sz(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=yt(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),UB(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new ZB;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("legendLineStyle")||{},g=d.getVisual("legendIcon"),y=d.getVisual("style"),v=this._createItem(p,a,o,r,e,t,f,y,g,u,i);v.on("click",XB(qB,a,null,i,h)).on("mouseover",XB($B,p.name,null,i,h)).on("mouseout",XB(JB,p.name,null,i,h)),n.ssr&&v.eachChild((function(t){var e=rl(t);e.seriesIndex=p.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var c=s.legendVisualProvider;if(!c.containName(a))return;var p=c.indexOfName(a),d=c.getItemVisual(p,"style"),f=c.getItemVisual(p,"legendIcon"),g=qn(d.fill);g&&0===g[3]&&(g[3]=.2,d=A(A({},d),{fill:ri(g,"rgba")}));var y=this._createItem(s,a,o,r,e,t,{},d,f,u,i);y.on("click",XB(qB,null,a,i,h)).on("mouseover",XB($B,null,a,i,h)).on("mouseout",XB(JB,null,a,i,h)),n.ssr&&y.eachChild((function(t){var e=rl(t);e.seriesIndex=s.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();UB(t,(function(t){var i=t.type,r=new Xs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),ic(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Ul(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualDrawType,p=r.get("itemWidth"),d=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),v=i.get("icon"),m=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),UB(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?mv(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var p=e.getModel("lineStyle"),d=p.getLineStyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=p.get("inactiveColor"),d.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}(l=v||l||"roundRect",i,a,s,c,f,h),x=new ZB,_=i.getModel("textStyle");if(!X(t.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;x.add(function(t){var e=t.icon||"roundRect",n=Xy(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:d,icon:l,iconRotate:b,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}))}else x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}));var w="left"===o?p+5:-5,S=o,M=r.get("formatter"),I=e;U(M)&&M?I=M.replace("{name}",null!=e?e:""):X(M)&&(I=M(e));var T=f?_.getTextColor():i.get("inactiveColor");x.add(new Xs({style:oc(_,{text:I,x:w,y:d/2,fill:T,align:S,verticalAlign:"middle"},{inheritColor:T})}));var C=new Ws({shape:x.getBoundingRect(),style:{fill:"transparent"}}),D=i.getModel("tooltip");return D.get("show")&&Kh({el:C,componentModel:r,itemName:e,itemTooltipOption:D.option}),x.add(C),x.eachChild((function(t){t.silent=!0})),C.silent=!u,this.getContentGroup().add(x),Ul(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Ap(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Ap("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ag);function qB(t,e,n,i){JB(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),$B(t,e,n,i)}function KB(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=rt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var x={x:0,y:0};x[r]=Math.max(n[r]-p[r]-v,0),x[o]=m[o],u.setClipPath(new Ws({shape:x})),u.__rectSize=x[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(t);return null!=_.pageIndex&&vh(l,{x:_.contentPosition[0],y:_.contentPosition[1]},d?t:null),this._updatePageInfoView(t,_),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;E(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",U(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=oF[r],a=aF[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!x(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&x(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(jB);function lF(t){Vm(eF),t.registerComponentModel(nF),t.registerComponentView(sF),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var uF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=kc(az.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(az),hF=Vo();function cF(t,e,n){hF(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function pF(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function dF(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function fF(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function gF(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=hF(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=yt());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){E(rz(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:H(fF,e),dispatchAction:H(dF,t),dataZoomInfoMap:null,controller:null},i=n.controller=new nT(t.getZr());return E(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=yt())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Hg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else pF(i,t)}))}))}var yF=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),cF(i,e,{pan:W(vF.pan,this),zoom:W(vF.zoom,this),scrollMove:W(vF.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=hF(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return zk(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:mF((function(t,e,n,i,r,o){var a=xF[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:mF((function(t,e,n,i,r,o){return xF[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function mF(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return zk(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var xF={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function _F(t){yz(t),t.registerComponentModel(uF),t.registerComponentView(yF),gF(t)}var bF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=kc(az.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(az),wF=Ws,SF="horizontal",MF="vertical",IF=["line","bar","candlestick","scatter"],TF={easing:"cubicOut",duration:100,delay:0},CF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Hg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Yg(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Br;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===SF?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Rp(t.option);E(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=kp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===MF&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==SF||r?n===SF&&r?{scaleY:a?1:-1,scaleX:-1}:n!==MF||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new wF({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new wF({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=r.getDataExtent(a),h=.3*(u[1]-u[0]);u=[u[0]-h,u[1]+h];var c,p=[0,e[1]],d=[0,e[0]],f=[[e[0],0],[0,0]],g=[],y=d[1]/(r.count()-1),v=0,m=Math.round(r.count()/e[0]);r.each([a],(function(t,e){if(m>0&&e%m)v+=y;else{var n=null==t||isNaN(t)||""===t,i=n?0:Kr(t,u,p,!0);n&&!c&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&c&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=y,c=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=x.getModel(t?"selectedDataBackground":"dataBackground"),n=new Br,i=new Xu({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Zu({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){E(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&P(IF,t.get("type"))<0)){var a,s=i.getComponent(nz(r),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new wF({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new wF({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),E([0,1],(function(e){var o=a.get("handleIcon");!Wy[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Xy(o,-1,0,2,2,null,!0);s.attr({cursor:DF(this._orient),draggable:!0,drift:W(this._onDragMove,this,e),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=$r(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Ul(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new Xs({silent:!0,invisible:!0,style:oc(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var p=$r(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new Ws({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=Xy(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new Ws({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:DF(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Kr(t[0],[0,100],e,!0),Kr(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];zk(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Kr(o.minSpan,a,r,!0):null,null!=o.maxSpan?Kr(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Qr([Kr(i[0],r,a,!0),Kr(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Qr(n.slice()),r=this._size;E([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new De(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Qr([Kr(n.x,i,r,!0),Kr(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(de(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new wF({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?TF:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=rz(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(uz);function DF(t){return"vertical"===t?"ns-resize":"ew-resize"}function AF(t){t.registerComponentModel(bF),t.registerComponentView(CF),yz(t)}var kF=function(t,e,n){var i=T((LF[t]||{})[e]);return n&&Y(i)?i[i.length-1]:i},LF={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]}},PF=kD.mapVisual,OF=kD.eachVisual,RF=Y,NF=E,EF=Qr,zF=Kr,VF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&PV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=W(t,this),this.controllerVisuals=LV(this.option.controller,e,t),this.targetVisuals=LV(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=To(t),e},e.prototype.eachTargetSeries=function(t,e){E(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],Y(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return U(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):X(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=EF([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});C(i,n),C(r,n);var o=this.isCategory();function a(n){RF(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},NF(i,(function(t,e){if(kD.isValidType(e)){var n=kF(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";NF(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&T(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&T(n)||(o?s[0]:[s[0],s[0]])),l.symbol=PF(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;OF(u,(function(t){t>h&&(h=t)})),l.symbolSize=PF(u,(function(t){return zF(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(zp),BF=[20,140],FF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=BF[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=BF[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):Y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Qr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=GF(this,"outOfRange",this.getExtent()),n=GF(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Br("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();ZF([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=UF(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=Fh(n.handleLabelPoints[l],Bh(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=UF(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=Fh(l.indicatorLabelPoint,Bh(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var x={x:d,y:p,style:{fill:h}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||JF(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function iG(t,e,n,i){for(var r=e.targetVisuals[i],o=kD.prepareVisualTypes(r),a={color:Ay(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(tG,eG),E(nG,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(oG))}function uG(t){t.registerComponentModel(FF),t.registerComponentView(KF),lG(t)}var hG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],cG[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=T(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=z(this._pieceList,(function(t){return t=T(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=kD.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}E(e.pieces,(function(t){E(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),E(n,(function(t,n){var i=!1;E(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&E(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=kF(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,E(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;E(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=T(t)},e.prototype.getValueState=function(t){var e=kD.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){kD.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return E(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=kc(VF.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(VF),cG={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function pG(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var dG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=it(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),E(l.viewPieceList,(function(i){var l=i.piece,u=new Br;u.onclick=W(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new Xs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Ap(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:XF(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return YF(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Br,a=this.visualMapModel.textStyleModel;o.add(new Xs({style:oc(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=z(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Xy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=T(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,E(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(WF);function fG(t){t.registerComponentModel(hG),t.registerComponentView(dG),lG(t)}var gG={label:{enabled:!0},decal:{show:!1}},yG=Vo(),vG={};function mG(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=T(gG);C(i.label,t.getLocaleModel().get("aria"),!1),C(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=yt();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),yG(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(X(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=pd(e.ecModel,e.name,vG,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=yG(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=pd(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?A(A({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=e.getZr().dom;if(!i)return;var o=t.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=k(a.option,o),!a.get("enabled"))return;if(a.get("description"))return void i.setAttribute("aria-label",a.get("description"));var s,l=t.getSeriesCount(),u=a.get(["data","maxCount"])||10,h=a.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();s=p?r(a.get(["general","withTitle"]),{title:p}):a.get(["general","withoutTitle"]);var d=[];s+=r(l>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,_=t.getLocaleModel().get(["series","typeNames"]),_[x]||_.chart)});var s=e.getData();if(s.count()>u)i+=r(a.get(["data","partialData"]),{displayCnt:u});else i+=a.get(["data","allData"]);for(var h=a.get(["data","separator","middle"]),p=a.get(["data","separator","end"]),f=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},bG=function(){function t(t){if(null==(this._condVal=U(t)?new RegExp(t):et(t)?t:null)){var e="";0,wo(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return U(e)?this._condVal.test(t):!!j(e)&&this._condVal.test(t+"")},t}(),wG=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),SG=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){EG(t,i)&&EG(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function VG(t,e,n,i,r,o,a,s,l,u){if(EG(t,n)&&EG(e,i)&&EG(r,a)&&EG(o,s))l.push(a,s);else{var h=2/u,c=h*h,p=a-t,d=s-e,f=Math.sqrt(p*p+d*d);p/=f,d/=f;var g=n-t,y=i-e,v=r-a,m=o-s,x=g*g+y*y,_=v*v+m*m;if(x=0&&_-w*w=0)l.push(a,s);else{var S=[],M=[];wn(t,n,r,a,.5,S),wn(e,i,o,s,.5,M),VG(S[0],M[0],S[1],M[1],S[2],M[2],S[3],M[3],l,u),VG(S[4],M[4],S[5],M[5],S[6],M[6],S[7],M[7],l,u)}}}}function BG(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=BG([l,u],h?0:1,e),p=(h?s:u)/c.length,d=0;d1?null:new De(d*l+t,d*u+e)}function HG(t,e,n){var i=new De;De.sub(i,n,e),i.normalize();var r=new De;return De.sub(r,t,e),r.dot(i)}function YG(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function XG(t){var e=t.points,n=[],i=[];Ba(e,n,i);var r=new ze(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new De,h=new De;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=BG([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,p=0;p0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(x=0;x0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function lW(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=z(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return z(o,(function(o,a){return{cp:o,z:sW(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function uW(t){return jG(t.path,t.count)}function hW(t){return Y(t[0])}function cW(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var pW={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);hW(t)&&(s=t,l=e),hW(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,p=s?cW(l,s):cW(c?e:t,[c?t:e]),d=0,f=0;f1e4))for(var r=n.getIndices(),o=0;o0&&i.group.traverse((function(t){t instanceof ks&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function SW(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function MW(t){return Y(t)?t.sort().join(","):t}function IW(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function TW(t,e){for(var n=0;n=0&&r.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:IW(e.oldData[n]),groupIdDim:t.dimension})})),E(To(t.to),(function(t){var i=TW(n.updatedSeries,t);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:e.oldDataGroupIds[i],data:r,divide:IW(r),groupIdDim:t.dimension})}})),r.length>0&&o.length>0&&wW(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=yt(),i=yt(),r=yt();return E(t.oldSeries,(function(e,n){var o=t.oldDataGroupIds[n],a=t.oldData[n],s=SW(e),l=MW(s);i.set(l,{dataGroupId:o,data:a}),Y(s)&&E(s,(function(t){r.set(t,{key:l,dataGroupId:o,data:a})}))})),E(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),a=SW(t),s=MW(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:IW(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:IW(o),data:o}]});else if(Y(a)){var u=[];E(a,(function(t){var e=i.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:IW(e.data),data:e.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:IW(o)}]})}else{var h=r.get(a);if(h){var c=n.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:IW(h.data)}],newSeries:[]},n.set(h.key,c)),c.newSeries.push({dataGroupId:e,data:o,divide:IW(o)})}}}})),n}(i,n);E(o.keys(),(function(t){var n=o.get(t);wW(n.oldSeries,n.newSeries,e)}))}E(n.updatedSeries,(function(t){t[_g]&&(t[_g]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],u=i.oldData=[],h=0;h O_ || t < -O_ + } + + function vt(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 + } + + function yt(t) { + return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t + } + + function xt(t) { + return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t + } + + function _t(t) { + return t < 0 ? 0 : t > 1 ? 1 : t + } + + function wt(t) { + return yt(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10)) + } + + function bt(t) { + return _t(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t)) + } + + function St(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 Mt(t, e, i) { + return t + (e - t) * i + } + + function It(t, e, i, n, o) { + return t[0] = e, t[1] = i, t[2] = n, t[3] = o, t + } + + function Tt(t, e) { + return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t + } + + function Dt(t, e) { + X_ && Tt(X_, e), X_ = U_.put(t, X_ || e.slice()) + } + + function At(t, e) { + if (t) { + e = e || []; + var i = U_.get(t); + if (i) return Tt(e, i); + var n = (t += "").replace(/ /g, "").toLowerCase(); + if (n in Z_) return Tt(e, Z_[n]), Dt(t, e), e; + if ("#" !== n.charAt(0)) { + var o = n.indexOf("("), a = n.indexOf(")"); + if (-1 !== o && a + 1 === n.length) { + var r = n.substr(0, o), s = n.substr(o + 1, a - (o + 1)).split(","), l = 1; + switch (r) { + case"rgba": + if (4 !== s.length) return void It(e, 0, 0, 0, 1); + l = bt(s.pop()); + case"rgb": + return 3 !== s.length ? void It(e, 0, 0, 0, 1) : (It(e, wt(s[0]), wt(s[1]), wt(s[2]), l), Dt(t, e), e); + case"hsla": + return 4 !== s.length ? void It(e, 0, 0, 0, 1) : (s[3] = bt(s[3]), Ct(s, e), Dt(t, e), e); + case"hsl": + return 3 !== s.length ? void It(e, 0, 0, 0, 1) : (Ct(s, e), Dt(t, e), e); + default: + return + } + } + It(e, 0, 0, 0, 1) + } else { + if (4 === n.length) return (u = parseInt(n.substr(1), 16)) >= 0 && u <= 4095 ? (It(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), Dt(t, e), e) : void It(e, 0, 0, 0, 1); + if (7 === n.length) { + var u = parseInt(n.substr(1), 16); + return u >= 0 && u <= 16777215 ? (It(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), Dt(t, e), e) : void It(e, 0, 0, 0, 1) + } + } + } + } + + function Ct(t, e) { + var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360, n = bt(t[1]), o = bt(t[2]), + a = o <= .5 ? o * (n + 1) : o + n - o * n, r = 2 * o - a; + return e = e || [], It(e, yt(255 * St(r, a, i + 1 / 3)), yt(255 * St(r, a, i)), yt(255 * St(r, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e + } + + function Lt(t) { + if (t) { + var e, i, n = t[0] / 255, o = t[1] / 255, a = t[2] / 255, r = Math.min(n, o, a), s = Math.max(n, o, a), + l = s - r, u = (s + r) / 2; + if (0 === l) e = 0, i = 0; else { + i = u < .5 ? l / (s + r) : l / (2 - s - r); + var h = ((s - n) / 6 + l / 2) / l, c = ((s - o) / 6 + l / 2) / l, d = ((s - a) / 6 + l / 2) / l; + n === s ? e = d - c : o === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -= 1) + } + var f = [360 * e, i, u]; + return null != t[3] && f.push(t[3]), f + } + } + + function kt(t, e) { + var i = At(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, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0); + return zt(i, 4 === i.length ? "rgba" : "rgb") + } + } + + function Pt(t) { + var e = At(t); + if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) + } + + function Nt(t, e, i) { + if (e && e.length && t >= 0 && t <= 1) { + i = i || []; + var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = e[o], s = e[a], l = n - o; + return i[0] = yt(Mt(r[0], s[0], l)), i[1] = yt(Mt(r[1], s[1], l)), i[2] = yt(Mt(r[2], s[2], l)), i[3] = _t(Mt(r[3], s[3], l)), i + } + } + + function Ot(t, e, i) { + if (e && e.length && t >= 0 && t <= 1) { + var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = At(e[o]), s = At(e[a]), l = n - o, + u = zt([yt(Mt(r[0], s[0], l)), yt(Mt(r[1], s[1], l)), yt(Mt(r[2], s[2], l)), _t(Mt(r[3], s[3], l))], "rgba"); + return i ? {color: u, leftIndex: o, rightIndex: a, value: n} : u + } + } + + function Et(t, e, i, n) { + if (t = At(t)) return t = Lt(t), null != e && (t[0] = xt(e)), null != i && (t[1] = bt(i)), null != n && (t[2] = bt(n)), zt(Ct(t), "rgba") + } + + function Rt(t, e) { + if ((t = At(t)) && null != e) return t[3] = _t(e), zt(t, "rgba") + } + + function zt(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 + ")" + } + } + + function Bt(t, e) { + return t[e] + } + + function Vt(t, e, i) { + t[e] = i + } + + function Gt(t, e, i) { + return (e - t) * i + t + } + + function Wt(t, e, i) { + return i > .5 ? e : t + } + + function Ft(t, e, i, n, o) { + var a = t.length; + if (1 == o) for (s = 0; s < a; s++) n[s] = Gt(t[s], e[s], i); else for (var r = a && t[0].length, s = 0; s < a; s++) for (var l = 0; l < r; l++) n[s][l] = Gt(t[s][l], e[s][l], i) + } + + function Ht(t, e, i) { + var n = t.length, o = e.length; + if (n !== o) if (n > o) t.length = o; else for (r = n; r < o; r++) t.push(1 === i ? e[r] : K_.call(e[r])); + for (var a = t[0] && t[0].length, r = 0; r < t.length; r++) if (1 === i) isNaN(t[r]) && (t[r] = e[r]); else for (var s = 0; s < a; s++) isNaN(t[r][s]) && (t[r][s] = e[r][s]) + } + + function Zt(t, e, i) { + if (t === e) return !0; + var n = t.length; + if (n !== e.length) return !1; + if (1 === i) { + for (a = 0; a < n; a++) if (t[a] !== e[a]) return !1 + } else for (var o = t[0].length, a = 0; a < n; a++) for (var r = 0; r < o; r++) if (t[a][r] !== e[a][r]) return !1; + return !0 + } + + function Ut(t, e, i, n, o, a, r, s, l) { + var u = t.length; + if (1 == l) for (c = 0; c < u; c++) s[c] = Xt(t[c], e[c], i[c], n[c], o, a, r); else for (var h = t[0].length, c = 0; c < u; c++) for (var d = 0; d < h; d++) s[c][d] = Xt(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r) + } + + function Xt(t, e, i, n, o, a, r) { + var s = .5 * (i - t), l = .5 * (n - e); + return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e + } + + function jt(t) { + if (c(t)) { + var e = t.length; + if (c(t[0])) { + for (var i = [], n = 0; n < e; n++) i.push(K_.call(t[n])); + return i + } + return K_.call(t) + } + return t + } + + function Yt(t) { + return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")" + } + + function qt(t) { + var e = t[t.length - 1].value; + return c(e && e[0]) ? 2 : 1 + } + + function Kt(t, e, i, n, o, a) { + var r = t._getter, s = t._setter, l = "spline" === e, u = n.length; + if (u) { + var h, d = c(n[0].value), f = !1, p = !1, g = d ? qt(n) : 0; + n.sort(function (t, e) { + return t.time - e.time + }), h = n[u - 1].time; + for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < u; _++) { + m.push(n[_].time / h); + var w = n[_].value; + if (d && Zt(w, y, g) || !d && w === y || (x = !1), y = w, "string" == typeof w) { + var b = At(w); + b ? (w = b, f = !0) : p = !0 + } + v.push(w) + } + if (a || !x) { + for (var S = v[u - 1], _ = 0; _ < u - 1; _++) d ? Ht(v[_], S, g) : !isNaN(v[_]) || isNaN(S) || p || f || (v[_] = S); + d && Ht(r(t._target, o), S, g); + var M, I, T, D, A, C, L = 0, k = 0; + if (f) var P = [0, 0, 0, 0]; + var N = new vt({ + target: t._target, life: h, loop: t._loop, delay: t._delay, onframe: function (t, e) { + var i; + if (e < 0) i = 0; else if (e < k) { + for (i = M = Math.min(L + 1, u - 1); i >= 0 && !(m[i] <= e); i--) ; + i = Math.min(i, u - 2) + } else { + for (i = L; i < u && !(m[i] > e); i++) ; + i = Math.min(i - 1, u - 2) + } + L = i, k = e; + var n = m[i + 1] - m[i]; + if (0 !== n) if (I = (e - m[i]) / n, l) if (D = v[i], T = v[0 === i ? i : i - 1], A = v[i > u - 2 ? u - 1 : i + 1], C = v[i > u - 3 ? u - 1 : i + 2], d) Ut(T, D, A, C, I, I * I, I * I * I, r(t, o), g); else { + if (f) a = Ut(T, D, A, C, I, I * I, I * I * I, P, 1), a = Yt(P); else { + if (p) return Wt(D, A, I); + a = Xt(T, D, A, C, I, I * I, I * I * I) + } + s(t, o, a) + } else if (d) Ft(v[i], v[i + 1], I, r(t, o), g); else { + var a; + if (f) Ft(v[i], v[i + 1], I, P, 1), a = Yt(P); else { + if (p) return Wt(v[i], v[i + 1], I); + a = Gt(v[i], v[i + 1], I) + } + s(t, o, a) + } + }, ondestroy: i + }); + return e && "spline" !== e && (N.easing = e), N + } + } + } + + function $t(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 + } + + function Jt(t) { + for (var e = 0; t >= lw;) e |= 1 & t, t >>= 1; + return t + e + } + + function Qt(t, e, i, n) { + var o = e + 1; + if (o === i) return 1; + if (n(t[o++], t[e]) < 0) { + for (; o < i && n(t[o], t[o - 1]) < 0;) o++; + te(t, e, o) + } else for (; o < i && n(t[o], t[o - 1]) >= 0;) o++; + return o - e + } + + function te(t, e, i) { + for (i--; e < i;) { + var n = t[e]; + t[e++] = t[i], t[i--] = n + } + } + + function ee(t, e, i, n, o) { + for (n === e && n++; n < i; n++) { + for (var a, r = t[n], s = e, l = n; s < l;) o(r, t[a = s + l >>> 1]) < 0 ? l = a : s = a + 1; + var u = n - s; + switch (u) { + case 3: + t[s + 3] = t[s + 2]; + case 2: + t[s + 2] = t[s + 1]; + case 1: + t[s + 1] = t[s]; + break; + default: + for (; u > 0;) t[s + u] = t[s + u - 1], u-- + } + t[s] = r + } + } + + function ie(t, e, i, n, o, a) { + var r = 0, s = 0, l = 1; + if (a(t, e[i + o]) > 0) { + for (s = n - o; l < s && a(t, e[i + o + l]) > 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s), r += o, l += o + } else { + for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s); + var u = r; + r = o - l, l = o - u + } + for (r++; r < l;) { + var h = r + (l - r >>> 1); + a(t, e[i + h]) > 0 ? r = h + 1 : l = h + } + return l + } + + function ne(t, e, i, n, o, a) { + var r = 0, s = 0, l = 1; + if (a(t, e[i + o]) < 0) { + for (s = o + 1; l < s && a(t, e[i + o - l]) < 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s); + var u = r; + r = o - l, l = o - u + } else { + for (s = n - o; l < s && a(t, e[i + o + l]) >= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s), r += o, l += o + } + for (r++; r < l;) { + var h = r + (l - r >>> 1); + a(t, e[i + h]) < 0 ? l = h : r = h + 1 + } + return l + } + + function oe(t, e) { + function i(i) { + var s = a[i], u = r[i], h = a[i + 1], c = r[i + 1]; + r[i] = u + c, i === l - 3 && (a[i + 1] = a[i + 2], r[i + 1] = r[i + 2]), l--; + var d = ne(t[h], t, s, u, 0, e); + s += d, 0 !== (u -= d) && 0 !== (c = ie(t[s + u - 1], t, h, c, c - 1, e)) && (u <= c ? n(s, u, h, c) : o(s, u, h, c)) + } + + function n(i, n, o, a) { + var r = 0; + for (r = 0; r < n; r++) u[r] = t[i + r]; + var l = 0, h = o, c = i; + if (t[c++] = t[h++], 0 != --a) if (1 !== n) { + for (var d, f, p, g = s; ;) { + d = 0, f = 0, p = !1; + do { + if (e(t[h], u[l]) < 0) { + if (t[c++] = t[h++], f++, d = 0, 0 == --a) { + p = !0; + break + } + } else if (t[c++] = u[l++], d++, f = 0, 1 == --n) { + p = !0; + break + } + } while ((d | f) < g); + if (p) break; + do { + if (0 !== (d = ne(t[h], u, l, n, 0, e))) { + for (r = 0; r < d; r++) t[c + r] = u[l + r]; + if (c += d, l += d, (n -= d) <= 1) { + p = !0; + break + } + } + if (t[c++] = t[h++], 0 == --a) { + p = !0; + break + } + if (0 !== (f = ie(u[l], t, h, a, 0, e))) { + for (r = 0; r < f; r++) t[c + r] = t[h + r]; + if (c += f, h += f, 0 === (a -= f)) { + p = !0; + break + } + } + if (t[c++] = u[l++], 1 == --n) { + p = !0; + break + } + g-- + } while (d >= uw || f >= uw); + if (p) break; + g < 0 && (g = 0), g += 2 + } + if ((s = g) < 1 && (s = 1), 1 === n) { + for (r = 0; r < a; r++) t[c + r] = t[h + r]; + t[c + a] = u[l] + } else { + if (0 === n) throw new Error; + for (r = 0; r < n; r++) t[c + r] = u[l + r] + } + } else { + for (r = 0; r < a; r++) t[c + r] = t[h + r]; + t[c + a] = u[l] + } else for (r = 0; r < n; r++) t[c + r] = u[l + r] + } + + function o(i, n, o, a) { + var r = 0; + for (r = 0; r < a; r++) u[r] = t[o + r]; + var l = i + n - 1, h = a - 1, c = o + a - 1, d = 0, f = 0; + if (t[c--] = t[l--], 0 != --n) if (1 !== a) { + for (var p = s; ;) { + var g = 0, m = 0, v = !1; + do { + if (e(u[h], t[l]) < 0) { + if (t[c--] = t[l--], g++, m = 0, 0 == --n) { + v = !0; + break + } + } else if (t[c--] = u[h--], m++, g = 0, 1 == --a) { + v = !0; + break + } + } while ((g | m) < p); + if (v) break; + do { + if (0 != (g = n - ne(u[h], t, i, n, n - 1, e))) { + for (n -= g, f = (c -= g) + 1, d = (l -= g) + 1, r = g - 1; r >= 0; r--) t[f + r] = t[d + r]; + if (0 === n) { + v = !0; + break + } + } + if (t[c--] = u[h--], 1 == --a) { + v = !0; + break + } + if (0 != (m = a - ie(t[l], u, 0, a, a - 1, e))) { + for (a -= m, f = (c -= m) + 1, d = (h -= m) + 1, r = 0; r < m; r++) t[f + r] = u[d + r]; + if (a <= 1) { + v = !0; + break + } + } + if (t[c--] = t[l--], 0 == --n) { + v = !0; + break + } + p-- + } while (g >= uw || m >= uw); + if (v) break; + p < 0 && (p = 0), p += 2 + } + if ((s = p) < 1 && (s = 1), 1 === a) { + for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r]; + t[c] = u[h] + } else { + if (0 === a) throw new Error; + for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r] + } + } else { + for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r]; + t[c] = u[h] + } else for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r] + } + + var a, r, s = uw, l = 0, u = []; + a = [], r = [], this.mergeRuns = function () { + for (; l > 1;) { + var t = l - 2; + if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1]) r[t - 1] < r[t + 1] && t--; else if (r[t] > r[t + 1]) break; + i(t) + } + }, this.forceMergeRuns = function () { + for (; l > 1;) { + var t = l - 2; + t > 0 && r[t - 1] < r[t + 1] && t--, i(t) + } + }, this.pushRun = function (t, e) { + a[l] = t, r[l] = e, l += 1 + } + } + + function ae(t, e, i, n) { + i || (i = 0), n || (n = t.length); + var o = n - i; + if (!(o < 2)) { + var a = 0; + if (o < lw) return a = Qt(t, i, n, e), void ee(t, i, n, i + a, e); + var r = new oe(t, e), s = Jt(o); + do { + if ((a = Qt(t, i, n, e)) < s) { + var l = o; + l > s && (l = s), ee(t, i, i + l, i + a, e), a = l + } + r.pushRun(i, a), r.mergeRuns(), o -= a, i += a + } while (0 !== o); + r.forceMergeRuns() + } + } + + function re(t, e) { + return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel + } + + function se(t, e, i) { + var n = null == e.x ? 0 : e.x, o = null == e.x2 ? 1 : e.x2, a = null == e.y ? 0 : e.y, + r = null == e.y2 ? 0 : e.y2; + return e.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y), n = isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, a = isNaN(a) ? 0 : a, r = isNaN(r) ? 0 : r, t.createLinearGradient(n, a, o, r) + } + + function le(t, e, i) { + var n = i.width, o = i.height, a = Math.min(n, o), 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 * o + i.y, l *= a), t.createRadialGradient(r, s, 0, r, s, l) + } + + function ue() { + return !1 + } + + function he(t, e, i) { + var n = m_(), o = e.getWidth(), a = e.getHeight(), r = n.style; + return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = o * i, n.height = a * i, n + } + + function ce(t) { + if ("string" == typeof t) { + var e = ww.get(t); + return e && e.image + } + return t + } + + function de(t, e, i, n, o) { + if (t) { + if ("string" == typeof t) { + if (e && e.__zrImageSrc === t || !i) return e; + var a = ww.get(t), r = {hostEl: i, cb: n, cbPayload: o}; + return a ? !pe(e = a.image) && a.pending.push(r) : (!e && (e = new Image), e.onload = fe, ww.put(t, e.__cachedImgObj = { + image: e, + pending: [r] + }), e.src = e.__zrImageSrc = t), e + } + return t + } + return e + } + + function fe() { + 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 pe(t) { + return t && t.width && t.height + } + + function ge(t, e) { + var i = t + ":" + (e = e || Tw); + if (bw[i]) return bw[i]; + for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++) o = Math.max(De(n[a], e).width, o); + return Sw > Mw && (Sw = 0, bw = {}), Sw++, bw[i] = o, o + } + + function me(t, e, i, n, o, a, r) { + return a ? ye(t, e, i, n, o, a, r) : ve(t, e, i, n, o, r) + } + + function ve(t, e, i, n, o, a) { + var r = Ae(t, e, o, a), s = ge(t, e); + o && (s += o[1] + o[3]); + var l = r.outerHeight, u = new $t(xe(0, s, i), _e(0, l, n), s, l); + return u.lineHeight = r.lineHeight, u + } + + function ye(t, e, i, n, o, a, r) { + var s = Ce(t, {rich: a, truncate: r, font: e, textAlign: i, textPadding: o}), l = s.outerWidth, + u = s.outerHeight; + return new $t(xe(0, l, i), _e(0, u, n), l, u) + } + + function xe(t, e, i) { + return "right" === i ? t -= e : "center" === i && (t -= e / 2), t + } + + function _e(t, e, i) { + return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t + } + + function we(t, e, i) { + var n = e.x, o = e.y, a = e.height, r = e.width, s = a / 2, l = "left", u = "top"; + switch (t) { + case"left": + n -= i, o += s, l = "right", u = "middle"; + break; + case"right": + n += i + r, o += s, u = "middle"; + break; + case"top": + n += r / 2, o -= i, l = "center", u = "bottom"; + break; + case"bottom": + n += r / 2, o += a + i, l = "center"; + break; + case"inside": + n += r / 2, o += s, l = "center", u = "middle"; + break; + case"insideLeft": + n += i, o += s, u = "middle"; + break; + case"insideRight": + n += r - i, o += s, l = "right", u = "middle"; + break; + case"insideTop": + n += r / 2, o += i, l = "center"; + break; + case"insideBottom": + n += r / 2, o += a - i, l = "center", u = "bottom"; + break; + case"insideTopLeft": + n += i, o += i; + break; + case"insideTopRight": + n += r - i, o += i, l = "right"; + break; + case"insideBottomLeft": + n += i, o += a - i, u = "bottom"; + break; + case"insideBottomRight": + n += r - i, o += a - i, l = "right", u = "bottom" + } + return {x: n, y: o, textAlign: l, textVerticalAlign: u} + } + + function be(t, e, i, n, o) { + if (!e) return ""; + var a = (t + "").split("\n"); + o = Se(e, i, n, o); + for (var r = 0, s = a.length; r < s; r++) a[r] = Me(a[r], o); + return a.join("\n") + } + + function Se(t, e, i, n) { + (n = a({}, n)).font = e; + var i = D(i, "..."); + n.maxIterations = D(n.maxIterations, 2); + var o = n.minChar = D(n.minChar, 0); + n.cnCharWidth = ge("国", e); + var r = n.ascCharWidth = ge("a", e); + n.placeholder = D(n.placeholder, ""); + for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= r; l++) s -= r; + var u = ge(i); + return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n + } + + function Me(t, e) { + var i = e.containerWidth, n = e.font, o = e.contentWidth; + if (!i) return ""; + var a = ge(t, n); + if (a <= i) return t; + for (var r = 0; ; r++) { + if (a <= o || r >= e.maxIterations) { + t += e.ellipsis; + break + } + var s = 0 === r ? Ie(t, o, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * o / a) : 0; + a = ge(t = t.substr(0, s), n) + } + return "" === t && (t = e.placeholder), t + } + + function Ie(t, e, i, n) { + for (var o = 0, a = 0, r = t.length; a < r && o < e; a++) { + var s = t.charCodeAt(a); + o += 0 <= s && s <= 127 ? i : n + } + return a + } + + function Te(t) { + return ge("国", t) + } + + function De(t, e) { + return Dw.measureText(t, e) + } + + function Ae(t, e, i, n) { + null != t && (t += ""); + var o = Te(e), a = t ? t.split("\n") : [], r = a.length * o, s = r; + if (i && (s += i[0] + i[2]), t && n) { + var l = n.outerHeight, u = n.outerWidth; + if (null != l && s > l) t = "", a = []; else if (null != u) for (var h = Se(u - (i ? i[1] + i[3] : 0), e, n.ellipsis, { + minChar: n.minChar, + placeholder: n.placeholder + }), c = 0, d = a.length; c < d; c++) a[c] = Me(a[c], h) + } + return {lines: a, height: r, outerHeight: s, lineHeight: o} + } + + function Ce(t, e) { + var i = {lines: [], width: 0, height: 0}; + if (null != t && (t += ""), !t) return i; + for (var n, o = Iw.lastIndex = 0; null != (n = Iw.exec(t));) { + var a = n.index; + a > o && Le(i, t.substring(o, a)), Le(i, n[2], n[1]), o = Iw.lastIndex + } + o < t.length && Le(i, t.substring(o, t.length)); + var r = i.lines, s = 0, l = 0, u = [], h = e.textPadding, c = e.truncate, d = c && c.outerWidth, + f = c && c.outerHeight; + h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2])); + for (L = 0; L < r.length; L++) { + for (var p = r[L], g = 0, m = 0, v = 0; v < p.tokens.length; v++) { + var y = (k = p.tokens[v]).styleName && e.rich[k.styleName] || {}, x = k.textPadding = y.textPadding, + _ = k.font = y.font || e.font, w = k.textHeight = D(y.textHeight, Te(_)); + if (x && (w += x[0] + x[2]), k.height = w, k.lineHeight = A(y.textLineHeight, e.textLineHeight, w), k.textAlign = y && y.textAlign || e.textAlign, k.textVerticalAlign = y && y.textVerticalAlign || "middle", null != f && s + k.lineHeight > f) return { + lines: [], + width: 0, + height: 0 + }; + k.textWidth = ge(k.text, _); + var b = y.textWidth, S = null == b || "auto" === b; + if ("string" == typeof b && "%" === b.charAt(b.length - 1)) k.percentWidth = b, u.push(k), b = 0; else { + if (S) { + b = k.textWidth; + var M = y.textBackgroundColor, I = M && M.image; + I && pe(I = ce(I)) && (b = Math.max(b, I.width * w / I.height)) + } + var T = x ? x[1] + x[3] : 0; + b += T; + var C = null != d ? d - m : null; + null != C && C < b && (!S || C < T ? (k.text = "", k.textWidth = b = 0) : (k.text = be(k.text, C - T, _, c.ellipsis, {minChar: c.minChar}), k.textWidth = ge(k.text, _), b = k.textWidth + T)) + } + m += k.width = b, y && (g = Math.max(g, k.lineHeight)) + } + p.width = m, p.lineHeight = g, s += g, l = Math.max(l, m) + } + i.outerWidth = i.width = D(e.textWidth, l), i.outerHeight = i.height = D(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]); + for (var L = 0; L < u.length; L++) { + var k = u[L], P = k.percentWidth; + k.width = parseInt(P, 10) / 100 * l + } + return i + } + + function Le(t, e, i) { + for (var n = "" === e, o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) { + var s = o[r], l = {styleName: i, text: s, isLineHolder: !s && !n}; + if (r) a.push({tokens: [l]}); else { + var u = (a[a.length - 1] || (a[0] = {tokens: []})).tokens, h = u.length; + 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l) + } + } + } + + function ke(t) { + var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" "); + return e && P(e) || t.textFont || t.font + } + + function Pe(t, e) { + var i, n, o, a, r = e.x, s = e.y, l = e.width, u = e.height, h = e.r; + l < 0 && (r += l, l = -l), u < 0 && (s += u, u = -u), "number" == typeof h ? i = n = o = a = h : h instanceof Array ? 1 === h.length ? i = n = o = a = h[0] : 2 === h.length ? (i = o = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], o = h[2]) : (i = h[0], n = h[1], o = h[2], a = h[3]) : i = n = o = a = 0; + var c; + i + n > l && (i *= l / (c = i + n), n *= l / c), o + a > l && (o *= l / (c = o + a), a *= l / c), n + o > u && (n *= u / (c = n + o), o *= u / c), i + a > u && (i *= u / (c = i + a), a *= u / c), t.moveTo(r + i, s), t.lineTo(r + l - n, s), 0 !== n && t.arc(r + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(r + l, s + u - o), 0 !== o && t.arc(r + l - o, s + u - o, o, 0, Math.PI / 2), t.lineTo(r + a, s + u), 0 !== a && t.arc(r + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(r, s + i), 0 !== i && t.arc(r + i, s + i, i, Math.PI, 1.5 * Math.PI) + } + + function Ne(t) { + return Oe(t), d(t.rich, Oe), t + } + + function Oe(t) { + if (t) { + t.font = ke(t); + var e = t.textAlign; + "middle" === e && (e = "center"), t.textAlign = null == e || Aw[e] ? e : "left"; + var i = t.textVerticalAlign || t.textBaseline; + "center" === i && (i = "middle"), t.textVerticalAlign = null == i || Cw[i] ? i : "top", t.textPadding && (t.textPadding = L(t.textPadding)) + } + } + + function Ee(t, e, i, n, o) { + n.rich ? ze(t, e, i, n, o) : Re(t, e, i, n, o) + } + + function Re(t, e, i, n, o) { + var a = Ue(e, "font", n.font || Tw), r = n.textPadding, s = t.__textCotentBlock; + s && !t.__dirty || (s = t.__textCotentBlock = Ae(i, a, r, n.truncate)); + var l = s.outerHeight, u = s.lines, h = s.lineHeight, c = Ze(l, n, o), d = c.baseX, f = c.baseY, + p = c.textAlign, g = c.textVerticalAlign; + Ve(e, n, o, d, f); + var m = _e(f, l, g), v = d, y = m, x = We(n); + if (x || r) { + var _ = ge(i, a); + r && (_ += r[1] + r[3]); + var w = xe(d, _, p); + x && Fe(t, e, n, w, m, _, l), r && (v = qe(d, p, r), y += r[0]) + } + Ue(e, "textAlign", p || "left"), Ue(e, "textBaseline", "middle"), Ue(e, "shadowBlur", n.textShadowBlur || 0), Ue(e, "shadowColor", n.textShadowColor || "transparent"), Ue(e, "shadowOffsetX", n.textShadowOffsetX || 0), Ue(e, "shadowOffsetY", n.textShadowOffsetY || 0), y += h / 2; + var b = n.textStrokeWidth, S = Xe(n.textStroke, b), M = je(n.textFill); + S && (Ue(e, "lineWidth", b), Ue(e, "strokeStyle", S)), M && Ue(e, "fillStyle", M); + for (var I = 0; I < u.length; I++) S && e.strokeText(u[I], v, y), M && e.fillText(u[I], v, y), y += h + } + + function ze(t, e, i, n, o) { + var a = t.__textCotentBlock; + a && !t.__dirty || (a = t.__textCotentBlock = Ce(i, n)), Be(t, e, a, n, o) + } + + function Be(t, e, i, n, o) { + var a = i.width, r = i.outerWidth, s = i.outerHeight, l = n.textPadding, u = Ze(s, n, o), h = u.baseX, + c = u.baseY, d = u.textAlign, f = u.textVerticalAlign; + Ve(e, n, o, h, c); + var p = xe(h, r, d), g = _e(c, s, f), m = p, v = g; + l && (m += l[3], v += l[0]); + var y = m + a; + We(n) && Fe(t, e, n, p, g, r, s); + for (var x = 0; x < i.lines.length; x++) { + for (var _, w = i.lines[x], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, D = m, A = y, C = S - 1; T < S && (!(_ = b[T]).textAlign || "left" === _.textAlign);) Ge(t, e, _, n, M, v, D, "left"), I -= _.width, D += _.width, T++; + for (; C >= 0 && "right" === (_ = b[C]).textAlign;) Ge(t, e, _, n, M, v, A, "right"), I -= _.width, A -= _.width, C--; + for (D += (a - (D - m) - (y - A) - I) / 2; T <= C;) Ge(t, e, _ = b[T], n, M, v, D + _.width / 2, "center"), D += _.width, T++; + v += M + } + } + + function Ve(t, e, i, n, o) { + if (i && e.textRotation) { + var a = e.textOrigin; + "center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y), t.translate(n, o), t.rotate(-e.textRotation), t.translate(-n, -o) + } + } + + function Ge(t, e, i, n, o, a, r, s) { + var l = n.rich[i.styleName] || {}, u = i.textVerticalAlign, h = a + o / 2; + "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + o - i.height / 2), !i.isLineHolder && We(l) && Fe(t, e, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, h - i.height / 2, i.width, i.height); + var c = i.textPadding; + c && (r = qe(r, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), Ue(e, "shadowBlur", A(l.textShadowBlur, n.textShadowBlur, 0)), Ue(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), Ue(e, "shadowOffsetX", A(l.textShadowOffsetX, n.textShadowOffsetX, 0)), Ue(e, "shadowOffsetY", A(l.textShadowOffsetY, n.textShadowOffsetY, 0)), Ue(e, "textAlign", s), Ue(e, "textBaseline", "middle"), Ue(e, "font", i.font || Tw); + var d = Xe(l.textStroke || n.textStroke, p), f = je(l.textFill || n.textFill), + p = D(l.textStrokeWidth, n.textStrokeWidth); + d && (Ue(e, "lineWidth", p), Ue(e, "strokeStyle", d), e.strokeText(i.text, r, h)), f && (Ue(e, "fillStyle", f), e.fillText(i.text, r, h)) + } + + function We(t) { + return t.textBackgroundColor || t.textBorderWidth && t.textBorderColor + } + + function Fe(t, e, i, n, o, a, r) { + var s = i.textBackgroundColor, l = i.textBorderWidth, u = i.textBorderColor, h = _(s); + if (Ue(e, "shadowBlur", i.textBoxShadowBlur || 0), Ue(e, "shadowColor", i.textBoxShadowColor || "transparent"), Ue(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), Ue(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) { + e.beginPath(); + var c = i.textBorderRadius; + c ? Pe(e, {x: n, y: o, width: a, height: r, r: c}) : e.rect(n, o, a, r), e.closePath() + } + if (h) Ue(e, "fillStyle", s), e.fill(); else if (w(s)) { + var d = s.image; + (d = de(d, null, t, He, s)) && pe(d) && e.drawImage(d, n, o, a, r) + } + l && u && (Ue(e, "lineWidth", l), Ue(e, "strokeStyle", u), e.stroke()) + } + + function He(t, e) { + e.image = t + } + + function Ze(t, e, i) { + var n = e.x || 0, o = e.y || 0, a = e.textAlign, r = e.textVerticalAlign; + if (i) { + var s = e.textPosition; + if (s instanceof Array) n = i.x + Ye(s[0], i.width), o = i.y + Ye(s[1], i.height); else { + var l = we(s, i, e.textDistance); + n = l.x, o = l.y, a = a || l.textAlign, r = r || l.textVerticalAlign + } + var u = e.textOffset; + u && (n += u[0], o += u[1]) + } + return {baseX: n, baseY: o, textAlign: a, textVerticalAlign: r} + } + + function Ue(t, e, i) { + return t[e] = dw(t, e, i), t[e] + } + + function Xe(t, e) { + return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t + } + + function je(t) { + return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t + } + + function Ye(t, e) { + return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t + } + + function qe(t, e, i) { + return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3] + } + + function Ke(t, e) { + return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding) + } + + function $e(t) { + t = t || {}, nw.call(this, t); + for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]); + this.style = new pw(t.style, this), this._rect = null, this.__clipPaths = [] + } + + function Je(t) { + $e.call(this, t) + } + + function Qe(t) { + return parseInt(t, 10) + } + + function ti(t) { + return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh) + } + + function ei(t, e, i) { + return Pw.copy(t.getBoundingRect()), t.transform && Pw.applyTransform(t.transform), Nw.width = e, Nw.height = i, !Pw.intersect(Nw) + } + + function ii(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 + } + + function ni(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) + } + } + + function oi(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 + } + + function ai(t) { + return t.getBoundingClientRect ? t.getBoundingClientRect() : {left: 0, top: 0} + } + + function ri(t, e, i, n) { + return i = i || {}, n || !a_.canvasSupported ? si(t, e, i) : a_.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) : si(t, e, i), i + } + + function si(t, e, i) { + var n = ai(t); + i.zrX = e.clientX - n.left, i.zrY = e.clientY - n.top + } + + function li(t, e, i) { + if (null != (e = e || window.event).zrX) return e; + var n = e.type; + if (n && n.indexOf("touch") >= 0) { + var o = "touchend" != n ? e.targetTouches[0] : e.changedTouches[0]; + o && ri(t, o, e, i) + } else ri(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3; + var a = e.button; + return null == e.which && void 0 !== a && Rw.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e + } + + function ui(t, e, i) { + Ew ? t.addEventListener(e, i) : t.attachEvent("on" + e, i) + } + + function hi(t, e, i) { + Ew ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i) + } + + function ci(t) { + return t.which > 1 + } + + function di(t) { + var e = t[1][0] - t[0][0], i = t[1][1] - t[0][1]; + return Math.sqrt(e * e + i * i) + } + + function fi(t) { + return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2] + } + + function pi(t) { + return "mousewheel" === t && a_.browser.firefox ? "DOMMouseScroll" : t + } + + function gi(t, e, i) { + var n = t._gestureMgr; + "start" === i && n.clear(); + var o = n.recognize(e, t.handler.findHover(e.zrX, e.zrY, null).target, t.dom); + if ("end" === i && n.clear(), o) { + var a = o.type; + e.gestureEvent = a, t.handler.dispatchToElement({target: o.target}, a, o.event) + } + } + + function mi(t) { + t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () { + t._touching = !1 + }, 700) + } + + function vi(t) { + var e = t.pointerType; + return "pen" === e || "touch" === e + } + + function yi(t) { + function e(t, e) { + return function () { + if (!e._touching) return t.apply(e, arguments) + } + } + + d(Fw, function (e) { + t._handlers[e] = m(Uw[e], t) + }), d(Zw, function (e) { + t._handlers[e] = m(Uw[e], t) + }), d(Ww, function (i) { + t._handlers[i] = e(Uw[i], t) + }) + } + + function xi(t) { + function e(e, i) { + d(e, function (e) { + ui(t, pi(e), i._handlers[e]) + }, i) + } + + D_.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._gestureMgr = new Vw, this._handlers = {}, yi(this), a_.pointerEventsSupported ? e(Zw, this) : (a_.touchEventsSupported && e(Fw, this), e(Ww, this)) + } + + function _i(t, e) { + var i = new Kw(n_(), t, e); + return qw[i.id] = i, i + } + + function wi(t, e) { + Yw[t] = e + } + + function bi(t) { + delete qw[t] + } + + function Si(t) { + return t instanceof Array ? t : null == t ? [] : [t] + } + + function Mi(t, e, i) { + if (t) { + t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {}; + for (var n = 0, o = i.length; n < o; n++) { + var a = i[n]; + !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]) + } + } + } + + function Ii(t) { + return !Qw(t) || tb(t) || t instanceof Date ? t : t.value + } + + function Ti(t) { + return Qw(t) && !(t instanceof Array) + } + + function Di(t, e) { + e = (e || []).slice(); + var i = f(t || [], function (t, e) { + return {exist: t} + }); + return Jw(e, function (t, n) { + if (Qw(t)) { + for (o = 0; o < i.length; o++) if (!i[o].option && null != t.id && i[o].exist.id === t.id + "") return i[o].option = t, void (e[n] = null); + for (var o = 0; o < i.length; o++) { + var a = i[o].exist; + if (!(i[o].option || null != a.id && null != t.id || null == t.name || Li(t) || Li(a) || a.name !== t.name + "")) return i[o].option = t, void (e[n] = null) + } + } + }), Jw(e, function (t, e) { + if (Qw(t)) { + for (var n = 0; n < i.length; n++) { + var o = i[n].exist; + if (!i[n].option && !Li(o) && null == t.id) { + i[n].option = t; + break + } + } + n >= i.length && i.push({option: t}) + } + }), i + } + + function Ai(t) { + var e = R(); + Jw(t, function (t, i) { + var n = t.exist; + n && e.set(n.id, t) + }), Jw(t, function (t, i) { + var n = t.option; + k(!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 = {}) + }), Jw(t, function (t, i) { + var n = t.exist, o = t.option, a = t.keyInfo; + if (Qw(o)) { + if (a.name = null != o.name ? o.name + "" : n ? n.name : eb + i, n) a.id = n.id; else if (null != o.id) a.id = o.id + ""; else { + var r = 0; + do { + a.id = "\0" + a.name + "\0" + r++ + } while (e.get(a.id)) + } + e.set(a.id, t) + } + }) + } + + function Ci(t) { + var e = t.name; + return !(!e || !e.indexOf(eb)) + } + + function Li(t) { + return Qw(t) && t.id && 0 === (t.id + "").indexOf("\0_ec_\0") + } + + function ki(t, e) { + function i(t, e, i) { + for (var n = 0, o = t.length; n < o; n++) for (var a = t[n].seriesId, r = Si(t[n].dataIndex), s = i && i[a], l = 0, u = r.length; l < u; l++) { + var h = r[l]; + s && s[h] ? s[h] = null : (e[a] || (e[a] = {}))[h] = 1 + } + } + + function n(t, e) { + var i = []; + for (var o in t) if (t.hasOwnProperty(o) && null != t[o]) if (e) i.push(+o); else { + var a = n(t[o], !0); + a.length && i.push({seriesId: o, dataIndex: a}) + } + return i + } + + var o = {}, a = {}; + return i(t || [], o), i(e || [], a, o), [n(o), n(a)] + } + + function Pi(t, e) { + return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? y(e.dataIndex) ? f(e.dataIndex, function (e) { + return t.indexOfRawIndex(e) + }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? y(e.name) ? f(e.name, function (e) { + return t.indexOfName(e) + }) : t.indexOfName(e.name) : void 0 + } + + function Ni() { + var t = "__\0ec_inner_" + nb++ + "_" + Math.random().toFixed(5); + return function (e) { + return e[t] || (e[t] = {}) + } + } + + function Oi(t, e, i) { + if (_(e)) { + var n = {}; + n[e + "Index"] = 0, e = n + } + var o = i && i.defaultMainType; + !o || Ei(e, o + "Index") || Ei(e, o + "Id") || Ei(e, o + "Name") || (e[o + "Index"] = 0); + var a = {}; + return Jw(e, function (n, o) { + var n = e[o]; + if ("dataIndex" !== o && "dataIndexInside" !== o) { + var r = o.match(/^(\w+)(Index|Id|Name)$/) || [], s = r[1], u = (r[2] || "").toLowerCase(); + if (!(!s || !u || null == n || "index" === u && "none" === n || i && i.includeMainTypes && l(i.includeMainTypes, s) < 0)) { + var h = {mainType: s}; + "index" === u && "all" === n || (h[u] = n); + var c = t.queryComponents(h); + a[s + "Models"] = c, a[s + "Model"] = c[0] + } + } else a[o] = n + }), a + } + + function Ei(t, e) { + return t && t.hasOwnProperty(e) + } + + function Ri(t, e, i) { + t.setAttribute ? t.setAttribute(e, i) : t[e] = i + } + + function zi(t, e) { + return t.getAttribute ? t.getAttribute(e) : t[e] + } + + function Bi(t) { + var e = {main: "", sub: ""}; + return t && (t = t.split(ob), e.main = t[0] || "", e.sub = t[1] || ""), e + } + + function Vi(t) { + k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal') + } + + function Gi(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 a(i.prototype, t), i.extend = this.extend, i.superCall = Fi, i.superApply = Hi, u(i, this), i.superClass = e, i + } + } + + function Wi(t) { + var e = ["__\0is_clz", rb++, Math.random().toFixed(3)].join("_"); + t.prototype[e] = !0, t.isInstance = function (t) { + return !(!t || !t[e]) + } + } + + function Fi(t, e) { + var i = C(arguments, 2); + return this.superClass.prototype[e].apply(t, i) + } + + function Hi(t, e, i) { + return this.superClass.prototype[e].apply(t, i) + } + + function Zi(t, e) { + function i(t) { + var e = n[t.main]; + return e && e[ab] || ((e = n[t.main] = {})[ab] = !0), e + } + + e = e || {}; + var n = {}; + if (t.registerClass = function (t, e) { + return e && (Vi(e), (e = Bi(e)).sub ? e.sub !== ab && (i(e)[e.sub] = t) : n[e.main] = t), t + }, t.getClass = function (t, e, i) { + var o = n[t]; + if (o && o[ab] && (o = e ? o[e] : null), i && !o) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified."); + return o + }, t.getClassesByMainType = function (t) { + t = Bi(t); + var e = [], i = n[t.main]; + return i && i[ab] ? d(i, function (t, i) { + i !== ab && e.push(t) + }) : e.push(i), e + }, t.hasClass = function (t) { + return t = Bi(t), !!n[t.main] + }, t.getAllClassMainTypes = function () { + var t = []; + return d(n, function (e, i) { + t.push(i) + }), t + }, t.hasSubTypes = function (t) { + t = Bi(t); + var e = n[t.main]; + return e && e[ab] + }, t.parseClassType = Bi, e.registerWhenExtend) { + var o = t.extend; + o && (t.extend = function (e) { + var i = o.call(this, e); + return t.registerClass(i, e.type) + }) + } + return t + } + + function Ui(t) { + return t > -pb && t < pb + } + + function Xi(t) { + return t > pb || t < -pb + } + + function ji(t, e, i, n, o) { + var a = 1 - o; + return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i) + } + + function Yi(t, e, i, n, o) { + var a = 1 - o; + return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o) + } + + function qi(t, e, i, n, o, a) { + var r = n + 3 * (e - i) - t, s = 3 * (i - 2 * e + t), l = 3 * (e - t), u = t - o, h = s * s - 3 * r * l, + c = s * l - 9 * r * u, d = l * l - 3 * s * u, f = 0; + if (Ui(h) && Ui(c)) Ui(s) ? a[0] = 0 : (M = -l / s) >= 0 && M <= 1 && (a[f++] = M); else { + var p = c * c - 4 * h * d; + if (Ui(p)) { + var g = c / h, m = -g / 2; + (M = -s / r + g) >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m) + } else if (p > 0) { + var v = fb(p), y = h * s + 1.5 * r * (-c + v), x = h * s + 1.5 * r * (-c - v); + (M = (-s - ((y = y < 0 ? -db(-y, vb) : db(y, vb)) + (x = x < 0 ? -db(-x, vb) : db(x, vb)))) / (3 * r)) >= 0 && M <= 1 && (a[f++] = M) + } else { + var _ = (2 * h * s - 3 * r * c) / (2 * fb(h * h * h)), w = Math.acos(_) / 3, b = fb(h), S = Math.cos(w), + M = (-s - 2 * b * S) / (3 * r), m = (-s + b * (S + mb * Math.sin(w))) / (3 * r), + I = (-s + b * (S - mb * Math.sin(w))) / (3 * r); + M >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m), I >= 0 && I <= 1 && (a[f++] = I) + } + } + return f + } + + function Ki(t, e, i, n, o) { + var a = 6 * i - 12 * e + 6 * t, r = 9 * e + 3 * n - 3 * t - 9 * i, s = 3 * e - 3 * t, l = 0; + if (Ui(r)) Xi(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c); else { + var u = a * a - 4 * r * s; + if (Ui(u)) o[0] = -a / (2 * r); else if (u > 0) { + var h = fb(u), c = (-a + h) / (2 * r), d = (-a - h) / (2 * r); + c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) + } + } + return l + } + + function $i(t, e, i, n, o, a) { + var r = (e - t) * o + t, s = (i - e) * o + e, l = (n - i) * o + i, u = (s - r) * o + r, h = (l - s) * o + s, + c = (h - u) * o + u; + a[0] = t, a[1] = r, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n + } + + function Ji(t, e, i, n, o, a, r, s, l, u, h) { + var c, d, f, p, g, m = .005, v = 1 / 0; + yb[0] = l, yb[1] = u; + for (var y = 0; y < 1; y += .05) xb[0] = ji(t, i, o, r, y), xb[1] = ji(e, n, a, s, y), (p = M_(yb, xb)) < v && (c = y, v = p); + v = 1 / 0; + for (var x = 0; x < 32 && !(m < gb); x++) d = c - m, f = c + m, xb[0] = ji(t, i, o, r, d), xb[1] = ji(e, n, a, s, d), p = M_(xb, yb), d >= 0 && p < v ? (c = d, v = p) : (_b[0] = ji(t, i, o, r, f), _b[1] = ji(e, n, a, s, f), g = M_(_b, yb), f <= 1 && g < v ? (c = f, v = g) : m *= .5); + return h && (h[0] = ji(t, i, o, r, c), h[1] = ji(e, n, a, s, c)), fb(v) + } + + function Qi(t, e, i, n) { + var o = 1 - n; + return o * (o * t + 2 * n * e) + n * n * i + } + + function tn(t, e, i, n) { + return 2 * ((1 - n) * (e - t) + n * (i - e)) + } + + function en(t, e, i, n, o) { + var a = t - 2 * e + i, r = 2 * (e - t), s = t - n, l = 0; + if (Ui(a)) Xi(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c); else { + var u = r * r - 4 * a * s; + if (Ui(u)) (c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c); else if (u > 0) { + var h = fb(u), c = (-r + h) / (2 * a), d = (-r - h) / (2 * a); + c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) + } + } + return l + } + + function nn(t, e, i) { + var n = t + i - 2 * e; + return 0 === n ? .5 : (t - e) / n + } + + function on(t, e, i, n, o) { + var a = (e - t) * n + t, r = (i - e) * n + e, s = (r - a) * n + a; + o[0] = t, o[1] = a, o[2] = s, o[3] = s, o[4] = r, o[5] = i + } + + function an(t, e, i, n, o, a, r, s, l) { + var u, h = .005, c = 1 / 0; + yb[0] = r, yb[1] = s; + for (var d = 0; d < 1; d += .05) xb[0] = Qi(t, i, o, d), xb[1] = Qi(e, n, a, d), (m = M_(yb, xb)) < c && (u = d, c = m); + c = 1 / 0; + for (var f = 0; f < 32 && !(h < gb); f++) { + var p = u - h, g = u + h; + xb[0] = Qi(t, i, o, p), xb[1] = Qi(e, n, a, p); + var m = M_(xb, yb); + if (p >= 0 && m < c) u = p, c = m; else { + _b[0] = Qi(t, i, o, g), _b[1] = Qi(e, n, a, g); + var v = M_(_b, yb); + g <= 1 && v < c ? (u = g, c = v) : h *= .5 + } + } + return l && (l[0] = Qi(t, i, o, u), l[1] = Qi(e, n, a, u)), fb(c) + } + + function rn(t, e, i) { + if (0 !== t.length) { + var n, o = t[0], a = o[0], r = o[0], s = o[1], l = o[1]; + for (n = 1; n < t.length; n++) o = t[n], a = wb(a, o[0]), r = bb(r, o[0]), s = wb(s, o[1]), l = bb(l, o[1]); + e[0] = a, e[1] = s, i[0] = r, i[1] = l + } + } + + function sn(t, e, i, n, o, a) { + o[0] = wb(t, i), o[1] = wb(e, n), a[0] = bb(t, i), a[1] = bb(e, n) + } + + function ln(t, e, i, n, o, a, r, s, l, u) { + var h, c = Ki, d = ji, f = c(t, i, o, r, Cb); + for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; h < f; h++) { + var p = d(t, i, o, r, Cb[h]); + l[0] = wb(p, l[0]), u[0] = bb(p, u[0]) + } + for (f = c(e, n, a, s, Lb), h = 0; h < f; h++) { + var g = d(e, n, a, s, Lb[h]); + l[1] = wb(g, l[1]), u[1] = bb(g, u[1]) + } + l[0] = wb(t, l[0]), u[0] = bb(t, u[0]), l[0] = wb(r, l[0]), u[0] = bb(r, u[0]), l[1] = wb(e, l[1]), u[1] = bb(e, u[1]), l[1] = wb(s, l[1]), u[1] = bb(s, u[1]) + } + + function un(t, e, i, n, o, a, r, s) { + var l = nn, u = Qi, h = bb(wb(l(t, i, o), 1), 0), c = bb(wb(l(e, n, a), 1), 0), d = u(t, i, o, h), + f = u(e, n, a, c); + r[0] = wb(t, o, d), r[1] = wb(e, a, f), s[0] = bb(t, o, d), s[1] = bb(e, a, f) + } + + function hn(t, e, i, n, o, a, r, s, l) { + var u = tt, h = et, c = Math.abs(o - a); + if (c % Ib < 1e-4 && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n); + if (Tb[0] = Mb(o) * i + t, Tb[1] = Sb(o) * n + e, Db[0] = Mb(a) * i + t, Db[1] = Sb(a) * n + e, u(s, Tb, Db), h(l, Tb, Db), (o %= Ib) < 0 && (o += Ib), (a %= Ib) < 0 && (a += Ib), o > a && !r ? a += Ib : o < a && r && (o += Ib), r) { + var d = a; + a = o, o = d + } + for (var f = 0; f < a; f += Math.PI / 2) f > o && (Ab[0] = Mb(f) * i + t, Ab[1] = Sb(f) * n + e, u(s, Ab, s), h(l, Ab, l)) + } + + function cn(t, e, i, n, o, a, r) { + if (0 === o) return !1; + var s = o, l = 0, u = t; + if (r > e + s && r > n + s || r < e - s && r < n - s || a > t + s && a > i + s || a < t - s && a < i - s) return !1; + if (t === i) return Math.abs(a - t) <= s / 2; + var h = (l = (e - n) / (t - i)) * a - r + (u = (t * n - i * e) / (t - i)); + return h * h / (l * l + 1) <= s / 2 * s / 2 + } + + function dn(t, e, i, n, o, a, r, s, l, u, h) { + if (0 === l) return !1; + var c = l; + return !(h > e + c && h > n + c && h > a + c && h > s + c || h < e - c && h < n - c && h < a - c && h < s - c || u > t + c && u > i + c && u > o + c && u > r + c || u < t - c && u < i - c && u < o - c && u < r - c) && Ji(t, e, i, n, o, a, r, s, u, h, null) <= c / 2 + } + + function fn(t, e, i, n, o, a, r, s, l) { + if (0 === r) return !1; + var u = r; + return !(l > e + u && l > n + u && l > a + u || l < e - u && l < n - u && l < a - u || s > t + u && s > i + u && s > o + u || s < t - u && s < i - u && s < o - u) && an(t, e, i, n, o, a, s, l, null) <= u / 2 + } + + function pn(t) { + return (t %= Zb) < 0 && (t += Zb), t + } + + function gn(t, e, i, n, o, a, r, s, l) { + if (0 === r) return !1; + var u = r; + s -= t, l -= e; + var h = Math.sqrt(s * s + l * l); + if (h - u > i || h + u < i) return !1; + if (Math.abs(n - o) % Ub < 1e-4) return !0; + if (a) { + var c = n; + n = pn(o), o = pn(c) + } else n = pn(n), o = pn(o); + n > o && (o += Ub); + var d = Math.atan2(l, s); + return d < 0 && (d += Ub), d >= n && d <= o || d + Ub >= n && d + Ub <= o + } + + function mn(t, e, i, n, o, a) { + if (a > e && a > n || a < e && a < n) return 0; + if (n === e) return 0; + var r = n < e ? 1 : -1, s = (a - e) / (n - e); + 1 !== s && 0 !== s || (r = n < e ? .5 : -.5); + var l = s * (i - t) + t; + return l === o ? 1 / 0 : l > o ? r : 0 + } + + function vn(t, e) { + return Math.abs(t - e) < Yb + } + + function yn() { + var t = Kb[0]; + Kb[0] = Kb[1], Kb[1] = t + } + + function xn(t, e, i, n, o, a, r, s, l, u) { + if (u > e && u > n && u > a && u > s || u < e && u < n && u < a && u < s) return 0; + var h = qi(e, n, a, s, u, qb); + if (0 === h) return 0; + for (var c, d, f = 0, p = -1, g = 0; g < h; g++) { + var m = qb[g], v = 0 === m || 1 === m ? .5 : 1; + ji(t, i, o, r, m) < l || (p < 0 && (p = Ki(e, n, a, s, Kb), Kb[1] < Kb[0] && p > 1 && yn(), c = ji(e, n, a, s, Kb[0]), p > 1 && (d = ji(e, n, a, s, Kb[1]))), 2 == p ? m < Kb[0] ? f += c < e ? v : -v : m < Kb[1] ? f += d < c ? v : -v : f += s < d ? v : -v : m < Kb[0] ? f += c < e ? v : -v : f += s < c ? v : -v) + } + return f + } + + function _n(t, e, i, n, o, a, r, s) { + if (s > e && s > n && s > a || s < e && s < n && s < a) return 0; + var l = en(e, n, a, s, qb); + if (0 === l) return 0; + var u = nn(e, n, a); + if (u >= 0 && u <= 1) { + for (var h = 0, c = Qi(e, n, a, u), d = 0; d < l; d++) { + f = 0 === qb[d] || 1 === qb[d] ? .5 : 1; + (p = Qi(t, i, o, qb[d])) < r || (qb[d] < u ? h += c < e ? f : -f : h += a < c ? f : -f) + } + return h + } + var f = 0 === qb[0] || 1 === qb[0] ? .5 : 1, p = Qi(t, i, o, qb[0]); + return p < r ? 0 : a < e ? f : -f + } + + function wn(t, e, i, n, o, a, r, s) { + if ((s -= e) > i || s < -i) return 0; + u = Math.sqrt(i * i - s * s); + qb[0] = -u, qb[1] = u; + var l = Math.abs(n - o); + if (l < 1e-4) return 0; + if (l % jb < 1e-4) { + n = 0, o = jb; + p = a ? 1 : -1; + return r >= qb[0] + t && r <= qb[1] + t ? p : 0 + } + if (a) { + var u = n; + n = pn(o), o = pn(u) + } else n = pn(n), o = pn(o); + n > o && (o += jb); + for (var h = 0, c = 0; c < 2; c++) { + var d = qb[c]; + if (d + t > r) { + var f = Math.atan2(s, d), p = a ? 1 : -1; + f < 0 && (f = jb + f), (f >= n && f <= o || f + jb >= n && f + jb <= o) && (f > Math.PI / 2 && f < 1.5 * Math.PI && (p = -p), h += p) + } + } + return h + } + + function bn(t, e, i, n, o) { + for (var a = 0, r = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) { + var c = t[h++]; + switch (c === Xb.M && h > 1 && (i || (a += mn(r, s, l, u, n, o))), 1 == h && (l = r = t[h], u = s = t[h + 1]), c) { + case Xb.M: + r = l = t[h++], s = u = t[h++]; + break; + case Xb.L: + if (i) { + if (cn(r, s, t[h], t[h + 1], e, n, o)) return !0 + } else a += mn(r, s, t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.C: + if (i) { + if (dn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 + } else a += xn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.Q: + if (i) { + if (fn(r, s, t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 + } else a += _n(r, s, t[h++], t[h++], t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.A: + var d = t[h++], f = t[h++], p = t[h++], g = t[h++], m = t[h++], v = t[h++], + y = (t[h++], 1 - t[h++]), x = Math.cos(m) * p + d, _ = Math.sin(m) * g + f; + h > 1 ? a += mn(r, s, x, _, n, o) : (l = x, u = _); + var w = (n - d) * g / p + d; + if (i) { + if (gn(d, f, g, m, m + v, y, e, w, o)) return !0 + } else a += wn(d, f, g, m, m + v, y, w, o); + r = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f; + break; + case Xb.R: + l = r = t[h++], u = s = t[h++]; + var x = l + t[h++], _ = u + t[h++]; + if (i) { + if (cn(l, u, x, u, e, n, o) || cn(x, u, x, _, e, n, o) || cn(x, _, l, _, e, n, o) || cn(l, _, l, u, e, n, o)) return !0 + } else a += mn(x, u, x, _, n, o), a += mn(l, _, l, u, n, o); + break; + case Xb.Z: + if (i) { + if (cn(r, s, l, u, e, n, o)) return !0 + } else a += mn(r, s, l, u, n, o); + r = l, s = u + } + } + return i || vn(s, u) || (a += mn(r, s, l, u, n, o) || 0), 0 !== a + } + + function Sn(t, e, i) { + return bn(t, 0, !1, e, i) + } + + function Mn(t, e, i, n) { + return bn(t, e, !0, i, n) + } + + function In(t) { + $e.call(this, t), this.path = null + } + + function Tn(t, e, i, n, o, a, r, s, l, u, h) { + var c = l * (uS / 180), d = lS(c) * (t - i) / 2 + sS(c) * (e - n) / 2, + f = -1 * sS(c) * (t - i) / 2 + lS(c) * (e - n) / 2, p = d * d / (r * r) + f * f / (s * s); + p > 1 && (r *= rS(p), s *= rS(p)); + var g = (o === a ? -1 : 1) * rS((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (d * d))) || 0, + m = g * r * f / s, v = g * -s * d / r, y = (t + i) / 2 + lS(c) * m - sS(c) * v, + x = (e + n) / 2 + sS(c) * m + lS(c) * v, _ = dS([1, 0], [(d - m) / r, (f - v) / s]), + w = [(d - m) / r, (f - v) / s], b = [(-1 * d - m) / r, (-1 * f - v) / s], S = dS(w, b); + cS(w, b) <= -1 && (S = uS), cS(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * uS), 1 === a && S < 0 && (S += 2 * uS), h.addData(u, y, x, r, s, _, S, c, a) + } + + function Dn(t) { + if (!t) return []; + var e, i = t.replace(/-/g, " -").replace(/ /g, " ").replace(/ /g, ",").replace(/,,/g, ","); + for (e = 0; e < aS.length; e++) i = i.replace(new RegExp(aS[e], "g"), "|" + aS[e]); + var n, o = i.split("|"), a = 0, r = 0, s = new Hb, l = Hb.CMD; + for (e = 1; e < o.length; e++) { + var u, h = o[e], c = h.charAt(0), d = 0, f = h.slice(1).replace(/e,-/g, "e-").split(","); + f.length > 0 && "" === f[0] && f.shift(); + for (var p = 0; p < f.length; p++) f[p] = parseFloat(f[p]); + for (; d < f.length && !isNaN(f[d]) && !isNaN(f[0]);) { + var g, m, v, y, x, _, w, b = a, S = r; + switch (c) { + case"l": + a += f[d++], r += f[d++], u = l.L, s.addData(u, a, r); + break; + case"L": + a = f[d++], r = f[d++], u = l.L, s.addData(u, a, r); + break; + case"m": + a += f[d++], r += f[d++], u = l.M, s.addData(u, a, r), c = "l"; + break; + case"M": + a = f[d++], r = f[d++], u = l.M, s.addData(u, a, r), c = "L"; + break; + case"h": + a += f[d++], u = l.L, s.addData(u, a, r); + break; + case"H": + a = f[d++], u = l.L, s.addData(u, a, r); + break; + case"v": + r += f[d++], u = l.L, s.addData(u, a, r); + break; + case"V": + r = f[d++], u = l.L, s.addData(u, a, r); + break; + case"C": + u = l.C, s.addData(u, f[d++], f[d++], f[d++], f[d++], f[d++], f[d++]), a = f[d - 2], r = f[d - 1]; + break; + case"c": + u = l.C, s.addData(u, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r), a += f[d - 2], r += f[d - 1]; + break; + case"S": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.C && (g += a - I[M - 4], m += r - I[M - 3]), u = l.C, b = f[d++], S = f[d++], a = f[d++], r = f[d++], s.addData(u, g, m, b, S, a, r); + break; + case"s": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.C && (g += a - I[M - 4], m += r - I[M - 3]), u = l.C, b = a + f[d++], S = r + f[d++], a += f[d++], r += f[d++], s.addData(u, g, m, b, S, a, r); + break; + case"Q": + b = f[d++], S = f[d++], a = f[d++], r = f[d++], u = l.Q, s.addData(u, b, S, a, r); + break; + case"q": + b = f[d++] + a, S = f[d++] + r, a += f[d++], r += f[d++], u = l.Q, s.addData(u, b, S, a, r); + break; + case"T": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.Q && (g += a - I[M - 4], m += r - I[M - 3]), a = f[d++], r = f[d++], u = l.Q, s.addData(u, g, m, a, r); + break; + case"t": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.Q && (g += a - I[M - 4], m += r - I[M - 3]), a += f[d++], r += f[d++], u = l.Q, s.addData(u, g, m, a, r); + break; + case"A": + v = f[d++], y = f[d++], x = f[d++], _ = f[d++], w = f[d++], Tn(b = a, S = r, a = f[d++], r = f[d++], _, w, v, y, x, u = l.A, s); + break; + case"a": + v = f[d++], y = f[d++], x = f[d++], _ = f[d++], w = f[d++], Tn(b = a, S = r, a += f[d++], r += f[d++], _, w, v, y, x, u = l.A, s) + } + } + "z" !== c && "Z" !== c || (u = l.Z, s.addData(u)), n = u + } + return s.toStatic(), s + } + + function An(t, e) { + var i = Dn(t); + return e = 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) { + oS(i, t), this.dirty(!0) + }, e + } + + function Cn(t, e) { + return new In(An(t, e)) + } + + function Ln(t, e) { + return In.extend(An(t, e)) + } + + function kn(t, e, i, n, o, a, r) { + var s = .5 * (i - t), l = .5 * (n - e); + return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e + } + + function Pn(t, e, i) { + var n = e.points, o = e.smooth; + if (n && n.length >= 2) { + if (o && "spline" !== o) { + var a = _S(n, o, 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 = a[2 * s], u = a[2 * s + 1], h = n[(s + 1) % r]; + t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1]) + } + } else { + "spline" === o && (n = xS(n, i)), t.moveTo(n[0][0], n[0][1]); + for (var s = 1, c = n.length; s < c; s++) t.lineTo(n[s][0], n[s][1]) + } + i && t.closePath() + } + } + + function Nn(t, e, i) { + var n = t.cpx2, o = t.cpy2; + return null === n || null === o ? [(i ? Yi : ji)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? Yi : ji)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? tn : Qi)(t.x1, t.cpx1, t.x2, e), (i ? tn : Qi)(t.y1, t.cpy1, t.y2, e)] + } + + function On(t) { + $e.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0 + } + + function En(t) { + return In.extend(t) + } + + function Rn(t, e, i, n) { + var o = Cn(t, e), a = o.getBoundingRect(); + return i && ("center" === n && (i = Bn(i, a)), Vn(o, i)), o + } + + function zn(t, e, i) { + var n = new Je({ + style: {image: t, x: e.x, y: e.y, width: e.width, height: e.height}, onload: function (t) { + if ("center" === i) { + var o = {width: t.width, height: t.height}; + n.setStyle(Bn(e, o)) + } + } + }); + return n + } + + function Bn(t, e) { + var i, n = e.width / e.height, o = t.height * n; + return i = o <= t.width ? t.height : (o = t.width) / n, { + x: t.x + t.width / 2 - o / 2, + y: t.y + t.height / 2 - i / 2, + width: o, + height: i + } + } + + function Vn(t, e) { + if (t.applyTransform) { + var i = t.getBoundingRect().calculateTransform(e); + t.applyTransform(i) + } + } + + function Gn(t) { + var e = t.shape, i = t.style.lineWidth; + return NS(2 * e.x1) === NS(2 * e.x2) && (e.x1 = e.x2 = Fn(e.x1, i, !0)), NS(2 * e.y1) === NS(2 * e.y2) && (e.y1 = e.y2 = Fn(e.y1, i, !0)), t + } + + function Wn(t) { + var e = t.shape, i = t.style.lineWidth, n = e.x, o = e.y, a = e.width, r = e.height; + return e.x = Fn(e.x, i, !0), e.y = Fn(e.y, i, !0), e.width = Math.max(Fn(n + a, i, !1) - e.x, 0 === a ? 0 : 1), e.height = Math.max(Fn(o + r, i, !1) - e.y, 0 === r ? 0 : 1), t + } + + function Fn(t, e, i) { + var n = NS(2 * t); + return (n + NS(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2 + } + + function Hn(t) { + return null != t && "none" != t + } + + function Zn(t) { + return "string" == typeof t ? kt(t, -.1) : t + } + + function Un(t) { + if (t.__hoverStlDirty) { + var e = t.style.stroke, i = t.style.fill, n = t.__hoverStl; + n.fill = n.fill || (Hn(i) ? Zn(i) : null), n.stroke = n.stroke || (Hn(e) ? Zn(e) : null); + var o = {}; + for (var a in n) null != n[a] && (o[a] = t.style[a]); + t.__normalStl = o, t.__hoverStlDirty = !1 + } + } + + function Xn(t) { + if (!t.__isHover) { + if (Un(t), t.useHoverLayer) t.__zr && t.__zr.addHover(t, t.__hoverStl); else { + var e = t.style, i = e.insideRollbackOpt; + i && uo(e), e.extendFrom(t.__hoverStl), i && (lo(e, e.insideOriginalTextPosition, i), null == e.textFill && (e.textFill = i.autoColor)), t.dirty(!1), t.z2 += 1 + } + t.__isHover = !0 + } + } + + function jn(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 Yn(t) { + "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && Xn(t) + }) : Xn(t) + } + + function qn(t) { + "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && jn(t) + }) : jn(t) + } + + function Kn(t, e) { + t.__hoverStl = t.hoverStyle || e || {}, t.__hoverStlDirty = !0, t.__isHover && Un(t) + } + + function $n(t) { + this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && Yn(this) + } + + function Jn(t) { + this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && qn(this) + } + + function Qn() { + this.__isEmphasis = !0, Yn(this) + } + + function to() { + this.__isEmphasis = !1, qn(this) + } + + function eo(t, e, i) { + t.__hoverSilentOnTouch = i && i.hoverSilentOnTouch, "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && Kn(t, e) + }) : Kn(t, e), t.on("mouseover", $n).on("mouseout", Jn), t.on("emphasis", Qn).on("normal", to) + } + + function io(t, e, i, n, o, a, r) { + var s, l = (o = o || RS).labelFetcher, u = o.labelDataIndex, h = o.labelDimIndex, c = i.getShallow("show"), + d = n.getShallow("show"); + (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = x(o.defaultText) ? o.defaultText(u, o) : o.defaultText)); + var f = c ? s : null, p = d ? D(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null; + null == f && null == p || (no(t, i, a, o), no(e, n, r, o, !0)), t.text = f, e.text = p + } + + function no(t, e, i, n, o) { + return oo(t, e, n, o), i && a(t, i), t.host && t.host.dirty && t.host.dirty(!1), t + } + + function oo(t, e, i, n) { + if ((i = i || RS).isRectText) { + var o = e.getShallow("position") || (n ? null : "inside"); + "outside" === o && (o = "top"), t.textPosition = o, t.textOffset = e.getShallow("offset"); + var a = e.getShallow("rotate"); + null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = D(e.getShallow("distance"), n ? null : 5) + } + var r, s = e.ecModel, l = s && s.option.textStyle, u = ao(e); + if (u) { + r = {}; + for (var h in u) if (u.hasOwnProperty(h)) { + var c = e.getModel(["rich", h]); + ro(r[h] = {}, c, l, i, n) + } + } + return t.rich = r, ro(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t + } + + function ao(t) { + for (var e; t && t !== t.ecModel;) { + var i = (t.option || RS).rich; + if (i) { + e = e || {}; + for (var n in i) i.hasOwnProperty(n) && (e[n] = 1) + } + t = t.parentModel + } + return e + } + + function ro(t, e, i, n, o, a) { + if (i = !o && i || RS, t.textFill = so(e.getShallow("color"), n) || i.color, t.textStroke = so(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = D(e.getShallow("textBorderWidth"), i.textBorderWidth), !o) { + if (a) { + var r = t.textPosition; + t.insideRollback = lo(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"), a && n.disableBox || (t.textBackgroundColor = so(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = so(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 so(t, e) { + return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null + } + + function lo(t, e, i) { + var n, o = i.useInsideStyle; + return null == t.textFill && !1 !== o && (!0 === o || 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 uo(t) { + var e = t.insideRollback; + e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth) + } + + function ho(t, e) { + var i = e || e.getModel("textStyle"); + return P([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(" ")) + } + + function co(t, e, i, n, o, a) { + if ("function" == typeof o && (a = o, o = null), n && n.isAnimationEnabled()) { + var r = t ? "Update" : "", s = n.getShallow("animationDuration" + r), + l = n.getShallow("animationEasing" + r), u = n.getShallow("animationDelay" + r); + "function" == typeof u && (u = u(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, o) : null)), "function" == typeof s && (s = s(o)), s > 0 ? e.animateTo(i, s, u || 0, l, a, !!a) : (e.stopAnimation(), e.attr(i), a && a()) + } else e.stopAnimation(), e.attr(i), a && a() + } + + function fo(t, e, i, n, o) { + co(!0, t, e, i, n, o) + } + + function po(t, e, i, n, o) { + co(!1, t, e, i, n, o) + } + + function go(t, e) { + for (var i = lt([]); t && t !== e;) ht(i, t.getLocalTransform(), i), t = t.parent; + return i + } + + function mo(t, e, i) { + return e && !c(e) && (e = E_.getLocalTransform(e)), i && (e = pt([], e)), Q([], t, e) + } + + function vo(t, e, i) { + var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]), + o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]), + a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -o : "bottom" === t ? o : 0]; + return a = mo(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top" + } + + function yo(t, e, i, n) { + function o(t) { + var e = {position: W(t.position), rotation: t.rotation}; + return t.shape && (e.shape = a({}, t.shape)), e + } + + if (t && e) { + var r = function (t) { + var e = {}; + return t.traverse(function (t) { + !t.isGroup && t.anid && (e[t.anid] = t) + }), e + }(t); + e.traverse(function (t) { + if (!t.isGroup && t.anid) { + var e = r[t.anid]; + if (e) { + var n = o(t); + t.attr(o(e)), fo(t, n, i, t.dataIndex) + } + } + }) + } + } + + function xo(t, e) { + return f(t, function (t) { + var i = t[0]; + i = OS(i, e.x), i = ES(i, e.x + e.width); + var n = t[1]; + return n = OS(n, e.y), n = ES(n, e.y + e.height), [i, n] + }) + } + + function _o(t, e, i) { + var n = (e = a({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), r(n, i), new Je(e)) : Rn(t.replace("path://", ""), e, i, "center") + } + + function wo(t, e, i) { + this.parentModel = e, this.ecModel = i, this.option = t + } + + function bo(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 So(t, e) { + var i = ZS(t).getParent; + return i ? i.call(t, e) : t.parentModel + } + + function Mo(t) { + return [t || "", US++, Math.random().toFixed(5)].join("_") + } + + function Io(t) { + return t.replace(/^\s+/, "").replace(/\s+$/, "") + } + + function To(t, e, i, n) { + var o = e[1] - e[0], a = i[1] - i[0]; + if (0 === o) return 0 === a ? i[0] : (i[0] + i[1]) / 2; + if (n) if (o > 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]) / o * a + i[0] + } + + function Do(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 ? Io(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t + } + + function Ao(t, e, i) { + return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t + } + + function Co(t) { + return t.sort(function (t, e) { + return t - e + }), t + } + + function Lo(t) { + if (t = +t, isNaN(t)) return 0; + for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++; + return i + } + + function ko(t) { + var e = t.toString(), i = e.indexOf("e"); + if (i > 0) { + var n = +e.slice(i + 1); + return n < 0 ? -n : 0 + } + var o = e.indexOf("."); + return o < 0 ? 0 : e.length - 1 - o + } + + function Po(t, e) { + var i = Math.log, n = Math.LN10, o = Math.floor(i(t[1] - t[0]) / n), + a = Math.round(i(Math.abs(e[1] - e[0])) / n), r = Math.min(Math.max(-o + a, 0), 20); + return isFinite(r) ? r : 20 + } + + function No(t, e, i) { + if (!t[e]) return 0; + var n = p(t, function (t, e) { + return t + (isNaN(e) ? 0 : e) + }, 0); + if (0 === n) return 0; + for (var o = Math.pow(10, i), a = f(t, function (t) { + return (isNaN(t) ? 0 : t) / n * o * 100 + }), r = 100 * o, s = f(a, function (t) { + return Math.floor(t) + }), l = p(s, function (t, e) { + return t + e + }, 0), u = f(a, function (t, e) { + return t - s[e] + }); l < r;) { + for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, g = u.length; d < g; ++d) u[d] > h && (h = u[d], c = d); + ++s[c], u[c] = 0, ++l + } + return s[e] / o + } + + function Oo(t) { + var e = 2 * Math.PI; + return (t % e + e) % e + } + + function Eo(t) { + return t > -XS && t < XS + } + + function Ro(t) { + if (t instanceof Date) return t; + if ("string" == typeof t) { + var e = YS.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)) + } + + function zo(t) { + return Math.pow(10, Bo(t)) + } + + function Bo(t) { + return Math.floor(Math.log(t) / Math.LN10) + } + + function Vo(t, e) { + var i, n = Bo(t), o = Math.pow(10, n), a = t / o; + return i = 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, t = i * o, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t + } + + function Go(t) { + function e(t, i, n) { + return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1)) + } + + t.sort(function (t, i) { + return e(t, i, 0) ? -1 : 1 + }); + for (var i = -1 / 0, n = 1, o = 0; o < t.length;) { + for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++) a[s] <= i && (a[s] = i, r[s] = s ? 1 : 1 - n), i = a[s], n = r[s]; + a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++ + } + return t + } + + function Wo(t) { + return t - parseFloat(t) >= 0 + } + + function Fo(t) { + return isNaN(t) ? "-" : (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : "") + } + + function Ho(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 + } + + function Zo(t) { + return null == t ? "" : (t + "").replace($S, function (t, e) { + return JS[e] + }) + } + + function Uo(t, e, i) { + y(e) || (e = [e]); + var n = e.length; + if (!n) return ""; + for (var o = e[0].$vars || [], a = 0; a < o.length; a++) { + var r = QS[a]; + t = t.replace(tM(r), tM(r, 0)) + } + for (var s = 0; s < n; s++) for (var l = 0; l < o.length; l++) { + var u = e[s][o[l]]; + t = t.replace(tM(QS[l], s), i ? Zo(u) : u) + } + return t + } + + function Xo(t, e, i) { + return d(e, function (e, n) { + t = t.replace("{" + n + "}", i ? Zo(e) : e) + }), t + } + + function jo(t, e) { + var i = (t = _(t) ? {color: t, extraCssText: e} : t || {}).color, n = t.type, e = t.extraCssText; + return i ? "subItem" === n ? '' : '' : "" + } + + function Yo(t, e) { + return t += "", "0000".substr(0, e - t.length) + t + } + + function qo(t, e, i) { + "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy"); + var n = Ro(e), o = i ? "UTC" : "", a = n["get" + o + "FullYear"](), r = n["get" + o + "Month"]() + 1, + s = n["get" + o + "Date"](), l = n["get" + o + "Hours"](), u = n["get" + o + "Minutes"](), + h = n["get" + o + "Seconds"](), c = n["get" + o + "Milliseconds"](); + return t = t.replace("MM", Yo(r, 2)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", Yo(s, 2)).replace("d", s).replace("hh", Yo(l, 2)).replace("h", l).replace("mm", Yo(u, 2)).replace("m", u).replace("ss", Yo(h, 2)).replace("s", h).replace("SSS", Yo(c, 3)) + } + + function Ko(t) { + return t ? t.charAt(0).toUpperCase() + t.substr(1) : t + } + + function $o(t, e, i, n, o) { + var a = 0, r = 0; + null == n && (n = 1 / 0), null == o && (o = 1 / 0); + var s = 0; + e.eachChild(function (l, u) { + var h, c, d = l.position, f = l.getBoundingRect(), p = e.childAt(u + 1), g = p && p.getBoundingRect(); + if ("horizontal" === t) { + var m = f.width + (g ? -g.x + f.x : 0); + (h = a + m) > n || l.newline ? (a = 0, h = m, r += s + i, s = f.height) : s = Math.max(s, f.height) + } else { + var v = f.height + (g ? -g.y + f.y : 0); + (c = r + v) > o || l.newline ? (a += s + i, r = 0, c = v, s = f.width) : s = Math.max(s, f.width) + } + l.newline || (d[0] = a, d[1] = r, "horizontal" === t ? a = h + i : r = c + i) + }) + } + + function Jo(t, e, i) { + var n = e.width, o = e.height, a = Do(t.x, n), r = Do(t.y, o), s = Do(t.x2, n), l = Do(t.y2, o); + return (isNaN(a) || isNaN(parseFloat(t.x))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.x2))) && (s = n), (isNaN(r) || isNaN(parseFloat(t.y))) && (r = 0), (isNaN(l) || isNaN(parseFloat(t.y2))) && (l = o), i = KS(i || 0), { + width: Math.max(s - a - i[1] - i[3], 0), + height: Math.max(l - r - i[0] - i[2], 0) + } + } + + function Qo(t, e, i) { + i = KS(i || 0); + var n = e.width, o = e.height, a = Do(t.left, n), r = Do(t.top, o), s = Do(t.right, n), l = Do(t.bottom, o), + u = Do(t.width, n), h = Do(t.height, o), c = i[2] + i[0], d = i[1] + i[3], f = t.aspect; + switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = o - l - c - r), null != f && (isNaN(u) && isNaN(h) && (f > n / o ? u = .8 * n : h = .8 * o), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(r) && (r = o - l - h - c), t.left || t.right) { + case"center": + a = n / 2 - u / 2 - i[3]; + break; + case"right": + a = n - u - d + } + switch (t.top || t.bottom) { + case"middle": + case"center": + r = o / 2 - h / 2 - i[0]; + break; + case"bottom": + r = o - h - c + } + a = a || 0, r = r || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = o - c - r - (l || 0)); + var p = new $t(a + i[3], r + i[0], u, h); + return p.margin = i, p + } + + function ta(t, e, i, n, o) { + var a = !o || !o.hv || o.hv[0], s = !o || !o.hv || o.hv[1], l = o && o.boundingMode || "all"; + if (a || s) { + var u; + if ("raw" === l) u = "group" === t.type ? new $t(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect(); else if (u = t.getBoundingRect(), t.needLocalTransform()) { + var h = t.getLocalTransform(); + (u = u.clone()).applyTransform(h) + } + e = Qo(r({width: u.width, height: u.height}, e), i, n); + var c = t.position, d = a ? e.x - u.x : 0, f = s ? e.y - u.y : 0; + t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f]) + } + } + + function ea(t, e) { + return null != t[rM[e][0]] || null != t[rM[e][1]] && null != t[rM[e][2]] + } + + function ia(t, e, i) { + function n(i, n) { + var r = {}, l = 0, u = {}, h = 0; + if (oM(i, function (e) { + u[e] = t[e] + }), oM(i, function (t) { + o(e, t) && (r[t] = u[t] = e[t]), a(r, t) && l++, a(u, t) && h++ + }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u; + if (2 !== h && l) { + if (l >= 2) return r; + for (var c = 0; c < i.length; c++) { + var d = i[c]; + if (!o(r, d) && o(t, d)) { + r[d] = t[d]; + break + } + } + return r + } + return u + } + + function o(t, e) { + return t.hasOwnProperty(e) + } + + function a(t, e) { + return null != t[e] && "auto" !== t[e] + } + + function r(t, e, i) { + oM(t, function (t) { + e[t] = i[t] + }) + } + + !w(i) && (i = {}); + var s = i.ignoreSize; + !y(s) && (s = [s, s]); + var l = n(rM[0], 0), u = n(rM[1], 1); + r(rM[0], t, l), r(rM[1], t, u) + } + + function na(t) { + return oa({}, t) + } + + function oa(t, e) { + return e && t && oM(aM, function (i) { + e.hasOwnProperty(i) && (t[i] = e[i]) + }), t + } + + function aa(t, e) { + for (var i = t.length, n = 0; n < i; n++) if (t[n].length > e) return t[n]; + return t[i - 1] + } + + function ra(t) { + var e = t.get("coordinateSystem"), i = {coordSysName: e, coordSysDims: [], axisMap: R(), categoryAxisMap: R()}, + n = gM[e]; + if (n) return n(t, i, i.axisMap, i.categoryAxisMap), i + } + + function sa(t) { + return "category" === t.get("type") + } + + function la(t) { + this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === xM ? {} : []), this.sourceFormat = t.sourceFormat || _M, this.seriesLayoutBy = t.seriesLayoutBy || bM, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && R(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount + } + + function ua(t) { + var e = t.option.source, i = _M; + if (S(e)) i = wM; else if (y(e)) for (var n = 0, o = e.length; n < o; n++) { + var a = e[n]; + if (null != a) { + if (y(a)) { + i = vM; + break + } + if (w(a)) { + i = yM; + break + } + } + } else if (w(e)) { + for (var r in e) if (e.hasOwnProperty(r) && c(e[r])) { + i = xM; + break + } + } else if (null != e) throw new Error("Invalid data"); + MM(t).sourceFormat = i + } + + function ha(t) { + return MM(t).source + } + + function ca(t) { + MM(t).datasetMap = R() + } + + function da(t) { + var e = t.option, i = e.data, n = S(i) ? wM : mM, o = !1, a = e.seriesLayoutBy, r = e.sourceHeader, + s = e.dimensions, l = ya(t); + if (l) { + var u = l.option; + i = u.source, n = MM(l).sourceFormat, o = !0, a = a || u.seriesLayoutBy, null == r && (r = u.sourceHeader), s = s || u.dimensions + } + var h = fa(i, n, a, r, s), c = e.encode; + !c && l && (c = va(t, l, i, n, a, h)), MM(t).source = new la({ + data: i, + fromDataset: o, + seriesLayoutBy: a, + sourceFormat: n, + dimensionsDefine: h.dimensionsDefine, + startIndex: h.startIndex, + dimensionsDetectCount: h.dimensionsDetectCount, + encodeDefine: c + }) + } + + function fa(t, e, i, n, o) { + if (!t) return {dimensionsDefine: pa(o)}; + var a, r, s; + if (e === vM) "auto" === n || null == n ? ga(function (t) { + null != t && "-" !== t && (_(t) ? null == r && (r = 1) : r = 0) + }, i, t, 10) : r = n ? 1 : 0, o || 1 !== r || (o = [], ga(function (t, e) { + o[e] = null != t ? t : "" + }, i, t)), a = o ? o.length : i === SM ? t.length : t[0] ? t[0].length : null; else if (e === yM) o || (o = ma(t), s = !0); else if (e === xM) o || (o = [], s = !0, d(t, function (t, e) { + o.push(e) + })); else if (e === mM) { + var l = Ii(t[0]); + a = y(l) && l.length || 1 + } + var u; + return s && d(o, function (t, e) { + "name" === (w(t) ? t.name : t) && (u = e) + }), {startIndex: r, dimensionsDefine: pa(o), dimensionsDetectCount: a, potentialNameDimIndex: u} + } + + function pa(t) { + if (t) { + var e = R(); + return f(t, function (t, i) { + if (null == (t = a({}, w(t) ? t : {name: t})).name) return t; + t.name += "", null == t.displayName && (t.displayName = t.name); + var n = e.get(t.name); + return n ? t.name += "-" + n.count++ : e.set(t.name, {count: 1}), t + }) + } + } + + function ga(t, e, i, n) { + if (null == n && (n = 1 / 0), e === SM) for (a = 0; a < i.length && a < n; a++) t(i[a] ? i[a][0] : null, a); else for (var o = i[0] || [], a = 0; a < o.length && a < n; a++) t(o[a], a) + } + + function ma(t) { + for (var e, i = 0; i < t.length && !(e = t[i++]);) ; + if (e) { + var n = []; + return d(e, function (t, e) { + n.push(e) + }), n + } + } + + function va(t, e, i, n, o, a) { + var r = ra(t), s = {}, l = [], u = [], h = t.subType, c = R(["pie", "map", "funnel"]), + f = R(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]); + if (r && null != f.get(h)) { + var p = t.ecModel, g = MM(p).datasetMap, m = e.uid + "_" + o, + v = g.get(m) || g.set(m, {categoryWayDim: 1, valueWayDim: 0}); + d(r.coordSysDims, function (t) { + if (null == r.firstCategoryDimIndex) { + e = v.valueWayDim++; + s[t] = e, u.push(e) + } else if (r.categoryAxisMap.get(t)) s[t] = 0, l.push(0); else { + var e = v.categoryWayDim++; + s[t] = e, u.push(e) + } + }) + } else if (null != c.get(h)) { + for (var y, x = 0; x < 5 && null == y; x++) _a(i, n, o, a.dimensionsDefine, a.startIndex, x) || (y = x); + if (null != y) { + s.value = y; + var _ = a.potentialNameDimIndex || Math.max(y - 1, 0); + u.push(_), l.push(_) + } + } + return l.length && (s.itemName = l), u.length && (s.seriesName = u), s + } + + function ya(t) { + var e = t.option; + if (!e.data) return t.ecModel.getComponent("dataset", e.datasetIndex || 0) + } + + function xa(t, e) { + return _a(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e) + } + + function _a(t, e, i, n, o, a) { + function r(t) { + return (null == t || !isFinite(t) || "" === t) && (!(!_(t) || "-" === t) || void 0) + } + + var s; + if (S(t)) return !1; + var l; + if (n && (l = w(l = n[a]) ? l.name : l), e === vM) if (i === SM) { + for (var u = t[a], h = 0; h < (u || []).length && h < 5; h++) if (null != (s = r(u[o + h]))) return s + } else for (h = 0; h < t.length && h < 5; h++) { + var c = t[o + h]; + if (c && null != (s = r(c[a]))) return s + } else if (e === yM) { + if (!l) return; + for (h = 0; h < t.length && h < 5; h++) if ((d = t[h]) && null != (s = r(d[l]))) return s + } else if (e === xM) { + if (!l) return; + if (!(u = t[l]) || S(u)) return !1; + for (h = 0; h < u.length && h < 5; h++) if (null != (s = r(u[h]))) return s + } else if (e === mM) for (h = 0; h < t.length && h < 5; h++) { + var d = t[h], f = Ii(d); + if (!y(f)) return !1; + if (null != (s = r(f[a]))) return s + } + return !1 + } + + function wa(t, e) { + if (e) { + var i = e.seiresIndex, n = e.seriesId, o = e.seriesName; + return null != i && t.componentIndex !== i || null != n && t.id !== n || null != o && t.name !== o + } + } + + function ba(t, e) { + var o = t.color && !t.colorLayer; + d(e, function (e, a) { + "colorLayer" === a && o || hM.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? n(t[a], e, !1) : i(e) : null == t[a] && (t[a] = e)) + }) + } + + function Sa(t) { + t = t, this.option = {}, this.option[IM] = 1, this._componentsMap = R({series: []}), this._seriesIndices, this._seriesIndicesMap, ba(t, this._theme.option), n(t, dM, !1), this.mergeOption(t) + } + + function Ma(t, e) { + y(e) || (e = e ? [e] : []); + var i = {}; + return d(e, function (e) { + i[e] = (t.get(e) || []).slice() + }), i + } + + function Ia(t, e, i) { + return e.type ? e.type : i ? i.subType : hM.determineSubType(t, e) + } + + function Ta(t, e) { + t._seriesIndicesMap = R(t._seriesIndices = f(e, function (t) { + return t.componentIndex + }) || []) + } + + function Da(t, e) { + return e.hasOwnProperty("subType") ? g(t, function (t) { + return t.subType === e.subType + }) : t + } + + function Aa(t) { + d(DM, function (e) { + this[e] = m(t[e], t) + }, this) + } + + function Ca() { + this._coordinateSystems = [] + } + + function La(t) { + this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption + } + + function ka(t, e, i) { + var n, o, a = [], r = [], s = t.timeline; + if (t.baseOption && (o = t.baseOption), (s || t.options) && (o = o || {}, a = (t.options || []).slice()), t.media) { + o = o || {}; + var l = t.media; + CM(l, function (t) { + t && t.option && (t.query ? r.push(t) : n || (n = t)) + }) + } + return o || (o = t), o.timeline || (o.timeline = s), CM([o].concat(a).concat(f(r, function (t) { + return t.option + })), function (t) { + CM(e, function (e) { + e(t, i) + }) + }), {baseOption: o, timelineOptions: a, mediaDefault: n, mediaList: r} + } + + function Pa(t, e, i) { + var n = {width: e, height: i, aspectratio: e / i}, o = !0; + return d(t, function (t, e) { + var i = e.match(NM); + if (i && i[1] && i[2]) { + var a = i[1], r = i[2].toLowerCase(); + Na(n[r], t, a) || (o = !1) + } + }), o + } + + function Na(t, e, i) { + return "min" === i ? t >= e : "max" === i ? t <= e : t === e + } + + function Oa(t, e) { + return t.join(",") === e.join(",") + } + + function Ea(t, e) { + CM(e = e || {}, function (e, i) { + if (null != e) { + var n = t[i]; + if (hM.hasClass(i)) { + e = Si(e); + var o = Di(n = Si(n), e); + t[i] = kM(o, function (t) { + return t.option && t.exist ? PM(t.exist, t.option, !0) : t.exist || t.option + }) + } else t[i] = PM(n, e, !0) + } + }) + } + + function Ra(t) { + var e = t && t.itemStyle; + if (e) for (var i = 0, o = RM.length; i < o; i++) { + var a = RM[i], r = e.normal, s = e.emphasis; + r && r[a] && (t[a] = t[a] || {}, t[a].normal ? n(t[a].normal, r[a]) : t[a].normal = r[a], r[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? n(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null) + } + } + + function za(t, e, i) { + if (t && t[e] && (t[e].normal || t[e].emphasis)) { + var n = t[e].normal, o = t[e].emphasis; + n && (i ? (t[e].normal = t[e].emphasis = null, r(t[e], n)) : t[e] = n), o && (t.emphasis = t.emphasis || {}, t.emphasis[e] = o) + } + } + + function Ba(t) { + za(t, "itemStyle"), za(t, "lineStyle"), za(t, "areaStyle"), za(t, "label"), za(t, "labelLine"), za(t, "upperLabel"), za(t, "edgeLabel") + } + + function Va(t, e) { + var i = EM(t) && t[e], n = EM(i) && i.textStyle; + if (n) for (var o = 0, a = ib.length; o < a; o++) { + var e = ib[o]; + n.hasOwnProperty(e) && (i[e] = n[e]) + } + } + + function Ga(t) { + t && (Ba(t), Va(t, "label"), t.emphasis && Va(t.emphasis, "label")) + } + + function Wa(t) { + if (EM(t)) { + Ra(t), Ba(t), Va(t, "label"), Va(t, "upperLabel"), Va(t, "edgeLabel"), t.emphasis && (Va(t.emphasis, "label"), Va(t.emphasis, "upperLabel"), Va(t.emphasis, "edgeLabel")); + var e = t.markPoint; + e && (Ra(e), Ga(e)); + var i = t.markLine; + i && (Ra(i), Ga(i)); + var n = t.markArea; + n && Ga(n); + var o = t.data; + if ("graph" === t.type) { + o = o || t.nodes; + var a = t.links || t.edges; + if (a && !S(a)) for (s = 0; s < a.length; s++) Ga(a[s]); + d(t.categories, function (t) { + Ba(t) + }) + } + if (o && !S(o)) for (s = 0; s < o.length; s++) Ga(o[s]); + if ((e = t.markPoint) && e.data) for (var r = e.data, s = 0; s < r.length; s++) Ga(r[s]); + if ((i = t.markLine) && i.data) for (var l = i.data, s = 0; s < l.length; s++) y(l[s]) ? (Ga(l[s][0]), Ga(l[s][1])) : Ga(l[s]); + "gauge" === t.type ? (Va(t, "axisLabel"), Va(t, "title"), Va(t, "detail")) : "treemap" === t.type ? (za(t.breadcrumb, "itemStyle"), d(t.levels, function (t) { + Ba(t) + })) : "tree" === t.type && Ba(t.leaves) + } + } + + function Fa(t) { + return y(t) ? t : t ? [t] : [] + } + + function Ha(t) { + return (y(t) ? t[0] : t) || {} + } + + function Za(t, e) { + e = e.split(","); + for (var i = t, n = 0; n < e.length && null != (i = i && i[e[n]]); n++) ; + return i + } + + function Ua(t, e, i, n) { + e = e.split(","); + for (var o, a = t, r = 0; r < e.length - 1; r++) null == a[o = e[r]] && (a[o] = {}), a = a[o]; + (n || null == a[e[r]]) && (a[e[r]] = i) + } + + function Xa(t) { + d(BM, function (e) { + e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]) + }) + } + + function ja(t) { + d(t, function (e, i) { + var n = [], o = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], r = e.data, + s = e.isStackedByIndex, l = r.map(a, function (a, l, u) { + var h = r.get(e.stackedDimension, u); + if (isNaN(h)) return o; + var c, d; + s ? d = r.getRawIndex(u) : c = r.get(e.stackedByDimension, u); + for (var f = NaN, p = i - 1; p >= 0; p--) { + var g = t[p]; + if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) { + var m = g.data.getByRawIndex(g.stackResultDimension, d); + if (h >= 0 && m > 0 || h <= 0 && m < 0) { + h += m, f = m; + break + } + } + } + return n[0] = h, n[1] = f, n + }); + r.hostModel.setData(l), e.data = l + }) + } + + function Ya(t, e) { + la.isInstance(t) || (t = la.seriesDataToSource(t)), this._source = t; + var i = this._data = t.data, n = t.sourceFormat; + n === wM && (this._offset = 0, this._dimSize = e, this._data = i), a(this, FM[n === vM ? n + "_" + t.seriesLayoutBy : n]) + } + + function qa() { + return this._data.length + } + + function Ka(t) { + return this._data[t] + } + + function $a(t) { + for (var e = 0; e < t.length; e++) this._data.push(t[e]) + } + + function Ja(t, e, i, n) { + return null != i ? t[i] : t + } + + function Qa(t, e, i, n) { + return tr(t[n], this._dimensionInfos[e]) + } + + function tr(t, e) { + var i = e && e.type; + if ("ordinal" === i) { + var n = e && e.ordinalMeta; + return n ? n.parseAndCollect(t) : t + } + return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +Ro(t)), null == t || "" === t ? NaN : +t + } + + function er(t, e, i) { + if (t) { + var n = t.getRawDataItem(e); + if (null != n) { + var o, a, r = t.getProvider().getSource().sourceFormat, s = t.getDimensionInfo(i); + return s && (o = s.name, a = s.index), HM[r](n, e, a, o) + } + } + } + + function ir(t, e, i) { + if (t) { + var n = t.getProvider().getSource().sourceFormat; + if (n === mM || n === yM) { + var o = t.getRawDataItem(e); + return n !== mM || w(o) || (o = null), o ? o[i] : void 0 + } + } + } + + function nr(t) { + return new or(t) + } + + function or(t) { + t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context + } + + function ar(t, e, i, n, o, a) { + YM.reset(i, n, o, a), t._callingProgress = e, t._callingProgress({ + start: i, + end: n, + count: n - i, + next: YM.next + }, t.context) + } + + function rr(t, e) { + t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null; + var i, n; + !e && t._reset && ((i = t._reset(t.context)) && i.progress && (n = i.forceFirstProgress, i = i.progress), y(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null; + var o = t._downstream; + return o && o.dirty(), n + } + + function sr(t) { + var e = t.name; + Ci(t) || (t.name = lr(t) || e) + } + + function lr(t) { + var e = t.getRawData(), i = []; + return d(e.mapDimension("seriesName", !0), function (t) { + var n = e.getDimensionInfo(t); + n.displayName && i.push(n.displayName) + }), i.join(" ") + } + + function ur(t) { + return t.model.getRawData().count() + } + + function hr(t) { + var e = t.model; + return e.setData(e.getRawData().cloneShallow()), cr + } + + function cr(t, e) { + t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData) + } + + function dr(t, e) { + d(t.CHANGABLE_METHODS, function (i) { + t.wrapMethod(i, v(fr, e)) + }) + } + + function fr(t) { + var e = pr(t); + e && e.setOutputEnd(this.count()) + } + + function pr(t) { + var e = (t.ecModel || {}).scheduler, i = e && e.getPipeline(t.uid); + if (i) { + var n = i.currentTask; + if (n) { + var o = n.agentStubMap; + o && (n = o.get(t.uid)) + } + return n + } + } + + function gr() { + this.group = new sw, this.uid = Mo("viewChart"), this.renderTask = nr({ + plan: yr, + reset: xr + }), this.renderTask.context = {view: this} + } + + function mr(t, e) { + if (t && (t.trigger(e), "group" === t.type)) for (var i = 0; i < t.childCount(); i++) mr(t.childAt(i), e) + } + + function vr(t, e, i) { + var n = Pi(t, e); + null != n ? d(Si(n), function (e) { + mr(t.getItemGraphicEl(e), i) + }) : t.eachItemGraphicEl(function (t) { + mr(t, i) + }) + } + + function yr(t) { + return eI(t.model) + } + + function xr(t) { + var e = t.model, i = t.ecModel, n = t.api, o = t.payload, a = e.pipelineContext.progressiveRender, r = t.view, + s = o && tI(o).updateMethod, l = a ? "incrementalPrepareRender" : s && r[s] ? s : "render"; + return "render" !== l && r[l](e, i, n, o), nI[l] + } + + function _r(t, e, i) { + function n() { + h = (new Date).getTime(), c = null, t.apply(r, s || []) + } + + var o, a, r, s, l, u = 0, h = 0, c = null; + e = e || 0; + var d = function () { + o = (new Date).getTime(), r = this, s = arguments; + var t = l || e, d = l || i; + l = null, a = o - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = o + }; + return d.clear = function () { + c && (clearTimeout(c), c = null) + }, d.debounceNextCall = function (t) { + l = t + }, d + } + + function wr(t, e, i, n) { + var o = t[e]; + if (o) { + var a = o[oI] || o, r = o[rI]; + if (o[aI] !== i || r !== n) { + if (null == i || !n) return t[e] = a; + (o = t[e] = _r(a, i, "debounce" === n))[oI] = a, o[rI] = n, o[aI] = i + } + return o + } + } + + function br(t, e) { + var i = t[e]; + i && i[oI] && (t[e] = i[oI]) + } + + function Sr(t, e, i, n) { + this.ecInstance = t, this.api = e, this.unfinished; + var i = this._dataProcessorHandlers = i.slice(), n = this._visualHandlers = n.slice(); + this._allHandlers = i.concat(n), this._stageTaskMap = R() + } + + function Mr(t, e, i, n, o) { + function a(t, e) { + return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id)) + } + + o = o || {}; + var r; + d(e, function (e, s) { + if (!o.visualType || o.visualType === e.visualType) { + var l = t._stageTaskMap.get(e.uid), u = l.seriesTaskMap, h = l.overallTask; + if (h) { + var c, d = h.agentStubMap; + d.each(function (t) { + a(o, t) && (t.dirty(), c = !0) + }), c && h.dirty(), dI(h, n); + var f = t.getPerformArgs(h, o.block); + d.each(function (t) { + t.perform(f) + }), r |= h.perform(f) + } else u && u.each(function (s, l) { + a(o, s) && s.dirty(); + var u = t.getPerformArgs(s, o.block); + u.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), dI(s, n), r |= s.perform(u) + }) + } + }), t.unfinished |= r + } + + function Ir(t, e, i, n, o) { + function a(i) { + var a = i.uid, s = r.get(a) || r.set(a, nr({plan: kr, reset: Pr, count: Or})); + s.context = { + model: i, + ecModel: n, + api: o, + useClearVisual: e.isVisual && !e.isLayout, + plan: e.plan, + reset: e.reset, + scheduler: t + }, Er(t, i, s) + } + + var r = i.seriesTaskMap || (i.seriesTaskMap = R()), s = e.seriesType, l = e.getTargetSeries; + e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, o).each(a); + var u = t._pipelineMap; + r.each(function (t, e) { + u.get(e) || (t.dispose(), r.removeKey(e)) + }) + } + + function Tr(t, e, i, n, o) { + function a(e) { + var i = e.uid, n = s.get(i); + n || (n = s.set(i, nr({reset: Ar, onDirty: Lr})), r.dirty()), n.context = { + model: e, + overallProgress: h, + modifyOutputEnd: c + }, n.agent = r, n.__block = h, Er(t, e, n) + } + + var r = i.overallTask = i.overallTask || nr({reset: Dr}); + r.context = {ecModel: n, api: o, overallReset: e.overallReset, scheduler: t}; + var s = r.agentStubMap = r.agentStubMap || R(), l = e.seriesType, u = e.getTargetSeries, h = !0, + c = e.modifyOutputEnd; + l ? n.eachRawSeriesByType(l, a) : u ? u(n, o).each(a) : (h = !1, d(n.getSeries(), a)); + var f = t._pipelineMap; + s.each(function (t, e) { + f.get(e) || (t.dispose(), r.dirty(), s.removeKey(e)) + }) + } + + function Dr(t) { + t.overallReset(t.ecModel, t.api, t.payload) + } + + function Ar(t, e) { + return t.overallProgress && Cr + } + + function Cr() { + this.agent.dirty(), this.getDownstream().dirty() + } + + function Lr() { + this.agent && this.agent.dirty() + } + + function kr(t) { + return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload) + } + + function Pr(t) { + t.useClearVisual && t.data.clearAllVisual(); + var e = t.resetDefines = Si(t.reset(t.model, t.ecModel, t.api, t.payload)); + return e.length > 1 ? f(e, function (t, e) { + return Nr(e) + }) : fI + } + + function Nr(t) { + return function (e, i) { + var n = i.data, o = i.resetDefines[t]; + if (o && o.dataEach) for (var a = e.start; a < e.end; a++) o.dataEach(n, a); else o && o.progress && o.progress(e, n) + } + } + + function Or(t) { + return t.data.count() + } + + function Er(t, e, i) { + var n = e.uid, o = t._pipelineMap.get(n); + !o.head && (o.head = i), o.tail && o.tail.pipe(i), o.tail = i, i.__idxInPipeline = o.count++, i.__pipeline = o + } + + function Rr(t) { + pI = null; + try { + t(gI, mI) + } catch (t) { + } + return pI + } + + function zr(t, e) { + for (var i in e.prototype) t[i] = B + } + + function Br(t) { + return function (e, i, n) { + e = e && e.toLowerCase(), D_.prototype[t].call(this, e, i, n) + } + } + + function Vr() { + D_.call(this) + } + + function Gr(t, e, n) { + function o(t, e) { + return t.__prio - e.__prio + } + + n = n || {}, "string" == typeof e && (e = HI[e]), this.id, this.group, this._dom = t; + var a = this._zr = _i(t, { + renderer: n.renderer || "canvas", + devicePixelRatio: n.devicePixelRatio, + width: n.width, + height: n.height + }); + this._throttledZrFlush = _r(m(a.flush, a), 17), (e = i(e)) && GM(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new Ca; + var r = this._api = os(this); + ae(FI, o), ae(VI, o), this._scheduler = new Sr(this, r, VI, FI), D_.call(this), this._messageCenter = new Vr, this._initEvents(), this.resize = m(this.resize, this), this._pendingActions = [], a.animation.on("frame", this._onframe, this), Yr(a, this), N(this) + } + + function Wr(t, e, i) { + var n, o = this._model, a = this._coordSysMgr.getCoordinateSystems(); + e = Oi(o, e); + for (var r = 0; r < a.length; r++) { + var s = a[r]; + if (s[t] && null != (n = s[t](o, e, i))) return n + } + } + + function Fr(t) { + var e = t._model, i = t._scheduler; + i.restorePipelines(e), i.prepareStageTasks(), qr(t, "component", e, i), qr(t, "chart", e, i), i.plan() + } + + function Hr(t, e, i, n, o) { + function a(n) { + n && n.__alive && n[e] && n[e](n.__model, r, t._api, i) + } + + var r = t._model; + if (n) { + var s = {}; + s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"]; + var l = {mainType: n, query: s}; + o && (l.subType = o); + var u = i.excludeSeriesId; + null != u && (u = R(Si(u))), r && r.eachComponent(l, function (e) { + u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId]) + }, t) + } else bI(t._componentsViews.concat(t._chartsViews), a) + } + + function Zr(t, e) { + var i = t._chartsMap, n = t._scheduler; + e.eachSeries(function (t) { + n.updateStreamModes(t, i[t.__viewId]) + }) + } + + function Ur(t, e) { + var i = t.type, n = t.escapeConnect, o = zI[i], s = o.actionInfo, l = (s.update || "update").split(":"), + u = l.pop(); + l = null != l[0] && II(l[0]), this[kI] = !0; + var h = [t], c = !1; + t.batch && (c = !0, h = f(t.batch, function (e) { + return e = r(a({}, e), t), e.batch = null, e + })); + var d, p = [], g = "highlight" === i || "downplay" === i; + bI(h, function (t) { + d = o.action(t, this._model, this._api), (d = d || a({}, t)).type = s.event || d.type, p.push(d), g ? Hr(this, u, t, "series") : l && Hr(this, u, t, l.main, l.sub) + }, this), "none" === u || g || l || (this[PI] ? (Fr(this), EI.update.call(this, t), this[PI] = !1) : EI[u].call(this, t)), d = c ? { + type: s.event || i, + escapeConnect: n, + batch: p + } : p[0], this[kI] = !1, !e && this._messageCenter.trigger(d.type, d) + } + + function Xr(t) { + for (var e = this._pendingActions; e.length;) { + var i = e.shift(); + Ur.call(this, i, t) + } + } + + function jr(t) { + !t && this.trigger("updated") + } + + function Yr(t, e) { + t.on("rendered", function () { + e.trigger("rendered"), !t.animation.isFinished() || e[PI] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished") + }) + } + + function qr(t, e, i, n) { + function o(t) { + var e = "_ec_" + t.id + "_" + t.type, o = s[e]; + if (!o) { + var h = II(t.type); + (o = new (a ? $M.getClass(h.main, h.sub) : gr.getClass(h.sub))).init(i, u), s[e] = o, r.push(o), l.add(o.group) + } + t.__viewId = o.__id = e, o.__alive = !0, o.__model = t, o.group.__ecComponentInfo = { + mainType: t.mainType, + index: t.componentIndex + }, !a && n.prepareView(o, t, i, u) + } + + for (var a = "component" === e, r = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < r.length; h++) r[h].__alive = !1; + a ? i.eachComponent(function (t, e) { + "series" !== t && o(e) + }) : i.eachSeries(o); + for (h = 0; h < r.length;) { + var c = r[h]; + c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), r.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null) + } + } + + function Kr(t) { + t.clearColorPalette(), t.eachSeries(function (t) { + t.clearColorPalette() + }) + } + + function $r(t, e, i, n) { + Jr(t, e, i, n), bI(t._chartsViews, function (t) { + t.__alive = !1 + }), Qr(t, e, i, n), bI(t._chartsViews, function (t) { + t.__alive || t.remove(e, i) + }) + } + + function Jr(t, e, i, n, o) { + bI(o || t._componentsViews, function (t) { + var o = t.__model; + t.render(o, e, i, n), ns(o, t) + }) + } + + function Qr(t, e, i, n, o) { + var a, r = t._scheduler; + e.eachSeries(function (e) { + var i = t._chartsMap[e.__viewId]; + i.__alive = !0; + var s = i.renderTask; + r.updatePayload(s, n), o && o.get(e.uid) && s.dirty(), a |= s.perform(r.getPerformArgs(s)), i.group.silent = !!e.get("silent"), ns(e, i), is(e, i) + }), r.unfinished |= a, es(t._zr, e), uI(t._zr.dom, e) + } + + function ts(t, e) { + bI(WI, function (i) { + i(t, e) + }) + } + + function es(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 is(t, e) { + var i = t.get("blendMode") || null; + e.group.traverse(function (t) { + t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) { + t.setStyle("blend", i) + }) + }) + } + + function ns(t, e) { + var i = t.get("z"), n = t.get("zlevel"); + e.group.traverse(function (t) { + "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n)) + }) + } + + function os(t) { + var e = t._coordSysMgr; + return a(new Aa(t), { + getCoordinateSystems: m(e.getCoordinateSystems, e), getComponentByElement: function (e) { + for (; e;) { + var i = e.__ecComponentInfo; + if (null != i) return t._model.getComponent(i.mainType, i.index); + e = e.parent + } + } + }) + } + + function as(t) { + function e(t, e) { + for (var n = 0; n < t.length; n++) t[n][i] = e + } + + var i = "__connectUpdateStatus"; + bI(BI, function (n, o) { + t._messageCenter.on(o, function (n) { + if (XI[t.group] && 0 !== t[i]) { + if (n && n.escapeConnect) return; + var o = t.makeActionFromEvent(n), a = []; + bI(UI, function (e) { + e !== t && e.group === t.group && a.push(e) + }), e(a, 0), bI(a, function (t) { + 1 !== t[i] && t.dispatchAction(o) + }), e(a, 2) + } + }) + }) + } + + function rs(t) { + XI[t] = !1 + } + + function ss(t) { + return UI[zi(t, qI)] + } + + function ls(t, e) { + HI[t] = e + } + + function us(t) { + GI.push(t) + } + + function hs(t, e) { + gs(VI, t, e, DI) + } + + function cs(t, e, i) { + "function" == typeof e && (i = e, e = ""); + var n = MI(t) ? t.type : [t, t = {event: e}][0]; + t.event = (t.event || n).toLowerCase(), e = t.event, wI(NI.test(n) && NI.test(e)), zI[n] || (zI[n] = { + action: i, + actionInfo: t + }), BI[e] = n + } + + function ds(t, e) { + Ca.register(t, e) + } + + function fs(t, e) { + gs(FI, t, e, AI, "layout") + } + + function ps(t, e) { + gs(FI, t, e, CI, "visual") + } + + function gs(t, e, i, n, o) { + (SI(e) || MI(e)) && (i = e, e = n); + var a = Sr.wrapStageHandler(i, o); + return a.__prio = e, a.__raw = i, t.push(a), a + } + + function ms(t, e) { + ZI[t] = e + } + + function vs(t) { + return hM.extend(t) + } + + function ys(t) { + return $M.extend(t) + } + + function xs(t) { + return KM.extend(t) + } + + function _s(t) { + return gr.extend(t) + } + + function ws(t) { + return KI[t] + } + + function bs(t) { + return t + } + + function Ss(t, e, i, n, o) { + this._old = t, this._new = e, this._oldKeyGetter = i || bs, this._newKeyGetter = n || bs, this.context = o + } + + function Ms(t, e, i, n, o) { + for (var a = 0; a < t.length; a++) { + var r = "_ec_" + o[n](t[a], a), s = e[r]; + null == s ? (i.push(r), e[r] = a) : (s.length || (e[r] = s = [s]), s.push(a)) + } + } + + function Is(t) { + var e = {}, i = e.encode = {}, n = R(), o = [], a = []; + d(t.dimensions, function (e) { + var r = t.getDimensionInfo(e), s = r.coordDim; + if (s) { + var l = i[s]; + i.hasOwnProperty(s) || (l = i[s] = []), l[r.coordDimIndex] = e, r.isExtraCoord || (n.set(s, 1), Ds(r.type) && (o[0] = e)), r.defaultTooltip && a.push(e) + } + QI.each(function (t, e) { + var n = i[e]; + i.hasOwnProperty(e) || (n = i[e] = []); + var o = r.otherDims[e]; + null != o && !1 !== o && (n[o] = r.name) + }) + }); + var r = [], s = {}; + n.each(function (t, e) { + var n = i[e]; + s[e] = n[0], r = r.concat(n) + }), e.dataDimsOnCoord = r, e.encodeFirstDimNotExtra = s; + var l = i.label; + l && l.length && (o = l.slice()); + var u = i.tooltip; + return u && u.length ? a = u.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, e + } + + function Ts(t) { + return "category" === t ? "ordinal" : "time" === t ? "time" : "float" + } + + function Ds(t) { + return !("ordinal" === t || "time" === t) + } + + function As(t) { + return t._rawCount > 65535 ? nT : oT + } + + function Cs(t) { + var e = t.constructor; + return e === Array ? t.slice() : new e(t) + } + + function Ls(t, e) { + d(aT.concat(e.__wrappedMethods || []), function (i) { + e.hasOwnProperty(i) && (t[i] = e[i]) + }), t.__wrappedMethods = e.__wrappedMethods, d(rT, function (n) { + t[n] = i(e[n]) + }), t._calculationInfo = a(e._calculationInfo) + } + + function ks(t) { + var e = t._invertedIndicesMap; + d(e, function (i, n) { + var o = t._dimensionInfos[n].ordinalMeta; + if (o) { + i = e[n] = new nT(o.categories.length); + for (a = 0; a < i.length; a++) i[a] = NaN; + for (var a = 0; a < t._count; a++) i[t.get(n, a)] = a + } + }) + } + + function Ps(t, e, i) { + var n; + if (null != e) { + var o = t._chunkSize, a = Math.floor(i / o), r = i % o, s = t.dimensions[e], l = t._storage[s][a]; + if (l) { + n = l[r]; + var u = t._dimensionInfos[s].ordinalMeta; + u && u.categories.length && (n = u.categories[n]) + } + } + return n + } + + function Ns(t) { + return t + } + + function Os(t) { + return t < this._count && t >= 0 ? this._indices[t] : -1 + } + + function Es(t, e) { + var i = t._idList[e]; + return null == i && (i = Ps(t, t._idDimIdx, e)), null == i && (i = eT + e), i + } + + function Rs(t) { + return y(t) || (t = [t]), t + } + + function zs(t, e) { + var i = t.dimensions, n = new sT(f(i, t.getDimensionInfo, t), t.hostModel); + Ls(n, t); + for (var o = n._storage = {}, a = t._storage, r = 0; r < i.length; r++) { + var s = i[r]; + a[s] && (l(e, s) >= 0 ? (o[s] = Bs(a[s]), n._rawExtent[s] = Vs(), n._extent[s] = null) : o[s] = a[s]) + } + return n + } + + function Bs(t) { + for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = Cs(t[i]); + return e + } + + function Vs() { + return [1 / 0, -1 / 0] + } + + function Gs(t, e, n) { + function o(t, e, i) { + null != QI.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0)) + } + + la.isInstance(e) || (e = la.seriesDataToSource(e)), n = n || {}, t = (t || []).slice(); + for (var s = (n.dimsDef || []).slice(), l = R(n.encodeDef), u = R(), h = R(), c = [], f = Ws(e, t, s, n.dimCount), p = 0; p < f; p++) { + var g = s[p] = a({}, w(s[p]) ? s[p] : {name: s[p]}), m = g.name, v = c[p] = {otherDims: {}}; + null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type), null != g.displayName && (v.displayName = g.displayName) + } + l.each(function (t, e) { + t = Si(t).slice(); + var i = l.set(e, []); + d(t, function (t, n) { + _(t) && (t = u.get(t)), null != t && t < f && (i[n] = t, o(c[t], e, n)) + }) + }); + var y = 0; + d(t, function (t, e) { + var n, t, a, s; + if (_(t)) n = t, t = {}; else { + n = t.name; + var u = t.ordinalMeta; + t.ordinalMeta = null, (t = i(t)).ordinalMeta = u, a = t.dimsDef, s = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null + } + var h = Si(l.get(n)); + if (!h.length) for (var f = 0; f < (a && a.length || 1); f++) { + for (; y < c.length && null != c[y].coordDim;) y++; + y < c.length && h.push(y++) + } + d(h, function (e, i) { + var l = c[e]; + if (o(r(l, t), n, i), null == l.name && a) { + var u = a[i]; + !w(u) && (u = {name: u}), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip + } + s && r(l.otherDims, s) + }) + }); + var x = n.generateCoord, b = n.generateCoordCount, S = null != b; + b = x ? b || 1 : 0; + for (var M = x || "value", I = 0; I < f; I++) null == (v = c[I] = c[I] || {}).coordDim && (v.coordDim = Fs(M, h, S), v.coordDimIndex = 0, (!x || b <= 0) && (v.isExtraCoord = !0), b--), null == v.name && (v.name = Fs(v.coordDim, u)), null == v.type && xa(e, I, v.name) && (v.type = "ordinal"); + return c + } + + function Ws(t, e, i, n) { + var o = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0); + return d(e, function (t) { + var e = t.dimsDef; + e && (o = Math.max(o, e.length)) + }), o + } + + function Fs(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 + } + + function Hs(t, e, i) { + var n, o, a, r, s = (i = i || {}).byIndex, l = i.stackedCoordDimension, u = !(!t || !t.get("stack")); + if (d(e, function (t, i) { + _(t) && (e[i] = t = {name: t}), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), o || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (o = t)) + }), !o || s || n || (s = !0), o) { + a = "__\0ecstackresult", r = "__\0ecstackedover", n && (n.createInvertedIndices = !0); + var h = o.coordDim, c = o.type, f = 0; + d(e, function (t) { + t.coordDim === h && f++ + }), e.push({ + name: a, + coordDim: h, + coordDimIndex: f, + type: c, + isExtraCoord: !0, + isCalculationCoord: !0 + }), f++, e.push({name: r, coordDim: r, coordDimIndex: f, type: c, isExtraCoord: !0, isCalculationCoord: !0}) + } + return { + stackedDimension: o && o.name, + stackedByDimension: n && n.name, + isStackedByIndex: s, + stackedOverDimension: r, + stackResultDimension: a + } + } + + function Zs(t, e) { + return !!e && e === t.getCalculationInfo("stackedDimension") + } + + function Us(t, e) { + return Zs(t, e) ? t.getCalculationInfo("stackResultDimension") : e + } + + function Xs(t, e, i) { + i = i || {}, la.isInstance(t) || (t = la.seriesDataToSource(t)); + var n, o = e.get("coordinateSystem"), a = Ca.get(o), r = ra(e); + r && (n = f(r.coordSysDims, function (t) { + var e = {name: t}, i = r.axisMap.get(t); + if (i) { + var n = i.get("type"); + e.type = Ts(n) + } + return e + })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]); + var s, l, u = hT(t, {coordDimensions: n, generateCoord: i.generateCoord}); + r && d(u, function (t, e) { + var i = t.coordDim, n = r.categoryAxisMap.get(i); + n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0) + }), l || null == s || (u[s].otherDims.itemName = 0); + var h = Hs(e, u), c = new sT(u, e); + c.setCalculationInfo(h); + var p = null != s && js(t) ? function (t, e, i, n) { + return n === s ? i : this.defaultDimValueGetter(t, e, i, n) + } : null; + return c.hasItemOption = !1, c.initData(t, null, p), c + } + + function js(t) { + if (t.sourceFormat === mM) { + var e = Ys(t.data || []); + return null != e && !y(Ii(e)) + } + } + + function Ys(t) { + for (var e = 0; e < t.length && null == t[e];) e++; + return t[e] + } + + function qs(t) { + this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments) + } + + function Ks(t) { + this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map + } + + function $s(t) { + return t._map || (t._map = R(t.categories)) + } + + function Js(t) { + return w(t) && null != t.value ? t.value : t + "" + } + + function Qs(t, e, i, n) { + var o = {}, a = t[1] - t[0], r = o.interval = Vo(a / e, !0); + null != i && r < i && (r = o.interval = i), null != n && r > n && (r = o.interval = n); + var s = o.intervalPrecision = tl(r); + return il(o.niceTickExtent = [pT(Math.ceil(t[0] / r) * r, s), pT(Math.floor(t[1] / r) * r, s)], t), o + } + + function tl(t) { + return ko(t) + 2 + } + + function el(t, e, i) { + t[e] = Math.max(Math.min(t[e], i[1]), i[0]) + } + + function il(t, e) { + !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), el(t, 0, e), el(t, 1, e), t[0] > t[1] && (t[0] = t[1]) + } + + function nl(t, e, i, n) { + var o = []; + if (!t) return o; + e[0] < i[0] && o.push(e[0]); + for (var a = i[0]; a <= i[1] && (o.push(a), (a = pT(a + t, n)) !== o[o.length - 1]);) if (o.length > 1e4) return []; + return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]), o + } + + function ol(t) { + return t.get("stack") || vT + t.seriesIndex + } + + function al(t) { + return t.dim + t.index + } + + function rl(t) { + var e = [], i = t.axis; + if ("category" === i.type) { + for (var n = i.getBandWidth(), o = 0; o < t.count; o++) e.push(r({ + bandWidth: n, + axisKey: "axis0", + stackId: vT + o + }, t)); + for (var a = ul(e), s = [], o = 0; o < t.count; o++) { + var l = a.axis0[vT + o]; + l.offsetCenter = l.offset + l.width / 2, s.push(l) + } + return s + } + } + + function sl(t, e) { + var i = []; + return e.eachSeriesByType(t, function (t) { + dl(t) && !fl(t) && i.push(t) + }), i + } + + function ll(t) { + var e = []; + return d(t, function (t) { + var i = t.getData(), n = t.coordinateSystem.getBaseAxis(), o = n.getExtent(), + a = "category" === n.type ? n.getBandWidth() : Math.abs(o[1] - o[0]) / i.count(), + r = Do(t.get("barWidth"), a), s = Do(t.get("barMaxWidth"), a), l = t.get("barGap"), + u = t.get("barCategoryGap"); + e.push({ + bandWidth: a, + barWidth: r, + barMaxWidth: s, + barGap: l, + barCategoryGap: u, + axisKey: al(n), + stackId: ol(t) + }) + }), ul(e) + } + + function ul(t) { + var e = {}; + d(t, function (t, i) { + var n = t.axisKey, o = t.bandWidth, a = e[n] || { + bandWidth: o, + remainedWidth: o, + autoWidthCount: 0, + categoryGap: "20%", + gap: "30%", + stacks: {} + }, r = a.stacks; + e[n] = a; + var s = t.stackId; + r[s] || a.autoWidthCount++, r[s] = r[s] || {width: 0, maxWidth: 0}; + var l = t.barWidth; + l && !r[s].width && (r[s].width = l, l = Math.min(a.remainedWidth, l), a.remainedWidth -= l); + var u = t.barMaxWidth; + u && (r[s].maxWidth = u); + var h = t.barGap; + null != h && (a.gap = h); + var c = t.barCategoryGap; + null != c && (a.categoryGap = c) + }); + var i = {}; + return d(e, function (t, e) { + i[e] = {}; + var n = t.stacks, o = t.bandWidth, a = Do(t.categoryGap, o), r = Do(t.gap, 1), s = t.remainedWidth, + l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); + u = Math.max(u, 0), d(n, function (t, e) { + var i = t.maxWidth; + i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) + }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); + var h, c = 0; + d(n, function (t, e) { + t.width || (t.width = u), h = t, c += t.width * (1 + r) + }), h && (c -= h.width * r); + var f = -c / 2; + d(n, function (t, n) { + i[e][n] = i[e][n] || {offset: f, width: t.width}, f += t.width * (1 + r) + }) + }), i + } + + function hl(t, e, i) { + if (t && e) { + var n = t[al(e)]; + return null != n && null != i && (n = n[ol(i)]), n + } + } + + function cl(t, e) { + var i = sl(t, e), n = ll(i), o = {}; + d(i, function (t) { + var e = t.getData(), i = t.coordinateSystem, a = i.getBaseAxis(), r = ol(t), s = n[al(a)][r], l = s.offset, + u = s.width, h = i.getOtherAxis(a), c = t.get("barMinHeight") || 0; + o[r] = o[r] || [], e.setLayout({offset: l, size: u}); + for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = Zs(e, d), g = h.isHorizontal(), m = pl(a, h, p), v = 0, y = e.count(); v < y; v++) { + var x = e.get(d, v), _ = e.get(f, v); + if (!isNaN(x)) { + var w = x >= 0 ? "p" : "n", b = m; + p && (o[r][_] || (o[r][_] = {p: m, n: m}), b = o[r][_][w]); + var S, M, I, T; + if (g) S = b, M = (D = i.dataToPoint([x, _]))[1] + l, I = D[0] - m, T = u, Math.abs(I) < c && (I = (I < 0 ? -1 : 1) * c), p && (o[r][_][w] += I); else { + var D = i.dataToPoint([_, x]); + S = D[0] + l, M = b, I = u, T = D[1] - m, Math.abs(T) < c && (T = (T <= 0 ? -1 : 1) * c), p && (o[r][_][w] += T) + } + e.setItemLayout(v, {x: S, y: M, width: I, height: T}) + } + } + }, this) + } + + function dl(t) { + return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type + } + + function fl(t) { + return t.pipelineContext && t.pipelineContext.large + } + + function pl(t, e, i) { + return l(t.getAxesOnZeroOf(), e) >= 0 || i ? e.toGlobalCoord(e.dataToCoord(0)) : e.getGlobalExtent()[0] + } + + function gl(t, e) { + return CT(t, AT(e)) + } + + function ml(t, e) { + var i, n, o, a = t.type, r = e.getMin(), s = e.getMax(), l = null != r, u = null != s, h = t.getExtent(); + "ordinal" === a ? i = e.getCategories().length : (y(n = e.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = Do(n[0], 1), n[1] = Do(n[1], 1), o = h[1] - h[0] || Math.abs(h[0])), null == r && (r = "ordinal" === a ? i ? 0 : NaN : h[0] - n[0] * o), null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : h[1] + n[1] * o), "dataMin" === r ? r = h[0] : "function" == typeof r && (r = r({ + min: h[0], + max: h[1] + })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({ + min: h[0], + max: h[1] + })), (null == r || !isFinite(r)) && (r = NaN), (null == s || !isFinite(s)) && (s = NaN), t.setBlank(I(r) || I(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (r > 0 && s > 0 && !l && (r = 0), r < 0 && s < 0 && !u && (s = 0)); + var c = e.ecModel; + if (c && "time" === a) { + var f, p = sl("bar", c); + if (d(p, function (t) { + f |= t.getBaseAxis() === e.axis + }), f) { + var g = ll(p), m = vl(r, s, e, g); + r = m.min, s = m.max + } + } + return [r, s] + } + + function vl(t, e, i, n) { + var o = i.axis.getExtent(), a = o[1] - o[0], r = hl(n, i.axis); + if (void 0 === r) return {min: t, max: e}; + var s = 1 / 0; + d(r, function (t) { + s = Math.min(t.offset, s) + }); + var l = -1 / 0; + d(r, function (t) { + l = Math.max(t.offset + t.width, l) + }), s = Math.abs(s), l = Math.abs(l); + var u = s + l, h = e - t, c = h / (1 - (s + l) / a) - h; + return e += c * (l / u), t -= c * (s / u), {min: t, max: e} + } + + function yl(t, e) { + var i = ml(t, e), n = null != e.getMin(), o = null != e.getMax(), a = e.get("splitNumber"); + "log" === t.type && (t.base = e.get("logBase")); + var r = t.type; + t.setExtent(i[0], i[1]), t.niceExtent({ + splitNumber: a, + fixMin: n, + fixMax: o, + 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) + } + + function xl(t, e) { + if (e = e || t.get("type")) switch (e) { + case"category": + return new fT(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]); + case"value": + return new mT; + default: + return (qs.getClass(e) || mT).create(t) + } + } + + function _l(t) { + var e = t.scale.getExtent(), i = e[0], n = e[1]; + return !(i > 0 && n > 0 || i < 0 && n < 0) + } + + function wl(t) { + var e = t.getLabelModel().get("formatter"), i = "category" === t.type ? t.scale.getExtent()[0] : null; + return "string" == typeof e ? e = function (t) { + return function (e) { + return t.replace("{value}", null != e ? e : "") + } + }(e) : "function" == typeof e ? function (n, o) { + return null != i && (o = n - i), e(bl(t, n), o) + } : function (e) { + return t.scale.getLabel(e) + } + } + + function bl(t, e) { + return "category" === t.type ? t.scale.getLabel(e) : e + } + + function Sl(t) { + var e = t.model, i = t.scale; + if (e.get("axisLabel.show") && !i.isBlank()) { + var n, o, a = "category" === t.type, r = i.getExtent(); + o = a ? i.count() : (n = i.getTicks()).length; + var s, l = t.getLabelModel(), u = wl(t), h = 1; + o > 40 && (h = Math.ceil(o / 40)); + for (var c = 0; c < o; c += h) { + var d = u(n ? n[c] : r[0] + c), f = Ml(l.getTextRect(d), l.get("rotate") || 0); + s ? s.union(f) : s = f + } + return s + } + } + + function Ml(t, e) { + var i = e * Math.PI / 180, n = t.plain(), o = n.width, a = n.height, r = o * Math.cos(i) + a * Math.sin(i), + s = o * Math.sin(i) + a * Math.cos(i); + return new $t(n.x, n.y, r, s) + } + + function Il(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) + } + } + + function Tl(t, e, i, n, o, a, r) { + var s = 0 === t.indexOf("empty"); + s && (t = t.substr(5, 1).toLowerCase() + t.substr(6)); + var l; + return l = 0 === t.indexOf("image://") ? zn(t.slice(8), new $t(e, i, n, o), r ? "center" : "cover") : 0 === t.indexOf("path://") ? Rn(t.slice(7), {}, new $t(e, i, n, o), r ? "center" : "cover") : new FT({ + shape: { + symbolType: t, + x: e, + y: i, + width: n, + height: o + } + }), l.__isEmptyBrush = s, l.setColor = Il, l.setColor(a), l + } + + function Dl(t, e) { + return Math.abs(t - e) < UT + } + + function Al(t, e, i) { + var n = 0, o = t[0]; + if (!o) return !1; + for (var a = 1; a < t.length; a++) { + var r = t[a]; + n += mn(o[0], o[1], r[0], r[1], e, i), o = r + } + var s = t[0]; + return Dl(o[0], s[0]) && Dl(o[1], s[1]) || (n += mn(o[0], o[1], s[0], s[1], e, i)), 0 !== n + } + + function Cl(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 + } + + function Ll(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 o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) { + var l = a[s]; + if ("Polygon" === o.type) a[s] = kl(l, r[s], e); else if ("MultiPolygon" === o.type) for (var u = 0; u < l.length; u++) { + var h = l[u]; + l[u] = kl(h, r[s][u], e) + } + } + return t.UTF8Encoding = !1, t + } + + function kl(t, e, i) { + for (var n = [], o = e[0], a = 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), o = s += o, a = l += a, n.push([s / i, l / i]) + } + return n + } + + function Pl(t) { + return "category" === t.type ? Ol(t) : zl(t) + } + + function Nl(t, e) { + return "category" === t.type ? Rl(t, e) : {ticks: t.scale.getTicks()} + } + + function Ol(t) { + var e = t.getLabelModel(), i = El(t, e); + return !e.get("show") || t.scale.isBlank() ? {labels: [], labelCategoryInterval: i.labelCategoryInterval} : i + } + + function El(t, e) { + var i = Bl(t, "labels"), n = Xl(e), o = Vl(i, n); + if (o) return o; + var a, r; + return a = x(n) ? Ul(t, n) : Zl(t, r = "auto" === n ? Wl(t) : n), Gl(i, n, { + labels: a, + labelCategoryInterval: r + }) + } + + function Rl(t, e) { + var i = Bl(t, "ticks"), n = Xl(e), o = Vl(i, n); + if (o) return o; + var a, r; + if (e.get("show") && !t.scale.isBlank() || (a = []), x(n)) a = Ul(t, n, !0); else if ("auto" === n) { + var s = El(t, t.getLabelModel()); + r = s.labelCategoryInterval, a = f(s.labels, function (t) { + return t.tickValue + }) + } else a = Zl(t, r = n, !0); + return Gl(i, n, {ticks: a, tickCategoryInterval: r}) + } + + function zl(t) { + var e = t.scale.getTicks(), i = wl(t); + return { + labels: f(e, function (e, n) { + return {formattedLabel: i(e, n), rawLabel: t.scale.getLabel(e), tickValue: e} + }) + } + } + + function Bl(t, e) { + return jT(t)[e] || (jT(t)[e] = []) + } + + function Vl(t, e) { + for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value + } + + function Gl(t, e, i) { + return t.push({key: e, value: i}), i + } + + function Wl(t) { + var e = jT(t).autoInterval; + return null != e ? e : jT(t).autoInterval = t.calculateCategoryInterval() + } + + function Fl(t) { + var e = Hl(t), i = wl(t), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, o = t.scale, a = o.getExtent(), + r = o.count(); + if (a[1] - a[0] < 1) return 0; + var s = 1; + r > 40 && (s = Math.max(1, Math.floor(r / 40))); + for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) { + var p = 0, g = 0, m = me(i(l), e.font, "center", "top"); + p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7) + } + var v = d / h, y = f / c; + isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0); + var x = Math.max(0, Math.floor(Math.min(v, y))), _ = jT(t.model), w = _.lastAutoInterval, b = _.lastTickCount; + return null != w && null != b && Math.abs(w - x) <= 1 && Math.abs(b - r) <= 1 && w > x ? x = w : (_.lastTickCount = r, _.lastAutoInterval = x), x + } + + function Hl(t) { + var e = t.getLabelModel(); + return { + axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0, + labelRotate: e.get("rotate") || 0, + font: e.getFont() + } + } + + function Zl(t, e, i) { + function n(t) { + l.push(i ? t : {formattedLabel: o(t), rawLabel: a.getLabel(t), tickValue: t}) + } + + var o = wl(t), a = t.scale, r = a.getExtent(), s = t.getLabelModel(), l = [], u = Math.max((e || 0) + 1, 1), + h = r[0], c = a.count(); + 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u)); + var d = {min: s.get("showMinLabel"), max: s.get("showMaxLabel")}; + d.min && h !== r[0] && n(r[0]); + for (var f = h; f <= r[1]; f += u) n(f); + return d.max && f !== r[1] && n(r[1]), l + } + + function Ul(t, e, i) { + var n = t.scale, o = wl(t), a = []; + return d(n.getTicks(), function (t) { + var r = n.getLabel(t); + e(t, r) && a.push(i ? t : {formattedLabel: o(t), rawLabel: r, tickValue: t}) + }), a + } + + function Xl(t) { + var e = t.get("interval"); + return null == e ? "auto" : e + } + + function jl(t, e) { + var i = (t[1] - t[0]) / e / 2; + t[0] += i, t[1] -= i + } + + function Yl(t, e, i, n, o) { + function a(t, e) { + return h ? t > e : t < e + } + + var r = e.length; + if (t.onBand && !n && r) { + var s, l = t.getExtent(); + if (1 === r) e[0].coord = l[0], s = e[1] = {coord: l[0]}; else { + var u = e[1].coord - e[0].coord; + d(e, function (t) { + t.coord -= u / 2; + var e = e || 0; + e % 2 > 0 && (t.coord -= u / (2 * (e + 1))) + }), s = {coord: e[r - 1].coord + u}, e.push(s) + } + var h = l[0] > l[1]; + a(e[0].coord, l[0]) && (o ? e[0].coord = l[0] : e.shift()), o && a(l[0], e[0].coord) && e.unshift({coord: l[0]}), a(l[1], s.coord) && (o ? s.coord = l[1] : e.pop()), o && a(s.coord, l[1]) && e.push({coord: l[1]}) + } + } + + function ql(t, e) { + var i = t.mapDimension("defaultedLabel", !0), n = i.length; + if (1 === n) return er(t, e, i[0]); + if (n) { + for (var o = [], a = 0; a < i.length; a++) { + var r = er(t, e, i[a]); + o.push(r) + } + return o.join(" ") + } + } + + function Kl(t, e, i) { + sw.call(this), this.updateData(t, e, i) + } + + function $l(t) { + return [t[0] / 2, t[1] / 2] + } + + function Jl(t, e) { + this.parent.drift(t, e) + } + + function Ql(t) { + this.group = new sw, this._symbolCtor = t || Kl + } + + function tu(t, e, i, n) { + return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(i)) && !(n.clipShape && !n.clipShape.contain(e[0], e[1])) && "none" !== t.getItemVisual(i, "symbol") + } + + function eu(t) { + return null == t || w(t) || (t = {isIgnore: t}), t || {} + } + + function iu(t) { + var e = t.hostModel; + return { + itemStyle: e.getModel("itemStyle").getItemStyle(["color"]), + hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(), + symbolRotate: e.get("symbolRotate"), + symbolOffset: e.get("symbolOffset"), + hoverAnimation: e.get("hoverAnimation"), + labelModel: e.getModel("label"), + hoverLabelModel: e.getModel("emphasis.label"), + cursorStyle: e.get("cursor") + } + } + + function nu(t, e, i) { + var n, o = t.getBaseAxis(), a = t.getOtherAxis(o), r = ou(a, i), s = o.dim, l = a.dim, u = e.mapDimension(l), + h = e.mapDimension(s), c = "x" === l || "radius" === l ? 1 : 0, d = f(t.dimensions, function (t) { + return e.mapDimension(t) + }), p = e.getCalculationInfo("stackResultDimension"); + return (n |= Zs(e, d[0])) && (d[0] = p), (n |= Zs(e, d[1])) && (d[1] = p), { + dataDimsForPoint: d, + valueStart: r, + valueAxisDim: l, + baseAxisDim: s, + stacked: !!n, + valueDim: u, + baseDim: h, + baseDataOffset: c, + stackedOverDimension: e.getCalculationInfo("stackedOverDimension") + } + } + + function ou(t, e) { + var i = 0, n = t.scale.getExtent(); + return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i + } + + function au(t, e, i, n) { + var o = NaN; + t.stacked && (o = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(o) && (o = t.valueStart); + var a = t.baseDataOffset, r = []; + return r[a] = i.get(t.baseDim, n), r[1 - a] = o, e.dataToPoint(r) + } + + function ru(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 + } + + function su(t) { + return isNaN(t[0]) || isNaN(t[1]) + } + + function lu(t, e, i, n, o, a, r, s, l, u, h) { + return "none" !== u && u ? uu.apply(this, arguments) : hu.apply(this, arguments) + } + + function uu(t, e, i, n, o, a, r, s, l, u, h) { + for (var c = 0, d = i, f = 0; f < n; f++) { + var p = e[d]; + if (d >= o || d < 0) break; + if (su(p)) { + if (h) { + d += a; + continue + } + break + } + if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]); else if (l > 0) { + var g = e[c], m = "y" === u ? 1 : 0, v = (p[m] - g[m]) * l; + uD(cD, g), cD[m] = g[m] + v, uD(dD, p), dD[m] = p[m] - v, t.bezierCurveTo(cD[0], cD[1], dD[0], dD[1], p[0], p[1]) + } else t.lineTo(p[0], p[1]); + c = d, d += a + } + return f + } + + function hu(t, e, i, n, o, a, r, s, l, u, h) { + for (var c = 0, d = i, f = 0; f < n; f++) { + var p = e[d]; + if (d >= o || d < 0) break; + if (su(p)) { + if (h) { + d += a; + continue + } + break + } + if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), uD(cD, p); else if (l > 0) { + var g = d + a, m = e[g]; + if (h) for (; m && su(e[g]);) m = e[g += a]; + var v = .5, y = e[c]; + if (!(m = e[g]) || su(m)) uD(dD, p); else { + su(m) && !h && (m = p), U(hD, m, y); + var x, _; + if ("x" === u || "y" === u) { + var w = "x" === u ? 0 : 1; + x = Math.abs(p[w] - y[w]), _ = Math.abs(p[w] - m[w]) + } else x = S_(p, y), _ = S_(p, m); + lD(dD, p, hD, -l * (1 - (v = _ / (_ + x)))) + } + rD(cD, cD, s), sD(cD, cD, r), rD(dD, dD, s), sD(dD, dD, r), t.bezierCurveTo(cD[0], cD[1], dD[0], dD[1], p[0], p[1]), lD(cD, p, hD, l * v) + } else t.lineTo(p[0], p[1]); + c = d, d += a + } + return f + } + + function cu(t, e) { + var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0]; + if (e) for (var o = 0; o < t.length; o++) { + var a = t[o]; + a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1]) + } + return {min: e ? i : n, max: e ? n : i} + } + + function du(t, e) { + if (t.length === e.length) { + for (var i = 0; i < t.length; i++) { + var n = t[i], o = e[i]; + if (n[0] !== o[0] || n[1] !== o[1]) return + } + return !0 + } + } + + function fu(t) { + return "number" == typeof t ? t : t ? .5 : 0 + } + + function pu(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 gu(t, e, i) { + if (!i.valueDim) return []; + for (var n = [], o = 0, a = e.count(); o < a; o++) n.push(au(i, t, e, o)); + return n + } + + function mu(t, e, i, n) { + var o = pu(t.getAxis("x")), a = pu(t.getAxis("y")), r = t.getBaseAxis().isHorizontal(), + s = Math.min(o[0], o[1]), l = Math.min(a[0], a[1]), u = Math.max(o[0], o[1]) - s, + h = Math.max(a[0], a[1]) - l; + if (i) s -= .5, u += .5, l -= .5, h += .5; else { + var c = n.get("lineStyle.width") || 2, d = n.get("clipOverflow") ? c / 2 : Math.max(u, h); + r ? (l -= d, h += 2 * d) : (s -= d, u += 2 * d) + } + var f = new SS({shape: {x: s, y: l, width: u, height: h}}); + return e && (f.shape[r ? "width" : "height"] = 0, po(f, {shape: {width: u, height: h}}, n)), f + } + + function vu(t, e, i, n) { + var o = t.getAngleAxis(), a = t.getRadiusAxis().getExtent().slice(); + a[0] > a[1] && a.reverse(); + var r = o.getExtent(), s = Math.PI / 180; + i && (a[0] -= .5, a[1] += .5); + var l = new vS({ + shape: { + cx: Ao(t.cx, 1), + cy: Ao(t.cy, 1), + r0: Ao(a[0], 1), + r: Ao(a[1], 1), + startAngle: -r[0] * s, + endAngle: -r[1] * s, + clockwise: o.inverse + } + }); + return e && (l.shape.endAngle = -r[0] * s, po(l, {shape: {endAngle: -r[1] * s}}, n)), l + } + + function yu(t, e, i, n) { + return "polar" === t.type ? vu(t, e, i, n) : mu(t, e, i, n) + } + + function xu(t, e, i) { + for (var n = e.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) { + var s = t[r + 1], l = t[r]; + a.push(l); + var u = []; + switch (i) { + case"end": + u[o] = s[o], u[1 - o] = l[1 - o], a.push(u); + break; + case"middle": + var h = (l[o] + s[o]) / 2, c = []; + u[o] = c[o] = h, u[1 - o] = l[1 - o], c[1 - o] = s[1 - o], a.push(u), a.push(c); + break; + default: + u[o] = l[o], u[1 - o] = s[1 - o], a.push(u) + } + } + return t[r] && a.push(t[r]), a + } + + function _u(t, e) { + var i = t.getVisual("visualMeta"); + if (i && i.length && t.count() && "cartesian2d" === e.type) { + for (var n, o, a = i.length - 1; a >= 0; a--) { + var r = i[a].dimension, s = t.dimensions[r], l = t.getDimensionInfo(s); + if ("x" === (n = l && l.coordDim) || "y" === n) { + o = i[a]; + break + } + } + if (o) { + var u = e.getAxis(n), h = f(o.stops, function (t) { + return {coord: u.toGlobalCoord(u.dataToCoord(t.value)), color: t.color} + }), c = h.length, p = o.outerColors.slice(); + c && h[0].coord > h[c - 1].coord && (h.reverse(), p.reverse()); + var g = h[0].coord - 10, m = h[c - 1].coord + 10, v = m - g; + if (v < .001) return "transparent"; + d(h, function (t) { + t.offset = (t.coord - g) / v + }), h.push({ + offset: c ? h[c - 1].offset : .5, + color: p[1] || "transparent" + }), h.unshift({offset: c ? h[0].offset : .5, color: p[0] || "transparent"}); + var y = new LS(0, 0, 0, 0, h, !0); + return y[n] = g, y[n + "2"] = m, y + } + } + } + + function wu(t, e, i) { + var n = t.get("showAllSymbol"), o = "auto" === n; + if (!n || o) { + var a = i.getAxesByScale("ordinal")[0]; + if (a && (!o || !bu(a, e))) { + var r = e.mapDimension(a.dim), s = {}; + return d(a.getViewLabels(), function (t) { + s[t.tickValue] = 1 + }), function (t) { + return !s.hasOwnProperty(e.get(r, t)) + } + } + } + } + + function bu(t, e) { + var i = t.getExtent(), n = Math.abs(i[1] - i[0]) / t.scale.count(); + isNaN(n) && (n = 0); + for (var o = e.count(), a = Math.max(1, Math.round(o / 5)), r = 0; r < o; r += a) if (1.5 * Kl.getSymbolSize(e, r)[t.isHorizontal() ? 1 : 0] > n) return !1; + return !0 + } + + function Su(t) { + return this._axes[t] + } + + function Mu(t) { + xD.call(this, t) + } + + function Iu(t, e) { + return e.type || (e.data ? "category" : "value") + } + + function Tu(t, e, i) { + return t.getCoordSysModel() === e + } + + function Du(t, e, i) { + this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t + } + + function Au(t, e, i) { + i.getAxesOnZeroOf = function () { + return n ? [n] : [] + }; + var n, o = t[e], a = i.model, r = a.get("axisLine.onZero"), s = a.get("axisLine.onZeroAxisIndex"); + if (r) if (null == s) { + for (var l in o) if (o.hasOwnProperty(l) && Cu(o[l])) { + n = o[l]; + break + } + } else Cu(o[s]) && (n = o[s]) + } + + function Cu(t) { + return t && "category" !== t.type && "time" !== t.type && _l(t) + } + + function Lu(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 + } + } + + function ku(t, e) { + return f(AD, function (e) { + return t.getReferringComponents(e)[0] + }) + } + + function Pu(t) { + return "cartesian2d" === t.get("coordinateSystem") + } + + function Nu(t) { + var e = {componentType: t.mainType}; + return e[t.mainType + "Index"] = t.componentIndex, e + } + + function Ou(t, e, i, n) { + var o, a, r = Oo(i - t.rotation), s = n[0] > n[1], l = "start" === e && !s || "start" !== e && s; + return Eo(r - CD / 2) ? (a = l ? "bottom" : "top", o = "center") : Eo(r - 1.5 * CD) ? (a = l ? "top" : "bottom", o = "center") : (a = "middle", o = r < 1.5 * CD && r > CD / 2 ? l ? "left" : "right" : l ? "right" : "left"), { + rotation: r, + textAlign: o, + textVerticalAlign: a + } + } + + function Eu(t) { + var e = t.get("tooltip"); + return t.get("silent") || !(t.get("triggerEvent") || e && e.show) + } + + function Ru(t, e, i) { + var n = t.get("axisLabel.showMinLabel"), o = t.get("axisLabel.showMaxLabel"); + e = e || [], i = i || []; + var a = e[0], r = e[1], s = e[e.length - 1], l = e[e.length - 2], u = i[0], h = i[1], c = i[i.length - 1], + d = i[i.length - 2]; + !1 === n ? (zu(a), zu(u)) : Bu(a, r) && (n ? (zu(r), zu(h)) : (zu(a), zu(u))), !1 === o ? (zu(s), zu(c)) : Bu(l, s) && (o ? (zu(l), zu(d)) : (zu(s), zu(c))) + } + + function zu(t) { + t && (t.ignore = !0) + } + + function Bu(t, e, i) { + var n = t && t.getBoundingRect().clone(), o = e && e.getBoundingRect().clone(); + if (n && o) { + var a = lt([]); + return dt(a, a, -t.rotation), n.applyTransform(ht([], a, t.getLocalTransform())), o.applyTransform(ht([], a, e.getLocalTransform())), n.intersect(o) + } + } + + function Vu(t) { + return "middle" === t || "center" === t + } + + function Gu(t, e, i) { + var n = e.axis; + if (e.get("axisTick.show") && !n.scale.isBlank()) { + for (var o = e.getModel("axisTick"), a = o.getModel("lineStyle"), s = o.get("length"), l = n.getTicksCoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) { + var p = l[f].coord; + u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * s, c && (Q(u, u, c), Q(h, h, c)); + var g = new MS(Gn({ + anid: "tick_" + l[f].tickValue, + shape: {x1: u[0], y1: u[1], x2: h[0], y2: h[1]}, + style: r(a.getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")}), + z2: 2, + silent: !0 + })); + t.group.add(g), d.push(g) + } + return d + } + } + + function Wu(t, e, i) { + var n = e.axis; + if (T(i.axisLabelShow, e.get("axisLabel.show")) && !n.scale.isBlank()) { + var o = e.getModel("axisLabel"), a = o.get("margin"), r = n.getViewLabels(), + s = (T(i.labelRotate, o.get("rotate")) || 0) * CD / 180, l = PD(i.rotation, s, i.labelDirection), + u = e.getCategories(!0), h = [], c = Eu(e), f = e.get("triggerEvent"); + return d(r, function (r, s) { + var d = r.tickValue, p = r.formattedLabel, g = r.rawLabel, m = o; + u && u[d] && u[d].textStyle && (m = new wo(u[d].textStyle, o, e.ecModel)); + var v = m.getTextColor() || e.get("axisLine.lineStyle.color"), + y = [n.dataToCoord(d), i.labelOffset + i.labelDirection * a], + x = new fS({anid: "label_" + d, position: y, rotation: l.rotation, silent: c, z2: 10}); + no(x.style, m, { + text: p, + textAlign: m.getShallow("align", !0) || l.textAlign, + textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || l.textVerticalAlign, + textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? d + "" : d, s) : v + }), f && (x.eventData = Nu(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x), x.updateTransform(), h.push(x), t.group.add(x), x.decomposeTransform() + }), h + } + } + + function Fu(t, e) { + var i = {axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {}}; + return Hu(i, t, e), i.seriesInvolved && Uu(i, t), i + } + + function Hu(t, e, i) { + var n = e.getComponent("tooltip"), o = e.getComponent("axisPointer"), a = o.get("link", !0) || [], r = []; + ND(i.getCoordinateSystems(), function (i) { + function s(n, s, l) { + var c = l.model.getModel("axisPointer", o), d = c.get("show"); + if (d && ("auto" !== d || n || $u(c))) { + null == s && (s = c.get("triggerTooltip")); + var f = (c = n ? Zu(l, h, o, e, n, s) : c).get("snap"), p = Ju(l.model), + g = s || f || "category" === l.type, m = t.axesInfo[p] = { + key: p, + axis: l, + coordSys: i, + axisPointerModel: c, + triggerTooltip: s, + involveSeries: g, + snap: f, + useHandle: $u(c), + seriesModels: [] + }; + u[p] = m, t.seriesInvolved |= g; + var v = Xu(a, l); + if (null != v) { + var y = r[v] || (r[v] = {axesInfo: {}}); + y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y + } + } + } + + if (i.axisPointerEnabled) { + var l = Ju(i.model), u = t.coordSysAxesInfo[l] = {}; + t.coordSysMap[l] = i; + var h = i.model.getModel("tooltip", n); + if (ND(i.getAxes(), OD(s, !1, null)), i.getTooltipAxes && n && h.get("show")) { + var c = "axis" === h.get("trigger"), d = "cross" === h.get("axisPointer.type"), + f = i.getTooltipAxes(h.get("axisPointer.axis")); + (c || d) && ND(f.baseAxes, OD(s, !d || "cross", c)), d && ND(f.otherAxes, OD(s, "cross", !1)) + } + } + }) + } + + function Zu(t, e, n, o, a, s) { + var l = e.getModel("axisPointer"), u = {}; + ND(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) { + u[t] = i(l.get(t)) + }), u.snap = "category" !== t.type && !!s, "cross" === l.get("type") && (u.type = "line"); + var h = u.label || (u.label = {}); + if (null == h.show && (h.show = !1), "cross" === a) { + var c = l.get("label.show"); + if (h.show = null == c || c, !s) { + var d = u.lineStyle = l.get("crossStyle"); + d && r(h, d.textStyle) + } + } + return t.model.getModel("axisPointer", new wo(u, n, o)) + } + + function Uu(t, e) { + e.eachSeries(function (e) { + var i = e.coordinateSystem, n = e.get("tooltip.trigger", !0), o = e.get("tooltip.show", !0); + i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axisPointer.show", !0) && ND(t.coordSysAxesInfo[Ju(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) + } + + function Xu(t, e) { + for (var i = e.model, n = e.dim, o = 0; o < t.length; o++) { + var a = t[o] || {}; + if (ju(a[n + "AxisId"], i.id) || ju(a[n + "AxisIndex"], i.componentIndex) || ju(a[n + "AxisName"], i.name)) return o + } + } + + function ju(t, e) { + return "all" === t || y(t) && l(t, e) >= 0 || t === e + } + + function Yu(t) { + var e = qu(t); + if (e) { + var i = e.axisPointerModel, n = e.axis.scale, o = i.option, a = i.get("status"), r = i.get("value"); + null != r && (r = n.parse(r)); + var s = $u(i); + null == a && (o.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]), o.value = r, s && (o.status = e.axis.scale.isBlank() ? "hide" : "show") + } + } + + function qu(t) { + var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo; + return e && e.axesInfo[Ju(t)] + } + + function Ku(t) { + var e = qu(t); + return e && e.axisPointerModel + } + + function $u(t) { + return !!t.get("handle.show") + } + + function Ju(t) { + return t.type + "||" + t.id + } + + function Qu(t, e, i, n, o, a) { + var r = ED.getAxisPointerClass(t.axisPointerClass); + if (r) { + var s = Ku(e); + s ? (t._axisPointer || (t._axisPointer = new r)).render(e, s, n, a) : th(t, n) + } + } + + function th(t, e, i) { + var n = t._axisPointer; + n && n.dispose(e, i), t._axisPointer = null + } + + function eh(t, e, i) { + i = i || {}; + var n = t.coordinateSystem, o = e.axis, a = {}, r = o.getAxesOnZeroOf()[0], s = o.position, + l = r ? "onZero" : s, u = o.dim, h = n.getRect(), c = [h.x, h.x + h.width, h.y, h.y + h.height], + d = {left: 0, right: 1, top: 0, bottom: 1, onZero: 2}, f = e.get("offset") || 0, + p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f]; + if (r) { + var g = r.toGlobalCoord(r.dataToCoord(0)); + p[d.onZero] = Math.max(Math.min(g, p[1]), p[0]) + } + a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1); + var m = {top: -1, bottom: 1, left: -1, right: 1}; + a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = r ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), T(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection); + var v = e.get("axisLabel.rotate"); + return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a + } + + function ih(t, e, i, n, o, a, r) { + io(t, e, i.getModel("label"), i.getModel("emphasis.label"), { + labelFetcher: o, + labelDataIndex: a, + defaultText: ql(o.getData(), a), + isRectText: !0, + autoColor: n + }), nh(t), nh(e) + } + + function nh(t, e) { + "outside" === t.textPosition && (t.textPosition = e) + } + + function oh(t, e, i) { + i.style.text = null, fo(i, {shape: {width: 0}}, e, t, function () { + i.parent && i.parent.remove(i) + }) + } + + function ah(t, e, i) { + i.style.text = null, fo(i, {shape: {r: i.shape.r0}}, e, t, function () { + i.parent && i.parent.remove(i) + }) + } + + function rh(t, e, i, n, o, a, s, l) { + var u = e.getItemVisual(i, "color"), h = e.getItemVisual(i, "opacity"), c = n.getModel("itemStyle"), + d = n.getModel("emphasis.itemStyle").getBarItemStyle(); + l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(r({fill: u, opacity: h}, c.getBarItemStyle())); + var f = n.getShallow("cursor"); + f && t.attr("cursor", f); + var p = s ? o.height > 0 ? "bottom" : "top" : o.width > 0 ? "left" : "right"; + l || ih(t.style, d, n, u, a, i, p), eo(t, d) + } + + function sh(t, e) { + var i = t.get(HD) || 0; + return Math.min(i, Math.abs(e.width), Math.abs(e.height)) + } + + function lh(t, e, i) { + var n = t.getData(), o = [], a = n.getLayout("valueAxisHorizontal") ? 1 : 0; + o[1 - a] = n.getLayout("valueAxisStart"); + var r = new XD({shape: {points: n.getLayout("largePoints")}, incremental: !!i, __startPoint: o, __valueIdx: a}); + e.add(r), uh(r, t, n) + } + + function uh(t, e, i) { + var n = i.getVisual("borderColor") || i.getVisual("color"), + o = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]); + t.useStyle(o), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth") + } + + function hh(t, e, i, n) { + var o = e.getData(), a = this.dataIndex, r = o.getName(a), s = e.get("selectedOffset"); + n.dispatchAction({type: "pieToggleSelect", from: t, name: r, seriesId: e.id}), o.each(function (t) { + ch(o.getItemGraphicEl(t), o.getItemLayout(t), e.isSelected(o.getName(t)), s, i) + }) + } + + function ch(t, e, i, n, o) { + var a = (e.startAngle + e.endAngle) / 2, r = Math.cos(a), s = Math.sin(a), l = i ? n : 0, u = [r * l, s * l]; + o ? t.animate().when(200, {position: u}).start("bounceOut") : t.attr("position", u) + } + + function dh(t, e) { + function i() { + a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore + } + + function n() { + a.ignore = a.normalIgnore, r.ignore = r.normalIgnore + } + + sw.call(this); + var o = new vS({z2: 2}), a = new bS, r = new fS; + this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) + } + + function fh(t, e, i, n, o, a, r) { + function s(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 l(t, e, i, n, o, a) { + for (var r = e ? Number.MAX_VALUE : 0, s = 0, l = t.length; s < l; s++) if ("center" !== t[s].position) { + var u = Math.abs(t[s].y - n), h = t[s].len, c = t[s].len2, + d = u < o + h ? Math.sqrt((o + h + c) * (o + h + c) - u * u) : Math.abs(t[s].x - i); + e && d >= r && (d = r - 10), !e && d <= r && (d = r + 10), t[s].x = i + d * a, r = d + } + } + + t.sort(function (t, e) { + return t.y - e.y + }); + for (var u, h = 0, c = t.length, d = [], f = [], p = 0; p < c; p++) (u = t[p].y - h) < 0 && function (e, i, n, o) { + for (var a = e; a < i; a++) if (t[a].y += n, a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height) return void s(a, n / 2); + s(i - 1, n / 2) + }(p, c, -u), h = t[p].y + t[p].height; + r - h < 0 && s(c - 1, h - r); + for (p = 0; p < c; p++) t[p].y >= i ? f.push(t[p]) : d.push(t[p]); + l(d, !1, e, i, n, o), l(f, !0, e, i, n, o) + } + + function ph(t, e, i, n, o, a) { + for (var r = [], s = [], l = 0; l < t.length; l++) t[l].x < e ? r.push(t[l]) : s.push(t[l]); + fh(s, e, i, n, 1, o, a), fh(r, e, i, n, -1, o, a); + for (l = 0; l < t.length; l++) { + var u = t[l].linePoints; + if (u) { + var h = u[1][0] - u[2][0]; + t[l].x < e ? u[2][0] = t[l].x + 3 : u[2][0] = t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h + } + } + } + + function gh() { + this.group = new sw + } + + function mh(t, e, i) { + qT.call(this, t, e, i), this.type = "value", this.angle = 0, this.name = "", this.model + } + + function vh(t, e, i) { + this._model = t, this.dimensions = [], this._indicatorAxes = f(t.getIndicatorModels(), function (t, e) { + var i = "indicator_" + e, n = new mh(i, new mT); + 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 + } + + function yh(t, e) { + return r({show: e}, t) + } + + function xh(t) { + return y(t) || (t = [+t, +t]), t + } + + function _h() { + E_.call(this) + } + + function wh(t) { + this.name = t, this.zoomLimit, E_.call(this), this._roamTransformable = new _h, this._rawTransformable = new _h, this._center, this._zoom + } + + function bh(t, e, i, n) { + var o = i.seriesModel, a = o ? o.coordinateSystem : null; + return a === this ? a[t](n) : null + } + + function Sh(t, e, i, n, o) { + wh.call(this, t), this.map = e, this._nameCoordMap = R(), this.loadGeoJson(i, n, o) + } + + function Mh(t, e, i, n) { + var o = i.geoModel, a = i.seriesModel, + r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null; + return r === this ? r[t](n) : null + } + + function Ih(t, e) { + var i = t.get("boundingCoords"); + if (null != i) { + var n = i[0], o = i[1]; + isNaN(n[0]) || isNaN(n[1]) || isNaN(o[0]) || isNaN(o[1]) || this.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1]) + } + var a, r = this.getBoundingRect(), s = t.get("layoutCenter"), l = t.get("layoutSize"), u = e.getWidth(), + h = e.getHeight(), c = t.get("aspectScale") || .75, d = r.width / r.height * c, f = !1; + s && l && (s = [Do(s[0], u), Do(s[1], h)], l = Do(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (f = !0)); + if (f) { + var p = {}; + d > 1 ? (p.width = l, p.height = l / d) : (p.height = l, p.width = l * d), p.y = s[1] - p.height / 2, p.x = s[0] - p.width / 2 + } else (a = t.getBoxLayoutParams()).aspect = d, p = Qo(a, {width: u, height: h}); + this.setViewRect(p.x, p.y, p.width, p.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom")) + } + + function Th(t, e) { + d(e.get("geoCoord"), function (e, i) { + t.addGeoCoord(i, e) + }) + } + + function Dh(t, e, i) { + Lh(t)[e] = i + } + + function Ah(t, e, i) { + var n = Lh(t); + n[e] === i && (n[e] = null) + } + + function Ch(t, e) { + return !!Lh(t)[e] + } + + function Lh(t) { + return t[xA] || (t[xA] = {}) + } + + function kh(t) { + this.pointerChecker, this._zr = t, this._opt = {}; + var e = m, n = e(Ph, this), o = e(Nh, this), a = e(Oh, this), s = e(Eh, this), l = e(Rh, this); + D_.call(this), this.setPointerChecker = function (t) { + this.pointerChecker = t + }, this.enable = function (e, u) { + this.disable(), this._opt = r(i(u) || {}, { + zoomOnMouseWheel: !0, + moveOnMouseMove: !0, + preventDefaultMouseMove: !0 + }), null == e && (e = !0), !0 !== e && "move" !== e && "pan" !== e || (t.on("mousedown", n), t.on("mousemove", o), t.on("mouseup", a)), !0 !== e && "scale" !== e && "zoom" !== e || (t.on("mousewheel", s), t.on("pinch", l)) + }, this.disable = function () { + t.off("mousedown", n), t.off("mousemove", o), t.off("mouseup", a), t.off("mousewheel", s), t.off("pinch", l) + }, this.dispose = this.disable, this.isDragging = function () { + return this._dragging + }, this.isPinching = function () { + return this._pinching + } + } + + function Ph(t) { + if (!(ci(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 Nh(t) { + if (!ci(t) && Bh(this, "moveOnMouseMove", t) && this._dragging && "pinch" !== t.gestureEvent && !Ch(this._zr, "globalPan")) { + var e = t.offsetX, i = t.offsetY, n = this._x, o = this._y, a = e - n, r = i - o; + this._x = e, this._y = i, this._opt.preventDefaultMouseMove && zw(t.event), this.trigger("pan", a, r, n, o, e, i) + } + } + + function Oh(t) { + ci(t) || (this._dragging = !1) + } + + function Eh(t) { + if (Bh(this, "zoomOnMouseWheel", t) && 0 !== t.wheelDelta) { + var e = t.wheelDelta > 0 ? 1.1 : 1 / 1.1; + zh.call(this, t, e, t.offsetX, t.offsetY) + } + } + + function Rh(t) { + if (!Ch(this._zr, "globalPan")) { + var e = t.pinchScale > 1 ? 1.1 : 1 / 1.1; + zh.call(this, t, e, t.pinchX, t.pinchY) + } + } + + function zh(t, e, i, n) { + this.pointerChecker && this.pointerChecker(t, i, n) && (zw(t.event), this.trigger("zoom", e, i, n)) + } + + function Bh(t, e, i) { + var n = t._opt[e]; + return n && (!_(n) || i.event[n + "Key"]) + } + + function Vh(t, e, i) { + var n = t.target, o = n.position; + o[0] += e, o[1] += i, n.dirty() + } + + function Gh(t, e, i, n) { + var o = t.target, a = t.zoomLimit, r = o.position, s = o.scale, l = t.zoom = t.zoom || 1; + if (l *= e, a) { + var u = a.min || 0, h = a.max || 1 / 0; + l = Math.max(Math.min(h, l), u) + } + 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, o.dirty() + } + + function Wh(t, e, i) { + var n = e.getComponentByElement(t.topTarget), o = n && n.coordinateSystem; + return n && n !== i && !_A[n.mainType] && o && o.model !== i + } + + function Fh(t, e) { + var i = t.getItemStyle(), n = t.get("areaColor"); + return null != n && (i.fill = n), i + } + + function Hh(t, e, i, n, o) { + i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function () { + t._mouseDownFlag = !0 + }), i.on("click", function (a) { + if (t._mouseDownFlag) { + t._mouseDownFlag = !1; + for (var r = a.target; !r.__regions;) r = r.parent; + if (r) { + var s = { + type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect", + batch: f(r.__regions, function (t) { + return {name: t.name, from: o.uid} + }) + }; + s[e.mainType + "Id"] = e.id, n.dispatchAction(s), Zh(e, i) + } + } + })) + } + + function Zh(t, e) { + e.eachChild(function (e) { + d(e.__regions, function (i) { + e.trigger(t.isSelected(i.name) ? "emphasis" : "normal") + }) + }) + } + + function Uh(t, e) { + var i = new sw; + this._controller = new kh(t.getZr()), this._controllerHost = {target: e ? i : null}, this.group = i, this._updateGroup = e, this._mouseDownFlag + } + + function Xh(t, e, i) { + var n = t.getZoom(), o = t.getCenter(), a = e.zoom, r = t.dataToPoint(o); + if (null != e.dx && null != e.dy) { + r[0] -= e.dx, r[1] -= e.dy; + o = t.pointToData(r); + t.setCenter(o) + } + if (null != a) { + if (i) { + var s = i.min || 0, l = i.max || 1 / 0; + a = Math.max(Math.min(n * a, l), s) / n + } + t.scale[0] *= a, t.scale[1] *= a; + var u = t.position, h = (e.originX - u[0]) * (a - 1), c = (e.originY - u[1]) * (a - 1); + u[0] -= h, u[1] -= c, t.updateTransform(); + o = t.pointToData(r); + t.setCenter(o), t.setZoom(a * n) + } + return {center: t.getCenter(), zoom: t.getZoom()} + } + + function jh(t, e) { + var i = {}; + return d(t, function (t) { + t.each(t.mapDimension("value"), function (e, n) { + var o = "ec-" + t.getName(n); + i[o] = i[o] || [], isNaN(e) || i[o].push(e) + }) + }), t[0].map(t[0].mapDimension("value"), function (n, o) { + for (var a = "ec-" + t[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; h < u; h++) s = Math.min(s, i[a][h]), l = Math.max(l, i[a][h]), r += i[a][h]; + var c; + return c = "min" === e ? s : "max" === e ? l : "average" === e ? r / u : r, 0 === u ? NaN : c + }) + } + + function Yh(t) { + var e = t.mainData, i = t.datas; + i || (i = {main: e}, t.datasAttr = {main: "data"}), t.datas = t.mainData = null, tc(e, i, t), wA(i, function (i) { + wA(e.TRANSFERABLE_METHODS, function (e) { + i.wrapMethod(e, v(qh, t)) + }) + }), e.wrapMethod("cloneShallow", v($h, t)), wA(e.CHANGABLE_METHODS, function (i) { + e.wrapMethod(i, v(Kh, t)) + }), k(i[e.dataType] === e) + } + + function qh(t, e) { + if (Qh(this)) { + var i = a({}, this[bA]); + i[this.dataType] = e, tc(e, i, t) + } else ec(e, this.dataType, this[SA], t); + return e + } + + function Kh(t, e) { + return t.struct && t.struct.update(this), e + } + + function $h(t, e) { + return wA(e[bA], function (i, n) { + i !== e && ec(i.cloneShallow(), n, e, t) + }), e + } + + function Jh(t) { + var e = this[SA]; + return null == t || null == e ? e : e[bA][t] + } + + function Qh(t) { + return t[SA] === t + } + + function tc(t, e, i) { + t[bA] = {}, wA(e, function (e, n) { + ec(e, n, t, i) + }) + } + + function ec(t, e, i, n) { + i[bA][e] = t, t[SA] = i, t.dataType = e, n.struct && (t[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = t), t.getLinkedData = Jh + } + + function ic(t, e, i) { + this.root, this.data, this._nodes = [], this.hostModel = t, this.levelModels = f(e || [], function (e) { + return new wo(e, t, t.ecModel) + }), this.leavesModel = new wo(i || {}, t, t.ecModel) + } + + function nc(t, e) { + var i = e.children; + t.parentNode !== e && (i.push(t), t.parentNode = e) + } + + function oc(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 o = i.length - 1; o >= 0; o--) { + var a = i[o]; + a.hierNode = { + defaultAncestor: null, + ancestor: a, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: o, + thread: null + }, n.push(a) + } + } + + function ac(t, e) { + var i = t.isExpand ? t.children : [], n = t.parentNode.children, o = t.hierNode.i ? n[t.hierNode.i - 1] : null; + if (i.length) { + hc(t); + var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2; + o ? (t.hierNode.prelim = o.hierNode.prelim + e(t, o), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a + } else o && (t.hierNode.prelim = o.hierNode.prelim + e(t, o)); + t.parentNode.hierNode.defaultAncestor = cc(t, o, t.parentNode.hierNode.defaultAncestor || n[0], e) + } + + function rc(t) { + var e = t.hierNode.prelim + t.parentNode.hierNode.modifier; + t.setLayout({x: e}, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier + } + + function sc(t) { + return arguments.length ? t : mc + } + + function lc(t, e) { + var i = {}; + return t -= Math.PI / 2, i.x = e * Math.cos(t), i.y = e * Math.sin(t), i + } + + function uc(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function hc(t) { + for (var e = t.children, i = e.length, n = 0, o = 0; --i >= 0;) { + var a = e[i]; + a.hierNode.prelim += n, a.hierNode.modifier += n, o += a.hierNode.change, n += a.hierNode.shift + o + } + } + + function cc(t, e, i, n) { + if (e) { + for (var o = t, a = t, r = a.parentNode.children[0], s = e, l = o.hierNode.modifier, u = a.hierNode.modifier, h = r.hierNode.modifier, c = s.hierNode.modifier; s = dc(s), a = fc(a), s && a;) { + o = dc(o), r = fc(r), o.hierNode.ancestor = t; + var d = s.hierNode.prelim + c - a.hierNode.prelim - u + n(s, a); + d > 0 && (gc(pc(s, t, i), t, d), u += d, l += d), c += s.hierNode.modifier, u += a.hierNode.modifier, l += o.hierNode.modifier, h += r.hierNode.modifier + } + s && !dc(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), a && !fc(r) && (r.hierNode.thread = a, r.hierNode.modifier += u - h, i = t) + } + return i + } + + function dc(t) { + var e = t.children; + return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread + } + + function fc(t) { + var e = t.children; + return e.length && t.isExpand ? e[0] : t.hierNode.thread + } + + function pc(t, e, i) { + return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : i + } + + function gc(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 mc(t, e) { + return t.parentNode === e.parentNode ? 1 : 2 + } + + function vc(t, e) { + var i = t.getItemLayout(e); + return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== t.getItemVisual(e, "symbol") + } + + function yc(t, e, i) { + return i.itemModel = e, i.itemStyle = e.getModel("itemStyle").getItemStyle(), i.hoverItemStyle = e.getModel("emphasis.itemStyle").getItemStyle(), i.lineStyle = e.getModel("lineStyle").getLineStyle(), i.labelModel = e.getModel("label"), i.hoverLabelModel = e.getModel("emphasis.label"), !1 === t.isExpand && 0 !== t.children.length ? i.symbolInnerColor = i.itemStyle.fill : i.symbolInnerColor = "#fff", i + } + + function xc(t, e, i, n, o, a) { + var s = !i, l = t.tree.getNodeByDataIndex(e), a = yc(l, l.getModel(), a), u = t.tree.root, + h = l.parentNode === u ? l : l.parentNode || l, c = t.getItemGraphicEl(h.dataIndex), d = h.getLayout(), + f = c ? {x: c.position[0], y: c.position[1], rawX: c.__radialOldRawX, rawY: c.__radialOldRawY} : d, + p = l.getLayout(); + s ? (i = new Kl(t, e, a)).attr("position", [f.x, f.y]) : i.updateData(t, e, a), i.__radialOldRawX = i.__radialRawX, i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), t.setItemGraphicEl(e, i), fo(i, {position: [p.x, p.y]}, o); + var g = i.getSymbolPath(); + if ("radial" === a.layout) { + var m, v, y = u.children[0], x = y.getLayout(), _ = y.children.length; + if (p.x === x.x && !0 === l.isExpand) { + var w = {}; + w.x = (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2, w.y = (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2, (m = Math.atan2(w.y - x.y, w.x - x.x)) < 0 && (m = 2 * Math.PI + m), (v = w.x < x.x) && (m -= Math.PI) + } else (m = Math.atan2(p.y - x.y, p.x - x.x)) < 0 && (m = 2 * Math.PI + m), 0 === l.children.length || 0 !== l.children.length && !1 === l.isExpand ? (v = p.x < x.x) && (m -= Math.PI) : (v = p.x > x.x) || (m -= Math.PI); + var b = v ? "left" : "right"; + g.setStyle({textPosition: b, textRotation: -m, textOrigin: "center", verticalAlign: "middle"}) + } + if (l.parentNode && l.parentNode !== u) { + var S = i.__edge; + S || (S = i.__edge = new TS({ + shape: wc(a, f, f), + style: r({opacity: 0}, a.lineStyle) + })), fo(S, {shape: wc(a, d, p), style: {opacity: 1}}, o), n.add(S) + } + } + + function _c(t, e, i, n, o, a) { + for (var r, s = t.tree.getNodeByDataIndex(e), l = t.tree.root, a = yc(s, s.getModel(), a), u = s.parentNode === l ? s : s.parentNode || s; null == (r = u.getLayout());) u = u.parentNode === l ? u : u.parentNode || u; + fo(i, {position: [r.x + 1, r.y + 1]}, o, function () { + n.remove(i), t.setItemGraphicEl(e, null) + }), i.fadeOut(null, {keepLabel: !0}); + var h = i.__edge; + h && fo(h, {shape: wc(a, r, r), style: {opacity: 0}}, o, function () { + n.remove(h) + }) + } + + function wc(t, e, i) { + var n, o, a, r, s = t.orient; + if ("radial" === t.layout) { + var l = e.rawX, u = e.rawY, h = i.rawX, c = i.rawY, d = lc(l, u), f = lc(l, u + (c - u) * t.curvature), + p = lc(h, c + (u - c) * t.curvature), g = lc(h, c); + return {x1: d.x, y1: d.y, x2: g.x, y2: g.y, cpx1: f.x, cpy1: f.y, cpx2: p.x, cpy2: p.y} + } + var l = e.x, u = e.y, h = i.x, c = i.y; + return "LR" !== s && "RL" !== s || (n = l + (h - l) * t.curvature, o = u, a = h + (l - h) * t.curvature, r = c), "TB" !== s && "BT" !== s || (n = l, o = u + (c - u) * t.curvature, a = h, r = c + (u - c) * t.curvature), { + x1: l, + y1: u, + x2: h, + y2: c, + cpx1: n, + cpy1: o, + cpx2: a, + cpy2: r + } + } + + function bc(t, e, i) { + for (var n, o = [t], a = []; n = o.pop();) if (a.push(n), n.isExpand) { + var r = n.children; + if (r.length) for (var s = 0; s < r.length; s++) o.push(r[s]) + } + for (; n = a.pop();) e(n, i) + } + + function Sc(t, e) { + for (var i, n = [t]; i = n.pop();) if (e(i), i.isExpand) { + var o = i.children; + if (o.length) for (var a = o.length - 1; a >= 0; a--) n.push(o[a]) + } + } + + function Mc(t, e) { + var i = uc(t, e); + t.layoutInfo = i; + var n = t.get("layout"), o = 0, a = 0, r = null; + "radial" === n ? (o = 2 * Math.PI, a = Math.min(i.height, i.width) / 2, r = sc(function (t, e) { + return (t.parentNode === e.parentNode ? 1 : 2) / t.depth + })) : (o = i.width, a = i.height, r = sc()); + var s = t.getData().tree.root, l = s.children[0]; + if (l) { + oc(s), bc(l, ac, r), s.hierNode.modifier = -l.hierNode.prelim, Sc(l, rc); + var u = l, h = l, c = l; + Sc(l, function (t) { + var e = t.getLayout().x; + e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t) + }); + var d = u === h ? 1 : r(u, h) / 2, f = d - u.getLayout().x, p = 0, g = 0, m = 0, v = 0; + if ("radial" === n) p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Sc(l, function (t) { + m = (t.getLayout().x + f) * p, v = (t.depth - 1) * g; + var e = lc(m, v); + t.setLayout({x: e.x, y: e.y, rawX: m, rawY: v}, !0) + }); else { + var y = t.getOrient(); + "RL" === y || "LR" === y ? (g = a / (h.getLayout().x + d + f), p = o / (c.depth - 1 || 1), Sc(l, function (t) { + v = (t.getLayout().x + f) * g, m = "LR" === y ? (t.depth - 1) * p : o - (t.depth - 1) * p, t.setLayout({ + x: m, + y: v + }, !0) + })) : "TB" !== y && "BT" !== y || (p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Sc(l, function (t) { + m = (t.getLayout().x + f) * p, v = "TB" === y ? (t.depth - 1) * g : a - (t.depth - 1) * g, t.setLayout({ + x: m, + y: v + }, !0) + })) + } + } + } + + function Ic(t, e, i) { + if (t && l(e, t.type) >= 0) { + var n = i.getData().tree.root, o = t.targetNode; + if (o && n.contains(o)) return {node: o}; + var a = t.targetNodeId; + if (null != a && (o = n.getNodeById(a))) return {node: o} + } + } + + function Tc(t) { + for (var e = []; t;) (t = t.parentNode) && e.push(t); + return e.reverse() + } + + function Dc(t, e) { + return l(Tc(t), e) >= 0 + } + + function Ac(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 + } + + function Cc(t) { + var e = 0; + d(t.children, function (t) { + Cc(t); + var i = t.value; + y(i) && (i = i[0]), e += i + }); + var i = t.value; + y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i + } + + function Lc(t, e) { + var i = e.get("color"); + if (i) { + var n; + return d(t = t || [], function (t) { + var e = new wo(t), i = e.get("color"); + (e.get("itemStyle.color") || i && "none" !== i) && (n = !0) + }), n || ((t[0] || (t[0] = {})).color = i.slice()), t + } + } + + function kc(t) { + this.group = new sw, t.add(this.group) + } + + function Pc(t, e, i, n, o, a) { + var r = [[o ? t : t - IA, e], [t + i, e], [t + i, e + n], [o ? t : t - IA, e + n]]; + return !a && r.splice(2, 0, [t + i + IA, e + n / 2]), !o && r.push([t, e + n / 2]), r + } + + function Nc(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 && Ac(i, e) + } + } + + function Oc() { + var t, e = [], i = {}; + return { + add: function (t, n, o, a, r) { + return _(a) && (r = a, a = 0), !i[t.id] && (i[t.id] = 1, e.push({ + el: t, + target: n, + time: o, + delay: a, + easing: r + }), !0) + }, done: function (e) { + return t = e, this + }, start: function () { + for (var n = e.length, o = 0, a = e.length; o < a; o++) { + var r = e[o]; + r.el.animateTo(r.target, r.time, r.delay, r.easing, function () { + --n || (e.length = 0, i = {}, t && t()) + }) + } + return this + } + } + } + + function Ec(t, e, n, o, r, s, l, u, h, c) { + function d(t, e) { + w ? !t.invisible && s.push(t) : (e(), t.__tmWillVisible || (t.invisible = !1)) + } + + function f(e, n, o, a, r, s) { + var u = l.getModel(), + h = T(t.getFormattedLabel(l.dataIndex, "normal", null, null, s ? "upperLabel" : "label"), u.get("name")); + if (!s && v.isLeafRoot) { + var c = t.get("drillDownIcon", !0); + h = c ? c + " " + h : h + } + var d = u.getModel(s ? PA : LA), f = u.getModel(s ? NA : kA), p = d.getShallow("show"); + io(e, n, d, f, { + defaultText: p ? h : null, + autoColor: o, + isRectText: !0 + }), s && (e.textRect = i(s)), e.truncate = p && d.get("ellipsis") ? { + outerWidth: a, + outerHeight: r, + minChar: 2 + } : null + } + + function p(t, i, o, a) { + var s = null != S && n[t][S], l = r[t]; + return s ? (n[t][S] = null, g(l, s, t)) : w || ((s = new i({z: Rc(o, a)})).__tmDepth = o, s.__tmStorageName = t, m(l, s, t)), e[t][b] = s + } + + function g(t, e, i) { + (t[b] = {}).old = "nodeGroup" === i ? e.position.slice() : a({}, e.shape) + } + + function m(t, e, i) { + var n = t[b] = {}, a = l.parentNode; + if (a && (!o || "drillDown" === o.direction)) { + var s = 0, u = 0, h = r.background[a.getRawIndex()]; + !o && h && h.old && (s = h.old.width, u = h.old.height), n.old = "nodeGroup" === i ? [0, u] : { + x: s, + y: u, + width: 0, + height: 0 + } + } + n.fadein = "nodeGroup" !== i + } + + if (l) { + var v = l.getLayout(); + if (v && v.isInView) { + var y = v.width, x = v.height, _ = v.borderWidth, w = v.invisible, b = l.getRawIndex(), + S = u && u.getRawIndex(), M = l.viewChildren, I = v.upperHeight, D = M && M.length, + A = l.getModel("itemStyle"), C = l.getModel("emphasis.itemStyle"), L = p("nodeGroup", DA); + if (L) { + if (h.add(L), L.attr("position", [v.x || 0, v.y || 0]), L.__tmNodeWidth = y, L.__tmNodeHeight = x, v.isAboveViewRoot) return L; + var k = p("background", AA, c, EA); + if (k && function (e, i, n) { + i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex, i.setShape({ + x: 0, + y: 0, + width: y, + height: x + }); + var o = l.getVisual("borderColor", !0), a = C.get("borderColor"); + d(i, function () { + var t = BA(A); + t.fill = o; + var e = zA(C); + if (e.fill = a, n) { + var r = y - 2 * _; + f(t, e, o, r, I, {x: _, y: 0, width: r, height: I}) + } else t.text = e.text = null; + i.setStyle(t), eo(i, e) + }), e.add(i) + }(L, k, D && v.upperHeight), !D) { + var P = p("content", AA, c, RA); + P && function (e, i) { + i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex; + var n = Math.max(y - 2 * _, 0), o = Math.max(x - 2 * _, 0); + i.culling = !0, i.setShape({x: _, y: _, width: n, height: o}); + var a = l.getVisual("color", !0); + d(i, function () { + var t = BA(A); + t.fill = a; + var e = zA(C); + f(t, e, a, n, o), i.setStyle(t), eo(i, e) + }), e.add(i) + }(L, P) + } + return L + } + } + } + } + + function Rc(t, e) { + var i = t * OA + e; + return (i - 1) / i + } + + function zc(t) { + var e = t.pieceList; + t.hasSpecialVisual = !1, d(e, function (e, i) { + e.originIndex = i, null != e.visual && (t.hasSpecialVisual = !0) + }) + } + + function Bc(t) { + var e = t.categories, i = t.visual, n = t.categoryMap = {}; + if (WA(e, function (t, e) { + n[t] = e + }), !y(i)) { + var o = []; + w(i) ? WA(i, function (t, e) { + var i = n[e]; + o[null != i ? i : HA] = t + }) : o[HA] = i, i = jc(t, o) + } + for (var a = e.length - 1; a >= 0; a--) null == i[a] && (delete n[e[a]], e.pop()) + } + + function Vc(t, e) { + var i = t.visual, n = []; + w(i) ? WA(i, function (t) { + n.push(t) + }) : null != i && n.push(i); + var o = {color: 1, symbol: 1}; + e || 1 !== n.length || o.hasOwnProperty(t.type) || (n[1] = n[0]), jc(t, n) + } + + function Gc(t) { + return { + applyVisual: function (e, i, n) { + e = this.mapValueToVisual(e), n("color", t(i("color"), e)) + }, _doMap: Uc([0, 1]) + } + } + + function Wc(t) { + var e = this.option.visual; + return e[Math.round(To(t, [0, 1], [0, e.length - 1], !0))] || {} + } + + function Fc(t) { + return function (e, i, n) { + n(t, this.mapValueToVisual(e)) + } + } + + function Hc(t) { + var e = this.option.visual; + return e[this.option.loop && t !== HA ? t % e.length : t] + } + + function Zc() { + return this.option.visual[0] + } + + function Uc(t) { + return { + linear: function (e) { + return To(e, t, this.option.visual, !0) + }, category: Hc, piecewise: function (e, i) { + var n = Xc.call(this, i); + return null == n && (n = To(e, t, this.option.visual, !0)), n + }, fixed: Zc + } + } + + function Xc(t) { + var e = this.option, i = e.pieceList; + if (e.hasSpecialVisual) { + var n = i[ZA.findPieceIndex(t, i)]; + if (n && n.visual) return n.visual[this.type] + } + } + + function jc(t, e) { + return t.visual = e, "color" === t.type && (t.parsedVisual = f(e, function (t) { + return At(t) + })), e + } + + function Yc(t, e, i) { + return t ? e <= i : e < i + } + + function qc(t, e, i, n, o, a) { + var r = t.getModel(), s = t.getLayout(); + if (s && !s.invisible && s.isInView) { + var l, u = t.getModel(YA), h = Kc(u, e, i[t.depth], n), c = u.get("borderColor"), + f = u.get("borderColorSaturation"); + null != f && (c = Jc(f, l = $c(h))), t.setVisual("borderColor", c); + var p = t.viewChildren; + if (p && p.length) { + var g = td(t, r, s, u, h, p); + d(p, function (t, e) { + (t.depth >= o.length || t === o[t.depth]) && qc(t, id(r, h, t, e, g, a), i, n, o, a) + }) + } else l = $c(h), t.setVisual("color", l) + } + } + + function Kc(t, e, i, n) { + var o = a({}, e); + return d(["color", "colorAlpha", "colorSaturation"], function (a) { + var r = t.get(a, !0); + null == r && i && (r = i[a]), null == r && (r = e[a]), null == r && (r = n.get(a)), null != r && (o[a] = r) + }), o + } + + function $c(t) { + var e = Qc(t, "color"); + if (e) { + var i = Qc(t, "colorAlpha"), n = Qc(t, "colorSaturation"); + return n && (e = Et(e, null, null, n)), i && (e = Rt(e, i)), e + } + } + + function Jc(t, e) { + return null != e ? Et(e, null, null, t) : null + } + + function Qc(t, e) { + var i = t[e]; + if (null != i && "none" !== i) return i + } + + function td(t, e, i, n, o, a) { + if (a && a.length) { + var r = ed(e, "color") || null != o.color && "none" !== o.color && (ed(e, "colorAlpha") || ed(e, "colorSaturation")); + if (r) { + var s = e.get("visualMin"), l = e.get("visualMax"), u = i.dataExtent.slice(); + null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l); + var h = e.get("colorMappingBy"), c = {type: r.name, dataExtent: u, visual: r.range}; + "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0); + var d = new ZA(c); + return d.__drColorMappingBy = h, d + } + } + } + + function ed(t, e) { + var i = t.get(e); + return jA(i) && i.length ? {name: e, range: i} : null + } + + function id(t, e, i, n, o, r) { + var s = a({}, e); + if (o) { + var l = o.type, u = "color" === l && o.__drColorMappingBy, + h = "index" === u ? n : "id" === u ? r.mapIdToIndex(i.getId()) : i.getValue(t.get("visualDimension")); + s[l] = o.mapValueToVisual(h) + } + return s + } + + function nd(t, e, i, n) { + var o, a; + if (!t.isRemoved()) { + var r = t.getLayout(); + o = r.width, a = r.height; + var s = (f = t.getModel()).get(tC), l = f.get(eC) / 2, u = fd(f), h = Math.max(s, u), c = s - l, d = h - l, + f = t.getModel(); + t.setLayout({borderWidth: s, upperHeight: h, upperLabelHeight: u}, !0); + var p = (o = KA(o - 2 * c, 0)) * (a = KA(a - c - d, 0)), g = od(t, f, p, e, i, n); + if (g.length) { + var m = {x: c, y: d, width: o, height: a}, v = $A(o, a), y = 1 / 0, x = []; + x.area = 0; + for (var _ = 0, w = g.length; _ < w;) { + var b = g[_]; + x.push(b), x.area += b.getLayout().area; + var S = ld(x, v, e.squareRatio); + S <= y ? (_++, y = S) : (x.area -= x.pop().getLayout().area, ud(x, v, m, l, !1), v = $A(m.width, m.height), x.length = x.area = 0, y = 1 / 0) + } + if (x.length && ud(x, v, m, l, !0), !i) { + var M = f.get("childrenVisibleMin"); + null != M && p < M && (i = !0) + } + for (var _ = 0, w = g.length; _ < w; _++) nd(g[_], e, i, n + 1) + } + } + } + + function od(t, e, i, n, o, a) { + var r = t.children || [], s = n.sort; + "asc" !== s && "desc" !== s && (s = null); + var l = null != n.leafDepth && n.leafDepth <= a; + if (o && !l) return t.viewChildren = []; + rd(r = g(r, function (t) { + return !t.isRemoved() + }), s); + var u = sd(e, r, s); + if (0 === u.sum) return t.viewChildren = []; + if (u.sum = ad(e, i, u.sum, s, r), 0 === u.sum) return t.viewChildren = []; + for (var h = 0, c = r.length; h < c; h++) { + var d = r[h].getValue() / u.sum * i; + r[h].setLayout({area: d}) + } + return l && (r.length && t.setLayout({isLeafRoot: !0}, !0), r.length = 0), t.viewChildren = r, t.setLayout({dataExtent: u.dataExtent}, !0), r + } + + function ad(t, e, i, n, o) { + if (!n) return i; + for (var a = t.get("visibleMin"), r = o.length, s = r, l = r - 1; l >= 0; l--) { + var u = o["asc" === n ? r - l - 1 : l].getValue(); + u / i * e < a && (s = l, i -= u) + } + return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s), i + } + + function rd(t, e) { + return 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 + }), t + } + + function sd(t, e, i) { + for (var n = 0, o = 0, a = e.length; o < a; o++) n += e[o].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]; + QA(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} + } + + function ld(t, e, i) { + for (var n, o = 0, a = 1 / 0, r = 0, s = t.length; r < s; r++) (n = t[r].getLayout().area) && (n < a && (a = n), n > o && (o = n)); + var l = t.area * t.area, u = e * e * i; + return l ? KA(u * o / l, l / (u * a)) : 1 / 0 + } + + function ud(t, e, i, n, o) { + var a = e === i.width ? 0 : 1, r = 1 - a, s = ["x", "y"], l = ["width", "height"], u = i[s[a]], + h = e ? t.area / e : 0; + (o || h > i[l[r]]) && (h = i[l[r]]); + for (var c = 0, d = t.length; c < d; c++) { + var f = t[c], p = {}, g = h ? f.getLayout().area / h : 0, m = p[l[r]] = KA(h - 2 * n, 0), + v = i[s[a]] + i[l[a]] - u, y = c === d - 1 || v < g ? v : g, x = p[l[a]] = KA(y - 2 * n, 0); + p[s[r]] = i[s[r]] + $A(n, m / 2), p[s[a]] = u + $A(n, x / 2), u += y, f.setLayout(p, !0) + } + i[s[r]] += h, i[l[r]] -= h + } + + function hd(t, e, i, n, o) { + var a = (e || {}).node, r = [n, o]; + if (!a || a === i) return r; + for (var s, l = n * o, u = l * t.option.zoomToNodeRatio; s = a.parentNode;) { + for (var h = 0, c = s.children, d = 0, f = c.length; d < f; d++) h += c[d].getValue(); + var p = a.getValue(); + if (0 === p) return r; + u *= h / p; + var g = s.getModel(), m = g.get(tC); + (u += 4 * m * m + (3 * m + Math.max(m, fd(g))) * Math.pow(u, .5)) > jS && (u = jS), a = s + } + u < l && (u = l); + var v = Math.pow(u / l, .5); + return [n * v, o * v] + } + + function cd(t, e, i) { + if (e) return {x: e.x, y: e.y}; + var n = {x: 0, y: 0}; + if (!i) return n; + var o = i.node, a = o.getLayout(); + if (!a) return n; + for (var r = [a.width / 2, a.height / 2], s = o; 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]} + } + + function dd(t, e, i, n, o) { + var a = t.getLayout(), r = i[o], s = r && r === t; + if (!(r && !s || o === i.length && t !== n)) { + t.setLayout({isInView: !0, invisible: !s && !e.intersect(a), isAboveViewRoot: s}, !0); + var l = new $t(e.x - a.x, e.y - a.y, e.width, e.height); + QA(t.viewChildren || [], function (t) { + dd(t, l, i, n, o + 1) + }) + } + } + + function fd(t) { + return t.get(iC) ? t.get(nC) : 0 + } + + function pd(t) { + return "_EC_" + t + } + + function gd(t, e) { + this.id = null == t ? "" : t, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex = null == e ? -1 : e + } + + function md(t, e, i) { + this.node1 = t, this.node2 = e, this.dataIndex = null == i ? -1 : i + } + + function vd(t) { + return isNaN(+t.cpx1) || isNaN(+t.cpy1) + } + + function yd(t) { + return "_" + t + "Type" + } + + function xd(t, e, i) { + var n = e.getItemVisual(i, "color"), o = e.getItemVisual(i, t), a = e.getItemVisual(i, t + "Size"); + if (o && "none" !== o) { + y(a) || (a = [a, a]); + var r = Tl(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n); + return r.name = t, r + } + } + + function _d(t) { + var e = new dC({name: "line"}); + return wd(e.shape, t), e + } + + function wd(t, e) { + var i = e[0], n = e[1], o = e[2]; + t.x1 = i[0], t.y1 = i[1], t.x2 = n[0], t.y2 = n[1], t.percent = 1, o ? (t.cpx1 = o[0], t.cpy1 = o[1]) : (t.cpx1 = NaN, t.cpy1 = NaN) + } + + function bd(t, e, i) { + sw.call(this), this._createLine(t, e, i) + } + + function Sd(t) { + this._ctor = t || bd, this.group = new sw + } + + function Md(t, e, i, n) { + if (Ad(e.getItemLayout(i))) { + var o = new t._ctor(e, i, n); + e.setItemGraphicEl(i, o), t.group.add(o) + } + } + + function Id(t, e, i, n, o, a) { + var r = e.getItemGraphicEl(n); + Ad(i.getItemLayout(o)) ? (r ? r.updateData(i, o, a) : r = new t._ctor(i, o, a), i.setItemGraphicEl(o, r), t.group.add(r)) : t.group.remove(r) + } + + function Td(t) { + var e = t.hostModel; + return { + lineStyle: e.getModel("lineStyle").getLineStyle(), + hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(), + labelModel: e.getModel("label"), + hoverLabelModel: e.getModel("emphasis.label") + } + } + + function Dd(t) { + return isNaN(t[0]) || isNaN(t[1]) + } + + function Ad(t) { + return !Dd(t[0]) && !Dd(t[1]) + } + + function Cd(t, e, i) { + for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, u = .1, h = .1; h <= .9; h += .1) mC[0] = xC(o[0], a[0], r[0], h), mC[1] = xC(o[1], a[1], r[1], h), (f = wC(_C(mC, e) - l)) < s && (s = f, n = h); + for (var c = 0; c < 32; c++) { + var d = n + u; + vC[0] = xC(o[0], a[0], r[0], n), vC[1] = xC(o[1], a[1], r[1], n), yC[0] = xC(o[0], a[0], r[0], d), yC[1] = xC(o[1], a[1], r[1], d); + var f = _C(vC, e) - l; + if (wC(f) < .01) break; + var p = _C(yC, e) - l; + u /= 2, f < 0 ? p >= 0 ? n += u : n -= u : p >= 0 ? n -= u : n += u + } + return n + } + + function Ld(t, e) { + return t.getVisual("opacity") || t.getModel().get(e) + } + + function kd(t, e, i) { + var n = t.getGraphicEl(), o = Ld(t, e); + null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (t) { + "group" !== t.type && t.setStyle("opacity", o) + }) + } + + function Pd(t, e) { + var i = Ld(t, e), n = t.getGraphicEl(); + n.highlight && n.highlight(), n.traverse(function (t) { + "group" !== t.type && t.setStyle("opacity", i) + }) + } + + function Nd(t) { + return t instanceof Array || (t = [t, t]), t + } + + function Od(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")]) + }), Ed(i) + } + } + + function Ed(t) { + t.eachEdge(function (t) { + var e = t.getModel().get("lineStyle.curveness") || 0, i = W(t.node1.getLayout()), + n = W(t.node2.getLayout()), o = [i, n]; + +e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]), t.setLayout(o) + }) + } + + function Rd(t) { + var e = t.coordinateSystem; + if (!e || "view" === e.type) { + var i = e.getBoundingRect(), n = t.getData(), o = n.graph, a = 0, r = n.getSum("value"), + s = 2 * Math.PI / (r || n.count()), l = i.width / 2 + i.x, u = i.height / 2 + i.y, + h = Math.min(i.width, i.height) / 2; + o.eachNode(function (t) { + var e = t.getValue("value"); + a += s * (r ? e : 1) / 2, t.setLayout([h * Math.cos(a) + l, h * Math.sin(a) + u]), a += s * (r ? e : 1) / 2 + }), n.setLayout({cx: l, cy: u}), o.eachEdge(function (t) { + var e, i = t.getModel().get("lineStyle.curveness") || 0, n = W(t.node1.getLayout()), + o = W(t.node2.getLayout()), a = (n[0] + o[0]) / 2, r = (n[1] + o[1]) / 2; + +i && (e = [l * (i *= 3) + a * (1 - i), u * i + r * (1 - i)]), t.setLayout([n, o, e]) + }) + } + } + + function zd(t, e, i) { + for (var n = i.rect, o = n.width, a = n.height, r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < t.length; l++) { + var u = t[l]; + u.p || (u.p = V(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])), u.pp = W(u.p), u.edges = null + } + var h = .6; + return { + warmUp: function () { + h = .5 + }, setFixed: function (e) { + t[e].fixed = !0 + }, setUnfixed: function (e) { + t[e].fixed = !1 + }, step: function (i) { + for (var n = [], o = t.length, a = 0; a < e.length; a++) { + var l = e[a], u = l.n1; + U(n, (p = l.n2).p, u.p); + var c = X(n) - l.d, d = p.w / (u.w + p.w); + isNaN(d) && (d = 0), q(n, n), !u.fixed && IC(u.p, u.p, n, d * c * h), !p.fixed && IC(p.p, p.p, n, -(1 - d) * c * h) + } + for (a = 0; a < o; a++) (v = t[a]).fixed || (U(n, r, v.p), IC(v.p, v.p, n, s * h)); + for (a = 0; a < o; a++) for (var u = t[a], f = a + 1; f < o; f++) { + var p = t[f]; + U(n, p.p, u.p), 0 === (c = X(n)) && (F(n, Math.random() - .5, Math.random() - .5), c = 1); + var g = (u.rep + p.rep) / c / c; + !u.fixed && IC(u.pp, u.pp, n, g), !p.fixed && IC(p.pp, p.pp, n, -g) + } + for (var m = [], a = 0; a < o; a++) { + var v = t[a]; + v.fixed || (U(m, v.p, v.pp), IC(v.p, v.p, m, h), G(v.pp, v.p)) + } + h *= .992, i && i(t, e, h < .01) + } + } + } + + function Bd(t, e, i) { + var n = t.getBoxLayoutParams(); + return n.aspect = i, Qo(n, {width: e.getWidth(), height: e.getHeight()}) + } + + function Vd(t, e) { + var i = t.get("center"), n = e.getWidth(), o = e.getHeight(), a = Math.min(n, o); + return {cx: Do(i[0], e.getWidth()), cy: Do(i[1], e.getHeight()), r: Do(t.get("radius"), a / 2)} + } + + function Gd(t, e) { + return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t + } + + function Wd(t, e) { + function i() { + a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore + } + + function n() { + a.ignore = a.normalIgnore, r.ignore = r.normalIgnore + } + + sw.call(this); + var o = new wS, a = new bS, r = new fS; + this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) + } + + function Fd(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function Hd(t, e) { + for (var i = t.mapDimension("value"), n = t.mapArray(i, function (t) { + return t + }), o = [], a = "ascending" === e, r = 0, s = t.count(); r < s; r++) o[r] = r; + return "function" == typeof e ? o.sort(e) : "none" !== e && o.sort(function (t, e) { + return a ? n[t] - n[e] : n[e] - n[t] + }), o + } + + function Zd(t) { + t.each(function (e) { + var i, n, o, a, r = t.getItemModel(e), s = r.getModel("label").get("position"), l = r.getModel("labelLine"), + u = t.getItemLayout(e), h = u.points, c = "inner" === s || "inside" === s || "center" === s; + if (c) i = "center", a = [[n = (h[0][0] + h[1][0] + h[2][0] + h[3][0]) / 4, o = (h[0][1] + h[1][1] + h[2][1] + h[3][1]) / 4], [n, o]]; else { + var d, f, p, g = l.get("length"); + "left" === s ? (d = (h[3][0] + h[0][0]) / 2, f = (h[3][1] + h[0][1]) / 2, n = (p = d - g) - 5, i = "right") : (d = (h[1][0] + h[2][0]) / 2, f = (h[1][1] + h[2][1]) / 2, n = (p = d + g) + 5, i = "left"); + var m = f; + a = [[d, f], [p, m]], o = m + } + u.label = {linePoints: a, x: n, y: o, verticalAlign: "middle", textAlign: i, inside: c} + }) + } + + function Ud(t) { + if (!t.parallel) { + var e = !1; + d(t.series, function (t) { + t && "parallel" === t.type && (e = !0) + }), e && (t.parallel = [{}]) + } + } + + function Xd(t) { + d(Si(t.parallelAxis), function (e) { + if (w(e)) { + var i = e.parallelIndex || 0, o = Si(t.parallel)[i]; + o && o.parallelAxisDefault && n(e, o.parallelAxisDefault, !1) + } + }) + } + + function jd(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 Yd(t, e) { + return Math.min(e[1], Math.max(e[0], t)) + } + + function qd(t, e, i) { + this._axesMap = R(), this._axesLayout = {}, this.dimensions = t.dimensions, this._rect, this._model = t, this._init(t, e, i) + } + + function Kd(t, e) { + return OC(EC(t, e[0]), e[1]) + } + + function $d(t, e) { + var i = e.layoutLength / (e.axisCount - 1); + return {position: i * t, axisNameAvailableWidth: i, axisLabelShow: !0} + } + + function Jd(t, e) { + var i, n, o = e.layoutLength, a = e.axisExpandWidth, r = e.axisCount, s = e.axisCollapseWidth, + l = e.winInnerIndices, u = s, h = !1; + return t < l[0] ? (i = t * s, n = s) : t <= l[1] ? (i = e.axisExpandWindow0Pos + t * a - e.axisExpandWindow[0], u = a, h = !0) : (i = o - (r - 1 - t) * s, n = s), { + position: i, + axisNameAvailableWidth: u, + axisLabelShow: h, + nameTruncateMaxWidth: n + } + } + + function Qd(t) { + D_.call(this), this._zr = t, this.group = new sw, this._brushType, this._brushOption, this._panels, this._track = [], this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid = "brushController_" + eL++, this._handlers = {}, HC(iL, function (t, e) { + this._handlers[e] = m(t, this) + }, this) + } + + function tf(t, e) { + var o = t._zr; + t._enableGlobalPan || Dh(o, $C, t._uid), HC(t._handlers, function (t, e) { + o.on(e, t) + }), t._brushType = e.brushType, t._brushOption = n(i(tL), e, !0) + } + + function ef(t) { + var e = t._zr; + Ah(e, $C, t._uid), HC(t._handlers, function (t, i) { + e.off(i, t) + }), t._brushType = t._brushOption = null + } + + function nf(t, e) { + var i = nL[e.brushType].createCover(t, e); + return i.__brushOption = e, rf(i, e), t.group.add(i), i + } + + function of(t, e) { + var i = lf(e); + return i.endCreating && (i.endCreating(t, e), rf(e, e.__brushOption)), e + } + + function af(t, e) { + var i = e.__brushOption; + lf(e).updateCoverShape(t, e, i.range, i) + } + + function rf(t, e) { + var i = e.z; + null == i && (i = YC), t.traverse(function (t) { + t.z = i, t.z2 = i + }) + } + + function sf(t, e) { + lf(e).updateCommon(t, e), af(t, e) + } + + function lf(t) { + return nL[t.__brushOption.brushType] + } + + function uf(t, e, i) { + var n = t._panels; + if (!n) return !0; + var o, a = t._transform; + return HC(n, function (t) { + t.isTargetByCursor(e, i, a) && (o = t) + }), o + } + + function hf(t, e) { + var i = t._panels; + if (!i) return !0; + var n = e.__brushOption.panelId; + return null == n || i[n] + } + + function cf(t) { + var e = t._covers, i = e.length; + return HC(e, function (e) { + t.group.remove(e) + }, t), e.length = 0, !!i + } + + function df(t, e) { + var n = ZC(t._covers, function (t) { + var e = t.__brushOption, n = i(e.range); + return {brushType: e.brushType, panelId: e.panelId, range: n} + }); + t.trigger("brush", n, {isEnd: !!e.isEnd, removeOnClick: !!e.removeOnClick}) + } + + function ff(t) { + var e = t._track; + if (!e.length) return !1; + var i = e[e.length - 1], n = e[0], o = i[0] - n[0], a = i[1] - n[1]; + return jC(o * o + a * a, .5) > qC + } + + function pf(t) { + var e = t.length - 1; + return e < 0 && (e = 0), [t[0], t[e]] + } + + function gf(t, e, i, n) { + var o = new sw; + return o.add(new SS({ + name: "main", + style: xf(i), + silent: !0, + draggable: !0, + cursor: "move", + drift: FC(t, e, o, "nswe"), + ondragend: FC(df, e, {isEnd: !0}) + })), HC(n, function (i) { + o.add(new SS({ + name: i, + style: {opacity: 0}, + draggable: !0, + silent: !0, + invisible: !0, + drift: FC(t, e, o, i), + ondragend: FC(df, e, {isEnd: !0}) + })) + }), o + } + + function mf(t, e, i, n) { + var o = n.brushStyle.lineWidth || 0, a = XC(o, KC), r = i[0][0], s = i[1][0], l = r - o / 2, u = s - o / 2, + h = i[0][1], c = i[1][1], d = h - a + o / 2, f = c - a + o / 2, p = h - r, g = c - s, m = p + o, v = g + o; + yf(t, e, "main", r, s, p, g), n.transformable && (yf(t, e, "w", l, u, a, v), yf(t, e, "e", d, u, a, v), yf(t, e, "n", l, u, m, a), yf(t, e, "s", l, f, m, a), yf(t, e, "nw", l, u, a, a), yf(t, e, "ne", d, u, a, a), yf(t, e, "sw", l, f, a, a), yf(t, e, "se", d, f, a, a)) + } + + function vf(t, e) { + var i = e.__brushOption, n = i.transformable, o = e.childAt(0); + o.useStyle(xf(i)), o.attr({ + silent: !n, + cursor: n ? "move" : "default" + }), HC(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function (i) { + var o = e.childOfName(i), a = bf(t, i); + o && o.attr({silent: !n, invisible: !n, cursor: n ? QC[a] + "-resize" : null}) + }) + } + + function yf(t, e, i, n, o, a, r) { + var s = e.childOfName(i); + s && s.setShape(Df(Tf(t, e, [[n, o], [n + a, o + r]]))) + } + + function xf(t) { + return r({strokeNoScale: !0}, t.brushStyle) + } + + function _f(t, e, i, n) { + var o = [UC(t, i), UC(e, n)], a = [XC(t, i), XC(e, n)]; + return [[o[0], a[0]], [o[1], a[1]]] + } + + function wf(t) { + return go(t.group) + } + + function bf(t, e) { + if (e.length > 1) return ("e" === (n = [bf(t, (e = e.split(""))[0]), bf(t, e[1])])[0] || "w" === n[0]) && n.reverse(), n.join(""); + var i = {left: "w", right: "e", top: "n", bottom: "s"}, + n = vo({w: "left", e: "right", n: "top", s: "bottom"}[e], wf(t)); + return i[n] + } + + function Sf(t, e, i, n, o, a, r, s) { + var l = n.__brushOption, u = t(l.range), h = If(i, a, r); + HC(o.split(""), function (t) { + var e = JC[t]; + u[e[0]][e[1]] += h[e[0]] + }), l.range = e(_f(u[0][0], u[1][0], u[0][1], u[1][1])), sf(i, n), df(i, {isEnd: !1}) + } + + function Mf(t, e, i, n, o) { + var a = e.__brushOption.range, r = If(t, i, n); + HC(a, function (t) { + t[0] += r[0], t[1] += r[1] + }), sf(t, e), df(t, {isEnd: !1}) + } + + function If(t, e, i) { + var n = t.group, o = n.transformCoordToLocal(e, i), a = n.transformCoordToLocal(0, 0); + return [o[0] - a[0], o[1] - a[1]] + } + + function Tf(t, e, n) { + var o = hf(t, e); + return o && !0 !== o ? o.clipPath(n, t._transform) : i(n) + } + + function Df(t) { + var e = UC(t[0][0], t[1][0]), i = UC(t[0][1], t[1][1]); + return {x: e, y: i, width: XC(t[0][0], t[1][0]) - e, height: XC(t[0][1], t[1][1]) - i} + } + + function Af(t, e, i) { + if (t._brushType) { + var n = t._zr, o = t._covers, a = uf(t, e, i); + if (!t._dragging) for (var r = 0; r < o.length; r++) { + var s = o[r].__brushOption; + if (a && (!0 === a || s.panelId === a.panelId) && nL[s.brushType].contain(o[r], i[0], i[1])) return + } + a && n.setCursorStyle("crosshair") + } + } + + function Cf(t) { + var e = t.event; + e.preventDefault && e.preventDefault() + } + + function Lf(t, e, i) { + return t.childOfName("main").contain(e, i) + } + + function kf(t, e, n, o) { + var a, r = t._creatingCover, s = t._creatingPanel, l = t._brushOption; + if (t._track.push(n.slice()), ff(t) || r) { + if (s && !r) { + "single" === l.brushMode && cf(t); + var u = i(l); + u.brushType = Pf(u.brushType, s), u.panelId = !0 === s ? null : s.panelId, r = t._creatingCover = nf(t, u), t._covers.push(r) + } + if (r) { + var h = nL[Pf(t._brushType, s)]; + r.__brushOption.range = h.getCreatingRange(Tf(t, r, t._track)), o && (of(t, r), h.updateCommon(t, r)), af(t, r), a = {isEnd: o} + } + } else o && "single" === l.brushMode && l.removeOnClick && uf(t, e, n) && cf(t) && (a = { + isEnd: o, + removeOnClick: !0 + }); + return a + } + + function Pf(t, e) { + return "auto" === t ? e.defaultBrushType : t + } + + function Nf(t) { + if (this._dragging) { + Cf(t); + var e = kf(this, t, this.group.transformCoordToLocal(t.offsetX, t.offsetY), !0); + this._dragging = !1, this._track = [], this._creatingCover = null, e && df(this, e) + } + } + + function Of(t) { + return { + createCover: function (e, i) { + return gf(FC(Sf, 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 = pf(e); + return [UC(i[0][t], i[1][t]), XC(i[0][t], i[1][t])] + }, updateCoverShape: function (e, i, n, o) { + var a, r = hf(e, i); + if (!0 !== r && r.getLinearBrushOtherExtent) a = r.getLinearBrushOtherExtent(t, e._transform); else { + var s = e._zr; + a = [0, [s.getWidth(), s.getHeight()][1 - t]] + } + var l = [n, a]; + t && l.reverse(), mf(e, i, l, o) + }, updateCommon: vf, contain: Lf + } + } + + function Ef(t) { + return t = Bf(t), function (e, i) { + return xo(e, t) + } + } + + function Rf(t, e) { + return t = Bf(t), function (i) { + var n = null != e ? e : i, o = n ? t.width : t.height, a = n ? t.x : t.y; + return [a, a + (o || 0)] + } + } + + function zf(t, e, i) { + return t = Bf(t), function (n, o, a) { + return t.contain(o[0], o[1]) && !Wh(n, e, i) + } + } + + function Bf(t) { + return $t.create(t) + } + + function Vf(t, e, i) { + return i && "axisAreaSelect" === i.type && e.findComponents({mainType: "parallelAxis", query: i})[0] === t + } + + function Gf(t) { + var e = t.axis; + return f(t.activeIntervals, function (t) { + return {brushType: "lineX", panelId: "pl", range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]} + }) + } + + function Wf(t, e) { + return e.getComponent("parallel", t.get("parallelIndex")) + } + + function Ff(t, e) { + var i = t._model; + return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === e + } + + function Hf(t, e) { + if (!t.encodeDefine) { + var i = e.ecModel.getComponent("parallel", e.get("parallelIndex")); + if (i) { + var n = t.encodeDefine = R(); + d(i.dimensions, function (t) { + var e = Zf(t); + n.set(t, e) + }) + } + } + } + + function Zf(t) { + return +t.replace("dim", "") + } + + function Uf(t, e, i) { + var n = t.model, o = t.getRect(), a = new SS({shape: {x: o.x, y: o.y, width: o.width, height: o.height}}), + r = "horizontal" === n.get("layout") ? "width" : "height"; + return a.setShape(r, 0), po(a, {shape: {width: o.width, height: o.height}}, e, i), a + } + + function Xf(t, e, i, n) { + for (var o = [], a = 0; a < i.length; a++) { + var r = i[a], s = t.get(t.mapDimension(r), e); + Kf(s, n.getAxis(r).type) || o.push(n.dataToPoint(s, r)) + } + return o + } + + function jf(t, e, i, n, o) { + var a = Xf(t, i, n, o), r = new bS({shape: {points: a}, silent: !0, z2: 10}); + return e.add(r), t.setItemGraphicEl(i, r), r + } + + function Yf(t) { + var e = t.get("smooth", !0); + return !0 === e && (e = sL), {lineStyle: t.getModel("lineStyle").getLineStyle(), smooth: null != e ? e : sL} + } + + function qf(t, e, i, n) { + var o = n.lineStyle; + e.hasItemOption && (o = e.getItemModel(i).getModel("lineStyle").getLineStyle()), t.useStyle(o); + var a = t.style; + a.fill = null, a.stroke = e.getItemVisual(i, "color"), a.opacity = e.getItemVisual(i, "opacity"), n.smooth && (t.shape.smooth = n.smooth) + } + + function Kf(t, e) { + return "category" === e ? null == t : null == t || isNaN(t) + } + + function $f(t, e, i) { + var n = new SS({shape: {x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20}}); + return po(n, {shape: {width: t.width + 20, height: t.height + 20}}, e, i), n + } + + function Jf() { + function t(e, n) { + if (n >= i.length) return e; + for (var o = -1, a = e.length, r = i[n++], s = {}, l = {}; ++o < a;) { + var u = r(e[o]), h = l[u]; + h ? h.push(e[o]) : l[u] = [e[o]] + } + return d(l, function (e, i) { + s[i] = t(e, n) + }), s + } + + function e(t, o) { + if (o >= i.length) return t; + var a = [], r = n[o++]; + return d(t, function (t, i) { + a.push({key: i, values: e(t, o)}) + }), r ? a.sort(function (t, e) { + return r(t.key, e.key) + }) : a + } + + var i = [], n = []; + return { + key: function (t) { + return i.push(t), this + }, sortKeys: function (t) { + return n[i.length - 1] = t, this + }, entries: function (i) { + return e(t(i, 0), 0) + } + } + } + + function Qf(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function tp(t, e, i, n, o, a, r) { + ip(t, e, i, o), ap(t, e, a, n, r), dp(t) + } + + function ep(t) { + d(t, function (t) { + var e = gp(t.outEdges, xp), i = gp(t.inEdges, xp), n = Math.max(e, i); + t.setLayout({value: n}, !0) + }) + } + + function ip(t, e, i, n) { + for (var o = [], a = [], r = [], s = [], l = 0, u = 0; u < e.length; u++) o[u] = 1; + for (u = 0; u < t.length; u++) a[u] = t[u].inEdges.length, 0 === a[u] && r.push(t[u]); + for (; r.length;) d(r, function (n) { + n.setLayout({x: l}, !0), n.setLayout({dx: i}, !0), d(n.outEdges, function (i) { + var n = e.indexOf(i); + o[n] = 0; + var r = i.node2, l = t.indexOf(r); + 0 == --a[l] && s.push(r) + }) + }), ++l, r = s, s = []; + for (u = 0; u < o.length; u++) ; + np(t, l), op(t, (n - i) / (l - 1)) + } + + function np(t, e) { + d(t, function (t) { + t.outEdges.length || t.setLayout({x: e - 1}, !0) + }) + } + + function op(t, e) { + d(t, function (t) { + var i = t.getLayout().x * e; + t.setLayout({x: i}, !0) + }) + } + + function ap(t, e, i, n, o) { + var a = Jf().key(function (t) { + return t.getLayout().x + }).sortKeys(yp).entries(t).map(function (t) { + return t.values + }); + rp(t, a, e, i, n), sp(a, n, i); + for (var r = 1; o > 0; o--) lp(a, r *= .99), sp(a, n, i), hp(a, r), sp(a, n, i) + } + + function rp(t, e, i, n, o) { + var a = []; + d(e, function (t) { + var e = t.length, i = 0; + d(t, function (t) { + i += t.getLayout().value + }); + var r = (n - (e - 1) * o) / i; + a.push(r) + }), a.sort(function (t, e) { + return t - e + }); + var r = a[0]; + d(e, function (t) { + d(t, function (t, e) { + t.setLayout({y: e}, !0); + var i = t.getLayout().value * r; + t.setLayout({dy: i}, !0) + }) + }), d(i, function (t) { + var e = +t.getValue() * r; + t.setLayout({dy: e}, !0) + }) + } + + function sp(t, e, i) { + d(t, function (t) { + var n, o, a, r = 0, s = t.length; + for (t.sort(vp), a = 0; a < s; a++) { + if (n = t[a], (o = r - n.getLayout().y) > 0) { + l = n.getLayout().y + o; + n.setLayout({y: l}, !0) + } + r = n.getLayout().y + n.getLayout().dy + e + } + if ((o = r - e - i) > 0) { + var l = n.getLayout().y - o; + for (n.setLayout({y: l}, !0), r = n.getLayout().y, a = s - 2; a >= 0; --a) (o = (n = t[a]).getLayout().y + n.getLayout().dy + e - r) > 0 && (l = n.getLayout().y - o, n.setLayout({y: l}, !0)), r = n.getLayout().y + } + }) + } + + function lp(t, e) { + d(t.slice().reverse(), function (t) { + d(t, function (t) { + if (t.outEdges.length) { + var i = gp(t.outEdges, up) / gp(t.outEdges, xp), n = t.getLayout().y + (i - mp(t)) * e; + t.setLayout({y: n}, !0) + } + }) + }) + } + + function up(t) { + return mp(t.node2) * t.getValue() + } + + function hp(t, e) { + d(t, function (t) { + d(t, function (t) { + if (t.inEdges.length) { + var i = gp(t.inEdges, cp) / gp(t.inEdges, xp), n = t.getLayout().y + (i - mp(t)) * e; + t.setLayout({y: n}, !0) + } + }) + }) + } + + function cp(t) { + return mp(t.node1) * t.getValue() + } + + function dp(t) { + d(t, function (t) { + t.outEdges.sort(fp), t.inEdges.sort(pp) + }), d(t, function (t) { + var e = 0, i = 0; + d(t.outEdges, function (t) { + t.setLayout({sy: e}, !0), e += t.getLayout().dy + }), d(t.inEdges, function (t) { + t.setLayout({ty: i}, !0), i += t.getLayout().dy + }) + }) + } + + function fp(t, e) { + return t.node2.getLayout().y - e.node2.getLayout().y + } + + function pp(t, e) { + return t.node1.getLayout().y - e.node1.getLayout().y + } + + function gp(t, e) { + for (var i = 0, n = t.length, o = -1; ++o < n;) { + var a = +e.call(t, t[o], o); + isNaN(a) || (i += a) + } + return i + } + + function mp(t) { + return t.getLayout().y + t.getLayout().dy / 2 + } + + function vp(t, e) { + return t.getLayout().y - e.getLayout().y + } + + function yp(t, e) { + return t - e + } + + function xp(t) { + return t.getValue() + } + + function _p(t, e, i, n, o) { + var a = t.ends, r = new pL({shape: {points: o ? bp(a, n, t) : a}}); + return wp(t, r, e, i, o), r + } + + function wp(t, e, i, n, o) { + var a = i.hostModel; + (0, BS[o ? "initProps" : "updateProps"])(e, {shape: {points: t.ends}}, a, n); + var r = i.getItemModel(n), s = r.getModel(dL), l = i.getItemVisual(n, "color"), + u = s.getItemStyle(["borderColor"]); + u.stroke = l, u.strokeNoScale = !0, e.useStyle(u), e.z2 = 100, eo(e, r.getModel(fL).getItemStyle()) + } + + function bp(t, e, i) { + return f(t, function (t) { + return t = t.slice(), t[e] = i.initBaseline, t + }) + } + + function Sp(t) { + var e = [], i = []; + return t.eachSeriesByType("boxplot", function (t) { + var n = t.getBaseAxis(), o = l(i, n); + o < 0 && (o = i.length, i[o] = n, e[o] = {axis: n, seriesModels: []}), e[o].seriesModels.push(t) + }), e + } + + function Mp(t) { + var e, i, n = t.axis, o = t.seriesModels, a = o.length, r = t.boxWidthList = [], s = t.boxOffsetList = [], + l = []; + if ("category" === n.type) i = n.getBandWidth(); else { + var u = 0; + mL(o, function (t) { + u = Math.max(u, t.getData().count()) + }), e = n.getExtent(), Math.abs(e[1] - e[0]) + } + mL(o, function (t) { + var e = t.get("boxWidth"); + y(e) || (e = [e, e]), l.push([Do(e[0], i) || 0, Do(e[1], i) || 0]) + }); + var h = .8 * i - 2, c = h / a * .3, d = (h - c * (a - 1)) / a, f = d / 2 - h / 2; + mL(o, function (t, e) { + s.push(f), f += c + d, r.push(Math.min(Math.max(d, l[e][0]), l[e][1])) + }) + } + + function Ip(t, e, i) { + function n(t, i, n) { + var o = s.get(i, n), a = []; + a[u] = t, a[h] = o; + var l; + return isNaN(t) || isNaN(o) ? l = [NaN, NaN] : (l = r.dataToPoint(a))[u] += e, l + } + + function o(t, e, i) { + var n = e.slice(), o = e.slice(); + n[u] += l, o[u] -= l, i ? t.push(n, o) : t.push(o, n) + } + + function a(t, e) { + var i = e.slice(), n = e.slice(); + i[u] -= l, n[u] += l, t.push(i, n) + } + + var r = t.coordinateSystem, s = t.getData(), l = i / 2, u = "horizontal" === t.get("layout") ? 0 : 1, h = 1 - u, + c = ["x", "y"], d = s.mapDimension(c[u]), f = s.mapDimension(c[h], !0); + if (!(null == d || f.length < 5)) for (var p = 0; p < s.count(); p++) { + var g = s.get(d, p), m = n(g, f[2], p), v = n(g, f[0], p), y = n(g, f[1], p), x = n(g, f[3], p), + _ = n(g, f[4], p), w = []; + o(w, y, 0), o(w, x, 1), w.push(v, y, _, x), a(w, v), a(w, _), a(w, m), s.setItemLayout(p, { + initBaseline: m[h], + ends: w + }) + } + } + + function Tp(t, e, i) { + var n = t.ends; + return new _L({shape: {points: i ? Ap(n, t) : n}, z2: 100}) + } + + function Dp(t, e, i, n) { + var o = e.getItemModel(i), a = o.getModel(vL), r = e.getItemVisual(i, "color"), + s = e.getItemVisual(i, "borderColor") || r, l = a.getItemStyle(xL); + t.useStyle(l), t.style.strokeNoScale = !0, t.style.fill = r, t.style.stroke = s, t.__simpleBox = n, eo(t, o.getModel(yL).getItemStyle()) + } + + function Ap(t, e) { + return f(t, function (t) { + return t = t.slice(), t[1] = e.initBaseline, t + }) + } + + function Cp(t, e, i) { + var n = t.getData(), o = n.getLayout("largePoints"), a = new wL({shape: {points: o}, __sign: 1}); + e.add(a); + var r = new wL({shape: {points: o}, __sign: -1}); + e.add(r), Lp(1, a, t, n), Lp(-1, r, t, n), i && (a.incremental = !0, r.incremental = !0) + } + + function Lp(t, e, i, n) { + var o = t > 0 ? "P" : "N", a = n.getVisual("borderColor" + o) || n.getVisual("color" + o), + r = i.getModel(vL).getItemStyle(xL); + e.useStyle(r), e.style.fill = null, e.style.stroke = a + } + + function kp(t, e, i, n, o) { + return i > n ? -1 : i < n ? 1 : e > 0 ? t.get(o, e - 1) <= n ? 1 : -1 : 1 + } + + function Pp(t, e) { + var i, n = t.getBaseAxis(), + o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(), Math.abs(i[1] - i[0]) / e.count()), + a = Do(D(t.get("barMaxWidth"), o), o), r = Do(D(t.get("barMinWidth"), 1), o), s = t.get("barWidth"); + return null != s ? Do(s, o) : Math.max(Math.min(o / 2, a), r) + } + + function Np(t) { + return y(t) || (t = [+t, +t]), t + } + + function Op(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 Ep(t, e) { + sw.call(this); + var i = new Kl(t, e), n = new sw; + this.add(i), this.add(n), n.beforeUpdate = function () { + this.attr(i.getScale()) + }, this.updateData(t, e) + } + + function Rp(t) { + var e = t.data; + e && e[0] && e[0][0] && e[0][0].coord && (t.data = f(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), o([e, t[0], t[1]]) + })) + } + + function zp(t, e, i) { + sw.call(this), this.add(this.createLine(t, e, i)), this._updateEffectSymbol(t, e) + } + + function Bp(t, e, i) { + sw.call(this), this._createPolyline(t, e, i) + } + + function Vp(t, e, i) { + zp.call(this, t, e, i), this._lastFrame = 0, this._lastFramePercent = 0 + } + + function Gp() { + this.group = new sw + } + + function Wp(t) { + return t instanceof Array || (t = [t, t]), t + } + + function Fp() { + var t = m_(); + this.canvas = t, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {} + } + + function Hp(t, e, i) { + var n = t[1] - t[0], o = (e = f(e, function (e) { + return {interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n]} + })).length, a = 0; + return function (t) { + for (n = a; n < o; n++) if ((r = e[n].interval)[0] <= t && t <= r[1]) { + a = n; + break + } + if (n === o) for (var n = a - 1; n >= 0; n--) { + var r = e[n].interval; + if (r[0] <= t && t <= r[1]) { + a = n; + break + } + } + return n >= 0 && n < o && i[n] + } + } + + function Zp(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] + } + } + + function Up(t) { + var e = t.dimensions; + return "lng" === e[0] && "lat" === e[1] + } + + function Xp(t, e, i, n) { + var o = t.getItemLayout(e), a = i.get("symbolRepeat"), r = i.get("symbolClip"), + s = i.get("symbolPosition") || "start", l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0, + u = i.get("symbolPatternSize") || 2, h = i.isAnimationEnabled(), c = { + dataIndex: e, + layout: o, + itemModel: i, + symbolType: t.getItemVisual(e, "symbol") || "circle", + color: t.getItemVisual(e, "color"), + symbolClip: r, + symbolRepeat: a, + symbolRepeatDirection: i.get("symbolRepeatDirection"), + symbolPatternSize: u, + rotation: l, + animationModel: h ? i : null, + hoverAnimation: h && i.get("hoverAnimation"), + z2: i.getShallow("z", !0) || 0 + }; + jp(i, a, o, n, c), qp(t, e, o, a, r, c.boundingLength, c.pxSign, u, n, c), Kp(i, c.symbolScale, l, n, c); + var d = c.symbolSize, f = i.get("symbolOffset"); + return y(f) && (f = [Do(f[0], d[0]), Do(f[1], d[1])]), $p(i, d, o, a, r, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c + } + + function jp(t, e, i, n, o) { + var a, r = n.valueDim, s = t.get("symbolBoundingData"), l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), + u = l.toGlobalCoord(l.dataToCoord(0)), h = 1 - +(i[r.wh] <= 0); + if (y(s)) { + var c = [Yp(l, s[0]) - u, Yp(l, s[1]) - u]; + c[1] < c[0] && c.reverse(), a = c[h] + } else a = null != s ? Yp(l, s) - u : e ? n.coordSysExtent[r.index][h] - u : i[r.wh]; + o.boundingLength = a, e && (o.repeatCutLength = i[r.wh]), o.pxSign = a > 0 ? 1 : a < 0 ? -1 : 0 + } + + function Yp(t, e) { + return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e))) + } + + function qp(t, e, i, n, o, a, r, s, l, u) { + var h = l.valueDim, c = l.categoryDim, d = Math.abs(i[c.wh]), f = t.getItemVisual(e, "symbolSize"); + y(f) ? f = f.slice() : (null == f && (f = "100%"), f = [f, f]), f[c.index] = Do(f[c.index], d), f[h.index] = Do(f[h.index], n ? d : Math.abs(a)), u.symbolSize = f, (u.symbolScale = [f[0] / s, f[1] / s])[h.index] *= (l.isHorizontal ? -1 : 1) * r + } + + function Kp(t, e, i, n, o) { + var a = t.get(FL) || 0; + a && (ZL.attr({ + scale: e.slice(), + rotation: i + }), ZL.updateTransform(), a /= ZL.getLineScale(), a *= e[n.valueDim.index]), o.valueLineWidth = a + } + + function $p(t, e, i, n, o, r, s, l, u, h, c, d) { + var f = c.categoryDim, p = c.valueDim, g = d.pxSign, m = Math.max(e[p.index] + l, 0), v = m; + if (n) { + var y = Math.abs(u), x = T(t.get("symbolMargin"), "15%") + "", _ = !1; + x.lastIndexOf("!") === x.length - 1 && (_ = !0, x = x.slice(0, x.length - 1)), x = Do(x, e[p.index]); + var w = Math.max(m + 2 * x, 0), b = _ ? 0 : 2 * x, S = Wo(n), M = S ? n : pg((y + b) / w); + w = m + 2 * (x = (y - M * m) / 2 / (_ ? M : M - 1)), b = _ ? 0 : 2 * x, S || "fixed" === n || (M = h ? pg((Math.abs(h) + b) / w) : 0), v = M * w - b, d.repeatTimes = M, d.symbolMargin = x + } + var I = g * (v / 2), D = d.pathPosition = []; + D[f.index] = i[f.wh] / 2, D[p.index] = "start" === s ? I : "end" === s ? u - I : u / 2, r && (D[0] += r[0], D[1] += r[1]); + var A = d.bundlePosition = []; + A[f.index] = i[f.xy], A[p.index] = i[p.xy]; + var C = d.barRectShape = a({}, i); + C[p.wh] = g * Math.max(Math.abs(i[p.wh]), Math.abs(D[p.index] + I)), C[f.wh] = i[f.wh]; + var L = d.clipShape = {}; + L[f.xy] = -i[f.xy], L[f.wh] = c.ecSize[f.wh], L[p.xy] = 0, L[p.wh] = i[p.wh] + } + + function Jp(t) { + var e = t.symbolPatternSize, i = Tl(t.symbolType, -e / 2, -e / 2, e, e, t.color); + return i.attr({culling: !0}), "image" !== i.type && i.setStyle({strokeNoScale: !0}), i + } + + function Qp(t, e, i, n) { + function o(t) { + var e = l.slice(), n = i.pxSign, o = t; + return ("start" === i.symbolRepeatDirection ? n > 0 : n < 0) && (o = h - 1 - t), e[u.index] = d * (o - h / 2 + .5) + l[u.index], { + position: e, + scale: i.symbolScale.slice(), + rotation: i.rotation + } + } + + var a = t.__pictorialBundle, r = i.symbolSize, s = i.valueLineWidth, l = i.pathPosition, u = e.valueDim, + h = i.repeatTimes || 0, c = 0, d = r[e.valueDim.index] + s + 2 * i.symbolMargin; + for (cg(t, function (t) { + t.__pictorialAnimationIndex = c, t.__pictorialRepeatTimes = h, c < h ? dg(t, null, o(c), i, n) : dg(t, null, {scale: [0, 0]}, i, n, function () { + a.remove(t) + }), rg(t, i), c++ + }); c < h; c++) { + var f = Jp(i); + f.__pictorialAnimationIndex = c, f.__pictorialRepeatTimes = h, a.add(f); + var p = o(c); + dg(f, {position: p.position, scale: [0, 0]}, { + scale: p.scale, + rotation: p.rotation + }, i, n), f.on("mouseover", function () { + cg(t, function (t) { + t.trigger("emphasis") + }) + }).on("mouseout", function () { + cg(t, function (t) { + t.trigger("normal") + }) + }), rg(f, i) + } + } + + function tg(t, e, i, n) { + var o = t.__pictorialBundle, a = t.__pictorialMainPath; + a ? dg(a, null, { + position: i.pathPosition.slice(), + scale: i.symbolScale.slice(), + rotation: i.rotation + }, i, n) : (a = t.__pictorialMainPath = Jp(i), o.add(a), dg(a, { + position: i.pathPosition.slice(), + scale: [0, 0], + rotation: i.rotation + }, {scale: i.symbolScale.slice()}, i, n), a.on("mouseover", function () { + this.trigger("emphasis") + }).on("mouseout", function () { + this.trigger("normal") + })), rg(a, i) + } + + function eg(t, e, i) { + var n = a({}, e.barRectShape), o = t.__pictorialBarRect; + o ? dg(o, null, {shape: n}, e, i) : (o = t.__pictorialBarRect = new SS({ + z2: 2, + shape: n, + silent: !0, + style: {stroke: "transparent", fill: "transparent", lineWidth: 0} + }), t.add(o)) + } + + function ig(t, e, i, n) { + if (i.symbolClip) { + var o = t.__pictorialClipPath, r = a({}, i.clipShape), s = e.valueDim, l = i.animationModel, + u = i.dataIndex; + if (o) fo(o, {shape: r}, l, u); else { + r[s.wh] = 0, o = new SS({shape: r}), t.__pictorialBundle.setClipPath(o), t.__pictorialClipPath = o; + var h = {}; + h[s.wh] = i.clipShape[s.wh], BS[n ? "updateProps" : "initProps"](o, {shape: h}, l, u) + } + } + } + + function ng(t, e) { + var i = t.getItemModel(e); + return i.getAnimationDelayParams = og, i.isAnimationEnabled = ag, i + } + + function og(t) { + return {index: t.__pictorialAnimationIndex, count: t.__pictorialRepeatTimes} + } + + function ag() { + return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation") + } + + function rg(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 sg(t, e, i, n) { + var o = new sw, a = new sw; + return o.add(a), o.__pictorialBundle = a, a.attr("position", i.bundlePosition.slice()), i.symbolRepeat ? Qp(o, e, i) : tg(o, e, i), eg(o, i, n), ig(o, e, i, n), o.__pictorialShapeStr = hg(t, i), o.__pictorialSymbolMeta = i, o + } + + function lg(t, e, i) { + var n = i.animationModel, o = i.dataIndex; + fo(t.__pictorialBundle, {position: i.bundlePosition.slice()}, n, o), i.symbolRepeat ? Qp(t, e, i, !0) : tg(t, e, i, !0), eg(t, i, !0), ig(t, e, i, !0) + } + + function ug(t, e, i, n) { + var o = n.__pictorialBarRect; + o && (o.style.text = null); + var a = []; + cg(n, function (t) { + a.push(t) + }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), d(a, function (t) { + fo(t, {scale: [0, 0]}, i, e, function () { + n.parent && n.parent.remove(n) + }) + }), t.setItemGraphicEl(e, null) + } + + function hg(t, e) { + return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":") + } + + function cg(t, e, i) { + d(t.__pictorialBundle.children(), function (n) { + n !== t.__pictorialBarRect && e.call(i, n) + }) + } + + function dg(t, e, i, n, o, a) { + e && t.attr(e), n.symbolClip && !o ? i && t.attr(i) : i && BS[o ? "updateProps" : "initProps"](t, i, n.animationModel, n.dataIndex, a) + } + + function fg(t, e, i) { + var n = i.color, o = i.dataIndex, a = i.itemModel, s = a.getModel("itemStyle").getItemStyle(["color"]), + l = a.getModel("emphasis.itemStyle").getItemStyle(), u = a.getShallow("cursor"); + cg(t, function (t) { + t.setColor(n), t.setStyle(r({fill: n, opacity: i.opacity}, s)), eo(t, l), u && (t.cursor = u), t.z2 = i.z2 + }); + var h = {}, c = e.valueDim.posDesc[+(i.boundingLength > 0)], d = t.__pictorialBarRect; + ih(d.style, h, a, n, e.seriesModel, o, c), eo(d, h) + } + + function pg(t) { + var e = Math.round(t); + return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t) + } + + function gg(t, e, i) { + this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model = t + } + + function mg(t, e) { + e = e || {}; + var i = t.coordinateSystem, n = t.axis, o = {}, a = n.position, r = n.orient, s = i.getRect(), + l = [s.x, s.x + s.width, s.y, s.y + s.height], + u = {horizontal: {top: l[2], bottom: l[3]}, vertical: {left: l[0], right: l[1]}}; + o.position = ["vertical" === r ? u.vertical[a] : l[0], "horizontal" === r ? u.horizontal[a] : l[3]]; + var h = {horizontal: 0, vertical: 1}; + o.rotation = Math.PI / 2 * h[r]; + var c = {top: -1, bottom: 1, right: 1, left: -1}; + o.labelDirection = o.tickDirection = o.nameDirection = c[a], t.get("axisTick.inside") && (o.tickDirection = -o.tickDirection), T(e.labelInside, t.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection); + var d = e.rotate; + return null == d && (d = t.get("axisLabel.rotate")), o.labelRotation = "top" === a ? -d : d, o.z2 = 1, o + } + + function vg(t, e, i, n, o) { + var r = t.axis; + if (!r.scale.isBlank() && r.containData(e)) if (t.involveSeries) { + var s = yg(e, t), l = s.payloadBatch, u = s.snapToValue; + l[0] && null == o.seriesIndex && a(o, l[0]), !n && t.snap && r.containData(u) && null != u && (e = u), i.showPointer(t, e, l, o), i.showTooltip(t, s, u) + } else i.showPointer(t, e) + } + + function yg(t, e) { + var i = e.axis, n = i.dim, o = t, a = [], r = Number.MAX_VALUE, s = -1; + return $L(e.seriesModels, function (e, l) { + var u, h, c = e.getData().mapDimension(n, !0); + if (e.getAxisTooltipData) { + var d = e.getAxisTooltipData(c, t, i); + h = d.dataIndices, u = d.nestestValue + } else { + if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === i.type ? .5 : null)).length) return; + u = e.getData().get(c[0], h[0]) + } + if (null != u && isFinite(u)) { + var f = t - u, p = Math.abs(f); + p <= r && ((p < r || f >= 0 && s < 0) && (r = p, s = f, o = u, a.length = 0), $L(h, function (t) { + a.push({seriesIndex: e.seriesIndex, dataIndexInside: t, dataIndex: e.getData().getRawIndex(t)}) + })) + } + }), {payloadBatch: a, snapToValue: o} + } + + function xg(t, e, i, n) { + t[e.key] = {value: i, payloadBatch: n} + } + + function _g(t, e, i, n) { + var o = i.payloadBatch, a = e.axis, r = a.model, s = e.axisPointerModel; + if (e.triggerTooltip && o.length) { + var l = e.coordSys.model, u = Ju(l), h = t.map[u]; + h || (h = t.map[u] = { + coordSysId: l.id, + coordSysIndex: l.componentIndex, + coordSysType: l.type, + coordSysMainType: l.mainType, + dataByAxis: [] + }, t.list.push(h)), h.dataByAxis.push({ + axisDim: a.dim, + axisIndex: r.componentIndex, + axisType: r.type, + axisId: r.id, + value: n, + valueLabelOpt: {precision: s.get("label.precision"), formatter: s.get("label.formatter")}, + seriesDataIndices: o.slice() + }) + } + } + + function wg(t, e, i) { + var n = i.axesInfo = []; + $L(e, function (e, i) { + var o = e.axisPointerModel.option, a = t[i]; + a ? (!e.useHandle && (o.status = "show"), o.value = a.value, o.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (o.status = "hide"), "show" === o.status && n.push({ + axisDim: e.axis.dim, + axisIndex: e.axis.model.componentIndex, + value: o.value + }) + }) + } + + function bg(t, e, i, n) { + if (!Tg(e) && t.list.length) { + var o = ((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: o.dataIndexInside, + dataIndex: o.dataIndex, + seriesIndex: o.seriesIndex, + dataByCoordSys: t.list + }) + } else n({type: "hideTip"}) + } + + function Sg(t, e, i) { + var n = i.getZr(), o = QL(n).axisPointerLastHighlights || {}, a = QL(n).axisPointerLastHighlights = {}; + $L(t, function (t, e) { + var i = t.axisPointerModel.option; + "show" === i.status && $L(i.seriesDataIndices, function (t) { + var e = t.seriesIndex + " | " + t.dataIndex; + a[e] = t + }) + }); + var r = [], s = []; + d(o, function (t, e) { + !a[e] && s.push(t) + }), d(a, function (t, e) { + !o[e] && r.push(t) + }), s.length && i.dispatchAction({ + type: "downplay", + escapeConnect: !0, + batch: s + }), r.length && i.dispatchAction({type: "highlight", escapeConnect: !0, batch: r}) + } + + function Mg(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 + } + } + + function Ig(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 Tg(t) { + return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1]) + } + + function Dg(t, e, i) { + if (!a_.node) { + var n = e.getZr(); + tk(n).records || (tk(n).records = {}), Ag(n, e), (tk(n).records[t] || (tk(n).records[t] = {})).handler = i + } + } + + function Ag(t, e) { + function i(i, n) { + t.on(i, function (i) { + var o = Pg(e); + ek(tk(t).records, function (t) { + t && n(t, i, o.dispatchAction) + }), Cg(o.pendings, e) + }) + } + + tk(t).initialized || (tk(t).initialized = !0, i("click", v(kg, "click")), i("mousemove", v(kg, "mousemove")), i("globalout", Lg)) + } + + function Cg(t, e) { + var i, n = t.showTip.length, o = t.hideTip.length; + n ? i = t.showTip[n - 1] : o && (i = t.hideTip[o - 1]), i && (i.dispatchAction = null, e.dispatchAction(i)) + } + + function Lg(t, e, i) { + t.handler("leave", null, i) + } + + function kg(t, e, i, n) { + e.handler(t, i, n) + } + + function Pg(t) { + var e = {showTip: [], hideTip: []}, i = function (n) { + var o = e[n.type]; + o ? o.push(n) : (n.dispatchAction = i, t.dispatchAction(n)) + }; + return {dispatchAction: i, pendings: e} + } + + function Ng(t, e) { + if (!a_.node) { + var i = e.getZr(); + (tk(i).records || {})[t] && (tk(i).records[t] = null) + } + } + + function Og() { + } + + function Eg(t, e, i, n) { + Rg(nk(i).lastProp, n) || (nk(i).lastProp = n, e ? fo(i, n, t) : (i.stopAnimation(), i.attr(n))) + } + + function Rg(t, e) { + if (w(t) && w(e)) { + var i = !0; + return d(e, function (e, n) { + i = i && Rg(t[n], e) + }), !!i + } + return t === e + } + + function zg(t, e) { + t[e.get("label.show") ? "show" : "hide"]() + } + + function Bg(t) { + return {position: t.position.slice(), rotation: t.rotation || 0} + } + + function Vg(t, e, i) { + var n = e.get("z"), o = e.get("zlevel"); + t && t.traverse(function (t) { + "group" !== t.type && (null != n && (t.z = n), null != o && (t.zlevel = o), t.silent = i) + }) + } + + function Gg(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 + } + + function Wg(t, e, i, n, o) { + var a = Hg(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 = KS(r.get("padding") || 0), l = r.getFont(), u = me(a, l), h = o.position, + c = u.width + s[1] + s[3], d = u.height + s[0] + s[2], f = o.align; + "right" === f && (h[0] -= c), "center" === f && (h[0] -= c / 2); + var p = o.verticalAlign; + "bottom" === p && (h[1] -= d), "middle" === p && (h[1] -= d / 2), Fg(h, 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: h.slice(), + style: { + text: a, + 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 Fg(t, e, i, n) { + var o = n.getWidth(), a = n.getHeight(); + t[0] = Math.min(t[0] + e, o) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0) + } + + function Hg(t, e, i, n, o) { + t = e.scale.parse(t); + var a = e.scale.getLabel(t, {precision: o.precision}), r = o.formatter; + if (r) { + var s = {value: bl(e, t), seriesData: []}; + d(n, function (t) { + var e = i.getSeriesByIndex(t.seriesIndex), n = t.dataIndexInside, o = e && e.getDataParams(n); + o && s.seriesData.push(o) + }), _(r) ? a = r.replace("{value}", a) : x(r) && (a = r(s)) + } + return a + } + + function Zg(t, e, i) { + var n = st(); + return dt(n, n, i.rotation), ct(n, n, i.position), mo([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n) + } + + function Ug(t, e, i, n, o, a) { + var r = LD.innerTextLayout(i.rotation, 0, i.labelDirection); + i.labelMargin = o.get("label.margin"), Wg(e, n, o, a, { + position: Zg(n.axis, t, i), + align: r.textAlign, + verticalAlign: r.textVerticalAlign + }) + } + + function Xg(t, e, i) { + return i = i || 0, {x1: t[i], y1: t[1 - i], x2: e[i], y2: e[1 - i]} + } + + function jg(t, e, i) { + return i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]} + } + + function Yg(t, e, i, n, o, a) { + return {cx: t, cy: e, r0: i, r: n, startAngle: o, endAngle: a, clockwise: !0} + } + + function qg(t, e) { + var i = {}; + return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i) + } + + function Kg(t) { + return "x" === t.dim ? 0 : 1 + } + + function $g(t) { + return t.isHorizontal() ? 0 : 1 + } + + function Jg(t, e) { + var i = t.getRect(); + return [i[lk[e]], i[lk[e]] + i[uk[e]]] + } + + function Qg(t, e, i) { + var n = new SS({shape: {x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20}}); + return po(n, {shape: {width: t.width + 20, height: t.height + 20}}, e, i), n + } + + function tm(t, e, i) { + if (t.count()) for (var n, o = e.coordinateSystem, a = e.getLayerSeries(), r = t.mapDimension("single"), s = t.mapDimension("value"), l = f(a, function (e) { + return f(e.indices, function (e) { + var i = o.dataToPoint(t.get(r, e)); + return i[1] = t.get(s, e), i + }) + }), u = em(l), h = u.y0, c = i / u.max, d = a.length, p = a[0].indices.length, g = 0; g < p; ++g) { + n = h[g] * c, t.setItemLayout(a[0].indices[g], {layerIndex: 0, x: l[0][g][0], y0: n, y: l[0][g][1] * c}); + for (var m = 1; m < d; ++m) n += l[m - 1][g][1] * c, t.setItemLayout(a[m].indices[g], { + layerIndex: m, + x: l[m][g][0], + y0: n, + y: l[m][g][1] * c + }) + } + } + + function em(t) { + for (var e = t.length, i = t[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) { + for (var l = 0, u = 0; l < e; ++l) u += t[l][s][1]; + u > a && (a = u), n.push(u) + } + for (var h = 0; h < i; ++h) o[h] = (a - n[h]) / 2; + a = 0; + for (var c = 0; c < i; ++c) { + var d = n[c] + o[c]; + d > a && (a = d) + } + return r.y0 = o, r.max = a, r + } + + function im(t) { + var e = 0; + d(t.children, function (t) { + im(t); + var i = t.value; + y(i) && (i = i[0]), e += i + }); + var i = t.value; + y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i + } + + function nm(t, e, i) { + function n() { + r.ignore = r.hoverIgnore + } + + function o() { + r.ignore = r.normalIgnore + } + + sw.call(this); + var a = new vS({z2: pk}); + a.seriesIndex = e.seriesIndex; + var r = new fS({z2: gk, silent: t.getModel("label").get("silent")}); + this.add(a), this.add(r), this.updateData(!0, t, "normal", e, i), this.on("emphasis", n).on("normal", o).on("mouseover", n).on("mouseout", o) + } + + function om(t, e, i) { + var n = t.getVisual("color"), o = t.getVisual("visualMeta"); + o && 0 !== o.length || (n = null); + var a = t.getModel("itemStyle").get("color"); + if (a) return a; + if (n) return n; + if (0 === t.depth) return i.option.color[0]; + var r = i.option.color.length; + return a = i.option.color[am(t) % r] + } + + function am(t) { + for (var e = t; e.depth > 1;) e = e.parentNode; + return l(t.getAncestors()[0].children, e) + } + + function rm(t, e, i) { + return i !== fk.NONE && (i === fk.SELF ? t === e : i === fk.ANCESTOR ? t === e || t.isAncestorOf(e) : t === e || t.isDescendantOf(e)) + } + + function sm(t, e) { + var i = t.children || []; + t.children = lm(i, e), i.length && d(t.children, function (t) { + sm(t, e) + }) + } + + function lm(t, e) { + if ("function" == typeof e) return t.sort(e); + var i = "asc" === e; + return t.sort(function (t, e) { + var n = (t.getValue() - e.getValue()) * (i ? 1 : -1); + return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n + }) + } + + function um(t, e) { + return e = e || [0, 0], f(["x", "y"], function (i, n) { + var o = this.getAxis(i), a = e[n], r = t[n] / 2; + return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r)) + }, this) + } + + function hm(t, e) { + return e = e || [0, 0], f([0, 1], function (i) { + var n = e[i], o = t[i] / 2, a = [], r = []; + return a[i] = n - o, r[i] = n + o, a[1 - i] = r[1 - i] = e[1 - i], Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(r)[i]) + }, this) + } + + function cm(t, e) { + var i = this.getAxis(), n = e instanceof Array ? e[0] : e, o = (t instanceof Array ? t[0] : t) / 2; + return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o)) + } + + function dm(t, e) { + return f(["Radius", "Angle"], function (i, n) { + var o = this["get" + i + "Axis"](), a = e[n], r = t[n] / 2, s = "dataTo" + i, + l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r)); + return "Angle" === i && (l = l * Math.PI / 180), l + }, this) + } + + function fm(t) { + var e, i = t.type; + if ("path" === i) { + var n = t.shape; + (e = Rn(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 Je({})).__customImagePath = t.style.image : "text" === i ? (e = new fS({})).__customText = t.style.text : e = new (0, BS[i.charAt(0).toUpperCase() + i.slice(1)]); + return e.__customGraphicType = i, e.name = t.name, e + } + + function pm(t, e, n, o, a, r) { + var s = {}, l = n.style || {}; + if (n.shape && (s.shape = i(n.shape)), n.position && (s.position = n.position.slice()), n.scale && (s.scale = n.scale.slice()), n.origin && (s.origin = n.origin.slice()), n.rotation && (s.rotation = n.rotation), "image" === t.type && n.style) { + u = s.style = {}; + d(["x", "y", "width", "height"], function (e) { + gm(e, u, l, t.style, r) + }) + } + if ("text" === t.type && n.style) { + var u = s.style = {}; + d(["x", "y"], function (e) { + gm(e, u, l, t.style, r) + }), !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill), !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke) + } + if ("group" !== t.type && (t.useStyle(l), r)) { + t.style.opacity = 0; + var h = l.opacity; + null == h && (h = 1), po(t, {style: {opacity: h}}, o, e) + } + r ? t.attr(s) : fo(t, s, o, e), t.attr({ + z2: n.z2 || 0, + silent: n.silent + }), !1 !== n.styleEmphasis && eo(t, n.styleEmphasis) + } + + function gm(t, e, i, n, o) { + null == i[t] || o || (e[t] = i[t], i[t] = n[t]) + } + + function mm(t, e, i, n) { + function o(t) { + null == t && (t = h), v && (c = e.getItemModel(t), d = c.getModel(bk), f = c.getModel(Sk), p = e.getItemVisual(t, "color"), v = !1) + } + + var s = t.get("renderItem"), l = t.coordinateSystem, u = {}; + l && (u = l.prepareCustoms ? l.prepareCustoms() : Ik[l.type](l)); + var h, c, d, f, p, g = r({ + getWidth: n.getWidth, + getHeight: n.getHeight, + getZr: n.getZr, + getDevicePixelRatio: n.getDevicePixelRatio, + value: function (t, i) { + return null == i && (i = h), e.get(e.getDimension(t || 0), i) + }, + style: function (i, n) { + null == n && (n = h), o(n); + var r = c.getModel(_k).getItemStyle(); + null != p && (r.fill = p); + var s = e.getItemVisual(n, "opacity"); + return null != s && (r.opacity = s), no(r, d, null, { + autoColor: p, + isRectText: !0 + }), r.text = d.getShallow("show") ? D(t.getFormattedLabel(n, "normal"), ql(e, n)) : null, i && a(r, i), r + }, + styleEmphasis: function (i, n) { + null == n && (n = h), o(n); + var r = c.getModel(wk).getItemStyle(); + return no(r, f, null, {isRectText: !0}, !0), r.text = f.getShallow("show") ? A(t.getFormattedLabel(n, "emphasis"), t.getFormattedLabel(n, "normal"), ql(e, n)) : null, i && a(r, i), r + }, + visual: function (t, i) { + return null == i && (i = h), e.getItemVisual(i, t) + }, + barLayout: function (t) { + if (l.getBaseAxis) return rl(r({axis: l.getBaseAxis()}, t), n) + }, + currentSeriesIndices: function () { + return i.getCurrentSeriesIndices() + }, + font: function (t) { + return ho(t, i) + } + }, u.api || {}), m = { + context: {}, + seriesId: t.id, + seriesName: t.name, + seriesIndex: t.seriesIndex, + coordSys: u.coordSys, + dataInsideLength: e.count(), + encode: vm(t.getData()) + }, v = !0; + return function (t) { + return h = t, v = !0, s && s(r({dataIndexInside: t, dataIndex: e.getRawIndex(t)}, m), g) || {} + } + } + + function vm(t) { + var e = {}; + return d(t.dimensions, function (i, n) { + var o = t.getDimensionInfo(i); + if (!o.isExtraCoord) { + var a = o.coordDim; + (e[a] = e[a] || [])[o.coordDimIndex] = n + } + }), e + } + + function ym(t, e, i, n, o, a) { + return (t = xm(t, e, i, n, o, a)) && a.setItemGraphicEl(e, t), t + } + + function xm(t, e, i, n, o, a) { + 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 || (o.remove(t), t = null), null != r) { + var s = !t; + if (!t && (t = fm(i)), pm(t, e, i, n, a, s), "group" === r) { + var l = t.children() || [], u = i.children || []; + if (i.diffChildrenByName) _m({ + oldChildren: l, + newChildren: u, + dataIndex: e, + animatableModel: n, + group: t, + data: a + }); else { + for (var h = 0; h < u.length; h++) xm(t.childAt(h), e, u[h], n, t, a); + for (; h < l.length; h++) l[h] && t.remove(l[h]) + } + } + return o.add(t), t + } + } + + function _m(t) { + new Ss(t.oldChildren, t.newChildren, wm, wm, t).add(bm).update(bm).remove(Sm).execute() + } + + function wm(t, e) { + var i = t && t.name; + return null != i ? i : Mk + e + } + + function bm(t, e) { + var i = this.context, n = null != t ? i.newChildren[t] : null; + xm(null != e ? i.oldChildren[e] : null, i.dataIndex, n, i.animatableModel, i.group, i.data) + } + + function Sm(t) { + var e = this.context, i = e.oldChildren[t]; + i && e.group.remove(i) + } + + function Mm(t, e, i, n) { + var o = i.type, a = new (0, BS[o.charAt(0).toUpperCase() + o.slice(1)])(i); + e.add(a), n.set(t, a), a.__ecGraphicId = t + } + + function Im(t, e) { + var i = t && t.parent; + i && ("group" === t.type && t.traverse(function (t) { + Im(t, e) + }), e.removeKey(t.__ecGraphicId), i.remove(t)) + } + + function Tm(t) { + return t = a({}, t), d(["id", "parentId", "$action", "hv", "bounding"].concat(aM), function (e) { + delete t[e] + }), t + } + + function Dm(t, e) { + var i; + return d(e, function (e) { + null != t[e] && "auto" !== t[e] && (i = !0) + }), i + } + + function Am(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 + } + + function Cm(t, e, i) { + var o = a({}, i), r = t[e], s = i.$action || "merge"; + "merge" === s ? r ? (n(r, o, !0), ia(r, o, {ignoreSize: !0}), oa(i, r)) : t[e] = o : "replace" === s ? t[e] = o : "remove" === s && r && (t[e] = null) + } + + function Lm(t, e) { + t && (t.hv = e.hv = [Dm(e, ["left", "right"]), Dm(e, ["top", "bottom"])], "group" === t.type && (null == t.width && (t.width = e.width = 0), null == t.height && (t.height = e.height = 0))) + } + + function km(t, e, i) { + var n, o = {}, a = "toggleSelected" === t; + return i.eachComponent("legend", function (i) { + a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name), n = i.isSelected(e.name)), d(i.getData(), function (t) { + var e = t.get("name"); + if ("\n" !== e && "" !== e) { + var n = i.isSelected(e); + o.hasOwnProperty(e) ? o[e] = o[e] && n : o[e] = n + } + }) + }), {name: e.name, selected: o} + } + + function Pm(t, e, i) { + var n = e.getBoxLayoutParams(), o = e.get("padding"), a = {width: i.getWidth(), height: i.getHeight()}, + r = Qo(n, a, o); + sM(e.get("orient"), t, e.get("itemGap"), r.width, r.height), ta(t, n, a, o) + } + + function Nm(t, e) { + var i = KS(e.get("padding")), n = e.getItemStyle(["color", "opacity"]); + return n.fill = e.get("backgroundColor"), t = new SS({ + 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 + }) + } + + function Om(t, e) { + e.dispatchAction({type: "legendToggleSelect", name: t}) + } + + function Em(t, e, i, n) { + var o = i.getZr().storage.getDisplayList()[0]; + o && o.useHoverLayer || i.dispatchAction({type: "highlight", seriesName: t.name, name: e, excludeSeriesId: n}) + } + + function Rm(t, e, i, n) { + var o = i.getZr().storage.getDisplayList()[0]; + o && o.useHoverLayer || i.dispatchAction({type: "downplay", seriesName: t.name, name: e, excludeSeriesId: n}) + } + + function zm(t, e, i) { + var n = [1, 1]; + n[t.getOrient().index] = 0, ia(e, i, {type: "box", ignoreSize: n}) + } + + function Bm(t) { + var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)"; + return f(Vk, function (t) { + return t + "transition:" + e + }).join(";") + } + + function Vm(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"), zk(["decoration", "align"], function (i) { + var n = t.get(i); + n && e.push("text-" + i + ":" + n) + }), e.join(";") + } + + function Gm(t) { + var e = [], i = t.get("transitionDuration"), n = t.get("backgroundColor"), o = t.getModel("textStyle"), + a = t.get("padding"); + return i && e.push(Bm(i)), n && (a_.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + Pt(n)), e.push("filter:alpha(opacity=70)"))), zk(["width", "color", "radius"], function (i) { + var n = "border-" + i, o = Bk(n), a = t.get(o); + null != a && e.push(n + ":" + a + ("color" === i ? "" : "px")) + }), e.push(Vm(o)), null != a && e.push("padding:" + KS(a).join("px ") + "px"), e.join(";") + ";" + } + + function Wm(t, e) { + if (a_.wxa) return null; + 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 o = this; + i.onmouseenter = function () { + o._enterable && (clearTimeout(o._hideTimeout), o._show = !0), o._inContent = !0 + }, i.onmousemove = function (e) { + if (e = e || window.event, !o._enterable) { + var i = n.handler; + li(t, e, !0), i.dispatch("mousemove", e) + } + }, i.onmouseleave = function () { + o._enterable && o._show && o.hideLater(o._hideDelay), o._inContent = !1 + } + } + + function Fm(t) { + for (var e = t.pop(); t.length;) { + var i = t.pop(); + i && (wo.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {formatter: i}), e = new wo(i, e, e.ecModel)) + } + return e + } + + function Hm(t, e) { + return t.dispatchAction || m(e.dispatchAction, e) + } + + function Zm(t, e, i, n, o, a, r) { + var s = Xm(i), l = s.width, u = s.height; + return null != a && (t + l + a > n ? t -= l + a : t += a), null != r && (e + u + r > o ? e -= u + r : e += r), [t, e] + } + + function Um(t, e, i, n, o) { + var a = Xm(i), r = a.width, s = a.height; + return t = Math.min(t + r, n) - r, e = Math.min(e + s, o) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e] + } + + function Xm(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 jm(t, e, i) { + var n = i[0], o = i[1], a = 0, r = 0, s = e.width, l = e.height; + switch (t) { + case"inside": + a = e.x + s / 2 - n / 2, r = e.y + l / 2 - o / 2; + break; + case"top": + a = e.x + s / 2 - n / 2, r = e.y - o - 5; + break; + case"bottom": + a = e.x + s / 2 - n / 2, r = e.y + l + 5; + break; + case"left": + a = e.x - n - 5, r = e.y + l / 2 - o / 2; + break; + case"right": + a = e.x + s + 5, r = e.y + l / 2 - o / 2 + } + return [a, r] + } + + function Ym(t) { + return "center" === t || "middle" === t + } + + function qm(t) { + return t.get("stack") || "__ec_stack_" + t.seriesIndex + } + + function Km(t) { + return t.dim + } + + function $m(t, e) { + var i = {}; + d(t, function (t, e) { + var n = t.getData(), o = t.coordinateSystem.getBaseAxis(), a = o.getExtent(), + r = "category" === o.type ? o.getBandWidth() : Math.abs(a[1] - a[0]) / n.count(), s = i[Km(o)] || { + bandWidth: r, + remainedWidth: r, + autoWidthCount: 0, + categoryGap: "20%", + gap: "30%", + stacks: {} + }, l = s.stacks; + i[Km(o)] = s; + var u = qm(t); + l[u] || s.autoWidthCount++, l[u] = l[u] || {width: 0, maxWidth: 0}; + var h = Do(t.get("barWidth"), r), c = Do(t.get("barMaxWidth"), r), d = t.get("barGap"), + f = t.get("barCategoryGap"); + h && !l[u].width && (h = Math.min(s.remainedWidth, h), l[u].width = h, s.remainedWidth -= h), c && (l[u].maxWidth = c), null != d && (s.gap = d), null != f && (s.categoryGap = f) + }); + var n = {}; + return d(i, function (t, e) { + n[e] = {}; + var i = t.stacks, o = t.bandWidth, a = Do(t.categoryGap, o), r = Do(t.gap, 1), s = t.remainedWidth, + l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); + u = Math.max(u, 0), d(i, function (t, e) { + var i = t.maxWidth; + i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) + }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); + var h, c = 0; + d(i, function (t, e) { + t.width || (t.width = u), h = t, c += t.width * (1 + r) + }), h && (c -= h.width * r); + var f = -c / 2; + d(i, function (t, i) { + n[e][i] = n[e][i] || {offset: f, width: t.width}, f += t.width * (1 + r) + }) + }), n + } + + function Jm(t, e) { + qT.call(this, "radius", t, e), this.type = "category" + } + + function Qm(t, e) { + e = e || [0, 360], qT.call(this, "angle", t, e), this.type = "category" + } + + function tv(t, e) { + return e.type || (e.data ? "category" : "value") + } + + function ev(t, e, i) { + var n = e.get("center"), o = i.getWidth(), a = i.getHeight(); + t.cx = Do(n[0], o), t.cy = Do(n[1], a); + var r = t.getRadiusAxis(), s = Math.min(o, a) / 2, l = Do(e.get("radius"), s); + r.inverse ? r.setExtent(l, 0) : r.setExtent(0, l) + } + + function iv(t, e) { + var i = this, n = i.getAngleAxis(), o = i.getRadiusAxis(); + if (n.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function (t) { + if (t.coordinateSystem === i) { + var e = t.getData(); + d(e.mapDimension("radius", !0), function (t) { + o.scale.unionExtentFromData(e, Us(e, t)) + }), d(e.mapDimension("angle", !0), function (t) { + n.scale.unionExtentFromData(e, Us(e, t)) + }) + } + }), yl(n.scale, n.model), yl(o.scale, o.model), "category" === n.type && !n.onBand) { + var a = n.getExtent(), r = 360 / n.scale.count(); + n.inverse ? a[1] += r : a[1] -= r, n.setExtent(a[0], a[1]) + } + } + + function nv(t, e) { + if (t.type = e.get("type"), t.scale = xl(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 + } + + function ov(t, e, i) { + e[1] > e[0] && (e = e.slice().reverse()); + var n = t.coordToPoint([e[0], i]), o = t.coordToPoint([e[1], i]); + return {x1: n[0], y1: n[1], x2: o[0], y2: o[1]} + } + + function av(t) { + return t.getRadiusAxis().inverse ? 0 : 1 + } + + function rv(t) { + var e = t[0], i = t[t.length - 1]; + e && i && Math.abs(Math.abs(e.coord - i.coord) - 360) < 1e-4 && t.pop() + } + + function sv(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 + } + } + + function lv(t, e, i, n, o) { + var a = e.axis, r = a.dataToCoord(t), s = n.getAngleAxis().getExtent()[0]; + s = s / 180 * Math.PI; + var l, u, h, c = n.getRadiusAxis().getExtent(); + if ("radius" === a.dim) { + var d = st(); + dt(d, d, s), ct(d, d, [n.cx, n.cy]), l = mo([r, -o], d); + var f = e.getModel("axisLabel").get("rotate") || 0, p = LD.innerTextLayout(s, f * Math.PI / 180, -1); + u = p.textAlign, h = p.textVerticalAlign + } else { + var g = c[1]; + l = n.coordToPoint([g + o, r]); + var m = n.cx, v = n.cy; + u = Math.abs(l[0] - m) / g < .3 ? "center" : l[0] > m ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom" + } + return {position: l, align: u, verticalAlign: h} + } + + function uv(t, e) { + e.update = "updateView", cs(e, function (e, i) { + var n = {}; + return i.eachComponent({mainType: "geo", query: e}, function (i) { + i[t](e.name), d(i.coordinateSystem.regions, function (t) { + n[t.name] = i.isSelected(t.name) || !1 + }) + }), {selected: n, name: e.name} + }) + } + + function hv(t) { + var e = {}; + d(t, function (t) { + e[t] = 1 + }), t.length = 0, d(e, function (e, i) { + t.push(i) + }) + } + + function cv(t) { + if (t) for (var e in t) if (t.hasOwnProperty(e)) return !0 + } + + function dv(t, e, n) { + function o() { + var t = function () { + }; + return t.prototype.__hidden = t.prototype, new t + } + + var a = {}; + return tP(e, function (e) { + var r = a[e] = o(); + tP(t[e], function (t, o) { + if (ZA.isValidType(o)) { + var a = {type: o, visual: t}; + n && n(a, e), r[o] = new ZA(a), "opacity" === o && ((a = i(a)).type = "colorAlpha", r.__hidden.__alphaForOpacity = new ZA(a)) + } + }) + }), a + } + + function fv(t, e, n) { + var o; + d(n, function (t) { + e.hasOwnProperty(t) && cv(e[t]) && (o = !0) + }), o && d(n, function (n) { + e.hasOwnProperty(n) && cv(e[n]) ? t[n] = i(e[n]) : delete t[n] + }) + } + + function pv(t, e, i, n, o, a) { + function r(t) { + return i.getItemVisual(h, t) + } + + function s(t, e) { + i.setItemVisual(h, t, e) + } + + function l(t, l) { + h = null == a ? t : l; + var c = i.getRawDataItem(h); + if (!c || !1 !== c.visualMap) for (var d = n.call(o, t), f = e[d], p = u[d], g = 0, m = p.length; g < m; g++) { + var v = p[g]; + f[v] && f[v].applyVisual(t, r, s) + } + } + + var u = {}; + d(t, function (t) { + var i = ZA.prepareVisualTypes(e[t]); + u[t] = i + }); + var h; + null == a ? i.each(l) : i.each([a], l) + } + + function gv(t, e, i, n) { + var o = {}; + return d(t, function (t) { + var i = ZA.prepareVisualTypes(e[t]); + o[t] = i + }), { + progress: function (t, a) { + null != n && (n = a.getDimension(n)); + for (var r; null != (r = t.next());) { + var s = a.getRawDataItem(r); + if (s && !1 === s.visualMap) return; + for (var l = null != n ? a.get(n, r, !0) : r, u = i(l), h = e[u], c = o[u], d = 0, f = c.length; d < f; d++) { + var p = c[d]; + h[p] && h[p].applyVisual(l, function (t) { + return a.getItemVisual(r, t) + }, function (t, e) { + a.setItemVisual(r, t, e) + }) + } + } + } + } + } + + function mv(t) { + var e = ["x", "y"], i = ["width", "height"]; + return { + point: function (e, i, n) { + if (e) { + var o = n.range; + return vv(e[t], o) + } + }, rect: function (n, o, a) { + if (n) { + var r = a.range, s = [n[e[t]], n[e[t]] + n[i[t]]]; + return s[1] < s[0] && s.reverse(), vv(s[0], r) || vv(s[1], r) || vv(r[0], s) || vv(r[1], s) + } + } + } + } + + function vv(t, e) { + return e[0] <= t && t <= e[1] + } + + function yv(t, e, i, n, o) { + for (var a = 0, r = o[o.length - 1]; a < o.length; a++) { + var s = o[a]; + if (xv(t, e, i, n, s[0], s[1], r[0], r[1])) return !0; + r = s + } + } + + function xv(t, e, i, n, o, a, r, s) { + var l = wv(i - t, o - r, n - e, a - s); + if (_v(l)) return !1; + var u = wv(o - t, o - r, a - e, a - s) / l; + if (u < 0 || u > 1) return !1; + var h = wv(i - t, o - t, n - e, a - e) / l; + return !(h < 0 || h > 1) + } + + function _v(t) { + return t <= 1e-6 && t >= -1e-6 + } + + function wv(t, e, i, n) { + return t * n - e * i + } + + function bv(t, e, i) { + var n = this._targetInfoList = [], o = {}, a = Mv(e, t); + iP(lP, function (t, e) { + (!i || !i.include || nP(i.include, e) >= 0) && t(a, n, o) + }) + } + + function Sv(t) { + return t[0] > t[1] && t.reverse(), t + } + + function Mv(t, e) { + return Oi(t, e, {includeMainTypes: rP}) + } + + function Iv(t, e, i, n) { + var o = i.getAxis(["x", "y"][t]), a = Sv(f([0, 1], function (t) { + return e ? o.coordToData(o.toLocalCoord(n[t])) : o.toGlobalCoord(o.dataToCoord(n[t])) + })), r = []; + return r[t] = a, r[1 - t] = [NaN, NaN], {values: a, xyMinMax: r} + } + + function Tv(t, e, i, n) { + return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]] + } + + function Dv(t, e) { + var i = Av(t), n = Av(e), o = [i[0] / n[0], i[1] / n[1]]; + return isNaN(o[0]) && (o[0] = 1), isNaN(o[1]) && (o[1] = 1), o + } + + function Av(t) { + return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN] + } + + function Cv(t, e, i, n, o) { + if (o) { + var a = t.getZr(); + a[gP] || (a[pP] || (a[pP] = Lv), wr(a, pP, i, e)(t, n)) + } + } + + function Lv(t, e) { + if (!t.isDisposed()) { + var i = t.getZr(); + i[gP] = !0, t.dispatchAction({type: "brushSelect", batch: e}), i[gP] = !1 + } + } + + function kv(t, e, i, n) { + for (var o = 0, a = e.length; o < a; o++) { + var r = e[o]; + if (t[r.brushType](n, i, r.selectors, r)) return !0 + } + } + + function Pv(t) { + var e = t.brushSelector; + if (_(e)) { + var i = []; + return d(eP, function (t, n) { + i[n] = function (i, n, o, a) { + var r = n.getItemLayout(i); + return t[e](r, o, a) + } + }), i + } + if (x(e)) { + var n = {}; + return d(eP, function (t, i) { + n[i] = e + }), n + } + return e + } + + function Nv(t, e) { + var i = t.option.seriesIndex; + return null != i && "all" !== i && (y(i) ? l(i, e) < 0 : e !== i) + } + + function Ov(t) { + var e = t.selectors = {}; + return d(eP[t.brushType], function (i, n) { + e[n] = function (n) { + return i(n, e, t) + } + }), t + } + + function Ev(t) { + return new $t(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]) + } + + function Rv(t, e) { + return n({ + brushType: t.brushType, + brushMode: t.brushMode, + transformable: t.transformable, + brushStyle: new wo(t.brushStyle).getItemStyle(), + removeOnClick: t.removeOnClick, + z: t.z + }, e, !0) + } + + function zv(t, e, i, n) { + (!n || n.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice()) + } + + function Bv(t, e) { + xP[t] = e + } + + function Vv(t) { + return xP[t] + } + + function Gv(t, e, i) { + this.model = t, this.ecModel = e, this.api = i, this._brushType, this._brushMode + } + + function Wv(t, e, i) { + this._model = t + } + + function Fv(t, e, i, n) { + var o = i.calendarModel, a = i.seriesModel, r = o ? o.coordinateSystem : a ? a.coordinateSystem : null; + return r === this ? r[t](n) : null + } + + function Hv(t, e) { + var i = t.cellSize; + y(i) ? 1 === i.length && (i[1] = i[0]) : i = t.cellSize = [i, i]; + var n = f([0, 1], function (t) { + return ea(e, t) && (i[t] = "auto"), null != i[t] && "auto" !== i[t] + }); + ia(t, e, {type: "box", ignoreSize: n}) + } + + function Zv(t) { + return l(IP, t) >= 0 + } + + function Uv(t, e, i) { + function n(t, e) { + return l(e.nodes, t) >= 0 + } + + function o(t, n) { + var o = !1; + return e(function (e) { + d(i(t, e) || [], function (t) { + n.records[e.name][t] && (o = !0) + }) + }), o + } + + function a(t, n) { + n.nodes.push(t), e(function (e) { + d(i(t, e) || [], function (t) { + n.records[e.name][t] = !0 + }) + }) + } + + return function (i) { + var r = {nodes: [], records: {}}; + if (e(function (t) { + r.records[t.name] = {} + }), !i) return r; + a(i, r); + var s; + do { + s = !1, t(function (t) { + !n(t, r) && o(t, r) && (a(t, r), s = !0) + }) + } while (s); + return r + } + } + + function Xv(t, e, i) { + var n = [1 / 0, -1 / 0]; + return DP(i, function (t) { + var i = t.getData(); + i && DP(i.mapDimension(e, !0), function (t) { + var e = i.getApproximateExtent(t); + e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]) + }) + }), n[1] < n[0] && (n = [NaN, NaN]), jv(t, n), n + } + + function jv(t, e) { + var i = t.getAxisModel(), n = i.getMin(!0), o = "category" === i.get("type"), a = o && i.getCategories().length; + null != n && "dataMin" !== n && "function" != typeof n ? e[0] = n : o && (e[0] = a > 0 ? 0 : NaN); + var r = i.getMax(!0); + return null != r && "dataMax" !== r && "function" != typeof r ? e[1] = r : o && (e[1] = a > 0 ? a - 1 : NaN), i.get("scale", !0) || (e[0] > 0 && (e[0] = 0), e[1] < 0 && (e[1] = 0)), e + } + + function Yv(t, e) { + var i = t.getAxisModel(), n = t._percentWindow, o = t._valueWindow; + if (n) { + var a = Po(o, [0, 500]); + a = Math.min(a, 20); + var r = e || 0 === n[0] && 100 === n[1]; + i.setRange(r ? null : +o[0].toFixed(a), r ? null : +o[1].toFixed(a)) + } + } + + function qv(t) { + var e = t._minMaxSpan = {}, i = t._dataZoomModel; + DP(["min", "max"], function (n) { + e[n + "Span"] = i.get(n + "Span"); + var o = i.get(n + "ValueSpan"); + if (null != o && (e[n + "ValueSpan"] = o, null != (o = t.getAxisModel().axis.scale.parse(o)))) { + var a = t._dataExtent; + e[n + "Span"] = To(a[0] + o, a, [0, 100], !0) + } + }) + } + + function Kv(t) { + var e = {}; + return LP(["start", "end", "startValue", "endValue", "throttle"], function (i) { + t.hasOwnProperty(i) && (e[i] = t[i]) + }), e + } + + function $v(t, e) { + var i = t._rangePropMode, n = t.get("rangeMode"); + LP([["start", "startValue"], ["end", "endValue"]], function (t, o) { + var a = null != e[t[0]], r = null != e[t[1]]; + a && !r ? i[o] = "percent" : !a && r ? i[o] = "value" : n ? i[o] = n[o] : a && (i[o] = "percent") + }) + } + + function Jv(t) { + return {x: "y", y: "x", radius: "angle", angle: "radius"}[t] + } + + function Qv(t) { + return "vertical" === t ? "ns-resize" : "ew-resize" + } + + function ty(t, e) { + var i = ny(t), n = e.dataZoomId, o = e.coordId; + d(i, function (t, i) { + var a = t.dataZoomInfos; + a[n] && l(e.allCoordIds, o) < 0 && (delete a[n], t.count--) + }), ay(i); + var a = i[o]; + a || ((a = i[o] = { + coordId: o, + dataZoomInfos: {}, + count: 0 + }).controller = oy(t, a), a.dispatchAction = v(uy, t)), !a.dataZoomInfos[n] && a.count++, a.dataZoomInfos[n] = e; + var r = hy(a.dataZoomInfos); + a.controller.enable(r.controlType, r.opt), a.controller.setPointerChecker(e.containsPoint), wr(a, "dispatchAction", e.throttleRate, "fixRate") + } + + function ey(t, e) { + var i = ny(t); + d(i, function (t) { + t.controller.dispose(); + var i = t.dataZoomInfos; + i[e] && (delete i[e], t.count--) + }), ay(i) + } + + function iy(t) { + return t.type + "\0_" + t.id + } + + function ny(t) { + var e = t.getZr(); + return e[ZP] || (e[ZP] = {}) + } + + function oy(t, e) { + var i = new kh(t.getZr()); + return i.on("pan", HP(ry, e)), i.on("zoom", HP(sy, e)), i + } + + function ay(t) { + d(t, function (e, i) { + e.count || (e.controller.dispose(), delete t[i]) + }) + } + + function ry(t, e, i, n, o, a, r) { + ly(t, function (s) { + return s.panGetRange(t.controller, e, i, n, o, a, r) + }) + } + + function sy(t, e, i, n) { + ly(t, function (o) { + return o.zoomGetRange(t.controller, e, i, n) + }) + } + + function ly(t, e) { + var i = []; + d(t.dataZoomInfos, function (t) { + var n = e(t); + !t.disabled && n && i.push({dataZoomId: t.dataZoomId, start: n[0], end: n[1]}) + }), i.length && t.dispatchAction(i) + } + + function uy(t, e) { + t.dispatchAction({type: "dataZoom", batch: e}) + } + + function hy(t) { + var e, i = {}, n = {type_true: 2, type_move: 1, type_false: 0, type_undefined: -1}; + return d(t, function (t) { + var o = !t.disabled && (!t.zoomLock || "move"); + n["type_" + o] > n["type_" + e] && (e = o), a(i, t.roamControllerOpt) + }), {controlType: e, opt: i} + } + + function cy(t, e) { + return t && t.hasOwnProperty && t.hasOwnProperty(e) + } + + function dy(t, e, i, n) { + for (var o = e.targetVisuals[n], a = ZA.prepareVisualTypes(o), r = {color: t.getData().getVisual("color")}, s = 0, l = a.length; s < l; s++) { + var u = a[s], h = o["opacity" === u ? "__alphaForOpacity" : u]; + h && h.applyVisual(i, function (t) { + return r[t] + }, function (t, e) { + r[t] = e + }) + } + return r.color + } + + function fy(t, e, i) { + if (i[0] === i[1]) return i.slice(); + for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++) a.push(o), o += n; + return a.push(i[1]), a + } + + function py(t, e, i) { + var n = t.option, o = n.align; + if (null != o && "auto" !== o) return o; + for (var a = { + width: e.getWidth(), + height: e.getHeight() + }, r = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[r], u = [0, null, 10], h = {}, c = 0; c < 3; c++) h[s[1 - r][c]] = u[c], h[l[c]] = 2 === c ? i[0] : n[l[c]]; + var d = [["x", "width", 3], ["y", "height", 0]][r], f = Qo(h, a, n.padding); + return l[(f.margin[d[2]] || 0) + f[d[0]] + .5 * f[d[1]] < .5 * a[d[1]] ? 0 : 1] + } + + function gy(t) { + return d(t || [], function (e) { + null != t.dataIndex && (t.dataIndexInside = t.dataIndex, t.dataIndex = null) + }), t + } + + function my(t, e, i, n) { + return new wS({ + shape: {points: t}, draggable: !!i, cursor: e, drift: i, onmousemove: function (t) { + zw(t.event) + }, ondragend: n + }) + } + + function vy(t, e) { + return 0 === t ? [[0, 0], [e, 0], [e, -e]] : [[0, 0], [e, 0], [e, e]] + } + + function yy(t, e, i, n) { + return t ? [[0, -dN(e, fN(i, 0))], [gN, 0], [0, dN(e, fN(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]] + } + + function xy(t, e, i) { + var n = pN / 2, o = t.get("hoverLinkDataSize"); + return o && (n = hN(o, e, i, !0) / 2), n + } + + function _y(t) { + var e = t.get("hoverLinkOnHandle"); + return !!(null == e ? t.get("realtime") : e) + } + + function wy(t) { + return "vertical" === t ? "ns-resize" : "ew-resize" + } + + function by(t, e) { + var i = t.inverse; + ("vertical" === t.orient ? !i : i) && e.reverse() + } + + function Sy(t) { + Mi(t, "label", ["show"]) + } + + function My(t) { + return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y))) + } + + function Iy(t) { + return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y)) + } + + function Ty(t, e, i, n, o, a) { + var r = [], s = Zs(e, n) ? e.getCalculationInfo("stackResultDimension") : n, l = Py(e, s, t), + u = e.indicesOfNearest(s, l)[0]; + r[o] = e.get(i, u), r[a] = e.get(n, u); + var h = Lo(e.get(n, u)); + return (h = Math.min(h, 20)) >= 0 && (r[a] = +r[a].toFixed(h)), r + } + + function Dy(t, e) { + var n = t.getData(), o = t.coordinateSystem; + if (e && !Iy(e) && !y(e.coord) && o) { + var a = o.dimensions, r = Ay(e, n, o, t); + if ((e = i(e)).type && MN[e.type] && r.baseAxis && r.valueAxis) { + var s = bN(a, r.baseAxis.dim), l = bN(a, r.valueAxis.dim); + e.coord = MN[e.type](n, r.baseDataDim, r.valueDataDim, s, l), e.value = e.coord[l] + } else { + for (var u = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], h = 0; h < 2; h++) MN[u[h]] && (u[h] = Py(n, n.mapDimension(a[h]), u[h])); + e.coord = u + } + } + return e + } + + function Ay(t, e, i, n) { + var o = {}; + return null != t.valueIndex || null != t.valueDim ? (o.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, o.valueAxis = i.getAxis(Cy(n, o.valueDataDim)), o.baseAxis = i.getOtherAxis(o.valueAxis), o.baseDataDim = e.mapDimension(o.baseAxis.dim)) : (o.baseAxis = n.getBaseAxis(), o.valueAxis = i.getOtherAxis(o.baseAxis), o.baseDataDim = e.mapDimension(o.baseAxis.dim), o.valueDataDim = e.mapDimension(o.valueAxis.dim)), o + } + + function Cy(t, e) { + var i = t.getData(), n = i.dimensions; + e = i.getDimension(e); + for (var o = 0; o < n.length; o++) { + var a = i.getDimensionInfo(n[o]); + if (a.name === e) return a.coordDim + } + } + + function Ly(t, e) { + return !(t && t.containData && e.coord && !My(e)) || t.containData(e.coord) + } + + function ky(t, e, i, n) { + return n < 2 ? t.coord && t.coord[n] : t.value + } + + function Py(t, e, i) { + if ("average" === i) { + var n = 0, o = 0; + return t.each(e, function (t, e) { + isNaN(t) || (n += t, o++) + }), n / o + } + return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0] + } + + function Ny(t, e, i) { + var n = e.coordinateSystem; + t.each(function (o) { + var a, r = t.getItemModel(o), s = Do(r.get("x"), i.getWidth()), l = Do(r.get("y"), i.getHeight()); + if (isNaN(s) || isNaN(l)) { + if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, o)); else if (n) { + var u = t.get(n.dimensions[0], o), h = t.get(n.dimensions[1], o); + a = n.dataToPoint([u, h]) + } + } else a = [s, l]; + isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(o, a) + }) + } + + function Oy(t, e, i) { + var n; + n = t ? f(t && t.dimensions, function (t) { + return r({name: t}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}) + }) : [{name: "value", type: "float"}]; + var o = new sT(n, i), a = f(i.get("data"), v(Dy, e)); + return t && (a = g(a, v(Ly, t))), o.initData(a, null, t ? ky : function (t) { + return t.value + }), o + } + + function Ey(t) { + return !isNaN(t) && !isFinite(t) + } + + function Ry(t, e, i, n) { + var o = 1 - t, a = n.dimensions[t]; + return Ey(e[o]) && Ey(i[o]) && e[t] === i[t] && n.getAxis(a).containData(e[t]) + } + + function zy(t, e) { + if ("cartesian2d" === t.type) { + var i = e[0].coord, n = e[1].coord; + if (i && n && (Ry(1, i, n, t) || Ry(0, i, n, t))) return !0 + } + return Ly(t, e[0]) && Ly(t, e[1]) + } + + function By(t, e, i, n, o) { + var a, r = n.coordinateSystem, s = t.getItemModel(e), l = Do(s.get("x"), o.getWidth()), + u = Do(s.get("y"), o.getHeight()); + if (isNaN(l) || isNaN(u)) { + if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e)); else { + var h = r.dimensions, c = t.get(h[0], e), d = t.get(h[1], e); + a = r.dataToPoint([c, d]) + } + if ("cartesian2d" === r.type) { + var f = r.getAxis("x"), p = r.getAxis("y"), h = r.dimensions; + Ey(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Ey(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1])) + } + isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u) + } else a = [l, u]; + t.setItemLayout(e, a) + } + + function Vy(t, e, i) { + var n; + n = t ? f(t && t.dimensions, function (t) { + return r({name: t}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}) + }) : [{name: "value", type: "float"}]; + var o = new sT(n, i), a = new sT(n, i), s = new sT([], i), l = f(i.get("data"), v(TN, e, t, i)); + t && (l = g(l, v(zy, t))); + var u = t ? ky : function (t) { + return t.value + }; + return o.initData(f(l, function (t) { + return t[0] + }), null, u), a.initData(f(l, function (t) { + return t[1] + }), null, u), s.initData(f(l, function (t) { + return t[2] + })), s.hasItemOption = !0, {from: o, to: a, line: s} + } + + function Gy(t) { + return !isNaN(t) && !isFinite(t) + } + + function Wy(t, e, i, n) { + var o = 1 - t; + return Gy(e[o]) && Gy(i[o]) + } + + function Fy(t, e) { + var i = e.coord[0], n = e.coord[1]; + return !("cartesian2d" !== t.type || !i || !n || !Wy(1, i, n, t) && !Wy(0, i, n, t)) || (Ly(t, { + coord: i, + x: e.x0, + y: e.y0 + }) || Ly(t, {coord: n, x: e.x1, y: e.y1})) + } + + function Hy(t, e, i, n, o) { + var a, r = n.coordinateSystem, s = t.getItemModel(e), l = Do(s.get(i[0]), o.getWidth()), + u = Do(s.get(i[1]), o.getHeight()); + if (isNaN(l) || isNaN(u)) { + if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e)); else { + var h = [f = t.get(i[0], e), p = t.get(i[1], e)]; + r.clampData && r.clampData(h, h), a = r.dataToPoint(h, !0) + } + if ("cartesian2d" === r.type) { + var c = r.getAxis("x"), d = r.getAxis("y"), f = t.get(i[0], e), p = t.get(i[1], e); + Gy(f) ? a[0] = c.toGlobalCoord(c.getExtent()["x0" === i[0] ? 0 : 1]) : Gy(p) && (a[1] = d.toGlobalCoord(d.getExtent()["y0" === i[1] ? 0 : 1])) + } + isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u) + } else a = [l, u]; + return a + } + + function Zy(t, e, i) { + var n, o, a = ["x0", "y0", "x1", "y1"]; + t ? (n = f(t && t.dimensions, function (t) { + var i = e.getData(); + return r({name: t}, i.getDimensionInfo(i.mapDimension(t)) || {}) + }), o = new sT(f(a, function (t, e) { + return {name: t, type: n[e % 2].type} + }), i)) : o = new sT(n = [{name: "value", type: "float"}], i); + var s = f(i.get("data"), v(DN, e, t, i)); + t && (s = g(s, v(Fy, t))); + var l = t ? function (t, e, i, n) { + return t.coord[Math.floor(n / 2)][n % 2] + } : function (t) { + return t.value + }; + return o.initData(s, null, l), o.hasItemOption = !0, o + } + + function Uy(t) { + var e = t.type, i = {number: "value", time: "time"}; + if (i[e] && (t.axisType = i[e], delete t.type), Xy(t), jy(t, "controlPosition")) { + var n = t.controlStyle || (t.controlStyle = {}); + jy(n, "position") || (n.position = t.controlPosition), "none" !== n.position || jy(n, "show") || (n.show = !1, delete n.position), delete t.controlPosition + } + d(t.data || [], function (t) { + w(t) && !y(t) && (!jy(t, "value") && jy(t, "name") && (t.value = t.name), Xy(t)) + }) + } + + function Xy(t) { + var e = t.itemStyle || (t.itemStyle = {}), i = e.emphasis || (e.emphasis = {}), n = t.label || t.label || {}, + o = n.normal || (n.normal = {}), a = {normal: 1, emphasis: 1}; + d(n, function (t, e) { + a[e] || jy(o, e) || (o[e] = t) + }), i.label && !jy(n, "emphasis") && (n.emphasis = i.label, delete i.label) + } + + function jy(t, e) { + return t.hasOwnProperty(e) + } + + function Yy(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}, t.get("padding")) + } + + function qy(t, e, n, o) { + return Rn(t.get(e).replace(/^path:\/\//, ""), i(o || {}), new $t(n[0], n[1], n[2], n[3]), "center") + } + + function Ky(t, e, i, o, a, r) { + var s = e.get("color"); + a ? (a.setColor(s), i.add(a), r && r.onUpdate(a)) : ((a = Tl(t.get("symbol"), -1, -1, 2, 2, s)).setStyle("strokeNoScale", !0), i.add(a), r && r.onCreate(a)); + var l = e.getItemStyle(["color", "symbol", "symbolSize"]); + a.setStyle(l), o = n({rectHover: !0, z2: 100}, o, !0); + var u = t.get("symbolSize"); + (u = u instanceof Array ? u.slice() : [+u, +u])[0] /= 2, u[1] /= 2, o.scale = u; + var h = t.get("symbolOffset"); + if (h) { + var c = o.position = o.position || [0, 0]; + c[0] += Do(h[0], u[0]), c[1] += Do(h[1], u[1]) + } + var d = t.get("symbolRotate"); + return o.rotation = (d || 0) * Math.PI / 180 || 0, a.attr(o), a.updateTransform(), a + } + + function $y(t, e, i, n, o) { + if (!t.dragging) { + var a = n.getModel("checkpointStyle"), r = i.dataToCoord(n.getData().get(["value"], e)); + o || !a.get("animation", !0) ? t.attr({position: [r, 0]}) : (t.stopAnimation(!0), t.animateTo({position: [r, 0]}, a.get("animationDuration", !0), a.get("animationEasing", !0))) + } + } + + function Jy(t) { + return 0 === t.indexOf("my") + } + + function Qy(t) { + this.model = t + } + + function tx(t) { + this.model = t + } + + function ex(t) { + var e = {}, i = [], n = []; + return t.eachRawSeries(function (t) { + var o = t.coordinateSystem; + if (!o || "cartesian2d" !== o.type && "polar" !== o.type) i.push(t); else { + var a = o.getBaseAxis(); + if ("category" === a.type) { + var r = a.dim + "_" + a.index; + e[r] || (e[r] = {categoryAxis: a, valueAxis: o.getOtherAxis(a), series: []}, n.push({ + axisDim: a.dim, + axisIndex: a.index + })), e[r].series.push(t) + } else i.push(t) + } + }), {seriesGroupByCategoryAxis: e, other: i, meta: n} + } + + function ix(t) { + var e = []; + return d(t, function (t, i) { + var n = t.categoryAxis, o = t.valueAxis.dim, a = [" "].concat(f(t.series, function (t) { + return t.name + })), r = [n.model.getCategories()]; + d(t.series, function (t) { + r.push(t.getRawData().mapArray(o, function (t) { + return t + })) + }); + for (var s = [a.join(HN)], l = 0; l < r[0].length; l++) { + for (var u = [], h = 0; h < r.length; h++) u.push(r[h][l]); + s.push(u.join(HN)) + } + e.push(s.join("\n")) + }), e.join("\n\n" + FN + "\n\n") + } + + function nx(t) { + return f(t, function (t) { + var e = t.getRawData(), i = [t.name], n = []; + return e.each(e.dimensions, function () { + for (var t = arguments.length, o = arguments[t - 1], a = e.getName(o), r = 0; r < t - 1; r++) n[r] = arguments[r]; + i.push((a ? a + HN : "") + n.join(HN)) + }), i.join("\n") + }).join("\n\n" + FN + "\n\n") + } + + function ox(t) { + var e = ex(t); + return { + value: g([ix(e.seriesGroupByCategoryAxis), nx(e.other)], function (t) { + return t.replace(/[\n\t\s]/g, "") + }).join("\n\n" + FN + "\n\n"), meta: e.meta + } + } + + function ax(t) { + return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "") + } + + function rx(t) { + if (t.slice(0, t.indexOf("\n")).indexOf(HN) >= 0) return !0 + } + + function sx(t) { + for (var e = t.split(/\n+/g), i = [], n = f(ax(e.shift()).split(ZN), function (t) { + return {name: t, data: []} + }), o = 0; o < e.length; o++) { + var a = ax(e[o]).split(ZN); + i.push(a.shift()); + for (var r = 0; r < a.length; r++) n[r] && (n[r].data[o] = a[r]) + } + return {series: n, categories: i} + } + + function lx(t) { + for (var e = t.split(/\n+/g), i = ax(e.shift()), n = [], o = 0; o < e.length; o++) { + var a, r = ax(e[o]).split(ZN), s = "", l = !1; + isNaN(r[0]) ? (l = !0, s = r[0], r = r.slice(1), n[o] = { + name: s, + value: [] + }, a = n[o].value) : a = n[o] = []; + for (var u = 0; u < r.length; u++) a.push(+r[u]); + 1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0]) + } + return {name: i, data: n} + } + + function ux(t, e) { + var i = {series: []}; + return d(t.split(new RegExp("\n*" + FN + "\n*", "g")), function (t, n) { + if (rx(t)) { + var o = sx(t), a = e[n], r = a.axisDim + "Axis"; + a && (i[r] = i[r] || [], i[r][a.axisIndex] = {data: o.categories}, i.series = i.series.concat(o.series)) + } else { + o = lx(t); + i.series.push(o) + } + }), i + } + + function hx(t) { + this._dom = null, this.model = t + } + + function cx(t, e) { + return f(t, function (t, i) { + var n = e && e[i]; + return w(n) && !y(n) ? (w(t) && !y(t) && (t = t.value), r({value: t}, n)) : t + }) + } + + function dx(t, e) { + var i = mx(t); + UN(e, function (e, n) { + for (var o = i.length - 1; o >= 0 && !i[o][n]; o--) ; + if (o < 0) { + var a = t.queryComponents({mainType: "dataZoom", subType: "select", id: n})[0]; + if (a) { + var r = a.getPercentRange(); + i[0][n] = {dataZoomId: n, start: r[0], end: r[1]} + } + } + }), i.push(e) + } + + function fx(t) { + var e = mx(t), i = e[e.length - 1]; + e.length > 1 && e.pop(); + var n = {}; + return UN(i, function (t, i) { + for (var o = e.length - 1; o >= 0; o--) if (t = e[o][i]) { + n[i] = t; + break + } + }), n + } + + function px(t) { + t[XN] = null + } + + function gx(t) { + return mx(t).length + } + + function mx(t) { + var e = t[XN]; + return e || (e = t[XN] = [{}]), e + } + + function vx(t, e, i) { + (this._brushController = new Qd(i.getZr())).on("brush", m(this._onBrush, this)).mount(), this._isZoomActive + } + + function yx(t) { + var e = {}; + return d(["xAxisIndex", "yAxisIndex"], function (i) { + e[i] = t[i], null == e[i] && (e[i] = "all"), (!1 === e[i] || "none" === e[i]) && (e[i] = []) + }), e + } + + function xx(t, e) { + t.setIconStatus("back", gx(e) > 1 ? "emphasis" : "normal") + } + + function _x(t, e, i, n, o) { + var a = i._isZoomActive; + n && "takeGlobalCursor" === n.type && (a = "dataZoomSelect" === n.key && n.dataZoomSelectActive), i._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal"); + var r = new bv(yx(t.option), e, {include: ["grid"]}); + i._brushController.setPanels(r.makePanelOpts(o, function (t) { + return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect" + })).enableBrush(!!a && {brushType: "auto", brushStyle: {lineWidth: 0, fill: "rgba(0,0,0,0.2)"}}) + } + + function bx(t) { + this.model = t + } + + function Sx(t) { + return QN(t) + } + + function Mx() { + if (!iO && nO) { + iO = !0; + var t = nO.styleSheets; + t.length < 31 ? nO.createStyleSheet().addRule(".zrvml", "behavior:url(#default#VML)") : t[0].addRule(".zrvml", "behavior:url(#default#VML)") + } + } + + function Ix(t) { + return parseInt(t, 10) + } + + function Tx(t, e) { + Mx(), 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 o = e.delFromStorage, a = e.addToStorage; + e.delFromStorage = function (t) { + o.call(e, t), t && t.onRemove && t.onRemove(n) + }, e.addToStorage = function (t) { + t.onAdd && t.onAdd(n), a.call(e, t) + }, this._firstPaint = !0 + } + + function Dx(t) { + return function () { + ew('In IE8.0 VML mode painter not support method "' + t + '"') + } + } + + function Ax(t) { + return document.createElementNS(zO, t) + } + + function Cx(t) { + return WO(1e4 * t) / 1e4 + } + + function Lx(t) { + return t < jO && t > -jO + } + + function kx(t, e) { + var i = e ? t.textFill : t.fill; + return null != i && i !== GO + } + + function Px(t, e) { + var i = e ? t.textStroke : t.stroke; + return null != i && i !== GO + } + + function Nx(t, e) { + e && Ox(t, "transform", "matrix(" + VO.call(e, ",") + ")") + } + + function Ox(t, e, i) { + (!i || "linear" !== i.type && "radial" !== i.type) && ("string" == typeof i && i.indexOf("NaN") > -1 && console.log(i), t.setAttribute(e, i)) + } + + function Ex(t, e, i) { + t.setAttributeNS("http://www.w3.org/1999/xlink", e, i) + } + + function Rx(t, e, i) { + if (kx(e, i)) { + var n = i ? e.textFill : e.fill; + n = "transparent" === n ? GO : n, "none" !== t.getAttribute("clip-path") && n === GO && (n = "rgba(0, 0, 0, 0.002)"), Ox(t, "fill", n), Ox(t, "fill-opacity", e.opacity) + } else Ox(t, "fill", GO); + if (Px(e, i)) { + var o = i ? e.textStroke : e.stroke; + Ox(t, "stroke", o = "transparent" === o ? GO : o), Ox(t, "stroke-width", (i ? e.textStrokeWidth : e.lineWidth) / (!i && e.strokeNoScale ? e.host.getLineScale() : 1)), Ox(t, "paint-order", i ? "stroke" : "fill"), Ox(t, "stroke-opacity", e.opacity), e.lineDash ? (Ox(t, "stroke-dasharray", e.lineDash.join(",")), Ox(t, "stroke-dashoffset", WO(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", GO) + } + + function zx(t) { + for (var e = [], i = t.data, n = t.len(), o = 0; o < n;) { + var a = "", r = 0; + switch (i[o++]) { + case BO.M: + a = "M", r = 2; + break; + case BO.L: + a = "L", r = 2; + break; + case BO.Q: + a = "Q", r = 4; + break; + case BO.C: + a = "C", r = 6; + break; + case BO.A: + var s = i[o++], l = i[o++], u = i[o++], h = i[o++], c = i[o++], d = i[o++], f = i[o++], p = i[o++], + g = Math.abs(d), m = Lx(g - UO) && !Lx(g), v = !1; + v = g >= UO || !Lx(g) && (d > -ZO && d < 0 || d > ZO) == !!p; + var y = Cx(s + u * HO(c)), x = Cx(l + h * FO(c)); + m && (d = p ? UO - 1e-4 : 1e-4 - UO, v = !0, 9 === o && e.push("M", y, x)); + var _ = Cx(s + u * HO(c + d)), w = Cx(l + h * FO(c + d)); + e.push("A", Cx(u), Cx(h), WO(f * XO), +v, +p, _, w); + break; + case BO.Z: + a = "Z"; + break; + case BO.R: + var _ = Cx(i[o++]), w = Cx(i[o++]), b = Cx(i[o++]), S = Cx(i[o++]); + e.push("M", _, w, "L", _ + b, w, "L", _ + b, w + S, "L", _, w + S, "L", _, w) + } + a && e.push(a); + for (var M = 0; M < r; M++) e.push(Cx(i[o++])) + } + return e.join(" ") + } + + function Bx(t) { + return "middle" === t ? "middle" : "bottom" === t ? "baseline" : "hanging" + } + + function Vx() { + } + + function Gx(t, e, i, n) { + for (var o = 0, a = e.length, r = 0, s = 0; o < a; o++) { + var l = e[o]; + if (l.removed) { + for (var u = [], h = s; h < s + l.count; h++) u.push(h); + l.indices = u, s += l.count + } else { + for (var u = [], h = r; h < r + l.count; h++) u.push(h); + l.indices = u, r += l.count, l.added || (s += l.count) + } + } + return e + } + + function Wx(t) { + return {newPos: t.newPos, components: t.components.slice(0)} + } + + function Fx(t, e, i, n, o) { + this._zrId = t, this._svgRoot = e, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName = o || "_dom", this.nextId = 0 + } + + function Hx(t, e) { + Fx.call(this, t, e, ["linearGradient", "radialGradient"], "__gradient_in_use__") + } + + function Zx(t, e) { + Fx.call(this, t, e, "clipPath", "__clippath_in_use__") + } + + function Ux(t, e) { + Fx.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowDom") + } + + function Xx(t) { + return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY || t.textShadowBlur || t.textShadowOffsetX || t.textShadowOffsetY) + } + + function jx(t) { + return parseInt(t, 10) + } + + function Yx(t) { + return t instanceof In ? YO : t instanceof Je ? qO : t instanceof fS ? KO : YO + } + + function qx(t, e) { + return e && t && e.parentNode !== t + } + + function Kx(t, e, i) { + if (qx(t, e) && i) { + var n = i.nextSibling; + n ? t.insertBefore(e, n) : t.appendChild(e) + } + } + + function $x(t, e) { + if (qx(t, e)) { + var i = t.firstChild; + i ? t.insertBefore(e, i) : t.appendChild(e) + } + } + + function Jx(t, e) { + e && t && e.parentNode === t && t.removeChild(e) + } + + function Qx(t) { + return t.__textSvgEl + } + + function t_(t) { + return t.__svgEl + } + + function e_(t) { + return function () { + ew('In SVG mode painter not support method "' + t + '"') + } + } + + var i_ = 2311, n_ = function () { + return i_++ + }, o_ = {}, a_ = o_ = "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? { + browser: {}, + os: {}, + node: !1, + wxa: !0, + canvasSupported: !0, + svgSupported: !1, + touchEventsSupported: !0 + } : "undefined" == typeof document && "undefined" != typeof self ? { + browser: {}, + os: {}, + node: !1, + worker: !0, + canvasSupported: !0 + } : "undefined" == typeof navigator ? { + browser: {}, + os: {}, + node: !0, + worker: !1, + canvasSupported: !0, + svgSupported: !0 + } : function (t) { + var e = {}, i = {}, n = t.match(/Firefox\/([\d.]+)/), + o = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge\/([\d.]+)/), + r = /micromessenger/i.test(t); + return n && (i.firefox = !0, i.version = n[1]), o && (i.ie = !0, i.version = o[1]), a && (i.edge = !0, i.version = a[1]), r && (i.weChat = !0), { + 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), r_ = { + "[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 + }, l_ = Object.prototype.toString, u_ = Array.prototype, h_ = u_.forEach, c_ = u_.filter, d_ = u_.slice, + f_ = u_.map, p_ = u_.reduce, g_ = {}, m_ = function () { + return g_.createCanvas() + }; + g_.createCanvas = function () { + return document.createElement("canvas") + }; + var v_, y_ = "__ec_primitive__"; + E.prototype = { + constructor: E, get: function (t) { + return this.hasOwnProperty(t) ? this[t] : null + }, set: function (t, e) { + return this[t] = e + }, each: function (t, e) { + void 0 !== e && (t = m(t, e)); + for (var i in this) this.hasOwnProperty(i) && t(this[i], i) + }, removeKey: function (t) { + delete this[t] + } + }; + var x_ = (Object.freeze || Object)({ + $override: e, + clone: i, + merge: n, + mergeAll: o, + extend: a, + defaults: r, + createCanvas: m_, + getContext: s, + indexOf: l, + inherits: u, + mixin: h, + isArrayLike: c, + each: d, + map: f, + reduce: p, + filter: g, + find: function (t, e, i) { + if (t && e) for (var n = 0, o = t.length; n < o; n++) if (e.call(i, t[n], n, t)) return t[n] + }, + bind: m, + curry: v, + isArray: y, + isFunction: x, + isString: _, + isObject: w, + isBuiltInObject: b, + isTypedArray: S, + isDom: M, + eqNaN: I, + retrieve: T, + retrieve2: D, + retrieve3: A, + slice: C, + normalizeCssArray: L, + assert: k, + trim: P, + setAsPrimitive: N, + isPrimitive: O, + createHashMap: R, + concatArray: z, + noop: B + }), __ = "undefined" == typeof Float32Array ? Array : Float32Array, w_ = X, b_ = j, S_ = K, M_ = $, + I_ = (Object.freeze || Object)({ + create: V, + copy: G, + clone: W, + set: F, + add: H, + scaleAndAdd: Z, + sub: U, + len: X, + length: w_, + lenSquare: j, + lengthSquare: b_, + mul: function (t, e, i) { + return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t + }, + div: function (t, e, i) { + return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t + }, + dot: function (t, e) { + return t[0] * e[0] + t[1] * e[1] + }, + scale: Y, + normalize: q, + distance: K, + dist: S_, + distanceSquare: $, + distSquare: M_, + negate: function (t, e) { + return t[0] = -e[0], t[1] = -e[1], t + }, + lerp: J, + applyTransform: Q, + min: tt, + max: et + }); + it.prototype = { + constructor: it, _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(nt(e, t), "dragstart", t.event)) + }, _drag: function (t) { + var e = this._draggingTarget; + if (e) { + var i = t.offsetX, n = t.offsetY, o = i - this._x, a = n - this._y; + this._x = i, this._y = n, e.drift(o, a, t), this.dispatchToElement(nt(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(nt(s, t), "dragleave", t.event), r && r !== s && this.dispatchToElement(nt(r, t), "dragenter", t.event)) + } + }, _dragEnd: function (t) { + var e = this._draggingTarget; + e && (e.dragging = !1), this.dispatchToElement(nt(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(nt(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null + } + }; + var T_ = Array.prototype.slice, D_ = function () { + this._$handlers = {} + }; + D_.prototype = { + constructor: D_, one: function (t, e, i) { + var n = this._$handlers; + if (!e || !t) return this; + n[t] || (n[t] = []); + for (var o = 0; o < n[t].length; o++) if (n[t][o].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 o = 0; o < n[t].length; o++) if (n[t][o].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 = [], o = 0, a = i[t].length; o < a; o++) i[t][o].h != e && n.push(i[t][o]); + 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 = T_.call(e, 1)); + for (var n = this._$handlers[t], o = n.length, a = 0; a < o;) { + switch (i) { + case 1: + n[a].h.call(n[a].ctx); + break; + case 2: + n[a].h.call(n[a].ctx, e[1]); + break; + case 3: + n[a].h.call(n[a].ctx, e[1], e[2]); + break; + default: + n[a].h.apply(n[a].ctx, e) + } + n[a].one ? (n.splice(a, 1), o--) : a++ + } + } + return this + }, triggerWithContext: function (t) { + if (this._$handlers[t]) { + var e = arguments, i = e.length; + i > 4 && (e = T_.call(e, 1, e.length - 1)); + for (var n = e[e.length - 1], o = this._$handlers[t], a = o.length, r = 0; r < a;) { + switch (i) { + case 1: + o[r].h.call(n); + break; + case 2: + o[r].h.call(n, e[1]); + break; + case 3: + o[r].h.call(n, e[1], e[2]); + break; + default: + o[r].h.apply(n, e) + } + o[r].one ? (o.splice(r, 1), a--) : r++ + } + } + return this + } + }; + var A_ = "silent"; + at.prototype.dispose = function () { + }; + var C_ = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"], + L_ = function (t, e, i, n) { + D_.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new at, this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, it.call(this), this.setHandlerProxy(i) + }; + L_.prototype = { + constructor: L_, setHandlerProxy: function (t) { + this.proxy && this.proxy.dispose(), t && (d(C_, function (e) { + t.on && t.on(e, this[e], this) + }, this), t.handler = this), this.proxy = t + }, mousemove: function (t) { + var e = t.zrX, i = t.zrY, n = this._hovered, o = n.target; + o && !o.__zr && (o = (n = this.findHover(n.x, n.y)).target); + var a = this._hovered = this.findHover(e, i), r = a.target, s = this.proxy; + s.setCursor && s.setCursor(r ? r.cursor : "default"), o && r !== o && this.dispatchToElement(n, "mouseout", t), this.dispatchToElement(a, "mousemove", t), r && r !== o && this.dispatchToElement(a, "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 o = "on" + e, a = ot(e, t, i); n && (n[o] && (a.cancelBubble = n[o].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelBubble);) ; + a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function (t) { + "function" == typeof t[o] && t[o].call(t, a), t.trigger && t.trigger(e, a) + })) + } + }, findHover: function (t, e, i) { + for (var n = this.storage.getDisplayList(), o = {x: t, y: e}, a = n.length - 1; a >= 0; a--) { + var r; + if (n[a] !== i && !n[a].ignore && (r = rt(n[a], t, e)) && (!o.topTarget && (o.topTarget = n[a]), r !== A_)) { + o.target = n[a]; + break + } + } + return o + } + }, d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) { + L_.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 ("mouseup" === t) this._upEl = n; else if ("click" === t) { + if (this._downEl !== this._upEl || !this._downPoint || S_(this._downPoint, [e.zrX, e.zrY]) > 4) return; + this._downPoint = null + } + this.dispatchToElement(i, t, e) + } + }), h(L_, D_), h(L_, it); + var k_ = "undefined" == typeof Float32Array ? Array : Float32Array, P_ = (Object.freeze || Object)({ + create: st, + identity: lt, + copy: ut, + mul: ht, + translate: ct, + rotate: dt, + scale: ft, + invert: pt, + clone: gt + }), N_ = lt, O_ = 5e-5, E_ = 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 + }, R_ = E_.prototype; + R_.transform = null, R_.needLocalTransform = function () { + return mt(this.rotation) || mt(this.position[0]) || mt(this.position[1]) || mt(this.scale[0] - 1) || mt(this.scale[1] - 1) + }, R_.updateTransform = function () { + var t = this.parent, e = t && t.transform, i = this.needLocalTransform(), n = this.transform; + i || e ? (n = n || st(), i ? this.getLocalTransform(n) : N_(n), e && (i ? ht(n, t.transform, n) : ut(n, t.transform)), this.transform = n, this.invTransform = this.invTransform || st(), pt(this.invTransform, n)) : n && N_(n) + }, R_.getLocalTransform = function (t) { + return E_.getLocalTransform(this, t) + }, R_.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) + }, R_.restoreTransform = function (t) { + var e = t.dpr || 1; + t.setTransform(e, 0, 0, e, 0, 0) + }; + var z_ = []; + R_.decomposeTransform = function () { + if (this.transform) { + var t = this.parent, e = this.transform; + t && t.transform && (ht(z_, t.invTransform, e), e = z_); + var i = e[0] * e[0] + e[1] * e[1], n = e[2] * e[2] + e[3] * e[3], o = this.position, a = this.scale; + mt(i - 1) && (i = Math.sqrt(i)), mt(n - 1) && (n = Math.sqrt(n)), e[0] < 0 && (i = -i), e[3] < 0 && (n = -n), o[0] = e[4], o[1] = e[5], a[0] = i, a[1] = n, this.rotation = Math.atan2(-e[1] / n, e[0] / i) + } + }, R_.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] + }, R_.transformCoordToLocal = function (t, e) { + var i = [t, e], n = this.invTransform; + return n && Q(i, i, n), i + }, R_.transformCoordToGlobal = function (t, e) { + var i = [t, e], n = this.transform; + return n && Q(i, i, n), i + }, E_.getLocalTransform = function (t, e) { + N_(e = e || []); + var i = t.origin, n = t.scale || [1, 1], o = t.rotation || 0, a = t.position || [0, 0]; + return i && (e[4] -= i[0], e[5] -= i[1]), ft(e, e, n), o && dt(e, e, o), i && (e[4] += i[0], e[5] += i[1]), e[4] += a[0], e[5] += a[1], e + }; + var B_ = { + 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; + return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI), (t *= 2) < 1 ? i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * -.5 : i * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * .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 - B_.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 * B_.bounceIn(2 * t) : .5 * B_.bounceOut(2 * t - 1) + .5 + } + }; + vt.prototype = { + constructor: vt, 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, o = "string" == typeof n ? B_[n] : n, a = "function" == typeof o ? o(i) : i; + return this.fire("frame", a), 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 V_ = function () { + this.head = null, this.tail = null, this._len = 0 + }, G_ = V_.prototype; + G_.insert = function (t) { + var e = new W_(t); + return this.insertEntry(e), e + }, G_.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++ + }, G_.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-- + }, G_.len = function () { + return this._len + }, G_.clear = function () { + this.head = this.tail = null, this._len = 0 + }; + var W_ = function (t) { + this.value = t, this.next, this.prev + }, F_ = function (t) { + this._list = new V_, this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null + }, H_ = F_.prototype; + H_.put = function (t, e) { + var i = this._list, n = this._map, o = null; + if (null == n[t]) { + var a = i.len(), r = this._lastRemovedEntry; + if (a >= this._maxSize && a > 0) { + var s = i.head; + i.remove(s), delete n[s.key], o = s.value, this._lastRemovedEntry = s + } + r ? r.value = e : r = new W_(e), r.key = t, i.insertEntry(r), n[t] = r + } + return o + }, H_.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 + }, H_.clear = function () { + this._list.clear(), this._map = {} + }; + var Z_ = { + 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] + }, U_ = new F_(20), X_ = null, j_ = Nt, Y_ = Ot, q_ = (Object.freeze || Object)({ + parse: At, + lift: kt, + toHex: Pt, + fastLerp: Nt, + fastMapToColor: j_, + lerp: Ot, + mapToColor: Y_, + modifyHSL: Et, + modifyAlpha: Rt, + stringify: zt + }), K_ = Array.prototype.slice, $_ = function (t, e, i, n) { + this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || Bt, this._setter = n || Vt, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = [] + }; + $_.prototype = { + when: function (t, e) { + var i = this._tracks; + for (var n in e) if (e.hasOwnProperty(n)) { + if (!i[n]) { + i[n] = []; + var o = this._getter(this._target, n); + if (null == o) continue; + 0 !== t && i[n].push({time: 0, value: jt(o)}) + } + 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, o = 0; + for (var a in this._tracks) if (this._tracks.hasOwnProperty(a)) { + var r = Kt(this, t, function () { + --o || n._doneCallback() + }, this._tracks[a], a, e); + r && (this._clipList.push(r), o++, this.animation && this.animation.addClip(r), i = r) + } + if (i) { + var s = i.onframe; + i.onframe = function (t, e) { + s(t, e); + for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e) + } + } + return o || this._doneCallback(), this + }, stop: function (t) { + for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) { + var o = e[n]; + t && o.onframe(this._target, 1), i && i.removeClip(o) + } + 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 J_ = 1; + "undefined" != typeof window && (J_ = Math.max(window.devicePixelRatio || 1, 1)); + var Q_ = J_, tw = function () { + }, ew = tw, iw = function () { + this.animators = [] + }; + iw.prototype = { + constructor: iw, animate: function (t, e) { + var i, n = !1, o = this, a = this.__zr; + if (t) { + var r = t.split("."), s = o; + n = "shape" === r[0]; + for (var u = 0, h = r.length; u < h; u++) s && (s = s[r[u]]); + s && (i = s) + } else i = o; + if (i) { + var c = o.animators, d = new $_(i, e); + return d.during(function (t) { + o.dirty(n) + }).done(function () { + c.splice(l(c, d), 1) + }), c.push(d), a && a.animation.addAnimator(d), d + } + ew('Property "' + t + '" is not existed in element ' + o.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, o, a) { + _(i) ? (o = n, n = i, i = 0) : x(n) ? (o = n, n = "linear", i = 0) : x(i) ? (o = i, i = 0) : x(e) ? (o = e, e = 500) : e || (e = 500), this.stopAnimation(), this._animateToShallow("", this, t, e, i); + var r = this.animators.slice(), s = r.length; + s || o && o(); + for (var l = 0; l < r.length; l++) r[l].done(function () { + --s || o && o() + }).start(n, a) + }, _animateToShallow: function (t, e, i, n, o) { + var a = {}, r = 0; + for (var s in i) if (i.hasOwnProperty(s)) if (null != e[s]) w(i[s]) && !c(i[s]) ? this._animateToShallow(t ? t + "." + s : s, e[s], i[s], n, o) : (a[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, a).delay(o || 0), this + } + }; + var nw = function (t) { + E_.call(this, t), D_.call(this, t), iw.call(this, t), this.id = t.id || n_() + }; + nw.prototype = { + type: "element", name: "", __zr: null, ignore: !1, clipPath: null, isGroup: !1, 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 (w(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) + } + }, h(nw, iw), h(nw, E_), h(nw, D_); + var ow = Q, aw = Math.min, rw = Math.max; + $t.prototype = { + constructor: $t, union: function (t) { + var e = aw(t.x, this.x), i = aw(t.y, this.y); + this.width = rw(t.x + t.width, this.x + this.width) - e, this.height = rw(t.y + t.height, this.y + this.height) - i, this.x = e, this.y = i + }, applyTransform: function () { + var t = [], e = [], i = [], n = []; + return function (o) { + if (o) { + t[0] = i[0] = this.x, t[1] = n[1] = this.y, e[0] = n[0] = this.x + this.width, e[1] = i[1] = this.y + this.height, ow(t, t, o), ow(e, e, o), ow(i, i, o), ow(n, n, o), this.x = aw(t[0], e[0], i[0], n[0]), this.y = aw(t[1], e[1], i[1], n[1]); + var a = rw(t[0], e[0], i[0], n[0]), r = rw(t[1], e[1], i[1], n[1]); + this.width = a - this.x, this.height = r - this.y + } + } + }(), calculateTransform: function (t) { + var e = this, i = t.width / e.width, n = t.height / e.height, o = st(); + return ct(o, o, [-e.x, -e.y]), ft(o, o, [i, n]), ct(o, o, [t.x, t.y]), o + }, intersect: function (t) { + if (!t) return !1; + t instanceof $t || (t = $t.create(t)); + var e = this, i = e.x, n = e.x + e.width, o = e.y, a = e.y + e.height, r = t.x, s = t.x + t.width, l = t.y, + u = t.y + t.height; + return !(n < r || s < i || a < l || u < o) + }, 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 $t(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} + } + }, $t.create = function (t) { + return new $t(t.x, t.y, t.width, t.height) + }; + var sw = function (t) { + t = t || {}, nw.call(this, t); + for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); + this._children = [], this.__storage = null, this.__dirty = !0 + }; + sw.prototype = { + constructor: sw, 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 sw && t.addChildrenToStorage(e)), i && i.refresh() + }, remove: function (t) { + var e = this.__zr, i = this.__storage, n = this._children, o = l(n, t); + return o < 0 ? this : (n.splice(o, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof sw && 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 sw && 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 o = i[n]; + t.call(e, o, 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 sw && 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 sw && i.delChildrenFromStorage(t) + } + }, dirty: function () { + return this.__dirty = !0, this.__zr && this.__zr.refresh(), this + }, getBoundingRect: function (t) { + for (var e = null, i = new $t(0, 0, 0, 0), n = t || this._children, o = [], a = 0; a < n.length; a++) { + var r = n[a]; + if (!r.ignore && !r.invisible) { + var s = r.getBoundingRect(), l = r.getLocalTransform(o); + l ? (i.copy(s), i.applyTransform(l), (e = e || i.clone()).union(i)) : (e = e || s.clone()).union(s) + } + } + return e || i + } + }, u(sw, nw); + var lw = 32, uw = 7, hw = function () { + this._roots = [], this._displayList = [], this._displayListLen = 0 + }; + hw.prototype = { + constructor: hw, 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, o = e.length; n < o; n++) this._updateAndAddDisplayable(e[n], null, t); + i.length = this._displayListLen, a_.canvasSupported && ae(i, re) + }, _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 o = n, a = t; o;) o.parent = a, o.updateTransform(), e.push(o), a = o, o = o.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 sw && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(t)) + }, delRoot: function (t) { + if (null == t) { + for (i = 0; i < this._roots.length; i++) { + var e = this._roots[i]; + e instanceof sw && e.delChildrenFromStorage(this) + } + return this._roots = [], this._displayList = [], void (this._displayListLen = 0) + } + if (t instanceof Array) for (var i = 0, n = t.length; i < n; i++) this.delRoot(t[i]); else { + var o = l(this._roots, t); + o >= 0 && (this.delFromStorage(t), this._roots.splice(o, 1), t instanceof sw && t.delChildrenFromStorage(this)) + } + }, addToStorage: function (t) { + return t && (t.__storage = this, t.dirty(!1)), this + }, delFromStorage: function (t) { + return t && (t.__storage = null), this + }, dispose: function () { + this._renderList = this._roots = null + }, displayableSortFunc: re + }; + var cw = { + shadowBlur: 1, + shadowOffsetX: 1, + shadowOffsetY: 1, + textShadowBlur: 1, + textShadowOffsetX: 1, + textShadowOffsetY: 1, + textBoxShadowBlur: 1, + textBoxShadowOffsetX: 1, + textBoxShadowOffsetY: 1 + }, dw = function (t, e, i) { + return cw.hasOwnProperty(e) ? i *= t.dpr : i + }, + fw = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]], + pw = function (t, e) { + this.extendFrom(t, !1), this.host = e + }; + pw.prototype = { + constructor: pw, + 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, o = i && i.style, a = !o, r = 0; r < fw.length; r++) { + var s = fw[r], l = s[0]; + (a || n[l] !== o[l]) && (t[l] = dw(t, l, n[l] || s[1])) + } + if ((a || n.fill !== o.fill) && (t.fillStyle = n.fill), (a || n.stroke !== o.stroke) && (t.strokeStyle = n.stroke), (a || n.opacity !== o.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== o.blend) && (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) { + var u = n.lineWidth; + t.lineWidth = u / (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 ? le : se)(t, e, i), o = e.colorStops, a = 0; a < o.length; a++) n.addColorStop(o[a].offset, o[a].color); + return n + } + }; + for (var gw = pw.prototype, mw = 0; mw < fw.length; mw++) { + var vw = fw[mw]; + vw[0] in gw || (gw[vw[0]] = vw[1]) + } + pw.getGradient = gw.getGradient; + var yw = function (t, e) { + this.image = t, this.repeat = e, this.type = "pattern" + }; + yw.prototype.getCanvasPattern = function (t) { + return t.createPattern(this.image, this.repeat || "repeat") + }; + var xw = function (t, e, i) { + var n; + i = i || Q_, "string" == typeof t ? n = he(t, e, i) : w(t) && (t = (n = t).id), this.id = t, this.dom = n; + var o = n.style; + o && (n.onselectstart = ue, o["-webkit-user-select"] = "none", o["user-select"] = "none", o["-webkit-touch-callout"] = "none", o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", o.padding = 0, o.margin = 0, o["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 + }; + xw.prototype = { + constructor: xw, + __dirty: !0, + __used: !1, + __drawIndex: 0, + __startIndex: 0, + __endIndex: 0, + incremental: !1, + getElementCount: function () { + return this.__endIndex - this.__startIndex + }, + initContext: function () { + this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr + }, + createBackBuffer: function () { + var t = this.dpr; + this.domBack = he("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 != t && this.ctxBack.scale(t, t) + }, + resize: function (t, e) { + var i = this.dpr, n = this.dom, o = n.style, a = this.domBack; + o && (o.width = t + "px", o.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height = e * i, 1 != i && this.ctxBack.scale(i, i)) + }, + clear: function (t, e) { + var i = this.dom, n = this.ctx, o = i.width, a = i.height, e = e || this.clearColor, + r = this.motionBlur && !t, s = this.lastFrameAlpha, l = this.dpr; + if (r && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, o / l, a / l)), n.clearRect(0, 0, o, a), e && "transparent" !== e) { + var u; + e.colorStops ? (u = e.__canvasGradient || pw.getGradient(n, e, { + x: 0, + y: 0, + width: o, + height: a + }), e.__canvasGradient = u) : e.image && (u = yw.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle = u || e, n.fillRect(0, 0, o, a), n.restore() + } + if (r) { + var h = this.domBack; + n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, o, a), n.restore() + } + } + }; + var _w = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) { + setTimeout(t, 16) + }, ww = new F_(50), bw = {}, Sw = 0, Mw = 5e3, Iw = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g, Tw = "12px sans-serif", + Dw = {}; + Dw.measureText = function (t, e) { + var i = s(); + return i.font = e || Tw, i.measureText(t) + }; + var Aw = {left: 1, right: 1, center: 1}, Cw = {top: 1, bottom: 1, middle: 1}, Lw = new $t, kw = function () { + }; + kw.prototype = { + constructor: kw, drawRectText: function (t, e) { + var i = this.style; + e = i.textRect || e, this.__dirty && Ne(i); + var n = i.text; + if (null != n && (n += ""), Ke(n, i)) { + t.save(); + var o = this.transform; + i.transformText ? this.setTransform(t) : o && (Lw.copy(e), Lw.applyTransform(o), e = Lw), Ee(this, t, n, i, e), t.restore() + } + } + }, $e.prototype = { + constructor: $e, + 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, + incremental: !1, + inplace: !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 ? nw.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 pw(t, this), this.dirty(!1), this + } + }, u($e, nw), h($e, kw), Je.prototype = { + constructor: Je, type: "image", brush: function (t, e) { + var i = this.style, n = i.image; + i.bind(t, this, e); + var o = this._image = de(n, this._image, this, this.onload); + if (o && pe(o)) { + var a = i.x || 0, r = i.y || 0, s = i.width, l = i.height, u = o.width / o.height; + if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = o.width, l = o.height), this.setTransform(t), i.sWidth && i.sHeight) { + var h = i.sx || 0, c = i.sy || 0; + t.drawImage(o, h, c, i.sWidth, i.sHeight, a, r, s, l) + } else if (i.sx && i.sy) { + var d = s - (h = i.sx), f = l - (c = i.sy); + t.drawImage(o, h, c, d, f, a, r, s, l) + } else t.drawImage(o, a, r, s, l); + null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect())) + } + }, getBoundingRect: function () { + var t = this.style; + return this._rect || (this._rect = new $t(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect + } + }, u(Je, $e); + var Pw = new $t(0, 0, 0, 0), Nw = new $t(0, 0, 0, 0), Ow = function (t, e, i) { + this.type = "canvas"; + var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase(); + this._opts = i = a({}, i || {}), this.dpr = i.devicePixelRatio || Q_, this._singleCanvas = n, this.root = t; + var o = t.style; + o && (o["-webkit-tap-highlight-color"] = "transparent", o["-webkit-user-select"] = o["user-select"] = o["-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e; + var r = this._zlevelList = [], s = this._layers = {}; + if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) { + var l = t.width, u = t.height; + null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width = l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u; + var h = new xw(t, this, this.dpr); + h.__builtin__ = !0, h.initContext(), s[314159] = h, h.zlevel = 314159, r.push(314159), this._domRoot = t + } else { + this._width = this._getSize(0), this._height = this._getSize(1); + var c = this._domRoot = oi(this._width, this._height); + t.appendChild(c) + } + this._hoverlayer = null, this._hoverElements = [] + }; + Ow.prototype = { + constructor: Ow, 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._redrawId = Math.random(), this._paintList(e, t, this._redrawId); + for (var n = 0; n < i.length; n++) { + var o = i[n], a = this._layers[o]; + if (!a.__builtin__ && a.refresh) { + var r = 0 === n ? this._backgroundColor : null; + a.refresh(r) + } + } + return this.refreshHover(), 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 = l(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) { + ae(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(1e5)); + var n = {}; + i.ctx.save(); + for (var o = 0; o < e;) { + var a = t[o], r = a.__from; + r && r.__zr ? (o++, r.invisible || (a.transform = r.transform, a.invTransform = r.invTransform, a.__clipPaths = r.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(o, 1), r.__hoverMir = null, e--) + } + i.ctx.restore() + } + }, getHoverLayer: function () { + return this.getLayer(1e5) + }, _paintList: function (t, e, i) { + if (this._redrawId === i) { + e = e || !1, this._updateLayerStatus(t); + var n = this._doPaintList(t, e); + if (this._needsManuallyCompositing && this._compositeManually(), !n) { + var o = this; + _w(function () { + o._paintList(t, e, i) + }) + } + } + }, _compositeManually: function () { + var t = this.getLayer(314159).ctx, e = this._domRoot.width, i = this._domRoot.height; + t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function (n) { + n.virtual && t.drawImage(n.dom, 0, 0, e, i) + }) + }, _doPaintList: function (t, e) { + for (var i = [], n = 0; n < this._zlevelList.length; n++) { + var o = this._zlevelList[n]; + (s = this._layers[o]).__builtin__ && s !== this._hoverlayer && (s.__dirty || e) && i.push(s) + } + for (var a = !0, r = 0; r < i.length; r++) { + var s = i[r], l = s.ctx, u = {}; + l.save(); + var h = e ? s.__startIndex : s.__drawIndex, c = !e && s.incremental && Date.now, f = c && Date.now(), + p = s.zlevel === this._zlevelList[0] ? this._backgroundColor : null; + if (s.__startIndex === s.__endIndex) s.clear(!1, p); else if (h === s.__startIndex) { + var g = t[h]; + g.incremental && g.notClear && !e || s.clear(!1, p) + } + -1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = s.__startIndex); + for (var m = h; m < s.__endIndex; m++) { + var v = t[m]; + if (this._doPaintEl(v, s, e, u), v.__dirty = !1, c && Date.now() - f > 15) break + } + s.__drawIndex = m, s.__drawIndex < s.__endIndex && (a = !1), u.prevElClipPaths && l.restore(), l.restore() + } + return a_.wxa && d(this._layers, function (t) { + t && t.ctx && t.ctx.draw && t.ctx.draw() + }), a + }, _doPaintEl: function (t, e, i, n) { + var o = e.ctx, a = t.transform; + if ((e.__dirty || i) && !t.invisible && 0 !== t.style.opacity && (!a || a[0] || a[3]) && (!t.culling || !ei(t, this._width, this._height))) { + var r = t.__clipPaths; + n.prevElClipPaths && !ii(r, n.prevElClipPaths) || (n.prevElClipPaths && (e.ctx.restore(), n.prevElClipPaths = null, n.prevEl = null), r && (o.save(), ni(r, o), n.prevElClipPaths = r)), t.beforeBrush && t.beforeBrush(o), t.brush(o, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(o) + } + }, getLayer: function (t, e) { + this._singleCanvas && !this._needsManuallyCompositing && (t = 314159); + var i = this._layers[t]; + return i || ((i = new xw("zr_" + t, this, this.dpr)).zlevel = t, i.__builtin__ = !0, this._layerConfig[t] && n(i, this._layerConfig[t], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i + }, insertLayer: function (t, e) { + var i = this._layers, n = this._zlevelList, o = n.length, a = null, r = -1, s = this._domRoot; + if (i[t]) ew("ZLevel " + t + " has been used already"); else if (ti(e)) { + if (o > 0 && t > n[0]) { + for (r = 0; r < o - 1 && !(n[r] < t && n[r + 1] > t); r++) ; + a = i[n[r]] + } + if (n.splice(r + 1, 0, t), i[t] = e, !e.virtual) if (a) { + var l = a.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 ew("Layer of zlevel " + t + " is not valid") + }, eachLayer: function (t, e) { + var i, n, o = this._zlevelList; + for (n = 0; n < o.length; n++) i = o[n], t.call(e, this._layers[i], i) + }, eachBuiltinLayer: function (t, e) { + var i, n, o, a = this._zlevelList; + for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ && t.call(e, i, n) + }, eachOtherLayer: function (t, e) { + var i, n, o, a = this._zlevelList; + for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ || t.call(e, i, n) + }, getLayers: function () { + return this._layers + }, _updateLayerStatus: function (t) { + function e(t) { + i && (i.__endIndex !== t && (i.__dirty = !0), i.__endIndex = t) + } + + if (this.eachBuiltinLayer(function (t, e) { + t.__dirty = t.__used = !1 + }), this._singleCanvas) for (o = 1; o < t.length; o++) if ((r = t[o]).zlevel !== t[o - 1].zlevel || r.incremental) { + this._needsManuallyCompositing = !0; + break + } + for (var i = null, n = 0, o = 0; o < t.length; o++) { + var a, r = t[o], s = r.zlevel; + r.incremental ? ((a = this.getLayer(s + .001, this._needsManuallyCompositing)).incremental = !0, n = 1) : a = this.getLayer(s + (n > 0 ? .01 : 0), this._needsManuallyCompositing), a.__builtin__ || ew("ZLevel " + s + " has been used by unkown layer " + a.id), a !== i && (a.__used = !0, a.__startIndex !== o && (a.__dirty = !0), a.__startIndex = o, a.incremental ? a.__drawIndex = -1 : a.__drawIndex = o, e(o), i = a), r.__dirty && (a.__dirty = !0, a.incremental && a.__drawIndex < 0 && (a.__drawIndex = o)) + } + e(o), this.eachBuiltinLayer(function (t, e) { + !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex) + }) + }, clear: function () { + return this.eachBuiltinLayer(this._clearLayer), this + }, _clearLayer: function (t) { + t.clear() + }, setBackgroundColor: function (t) { + this._backgroundColor = t + }, configLayer: function (t, e) { + if (e) { + var i = this._layerConfig; + i[t] ? n(i[t], e, !0) : i[t] = e; + for (var o = 0; o < this._zlevelList.length; o++) { + var a = this._zlevelList[o]; + a !== t && a !== t + .01 || n(this._layers[a], 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(l(i, t), 1)) + }, resize: function (t, e) { + if (this._domRoot.style) { + 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) { + i.style.width = t + "px", i.style.height = e + "px"; + for (var o in this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e); + d(this._progressiveLayers, function (i) { + i.resize(t, e) + }), this.refresh(!0) + } + this._width = t, this._height = e + } else { + if (null == t || null == e) return; + this._width = t, this._height = e, this.getLayer(314159).resize(t, e) + } + return 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 && !this._compositeManually) return this._layers[314159].dom; + var e = new xw("image", this, t.pixelRatio || this.dpr); + if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) { + this.refresh(); + var i = e.dom.width, n = e.dom.height, o = e.ctx; + this.eachLayer(function (t) { + t.__builtin__ ? o.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore()) + }) + } else for (var a = {}, r = this.storage.getDisplayList(!0), s = 0; s < r.length; s++) { + var l = r[s]; + this._doPaintEl(l, e, !0, a) + } + return 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], + o = ["paddingLeft", "paddingTop"][t], a = ["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] || Qe(s[i]) || Qe(r.style[i])) - (Qe(s[o]) || 0) - (Qe(s[a]) || 0) | 0 + }, pathToImage: function (t, e) { + e = e || this.dpr; + var i = document.createElement("canvas"), n = i.getContext("2d"), o = t.getBoundingRect(), a = t.style, + r = a.shadowBlur * e, s = a.shadowOffsetX * e, l = a.shadowOffsetY * e, + u = a.hasStroke() ? a.lineWidth : 0, h = Math.max(u / 2, -s + r), c = Math.max(u / 2, s + r), + d = Math.max(u / 2, -l + r), f = Math.max(u / 2, l + r), p = o.width + h + c, g = o.height + d + f; + i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e; + var m = {position: t.position, rotation: t.rotation, scale: t.scale}; + t.position = [h - o.x, d - o.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n); + var v = new Je({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 Ew = "undefined" != typeof window && !!window.addEventListener, + Rw = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, zw = Ew ? function (t) { + t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0 + } : function (t) { + t.returnValue = !1, t.cancelBubble = !0 + }, Bw = 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, D_.call(this) + }; + Bw.prototype = { + constructor: Bw, 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 = l(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, o = [], a = [], r = 0; r < n; r++) { + var s = i[r], l = s.step(t, e); + l && (o.push(l), a.push(s)) + } + for (r = 0; r < n;) i[r]._needsRemove ? (i[r] = i[n - 1], i.pop(), n--) : r++; + n = o.length; + for (r = 0; r < n; r++) a[r].fire(o[r]); + this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update() + }, _startLoop: function () { + function t() { + e._running && (_w(t), !e._paused && e._update()) + } + + var e = this; + this._running = !0, _w(t) + }, 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 = [] + }, isFinished: function () { + return !this._clips.length + }, animate: function (t, e) { + var i = new $_(t, (e = e || {}).loop, e.getter, e.setter); + return this.addAnimator(i), i + } + }, h(Bw, D_); + var Vw = function () { + this._track = [] + }; + Vw.prototype = { + constructor: Vw, 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 o = {points: [], touches: [], target: e, event: t}, a = 0, r = n.length; a < r; a++) { + var s = n[a], l = ri(i, s, {}); + o.points.push([l.zrX, l.zrY]), o.touches.push(s) + } + this._track.push(o) + } + }, _recognize: function (t) { + for (var e in Gw) if (Gw.hasOwnProperty(e)) { + var i = Gw[e](this._track, t); + if (i) return i + } + } + }; + var Gw = { + pinch: function (t, e) { + var i = t.length; + if (i) { + var n = (t[i - 1] || {}).points, o = (t[i - 2] || {}).points || n; + if (o && o.length > 1 && n && n.length > 1) { + var a = di(n) / di(o); + !isFinite(a) && (a = 1), e.pinchScale = a; + var r = fi(n); + return e.pinchX = r[0], e.pinchY = r[1], {type: "pinch", target: t[0].target, event: e} + } + } + } + }, Ww = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"], + Fw = ["touchstart", "touchend", "touchmove"], + Hw = {pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1}, Zw = f(Ww, function (t) { + var e = t.replace("mouse", "pointer"); + return Hw[e] ? e : t + }), Uw = { + mousemove: function (t) { + t = li(this.dom, t), this.trigger("mousemove", t) + }, mouseout: function (t) { + var e = (t = li(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 = li(this.dom, t)).zrByTouch = !0, this._lastTouchMoment = new Date, gi(this, t, "start"), Uw.mousemove.call(this, t), Uw.mousedown.call(this, t), mi(this) + }, touchmove: function (t) { + (t = li(this.dom, t)).zrByTouch = !0, gi(this, t, "change"), Uw.mousemove.call(this, t), mi(this) + }, touchend: function (t) { + (t = li(this.dom, t)).zrByTouch = !0, gi(this, t, "end"), Uw.mouseup.call(this, t), +new Date - this._lastTouchMoment < 300 && Uw.click.call(this, t), mi(this) + }, pointerdown: function (t) { + Uw.mousedown.call(this, t) + }, pointermove: function (t) { + vi(t) || Uw.mousemove.call(this, t) + }, pointerup: function (t) { + Uw.mouseup.call(this, t) + }, pointerout: function (t) { + vi(t) || Uw.mouseout.call(this, t) + } + }; + d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) { + Uw[t] = function (e) { + e = li(this.dom, e), this.trigger(t, e) + } + }); + var Xw = xi.prototype; + Xw.dispose = function () { + for (var t = Ww.concat(Fw), e = 0; e < t.length; e++) { + var i = t[e]; + hi(this.dom, pi(i), this._handlers[i]) + } + }, Xw.setCursor = function (t) { + this.dom.style && (this.dom.style.cursor = t || "default") + }, h(xi, D_); + var jw = !a_.canvasSupported, Yw = {canvas: Ow}, qw = {}, Kw = function (t, e, i) { + i = i || {}, this.dom = e, this.id = t; + var n = this, o = new hw, a = i.renderer; + if (jw) { + if (!Yw.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8"); + a = "vml" + } else a && Yw[a] || (a = "canvas"); + var r = new Yw[a](e, o, i, t); + this.storage = o, this.painter = r; + var s = a_.node || a_.worker ? null : new xi(r.getViewportRoot()); + this.handler = new L_(o, r, s, r.root), this.animation = new Bw({stage: {update: m(this.flush, this)}}), this.animation.start(), this._needsRefresh; + var l = o.delFromStorage, u = o.addToStorage; + o.delFromStorage = function (t) { + l.call(o, t), t && t.removeSelfFromZr(n) + }, o.addToStorage = function (t) { + u.call(o, t), t.addSelfToZr(n) + } + }; + Kw.prototype = { + constructor: Kw, 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 && this.painter.configLayer(t, e), this._needsRefresh = !0 + }, setBackgroundColor: function (t) { + this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0 + }, refreshImmediately: function () { + this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1 + }, refresh: function () { + this._needsRefresh = !0 + }, flush: function () { + var t; + this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()), t && this.trigger("rendered") + }, 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 () { + this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, bi(this.id) + } + }; + var $w = (Object.freeze || Object)({ + version: "4.0.4", init: _i, dispose: function (t) { + if (t) t.dispose(); else { + for (var e in qw) qw.hasOwnProperty(e) && qw[e].dispose(); + qw = {} + } + return this + }, getInstance: function (t) { + return qw[t] + }, registerPainter: wi + }), Jw = d, Qw = w, tb = y, eb = "series\0", + ib = ["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"], + nb = 0, ob = ".", ab = "___EC__COMPONENT__CONTAINER___", rb = 0, sb = 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 o = {}, a = 0; a < t.length; a++) { + var r = t[a][1]; + if (!(i && l(i, r) >= 0 || n && l(n, r) < 0)) { + var s = e.getShallow(r); + null != s && (o[t[a][0]] = s) + } + } + return o + } + }, + lb = sb([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + ub = { + getLineStyle: function (t) { + var e = lb(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] + } + }, + hb = sb([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]), + cb = { + getAreaStyle: function (t, e) { + return hb(this, t, e) + } + }, db = Math.pow, fb = Math.sqrt, pb = 1e-8, gb = 1e-4, mb = fb(3), vb = 1 / 3, yb = V(), xb = V(), _b = V(), + wb = Math.min, bb = Math.max, Sb = Math.sin, Mb = Math.cos, Ib = 2 * Math.PI, Tb = V(), Db = V(), Ab = V(), + Cb = [], Lb = [], kb = {M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7}, Pb = [], Nb = [], Ob = [], Eb = [], + Rb = Math.min, zb = Math.max, Bb = Math.cos, Vb = Math.sin, Gb = Math.sqrt, Wb = Math.abs, + Fb = "undefined" != typeof Float32Array, Hb = function (t) { + this._saveData = !t, this._saveData && (this.data = []), this._ctx = null + }; + Hb.prototype = { + constructor: Hb, + _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 = Wb(1 / Q_ / t) || 0, this._uy = Wb(1 / Q_ / 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(kb.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 = Wb(t - this._xi) > this._ux || Wb(e - this._yi) > this._uy || this._len < 5; + return this.addData(kb.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, o, a) { + return this.addData(kb.C, t, e, i, n, o, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, o, a) : this._ctx.bezierCurveTo(t, e, i, n, o, a)), this._xi = o, this._yi = a, this + }, + quadraticCurveTo: function (t, e, i, n) { + return this.addData(kb.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, o, a) { + return this.addData(kb.A, t, e, i, i, n, o - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, o, a), this._xi = Bb(o) * i + t, this._yi = Vb(o) * i + t, this + }, + arcTo: function (t, e, i, n, o) { + return this._ctx && this._ctx.arcTo(t, e, i, n, o), this + }, + rect: function (t, e, i, n) { + return this._ctx && this._ctx.rect(t, e, i, n), this.addData(kb.R, t, e, i, n), this + }, + closePath: function () { + this.addData(kb.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 || !Fb || (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, o = 0; o < e; o++) i += t[o].len(); + Fb && this.data instanceof Float32Array && (this.data = new Float32Array(n + i)); + for (o = 0; o < e; o++) for (var a = t[o].data, r = 0; r < a.length; r++) this.data[n++] = a[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, o = this._dashSum, a = this._dashOffset, r = this._lineDash, s = this._ctx, l = this._xi, + u = this._yi, h = t - l, c = e - u, d = Gb(h * h + c * c), f = l, p = u, g = r.length; + for (h /= d, c /= d, a < 0 && (a = o + a), f -= (a %= o) * h, p -= a * c; h > 0 && f <= t || h < 0 && f >= t || 0 == h && (c > 0 && p <= e || c < 0 && p >= e);) f += h * (i = r[n = this._dashIdx]), p += c * i, this._dashIdx = (n + 1) % g, h > 0 && f < l || h < 0 && f > l || c > 0 && p < u || c < 0 && p > u || s[n % 2 ? "moveTo" : "lineTo"](h >= 0 ? Rb(f, t) : zb(f, t), c >= 0 ? Rb(p, e) : zb(p, e)); + h = f - t, c = p - e, this._dashOffset = -Gb(h * h + c * c) + }, + _dashedBezierTo: function (t, e, i, n, o, a) { + var r, s, l, u, h, c = this._dashSum, d = this._dashOffset, f = this._lineDash, p = this._ctx, g = this._xi, + m = this._yi, v = ji, y = 0, x = this._dashIdx, _ = f.length, w = 0; + for (d < 0 && (d = c + d), d %= c, r = 0; r < 1; r += .1) s = v(g, t, i, o, r + .1) - v(g, t, i, o, r), l = v(m, e, n, a, r + .1) - v(m, e, n, a, r), y += Gb(s * s + l * l); + for (; x < _ && !((w += f[x]) > d); x++) ; + for (r = (w - d) / y; r <= 1;) u = v(g, t, i, o, r), h = v(m, e, n, a, r), x % 2 ? p.moveTo(u, h) : p.lineTo(u, h), r += f[x] / y, x = (x + 1) % _; + x % 2 != 0 && p.lineTo(o, a), s = o - u, l = a - h, this._dashOffset = -Gb(s * s + l * l) + }, + _dashedQuadraticTo: function (t, e, i, n) { + var o = i, a = 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, o, a) + }, + toStatic: function () { + var t = this.data; + t instanceof Array && (t.length = this._len, Fb && (this.data = new Float32Array(t))) + }, + getBoundingRect: function () { + Pb[0] = Pb[1] = Ob[0] = Ob[1] = Number.MAX_VALUE, Nb[0] = Nb[1] = Eb[0] = Eb[1] = -Number.MAX_VALUE; + for (var t = this.data, e = 0, i = 0, n = 0, o = 0, a = 0; a < t.length;) { + var r = t[a++]; + switch (1 == a && (n = e = t[a], o = i = t[a + 1]), r) { + case kb.M: + e = n = t[a++], i = o = t[a++], Ob[0] = n, Ob[1] = o, Eb[0] = n, Eb[1] = o; + break; + case kb.L: + sn(e, i, t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.C: + ln(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.Q: + un(e, i, t[a++], t[a++], t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.A: + var s = t[a++], l = t[a++], u = t[a++], h = t[a++], c = t[a++], d = t[a++] + c, + f = (t[a++], 1 - t[a++]); + 1 == a && (n = Bb(c) * u + s, o = Vb(c) * h + l), hn(s, l, u, h, c, d, f, Ob, Eb), e = Bb(d) * u + s, i = Vb(d) * h + l; + break; + case kb.R: + sn(n = e = t[a++], o = i = t[a++], n + t[a++], o + t[a++], Ob, Eb); + break; + case kb.Z: + e = n, i = o + } + tt(Pb, Pb, Ob), et(Nb, Nb, Eb) + } + return 0 === a && (Pb[0] = Pb[1] = Nb[0] = Nb[1] = 0), new $t(Pb[0], Pb[1], Nb[0] - Pb[0], Nb[1] - Pb[1]) + }, + rebuildPath: function (t) { + for (var e, i, n, o, a, r, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; c < h;) { + var d = s[c++]; + switch (1 == c && (e = n = s[c], i = o = s[c + 1]), d) { + case kb.M: + e = n = s[c++], i = o = s[c++], t.moveTo(n, o); + break; + case kb.L: + a = s[c++], r = s[c++], (Wb(a - n) > l || Wb(r - o) > u || c === h - 1) && (t.lineTo(a, r), n = a, o = r); + break; + case kb.C: + t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1]; + break; + case kb.Q: + t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1]; + break; + case kb.A: + var f = s[c++], p = s[c++], g = s[c++], m = s[c++], v = s[c++], y = s[c++], x = s[c++], + _ = s[c++], w = g > m ? g : m, b = g > m ? 1 : g / m, S = g > m ? m / g : 1, M = v + y; + Math.abs(g - m) > .001 ? (t.translate(f, p), t.rotate(x), t.scale(b, S), t.arc(0, 0, w, v, M, 1 - _), t.scale(1 / b, 1 / S), t.rotate(-x), t.translate(-f, -p)) : t.arc(f, p, w, v, M, 1 - _), 1 == c && (e = Bb(v) * g + f, i = Vb(v) * m + p), n = Bb(M) * g + f, o = Vb(M) * m + p; + break; + case kb.R: + e = n = s[c], i = o = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]); + break; + case kb.Z: + t.closePath(), n = e, o = i + } + } + } + }, Hb.CMD = kb; + var Zb = 2 * Math.PI, Ub = 2 * Math.PI, Xb = Hb.CMD, jb = 2 * Math.PI, Yb = 1e-4, qb = [-1, -1, -1], Kb = [-1, -1], + $b = yw.prototype.getCanvasPattern, Jb = Math.abs, Qb = new Hb(!0); + In.prototype = { + constructor: In, type: "path", __dirtyPath: !0, strokeContainThreshold: 5, brush: function (t, e) { + var i = this.style, n = this.path || Qb, o = i.hasStroke(), a = i.hasFill(), r = i.fill, s = i.stroke, + l = a && !!r.colorStops, u = o && !!s.colorStops, h = a && !!r.image, c = o && !!s.image; + if (i.bind(t, this, e), this.setTransform(t), this.__dirty) { + var d; + l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, r, d)), u && (d = d || this.getBoundingRect(), this._strokeGradient = i.getGradient(t, s, d)) + } + l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = $b.call(r, t)), u ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = $b.call(s, t)); + var f = i.lineDash, p = i.lineDashOffset, g = !!t.setLineDash, m = this.getGlobalScale(); + n.setScale(m[0], m[1]), this.__dirtyPath || f && !g && o ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(t)), a && n.fill(t), f && g && (t.setLineDash(f), t.lineDashOffset = p), o && n.stroke(t), f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect())) + }, buildPath: function (t, e, i) { + }, createPathProxy: function () { + this.path = new Hb + }, getBoundingRect: function () { + var t = this._rect, e = this.style, i = !t; + if (i) { + var n = this.path; + n || (n = this.path = new Hb), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect() + } + if (this._rect = t, e.hasStroke()) { + var o = this._rectWithStroke || (this._rectWithStroke = t.clone()); + if (this.__dirty || i) { + o.copy(t); + var a = e.lineWidth, r = e.strokeNoScale ? this.getLineScale() : 1; + e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), r > 1e-10 && (o.width += a / r, o.height += a / r, o.x -= a / r / 2, o.y -= a / r / 2) + } + return o + } + return t + }, contain: function (t, e) { + var i = this.transformCoordToLocal(t, e), n = this.getBoundingRect(), o = this.style; + if (t = i[0], e = i[1], n.contain(t, e)) { + var a = this.path.data; + if (o.hasStroke()) { + var r = o.lineWidth, s = o.strokeNoScale ? this.getLineScale() : 1; + if (s > 1e-10 && (o.hasFill() || (r = Math.max(r, this.strokeContainThreshold)), Mn(a, r / s, t, e))) return !0 + } + if (o.hasFill()) return Sn(a, 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) : $e.prototype.attrKV.call(this, t, e) + }, setShape: function (t, e) { + var i = this.shape; + if (i) { + if (w(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 && Jb(t[0] - 1) > 1e-10 && Jb(t[3] - 1) > 1e-10 ? Math.sqrt(Jb(t[0] * t[3] - t[2] * t[1])) : 1 + } + }, In.extend = function (t) { + var e = function (e) { + In.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 o in i) !n.hasOwnProperty(o) && i.hasOwnProperty(o) && (n[o] = i[o]) + } + t.init && t.init.call(this, e) + }; + u(e, In); + for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]); + return e + }, u(In, $e); + var tS = Hb.CMD, eS = [[], [], []], iS = Math.sqrt, nS = Math.atan2, oS = function (t, e) { + var i, n, o, a, r, s, l = t.data, u = tS.M, h = tS.C, c = tS.L, d = tS.R, f = tS.A, p = tS.Q; + for (o = 0, a = 0; o < l.length;) { + switch (i = l[o++], a = o, n = 0, i) { + case u: + case c: + n = 1; + break; + case h: + n = 3; + break; + case p: + n = 2; + break; + case f: + var g = e[4], m = e[5], v = iS(e[0] * e[0] + e[1] * e[1]), y = iS(e[2] * e[2] + e[3] * e[3]), + x = nS(-e[1] / y, e[0] / v); + l[o] *= v, l[o++] += g, l[o] *= y, l[o++] += m, l[o++] *= v, l[o++] *= y, l[o++] += x, l[o++] += x, a = o += 2; + break; + case d: + s[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[o++], s[1] += l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1] + } + for (r = 0; r < n; r++) (s = eS[r])[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1] + } + }, aS = ["m", "M", "l", "L", "v", "V", "h", "H", "z", "Z", "c", "C", "q", "Q", "t", "T", "s", "S", "a", "A"], + rS = Math.sqrt, sS = Math.sin, lS = Math.cos, uS = Math.PI, hS = function (t) { + return Math.sqrt(t[0] * t[0] + t[1] * t[1]) + }, cS = function (t, e) { + return (t[0] * e[0] + t[1] * e[1]) / (hS(t) * hS(e)) + }, dS = function (t, e) { + return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(cS(t, e)) + }, fS = function (t) { + $e.call(this, t) + }; + fS.prototype = { + constructor: fS, type: "text", brush: function (t, e) { + var i = this.style; + this.__dirty && Ne(i), 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), Ke(n, i) && (this.setTransform(t), Ee(this, t, n, i), this.restoreTransform(t)) + }, getBoundingRect: function () { + var t = this.style; + if (this.__dirty && Ne(t), !this._rect) { + var e = t.text; + null != e ? e += "" : e = ""; + var i = me(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.rich); + if (i.x += t.x || 0, i.y += t.y || 0, Xe(t.textStroke, t.textStrokeWidth)) { + var n = t.textStrokeWidth; + i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n + } + this._rect = i + } + return this._rect + } + }, u(fS, $e); + var pS = In.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) + } + }), gS = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]], + mS = function (t) { + return a_.browser.ie && a_.browser.version >= 11 ? function () { + var e, i = this.__clipPaths, n = this.style; + if (i) for (var o = 0; o < i.length; o++) { + var a = i[o], r = a && a.shape, s = a && a.type; + if (r && ("sector" === s && r.startAngle === r.endAngle || "rect" === s && (!r.width || !r.height))) { + for (l = 0; l < gS.length; l++) gS[l][2] = n[gS[l][0]], n[gS[l][0]] = gS[l][1]; + e = !0; + break + } + } + if (t.apply(this, arguments), e) for (var l = 0; l < gS.length; l++) n[gS[l][0]] = gS[l][2] + } : t + }, vS = In.extend({ + type: "sector", + shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0}, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = Math.max(e.r0 || 0, 0), a = Math.max(e.r, 0), r = e.startAngle, s = e.endAngle, + l = e.clockwise, u = Math.cos(r), h = Math.sin(r); + t.moveTo(u * o + i, h * o + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, r, s, !l), t.lineTo(Math.cos(s) * o + i, Math.sin(s) * o + n), 0 !== o && t.arc(i, n, o, s, r, l), t.closePath() + } + }), yS = In.extend({ + type: "ring", shape: {cx: 0, cy: 0, r: 0, r0: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = 2 * Math.PI; + t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, o, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, o, !0) + } + }), xS = function (t, e) { + for (var i = t.length, n = [], o = 0, a = 1; a < i; a++) o += K(t[a - 1], t[a]); + var r = o / 2; + r = r < i ? i : r; + for (a = 0; a < r; a++) { + var s, l, u, h = a / (r - 1) * (e ? i : i - 1), c = Math.floor(h), d = h - c, f = t[c % i]; + e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1], l = t[c > i - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]); + var p = d * d, g = d * p; + n.push([kn(s[0], f[0], l[0], u[0], d, p, g), kn(s[1], f[1], l[1], u[1], d, p, g)]) + } + return n + }, _S = function (t, e, i, n) { + var o, a, r, s, l = [], u = [], h = [], c = []; + if (n) { + r = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0]; + for (var d = 0, f = t.length; d < f; d++) tt(r, r, t[d]), et(s, s, t[d]); + tt(r, r, n[0]), et(s, s, n[1]) + } + for (var d = 0, f = t.length; d < f; d++) { + var p = t[d]; + if (i) o = t[d ? d - 1 : f - 1], a = t[(d + 1) % f]; else { + if (0 === d || d === f - 1) { + l.push(W(t[d])); + continue + } + o = t[d - 1], a = t[d + 1] + } + U(u, a, o), Y(u, u, e); + var g = K(p, o), m = K(p, a), v = g + m; + 0 !== v && (g /= v, m /= v), Y(h, u, -g), Y(c, u, m); + var y = H([], p, h), x = H([], p, c); + n && (et(y, y, r), tt(y, y, s), et(x, x, r), tt(x, x, s)), l.push(y), l.push(x) + } + return i && l.push(l.shift()), l + }, wS = In.extend({ + type: "polygon", + shape: {points: null, smooth: !1, smoothConstraint: null}, + buildPath: function (t, e) { + Pn(t, e, !0) + } + }), bS = In.extend({ + type: "polyline", + shape: {points: null, smooth: !1, smoothConstraint: null}, + style: {stroke: "#000", fill: null}, + buildPath: function (t, e) { + Pn(t, e, !1) + } + }), SS = In.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, o = e.width, a = e.height; + e.r ? Pe(t, e) : t.rect(i, n, o, a), t.closePath() + } + }), MS = In.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, o = e.x2, a = e.y2, r = e.percent; + 0 !== r && (t.moveTo(i, n), r < 1 && (o = i * (1 - r) + o * r, a = n * (1 - r) + a * r), t.lineTo(o, a)) + }, + pointAt: function (t) { + var e = this.shape; + return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t] + } + }), IS = [], TS = In.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, o = e.x2, a = e.y2, r = e.cpx1, s = e.cpy1, l = e.cpx2, u = e.cpy2, h = e.percent; + 0 !== h && (t.moveTo(i, n), null == l || null == u ? (h < 1 && (on(i, r, o, h, IS), r = IS[1], o = IS[2], on(n, s, a, h, IS), s = IS[1], a = IS[2]), t.quadraticCurveTo(r, s, o, a)) : (h < 1 && ($i(i, r, l, o, h, IS), r = IS[1], l = IS[2], o = IS[3], $i(n, s, u, a, h, IS), s = IS[1], u = IS[2], a = IS[3]), t.bezierCurveTo(r, s, l, u, o, a))) + }, + pointAt: function (t) { + return Nn(this.shape, t, !1) + }, + tangentAt: function (t) { + var e = Nn(this.shape, t, !0); + return q(e, e) + } + }), DS = In.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, o = Math.max(e.r, 0), a = e.startAngle, r = e.endAngle, s = e.clockwise, + l = Math.cos(a), u = Math.sin(a); + t.moveTo(l * o + i, u * o + n), t.arc(i, n, o, a, r, !s) + } + }), AS = In.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(), In.prototype.getBoundingRect.call(this) + } + }), CS = function (t) { + this.colorStops = t || [] + }; + CS.prototype = { + constructor: CS, addColorStop: function (t, e) { + this.colorStops.push({offset: t, color: e}) + } + }; + var LS = function (t, e, i, n, o, a) { + 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 = a || !1, CS.call(this, o) + }; + LS.prototype = {constructor: LS}, u(LS, CS); + var kS = function (t, e, i, n, o) { + this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global = o || !1, CS.call(this, n) + }; + kS.prototype = {constructor: kS}, u(kS, CS), On.prototype.incremental = !0, On.prototype.clearDisplaybles = function () { + this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1 + }, On.prototype.addDisplayable = function (t, e) { + e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty() + }, On.prototype.addDisplayables = function (t, e) { + e = e || !1; + for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e) + }, On.prototype.eachPendingDisplayable = function (t) { + for (e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]); + for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e]) + }, On.prototype.update = function () { + this.updateTransform(); + for (t = this._cursor; t < this._displayables.length; t++) (e = this._displayables[t]).parent = this, e.update(), e.parent = null; + for (var t = 0; t < this._temporaryDisplayables.length; t++) { + var e = this._temporaryDisplayables[t]; + e.parent = this, e.update(), e.parent = null + } + }, On.prototype.brush = function (t, e) { + for (i = this._cursor; i < this._displayables.length; i++) (n = this._displayables[i]).beforeBrush && n.beforeBrush(t), n.brush(t, i === this._cursor ? null : this._displayables[i - 1]), n.afterBrush && n.afterBrush(t); + this._cursor = i; + for (var i = 0; i < this._temporaryDisplayables.length; i++) { + var n = this._temporaryDisplayables[i]; + n.beforeBrush && n.beforeBrush(t), n.brush(t, 0 === i ? null : this._temporaryDisplayables[i - 1]), n.afterBrush && n.afterBrush(t) + } + this._temporaryDisplayables = [], this.notClear = !0 + }; + var PS = []; + On.prototype.getBoundingRect = function () { + if (!this._rect) { + for (var t = new $t(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) { + var i = this._displayables[e], n = i.getBoundingRect().clone(); + i.needLocalTransform() && n.applyTransform(i.getLocalTransform(PS)), t.union(n) + } + this._rect = t + } + return this._rect + }, On.prototype.contain = function (t, e) { + var i = this.transformCoordToLocal(t, e); + if (this.getBoundingRect().contain(i[0], i[1])) for (var n = 0; n < this._displayables.length; n++) if (this._displayables[n].contain(t, e)) return !0; + return !1 + }, u(On, $e); + var NS = Math.round, OS = Math.max, ES = Math.min, RS = {}, zS = function (t, e) { + for (var i = [], n = t.length, o = 0; o < n; o++) { + var a = t[o]; + a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path) + } + var r = new In(e); + return r.createPathProxy(), r.buildPath = function (t) { + t.appendPath(i); + var e = t.getContext(); + e && t.rebuildPath(e) + }, r + }, BS = (Object.freeze || Object)({ + extendShape: En, + extendPath: function (t, e) { + return Ln(t, e) + }, + makePath: Rn, + makeImage: zn, + mergePath: zS, + resizePath: Vn, + subPixelOptimizeLine: Gn, + subPixelOptimizeRect: Wn, + subPixelOptimize: Fn, + setHoverStyle: eo, + setLabelStyle: io, + setTextStyle: no, + setText: function (t, e, i) { + var n, o = {isRectText: !0}; + !1 === i ? n = !0 : o.autoColor = i, oo(t, e, o, n), t.host && t.host.dirty && t.host.dirty(!1) + }, + getFont: ho, + updateProps: fo, + initProps: po, + getTransform: go, + applyTransform: mo, + transformDirection: vo, + groupTransition: yo, + clipPointsByRect: xo, + clipRectByRect: function (t, e) { + var i = OS(t.x, e.x), n = ES(t.x + t.width, e.x + e.width), o = OS(t.y, e.y), + a = ES(t.y + t.height, e.y + e.height); + if (n >= i && a >= o) return {x: i, y: o, width: n - i, height: a - o} + }, + createIcon: _o, + Group: sw, + Image: Je, + Text: fS, + Circle: pS, + Sector: vS, + Ring: yS, + Polygon: wS, + Polyline: bS, + Rect: SS, + Line: MS, + BezierCurve: TS, + Arc: DS, + IncrementalDisplayable: On, + CompoundPath: AS, + LinearGradient: LS, + RadialGradient: kS, + BoundingRect: $t + }), VS = ["textStyle", "color"], GS = { + getTextColor: function (t) { + var e = this.ecModel; + return this.getShallow("color") || (!t && e ? e.get(VS) : null) + }, getFont: function () { + return ho({ + fontStyle: this.getShallow("fontStyle"), + fontWeight: this.getShallow("fontWeight"), + fontSize: this.getShallow("fontSize"), + fontFamily: this.getShallow("fontFamily") + }, this.ecModel) + }, getTextRect: function (t) { + return me(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("rich"), this.getShallow("truncateText")) + } + }, + WS = sb([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]), + FS = { + getItemStyle: function (t, e) { + var i = WS(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] + } + }, HS = h, ZS = Ni(); + wo.prototype = { + constructor: wo, init: null, mergeOption: function (t) { + n(this.option, t, !0) + }, get: function (t, e) { + return null == t ? this.option : bo(this.option, this.parsePath(t), !e && So(this, t)) + }, getShallow: function (t, e) { + var i = this.option, n = null == i ? i : i[t], o = !e && So(this, t); + return null == n && o && (n = o.getShallow(t)), n + }, getModel: function (t, e) { + var i, n = null == t ? this.option : bo(this.option, t = this.parsePath(t)); + return e = e || (i = So(this, t)) && i.getModel(t), new wo(n, e, this.ecModel) + }, isEmpty: function () { + return null == this.option + }, restoreData: function () { + }, clone: function () { + return new (0, this.constructor)(i(this.option)) + }, setReadOnly: function (t) { + }, parsePath: function (t) { + return "string" == typeof t && (t = t.split(".")), t + }, customizeGetParent: function (t) { + ZS(this).getParent = t + }, isAnimationEnabled: function () { + if (!a_.node) { + if (null != this.option.animation) return !!this.option.animation; + if (this.parentModel) return this.parentModel.isAnimationEnabled() + } + } + }, Gi(wo), Wi(wo), HS(wo, ub), HS(wo, cb), HS(wo, GS), HS(wo, FS); + var US = 0, XS = 1e-4, jS = 9007199254740991, + YS = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/, + qS = (Object.freeze || Object)({ + linearMap: To, + parsePercent: Do, + round: Ao, + asc: Co, + getPrecision: Lo, + getPrecisionSafe: ko, + getPixelPrecision: Po, + getPercentWithPrecision: No, + MAX_SAFE_INTEGER: jS, + remRadian: Oo, + isRadianAroundZero: Eo, + parseDate: Ro, + quantity: zo, + nice: Vo, + reformIntervals: Go, + isNumeric: Wo + }), KS = L, $S = /([&<>"'])/g, JS = {"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}, + QS = ["a", "b", "c", "d", "e", "f", "g"], tM = function (t, e) { + return "{" + t + (null == e ? "" : e) + "}" + }, eM = be, iM = me, nM = (Object.freeze || Object)({ + addCommas: Fo, + toCamelCase: Ho, + normalizeCssArray: KS, + encodeHTML: Zo, + formatTpl: Uo, + formatTplSimple: Xo, + getTooltipMarker: jo, + formatTime: qo, + capitalFirst: Ko, + truncateText: eM, + getTextRect: iM + }), oM = d, aM = ["left", "right", "top", "bottom", "width", "height"], + rM = [["width", "left", "right"], ["height", "top", "bottom"]], sM = $o, + lM = (v($o, "vertical"), v($o, "horizontal"), { + 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") + } + } + }), uM = Ni(), hM = wo.extend({ + type: "component", + id: "", + name: "", + mainType: "", + subType: "", + componentIndex: 0, + defaultOption: null, + ecModel: null, + dependentModels: [], + uid: null, + layoutMode: null, + $constructor: function (t, e, i, n) { + wo.call(this, t, e, i, n), this.uid = Mo("ec_cpt_model") + }, + init: function (t, e, i, n) { + this.mergeDefaultAndTheme(t, i) + }, + mergeDefaultAndTheme: function (t, e) { + var i = this.layoutMode, o = i ? na(t) : {}; + n(t, e.getTheme().get(this.mainType)), n(t, this.getDefaultOption()), i && ia(t, o, i) + }, + mergeOption: function (t, e) { + n(this.option, t, !0); + var i = this.layoutMode; + i && ia(this.option, t, i) + }, + optionUpdated: function (t, e) { + }, + getDefaultOption: function () { + var t = uM(this); + if (!t.defaultOption) { + for (var e = [], i = this.constructor; i;) { + var o = i.prototype.defaultOption; + o && e.push(o), i = i.superClass + } + for (var a = {}, r = e.length - 1; r >= 0; r--) a = n(a, e[r], !0); + t.defaultOption = a + } + return t.defaultOption + }, + getReferringComponents: function (t) { + return this.ecModel.queryComponents({ + mainType: t, + index: this.get(t + "Index", !0), + id: this.get(t + "Id", !0) + }) + } + }); + Zi(hM, {registerWhenExtend: !0}), function (t) { + var e = {}; + t.registerSubTypeDefaulter = function (t, i) { + t = Bi(t), e[t.main] = i + }, t.determineSubType = function (i, n) { + var o = n.type; + if (!o) { + var a = Bi(i).main; + t.hasSubTypes(i) && e[a] && (o = e[a](n)) + } + return o + } + }(hM), function (t, e) { + function i(t) { + var i = {}, a = []; + return d(t, function (r) { + var s = n(i, r), u = o(s.originalDeps = e(r), t); + s.entryCount = u.length, 0 === s.entryCount && a.push(r), d(u, function (t) { + l(s.predecessor, t) < 0 && s.predecessor.push(t); + var e = n(i, t); + l(e.successor, t) < 0 && e.successor.push(r) + }) + }), {graph: i, noEntryList: a} + } + + function n(t, e) { + return t[e] || (t[e] = {predecessor: [], successor: []}), t[e] + } + + function o(t, e) { + var i = []; + return d(t, function (t) { + l(e, t) >= 0 && i.push(t) + }), i + } + + t.topologicalTravel = function (t, e, n, o) { + function a(t) { + s[t].entryCount--, 0 === s[t].entryCount && l.push(t) + } + + if (t.length) { + var r = i(e), s = r.graph, l = r.noEntryList, u = {}; + for (d(t, function (t) { + u[t] = !0 + }); l.length;) { + var h = l.pop(), c = s[h], f = !!u[h]; + f && (n.call(o, h, c.originalDeps.slice()), delete u[h]), d(c.successor, f ? function (t) { + u[t] = !0, a(t) + } : a) + } + d(u, function () { + throw new Error("Circle dependency may exists") + }) + } + } + }(hM, function (t) { + var e = []; + return d(hM.getClassesByMainType(t), function (t) { + e = e.concat(t.prototype.dependencies || []) + }), e = f(e, function (t) { + return Bi(t).main + }), "dataset" !== t && l(e, "dataset") <= 0 && e.unshift("dataset"), e + }), h(hM, lM); + var cM = ""; + "undefined" != typeof navigator && (cM = navigator.platform || ""); + var dM = { + color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"], + gradientColor: ["#f6efa6", "#d88273", "#bf444c"], + textStyle: { + fontFamily: cM.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 + }, fM = Ni(), pM = { + clearColorPalette: function () { + fM(this).colorIdx = 0, fM(this).colorNameMap = {} + }, getColorFromPalette: function (t, e, i) { + var n = fM(e = e || this), o = n.colorIdx || 0, a = n.colorNameMap = n.colorNameMap || {}; + if (a.hasOwnProperty(t)) return a[t]; + var r = Si(this.get("color", !0)), s = this.get("colorLayer", !0), l = null != i && s ? aa(s, i) : r; + if ((l = l || r) && l.length) { + var u = l[o]; + return t && (a[t] = u), n.colorIdx = (o + 1) % l.length, u + } + } + }, gM = { + cartesian2d: function (t, e, i, n) { + var o = t.getReferringComponents("xAxis")[0], a = t.getReferringComponents("yAxis")[0]; + e.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", a), sa(o) && (n.set("x", o), e.firstCategoryDimIndex = 0), sa(a) && (n.set("y", a), e.firstCategoryDimIndex = 1) + }, singleAxis: function (t, e, i, n) { + var o = t.getReferringComponents("singleAxis")[0]; + e.coordSysDims = ["single"], i.set("single", o), sa(o) && (n.set("single", o), e.firstCategoryDimIndex = 0) + }, polar: function (t, e, i, n) { + var o = t.getReferringComponents("polar")[0], a = o.findAxisModel("radiusAxis"), + r = o.findAxisModel("angleAxis"); + e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", r), sa(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), sa(r) && (n.set("angle", r), e.firstCategoryDimIndex = 1) + }, geo: function (t, e, i, n) { + e.coordSysDims = ["lng", "lat"] + }, parallel: function (t, e, i, n) { + var o = t.ecModel, a = o.getComponent("parallel", t.get("parallelIndex")), + r = e.coordSysDims = a.dimensions.slice(); + d(a.parallelAxisIndex, function (t, a) { + var s = o.getComponent("parallelAxis", t), l = r[a]; + i.set(l, s), sa(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a) + }) + } + }, mM = "original", vM = "arrayRows", yM = "objectRows", xM = "keyedColumns", _M = "unknown", wM = "typedArray", + bM = "column", SM = "row"; + la.seriesDataToSource = function (t) { + return new la({data: t, sourceFormat: S(t) ? wM : mM, fromDataset: !1}) + }, Wi(la); + var MM = Ni(), IM = "\0_ec_inner", TM = wo.extend({ + init: function (t, e, i, n) { + i = i || {}, this.option = null, this._theme = new wo(i), this._optionManager = n + }, setOption: function (t, e) { + k(!(IM 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)) : Sa.call(this, n), e = !0 + } + if ("timeline" !== t && "media" !== t || this.restoreData(), !t || "recreate" === t || "timeline" === t) { + var o = i.getTimelineOption(this); + o && (this.mergeOption(o), e = !0) + } + if (!t || "recreate" === t || "media" === t) { + var a = i.getMediaOption(this, this._api); + a.length && d(a, function (t) { + this.mergeOption(t, e = !0) + }, this) + } + return e + }, mergeOption: function (t) { + var e = this.option, o = this._componentsMap, r = []; + ca(this), d(t, function (t, o) { + null != t && (hM.hasClass(o) ? o && r.push(o) : e[o] = null == e[o] ? i(t) : n(e[o], t, !0)) + }), hM.topologicalTravel(r, hM.getAllClassMainTypes(), function (i, n) { + var r = Si(t[i]), s = Di(o.get(i), r); + Ai(s), d(s, function (t, e) { + var n = t.option; + w(n) && (t.keyInfo.mainType = i, t.keyInfo.subType = Ia(i, n, t.exist)) + }); + var l = Ma(o, n); + e[i] = [], o.set(i, []), d(s, function (t, n) { + var r = t.exist, s = t.option; + if (k(w(s) || r, "Empty component definition"), s) { + var u = hM.getClass(i, t.keyInfo.subType, !0); + if (r && r instanceof u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1); else { + var h = a({dependentModels: l, componentIndex: n}, t.keyInfo); + a(r = new u(s, this, this, h), h), r.init(s, this, this, h), r.optionUpdated(null, !0) + } + } else r.mergeOption({}, this), r.optionUpdated({}, !1); + o.get(i)[n] = r, e[i][n] = r.option + }, this), "series" === i && Ta(this, o.get("series")) + }, this), this._seriesIndicesMap = R(this._seriesIndices = this._seriesIndices || []) + }, getOption: function () { + var t = i(this.option); + return d(t, function (e, i) { + if (hM.hasClass(i)) { + for (var n = (e = Si(e)).length - 1; n >= 0; n--) Li(e[n]) && e.splice(n, 1); + t[i] = e + } + }), delete t[IM], 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 = t.index, n = t.id, o = t.name, a = this._componentsMap.get(e); + if (!a || !a.length) return []; + var r; + if (null != i) y(i) || (i = [i]), r = g(f(i, function (t) { + return a[t] + }), function (t) { + return !!t + }); else if (null != n) { + var s = y(n); + r = g(a, function (t) { + return s && l(n, t.id) >= 0 || !s && t.id === n + }) + } else if (null != o) { + var u = y(o); + r = g(a, function (t) { + return u && l(o, t.name) >= 0 || !u && t.name === o + }) + } else r = a.slice(); + return Da(r, t) + }, findComponents: function (t) { + var e = t.query, i = t.mainType, n = function (t) { + var e = i + "Index", n = i + "Id", o = i + "Name"; + return !t || null == t[e] && null == t[n] && null == t[o] ? null : { + mainType: i, + index: t[e], + id: t[n], + name: t[o] + } + }(e); + return function (e) { + return t.filter ? g(e, t.filter) : e + }(Da(n ? this.queryComponents(n) : this._componentsMap.get(i), t)) + }, eachComponent: function (t, e, i) { + var n = this._componentsMap; + "function" == typeof t ? (i = e, e = t, n.each(function (t, n) { + d(t, function (t, o) { + e.call(i, n, t, o) + }) + })) : _(t) ? d(n.get(t), e, i) : w(t) && d(this.findComponents(t), e, i) + }, getSeriesByName: function (t) { + return g(this._componentsMap.get("series"), function (e) { + return e.name === t + }) + }, getSeriesByIndex: function (t) { + return this._componentsMap.get("series")[t] + }, getSeriesByType: function (t) { + return g(this._componentsMap.get("series"), function (e) { + return e.subType === t + }) + }, getSeries: function () { + return this._componentsMap.get("series").slice() + }, getSeriesCount: function () { + return this._componentsMap.get("series").length + }, eachSeries: function (t, e) { + d(this._seriesIndices, function (i) { + var n = this._componentsMap.get("series")[i]; + t.call(e, n, i) + }, this) + }, eachRawSeries: function (t, e) { + d(this._componentsMap.get("series"), t, e) + }, eachSeriesByType: function (t, e, i) { + d(this._seriesIndices, function (n) { + var o = this._componentsMap.get("series")[n]; + o.subType === t && e.call(i, o, n) + }, this) + }, eachRawSeriesByType: function (t, e, i) { + return d(this.getSeriesByType(t), e, i) + }, isSeriesFiltered: function (t) { + return null == this._seriesIndicesMap.get(t.componentIndex) + }, getCurrentSeriesIndices: function () { + return (this._seriesIndices || []).slice() + }, filterSeries: function (t, e) { + Ta(this, g(this._componentsMap.get("series"), t, e)) + }, restoreData: function (t) { + var e = this._componentsMap; + Ta(this, e.get("series")); + var i = []; + e.each(function (t, e) { + i.push(e) + }), hM.topologicalTravel(i, hM.getAllClassMainTypes(), function (i, n) { + d(e.get(i), function (e) { + ("series" !== i || !wa(e, t)) && e.restoreData() + }) + }) + } + }); + h(TM, pM); + var DM = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"], + AM = {}; + Ca.prototype = { + constructor: Ca, create: function (t, e) { + var i = []; + d(AM, function (n, o) { + var a = n.create(t, e); + i = i.concat(a || []) + }), this._coordinateSystems = i + }, update: function (t, e) { + d(this._coordinateSystems, function (i) { + i.update && i.update(t, e) + }) + }, getCoordinateSystems: function () { + return this._coordinateSystems.slice() + } + }, Ca.register = function (t, e) { + AM[t] = e + }, Ca.get = function (t) { + return AM[t] + }; + var CM = d, LM = i, kM = f, PM = n, NM = /^(min|max)?(.+)$/; + La.prototype = { + constructor: La, setOption: function (t, e) { + t && d(Si(t.series), function (t) { + t && t.data && S(t.data) && N(t.data) + }), t = LM(t, !0); + var i = this._optionBackup, n = ka.call(this, t, e, !i); + this._newBaseOption = n.baseOption, i ? (Ea(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n + }, mountOption: function (t) { + var e = this._optionBackup; + return this._timelineOptions = kM(e.timelineOptions, LM), this._mediaList = kM(e.mediaList, LM), this._mediaDefault = LM(e.mediaDefault), this._currentMediaIndices = [], LM(t ? e.baseOption : this._newBaseOption) + }, getTimelineOption: function (t) { + var e, i = this._timelineOptions; + if (i.length) { + var n = t.getComponent("timeline"); + n && (e = LM(i[n.getCurrentIndex()], !0)) + } + return e + }, getMediaOption: function (t) { + var e = this._api.getWidth(), i = this._api.getHeight(), n = this._mediaList, o = this._mediaDefault, + a = [], r = []; + if (!n.length && !o) return r; + for (var s = 0, l = n.length; s < l; s++) Pa(n[s].query, e, i) && a.push(s); + return !a.length && o && (a = [-1]), a.length && !Oa(a, this._currentMediaIndices) && (r = kM(a, function (t) { + return LM(-1 === t ? o.option : n[t].option) + })), this._currentMediaIndices = a, r + } + }; + var OM = d, EM = w, RM = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"], + zM = function (t, e) { + OM(Fa(t.series), function (t) { + EM(t) && Wa(t) + }); + var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"]; + e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), OM(i, function (e) { + OM(Fa(t[e]), function (t) { + t && (Va(t, "axisLabel"), Va(t.axisPointer, "label")) + }) + }), OM(Fa(t.parallel), function (t) { + var e = t && t.parallelAxisDefault; + Va(e, "axisLabel"), Va(e && e.axisPointer, "label") + }), OM(Fa(t.calendar), function (t) { + za(t, "itemStyle"), Va(t, "dayLabel"), Va(t, "monthLabel"), Va(t, "yearLabel") + }), OM(Fa(t.radar), function (t) { + Va(t, "name") + }), OM(Fa(t.geo), function (t) { + EM(t) && (Ga(t), OM(Fa(t.regions), function (t) { + Ga(t) + })) + }), OM(Fa(t.timeline), function (t) { + Ga(t), za(t, "label"), za(t, "itemStyle"), za(t, "controlStyle", !0); + var e = t.data; + y(e) && d(e, function (t) { + w(t) && (za(t, "label"), za(t, "itemStyle")) + }) + }), OM(Fa(t.toolbox), function (t) { + za(t, "iconStyle"), OM(t.feature, function (t) { + za(t, "iconStyle") + }) + }), Va(Ha(t.axisPointer), "label"), Va(Ha(t.tooltip).axisPointer, "label") + }, BM = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], + VM = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], + GM = function (t, e) { + zM(t, e), t.series = Si(t.series), d(t.series, function (t) { + if (w(t)) { + var e = t.type; + if ("pie" !== e && "gauge" !== e || null != t.clockWise && (t.clockwise = t.clockWise), "gauge" === e) { + var i = Za(t, "pointer.color"); + null != i && Ua(t, "itemStyle.normal.color", i) + } + Xa(t) + } + }), t.dataRange && (t.visualMap = t.dataRange), d(VM, function (e) { + var i = t[e]; + i && (y(i) || (i = [i]), d(i, function (t) { + Xa(t) + })) + }) + }, WM = Ya.prototype; + WM.pure = !1, WM.persistent = !0, WM.getSource = function () { + return this._source + }; + var FM = { + arrayRows_column: { + pure: !0, count: function () { + return Math.max(0, this._data.length - this._source.startIndex) + }, getItem: function (t) { + return this._data[t + this._source.startIndex] + }, appendData: $a + }, + arrayRows_row: { + pure: !0, count: function () { + var t = this._data[0]; + return t ? Math.max(0, t.length - this._source.startIndex) : 0 + }, getItem: function (t) { + t += this._source.startIndex; + for (var e = [], i = this._data, n = 0; n < i.length; n++) { + var o = i[n]; + e.push(o ? o[t] : null) + } + return e + }, appendData: function () { + throw new Error('Do not support appendData when set seriesLayoutBy: "row".') + } + }, + objectRows: {pure: !0, count: qa, getItem: Ka, appendData: $a}, + keyedColumns: { + pure: !0, count: function () { + var t = this._source.dimensionsDefine[0].name, e = this._data[t]; + return e ? e.length : 0 + }, getItem: function (t) { + for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) { + var o = this._data[i[n].name]; + e.push(o ? o[t] : null) + } + return e + }, appendData: function (t) { + var e = this._data; + d(t, function (t, i) { + for (var n = e[i] || (e[i] = []), o = 0; o < (t || []).length; o++) n.push(t[o]) + }) + } + }, + original: {count: qa, getItem: Ka, appendData: $a}, + typedArray: { + persistent: !1, pure: !0, count: function () { + return this._data ? this._data.length / this._dimSize : 0 + }, getItem: function (t, e) { + t -= this._offset, e = e || []; + for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n]; + return e + }, appendData: function (t) { + this._data = t + }, clean: function () { + this._offset += this.count(), this._data = null + } + } + }, HM = { + arrayRows: Ja, objectRows: function (t, e, i, n) { + return null != i ? t[n] : t + }, keyedColumns: Ja, original: function (t, e, i, n) { + var o = Ii(t); + return null != i && o instanceof Array ? o[i] : o + }, typedArray: Ja + }, ZM = { + arrayRows: Qa, objectRows: function (t, e, i, n) { + return tr(t[e], this._dimensionInfos[e]) + }, keyedColumns: Qa, original: function (t, e, i, n) { + var o = t && (null == t.value ? t : t.value); + return !this._rawData.pure && Ti(t) && (this.hasItemOption = !0), tr(o instanceof Array ? o[n] : o, this._dimensionInfos[e]) + }, typedArray: function (t, e, i, n) { + return t[n] + } + }, UM = /\{@(.+?)\}/g, XM = { + getDataParams: function (t, e) { + var i = this.getData(e), n = this.getRawValue(t, e), o = i.getRawIndex(t), a = i.getName(t), + 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: a, + dataIndex: o, + data: r, + dataType: e, + value: n, + color: s, + marker: jo(s), + $vars: ["seriesName", "name", "value"] + } + }, getFormattedLabel: function (t, e, i, n, o) { + e = e || "normal"; + var a = this.getData(i), r = a.getItemModel(t), s = this.getDataParams(t, i); + null != n && s.value instanceof Array && (s.value = s.value[n]); + var l = r.get("normal" === e ? [o || "label", "formatter"] : [e, o || "label", "formatter"]); + return "function" == typeof l ? (s.status = e, l(s)) : "string" == typeof l ? Uo(l, s).replace(UM, function (e, i) { + var n = i.length; + return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), er(a, t, i) + }) : void 0 + }, getRawValue: function (t, e) { + return er(this.getData(e), t) + }, formatTooltip: function () { + } + }, jM = or.prototype; + jM.perform = function (t) { + function e(t) { + return !(t >= 1) && (t = 1), t + } + + var i = this._upstream, n = t && t.skip; + if (this._dirty && i) { + var o = this.context; + o.data = o.outputData = i.context.outputData + } + this.__pipeline && (this.__pipeline.currentTask = this); + var a; + this._plan && !n && (a = this._plan(this.context)); + var r = e(this._modBy), s = this._modDataCount || 0, l = e(t && t.modBy), u = t && t.modDataCount || 0; + r === l && s === u || (a = "reset"); + var h; + (this._dirty || "reset" === a) && (this._dirty = !1, h = rr(this, n)), this._modBy = l, this._modDataCount = u; + var c = t && t.step; + if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) { + var d = this._dueIndex, f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd); + if (!n && (h || d < f)) { + var p = this._progress; + if (y(p)) for (var g = 0; g < p.length; g++) ar(this, p[g], d, f, l, u); else ar(this, p, d, f, l, u) + } + this._dueIndex = f; + var m = null != this._settedOutputEnd ? this._settedOutputEnd : f; + this._outputDueEnd = m + } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd; + return this.unfinished() + }; + var YM = function () { + function t() { + return n < i ? n++ : null + } + + function e() { + var t = n % r * o + Math.ceil(n / r), e = n >= i ? null : t < a ? t : n; + return n++, e + } + + var i, n, o, a, r, s = { + reset: function (l, u, h, c) { + n = l, i = u, o = h, a = c, r = Math.ceil(a / o), s.next = o > 1 && a > 0 ? e : t + } + }; + return s + }(); + jM.dirty = function () { + this._dirty = !0, this._onDirty && this._onDirty(this.context) + }, jM.unfinished = function () { + return this._progress && this._dueIndex < this._dueEnd + }, jM.pipe = function (t) { + (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty()) + }, jM.dispose = function () { + this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0) + }, jM.getUpstream = function () { + return this._upstream + }, jM.getDownstream = function () { + return this._downstream + }, jM.setOutputEnd = function (t) { + this._outputDueEnd = this._settedOutputEnd = t + }; + var qM = Ni(), KM = hM.extend({ + type: "series.__base__", + seriesIndex: 0, + coordinateSystem: null, + defaultOption: null, + legendDataProvider: null, + visualColorAccessPath: "itemStyle.color", + layoutMode: null, + init: function (t, e, i, n) { + this.seriesIndex = this.componentIndex, this.dataTask = nr({ + count: ur, + reset: hr + }), this.dataTask.context = {model: this}, this.mergeDefaultAndTheme(t, i), da(this); + var o = this.getInitialData(t, i); + dr(o, this), this.dataTask.context.data = o, qM(this).dataBeforeProcessed = o, sr(this) + }, + mergeDefaultAndTheme: function (t, e) { + var i = this.layoutMode, o = i ? na(t) : {}, a = this.subType; + hM.hasClass(a) && (a += "Series"), n(t, e.getTheme().get(this.subType)), n(t, this.getDefaultOption()), Mi(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && ia(t, o, i) + }, + mergeOption: function (t, e) { + t = n(this.option, t, !0), this.fillDataTextStyle(t.data); + var i = this.layoutMode; + i && ia(this.option, t, i), da(this); + var o = this.getInitialData(t, e); + dr(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, qM(this).dataBeforeProcessed = o, sr(this) + }, + fillDataTextStyle: function (t) { + if (t && !S(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Mi(t[i], "label", e) + }, + getInitialData: function () { + }, + appendData: function (t) { + this.getRawData().appendData(t.data) + }, + getData: function (t) { + var e = pr(this); + if (e) { + var i = e.context.data; + return null == t ? i : i.getLinkedData(t) + } + return qM(this).data + }, + setData: function (t) { + var e = pr(this); + if (e) { + var i = e.context; + i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data = t) + } + qM(this).data = t + }, + getSource: function () { + return ha(this) + }, + getRawData: function () { + return qM(this).dataBeforeProcessed + }, + getBaseAxis: function () { + var t = this.coordinateSystem; + return t && t.getBaseAxis && t.getBaseAxis() + }, + formatTooltip: function (t, e, i) { + function n(t) { + return Zo(Fo(t)) + } + + var o = this.getData(), a = o.mapDimension("defaultedTooltip", !0), r = a.length, s = this.getRawValue(t), + l = y(s), u = o.getItemVisual(t, "color"); + w(u) && u.colorStops && (u = (u.colorStops[0] || {}).color), u = u || "transparent"; + var h = r > 1 || l && !r ? function (i) { + function n(t, i) { + var n = o.getDimensionInfo(i); + if (n && !1 !== n.otherDims.tooltip) { + var a = n.type, l = jo({color: u, type: "subItem"}), + h = (r ? l + Zo(n.displayName || "-") + ": " : "") + Zo("ordinal" === a ? t + "" : "time" === a ? e ? "" : qo("yyyy/MM/dd hh:mm:ss", t) : Fo(t)); + h && s.push(h) + } + } + + var r = p(i, function (t, e, i) { + var n = o.getDimensionInfo(i); + return t |= n && !1 !== n.tooltip && null != n.displayName + }, 0), s = []; + return a.length ? d(a, function (e) { + n(er(o, t, e), e) + }) : d(i, n), (r ? "
" : "") + s.join(r ? "
" : ", ") + }(s) : n(r ? er(o, t, a[0]) : l ? s[0] : s), c = jo(u), f = o.getName(t), g = this.name; + return Ci(this) || (g = ""), g = g ? Zo(g) + (e ? ": " : "
") : "", e ? c + g + h : g + c + (f ? Zo(f) + ": " + h : h) + }, + isAnimationEnabled: function () { + if (a_.node) return !1; + var t = this.getShallow("animation"); + return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t + }, + restoreData: function () { + this.dataTask.dirty() + }, + getColorFromPalette: function (t, e, i) { + var n = this.ecModel, o = pM.getColorFromPalette.call(this, t, e, i); + return o || (o = n.getColorFromPalette(t, e, i)), o + }, + coordDimToDataDim: function (t) { + return this.getRawData().mapDimension(t, !0) + }, + getProgressive: function () { + return this.get("progressive") + }, + getProgressiveThreshold: function () { + return this.get("progressiveThreshold") + }, + getAxisTooltipData: null, + getTooltipPosition: null, + pipeTask: null, + preventIncremental: null, + pipelineContext: null + }); + h(KM, XM), h(KM, pM); + var $M = function () { + this.group = new sw, this.uid = Mo("viewComponent") + }; + $M.prototype = { + constructor: $M, init: function (t, e) { + }, render: function (t, e, i, n) { + }, dispose: function () { + } + }; + var JM = $M.prototype; + JM.updateView = JM.updateLayout = JM.updateVisual = function (t, e, i, n) { + }, Gi($M), Zi($M, {registerWhenExtend: !0}); + var QM = function () { + var t = Ni(); + return function (e) { + var i = t(e), n = e.pipelineContext, o = i.large, a = i.progressiveRender, r = i.large = n.large, + s = i.progressiveRender = n.progressiveRender; + return !!(o ^ r || a ^ s) && "reset" + } + }, tI = Ni(), eI = QM(); + gr.prototype = { + type: "chart", init: function (t, e) { + }, render: function (t, e, i, n) { + }, highlight: function (t, e, i, n) { + vr(t.getData(), n, "emphasis") + }, downplay: function (t, e, i, n) { + vr(t.getData(), n, "normal") + }, remove: function (t, e) { + this.group.removeAll() + }, dispose: function () { + }, incrementalPrepareRender: null, incrementalRender: null, updateTransform: null + }; + var iI = gr.prototype; + iI.updateView = iI.updateLayout = iI.updateVisual = function (t, e, i, n) { + this.render(t, e, i, n) + }, Gi(gr), Zi(gr, {registerWhenExtend: !0}), gr.markUpdateMethod = function (t, e) { + tI(t).updateMethod = e + }; + var nI = { + incrementalPrepareRender: { + progress: function (t, e) { + e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload) + } + }, render: { + forceFirstProgress: !0, progress: function (t, e) { + e.view.render(e.model, e.ecModel, e.api, e.payload) + } + } + }, oI = "\0__throttleOriginMethod", aI = "\0__throttleRate", rI = "\0__throttleType", sI = { + createOnAllSeries: !0, performRawSeries: !0, reset: function (t, e) { + var i = t.getData(), n = (t.visualColorAccessPath || "itemStyle.color").split("."), + o = t.get(n) || t.getColorFromPalette(t.name, null, e.getSeriesCount()); + if (i.setVisual("color", o), !e.isSeriesFiltered(t)) { + "function" != typeof o || o instanceof CS || i.each(function (e) { + i.setItemVisual(e, "color", o(t.getDataParams(e))) + }); + return { + dataEach: i.hasItemOption ? function (t, e) { + var i = t.getItemModel(e).get(n, !0); + null != i && t.setItemVisual(e, "color", i) + } : null + } + } + } + }, lI = { + toolbox: { + brush: { + title: { + rect: "矩形选择", + polygon: "圈选", + lineX: "横向选择", + lineY: "纵向选择", + keep: "保持选择", + clear: "清除选择" + } + }, + dataView: {title: "数据视图", lang: ["数据视图", "关闭", "刷新"]}, + dataZoom: {title: {zoom: "区域缩放", back: "区域缩放还原"}}, + magicType: {title: {line: "切换为折线图", bar: "切换为柱状图", stack: "切换为堆叠", tiled: "切换为平铺"}}, + restore: {title: "还原"}, + saveAsImage: {title: "保存为图片", lang: ["右键另存为图片"]} + }, + series: { + typeNames: { + pie: "饼图", + bar: "柱状图", + line: "折线图", + scatter: "散点图", + effectScatter: "涟漪散点图", + radar: "雷达图", + tree: "树图", + treemap: "矩形树图", + boxplot: "箱型图", + candlestick: "K线图", + k: "K线图", + heatmap: "热力图", + map: "地图", + parallel: "平行坐标图", + lines: "线图", + graph: "关系图", + sankey: "桑基图", + funnel: "漏斗图", + gauge: "仪表盘图", + pictorialBar: "象形柱图", + themeRiver: "主题河流图", + sunburst: "旭日图" + } + }, + aria: { + general: {withTitle: "这是一个关于“{title}”的图表。", withoutTitle: "这是一个图表,"}, + series: { + single: { + prefix: "", + withName: "图表类型是{seriesType},表示{seriesName}。", + withoutName: "图表类型是{seriesType}。" + }, + multiple: { + prefix: "它由{seriesCount}个图表系列组成。", + withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},", + withoutName: "第{seriesId}个系列是一个{seriesType},", + separator: {middle: ";", end: "。"} + } + }, + data: { + allData: "其数据是——", + partialData: "其中,前{displayCnt}项是——", + withName: "{name}的数据是{value}", + withoutName: "{value}", + separator: {middle: ",", end: ""} + } + } + }, uI = function (t, e) { + function i(t, e) { + if ("string" != typeof t) return t; + var i = t; + return d(e, function (t, e) { + i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t) + }), i + } + + function n(t) { + var e = a.get(t); + if (null == e) { + for (var i = t.split("."), n = lI.aria, o = 0; o < i.length; ++o) n = n[i[o]]; + return n + } + return e + } + + function o(t) { + return lI.series.typeNames[t] || "自定义图" + } + + var a = e.getModel("aria"); + if (a.get("show")) if (a.get("description")) t.setAttribute("aria-label", a.get("description")); else { + var r = 0; + e.eachSeries(function (t, e) { + ++r + }, this); + var s, l = a.get("data.maxCount") || 10, u = a.get("series.maxCount") || 10, h = Math.min(r, u); + if (!(r < 1)) { + var c = function () { + var t = e.getModel("title").option; + return t && t.length && (t = t[0]), t && t.text + }(); + s = c ? i(n("general.withTitle"), {title: c}) : n("general.withoutTitle"); + var f = []; + s += i(n(r > 1 ? "series.multiple.prefix" : "series.single.prefix"), {seriesCount: r}), e.eachSeries(function (t, e) { + if (e < h) { + var a, s = t.get("name"), u = "series." + (r > 1 ? "multiple" : "single") + "."; + a = i(a = n(s ? u + "withName" : u + "withoutName"), { + seriesId: t.seriesIndex, + seriesName: t.get("name"), + seriesType: o(t.subType) + }); + var c = t.getData(); + window.data = c, c.count() > l ? a += i(n("data.partialData"), {displayCnt: l}) : a += n("data.allData"); + for (var d = [], p = 0; p < c.count(); p++) if (p < l) { + var g = c.getName(p), m = er(c, p); + d.push(i(n(g ? "data.withName" : "data.withoutName"), {name: g, value: m})) + } + a += d.join(n("data.separator.middle")) + n("data.separator.end"), f.push(a) + } + }), s += f.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute("aria-label", s) + } + } + }, hI = Math.PI, cI = Sr.prototype; + cI.restoreData = function (t, e) { + t.restoreData(e), this._stageTaskMap.each(function (t) { + var e = t.overallTask; + e && e.dirty() + }) + }, cI.getPerformArgs = function (t, e) { + if (t.__pipeline) { + var i = this._pipelineMap.get(t.__pipeline.id), n = i.context, + o = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex ? i.step : null, + a = n && n.modDataCount; + return {step: o, modBy: null != a ? Math.ceil(a / o) : null, modDataCount: a} + } + }, cI.getPipeline = function (t) { + return this._pipelineMap.get(t) + }, cI.updateStreamModes = function (t, e) { + var i = this._pipelineMap.get(t.uid), n = t.getData().count(), + o = i.progressiveEnabled && e.incrementalPrepareRender && n >= i.threshold, + a = t.get("large") && n >= t.get("largeThreshold"), r = "mod" === t.get("progressiveChunkMode") ? n : null; + t.pipelineContext = i.context = {progressiveRender: o, modDataCount: r, large: a} + }, cI.restorePipelines = function (t) { + var e = this, i = e._pipelineMap = R(); + t.eachSeries(function (t) { + var n = t.getProgressive(), o = t.uid; + i.set(o, { + id: o, + head: null, + tail: null, + threshold: t.getProgressiveThreshold(), + progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()), + blockIndex: -1, + step: Math.round(n || 700), + count: 0 + }), Er(e, t, t.dataTask) + }) + }, cI.prepareStageTasks = function () { + var t = this._stageTaskMap, e = this.ecInstance.getModel(), i = this.api; + d(this._allHandlers, function (n) { + var o = t.get(n.uid) || t.set(n.uid, []); + n.reset && Ir(this, n, o, e, i), n.overallReset && Tr(this, n, o, e, i) + }, this) + }, cI.prepareView = function (t, e, i, n) { + var o = t.renderTask, a = o.context; + a.model = e, a.ecModel = i, a.api = n, o.__block = !t.incrementalPrepareRender, Er(this, e, o) + }, cI.performDataProcessorTasks = function (t, e) { + Mr(this, this._dataProcessorHandlers, t, e, {block: !0}) + }, cI.performVisualTasks = function (t, e, i) { + Mr(this, this._visualHandlers, t, e, i) + }, cI.performSeriesTasks = function (t) { + var e; + t.eachSeries(function (t) { + e |= t.dataTask.perform() + }), this.unfinished |= e + }, cI.plan = function () { + this._pipelineMap.each(function (t) { + var e = t.tail; + do { + if (e.__block) { + t.blockIndex = e.__idxInPipeline; + break + } + e = e.getUpstream() + } while (e) + }) + }; + var dI = cI.updatePayload = function (t, e) { + "remain" !== e && (t.context.payload = e) + }, fI = Nr(0); + Sr.wrapStageHandler = function (t, e) { + return x(t) && (t = { + overallReset: t, + seriesType: Rr(t) + }), t.uid = Mo("stageHandler"), e && (t.visualType = e), t + }; + var pI, gI = {}, mI = {}; + zr(gI, TM), zr(mI, Aa), gI.eachSeriesByType = gI.eachRawSeriesByType = function (t) { + pI = t + }, gI.eachComponent = function (t) { + "series" === t.mainType && t.subType && (pI = t.subType) + }; + var vI = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"], + yI = { + color: vI, + colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], vI] + }, + xI = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"], + _I = { + color: xI, + backgroundColor: "#333", + tooltip: {axisPointer: {lineStyle: {color: "#eee"}, crossStyle: {color: "#eee"}}}, + legend: {textStyle: {color: "#eee"}}, + textStyle: {color: "#eee"}, + title: {textStyle: {color: "#eee"}}, + toolbox: {iconStyle: {normal: {borderColor: "#eee"}}}, + dataZoom: {textStyle: {color: "#eee"}}, + visualMap: {textStyle: {color: "#eee"}}, + timeline: { + lineStyle: {color: "#eee"}, + itemStyle: {normal: {color: xI[1]}}, + label: {normal: {textStyle: {color: "#eee"}}}, + controlStyle: {normal: {color: "#eee", borderColor: "#eee"}} + }, + timeAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + logAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + valueAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + categoryAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + line: {symbol: "circle"}, + graph: {color: xI}, + gauge: {title: {textStyle: {color: "#eee"}}}, + candlestick: { + itemStyle: { + normal: { + color: "#FD1050", + color0: "#0CF49B", + borderColor: "#FD1050", + borderColor0: "#0CF49B" + } + } + } + }; + _I.categoryAxis.splitLine.show = !1, hM.extend({ + type: "dataset", + defaultOption: {seriesLayoutBy: bM, sourceHeader: null, dimensions: null, source: null}, + optionUpdated: function () { + ua(this) + } + }), $M.extend({type: "dataset"}); + var wI = k, bI = d, SI = x, MI = w, II = hM.parseClassType, TI = {zrender: "4.0.4"}, DI = 1e3, AI = 1e3, CI = 3e3, + LI = { + PROCESSOR: {FILTER: DI, STATISTIC: 5e3}, + VISUAL: {LAYOUT: AI, GLOBAL: 2e3, CHART: CI, COMPONENT: 4e3, BRUSH: 5e3} + }, kI = "__flagInMainProcess", PI = "__optionUpdated", NI = /^[a-zA-Z0-9_]+$/; + Vr.prototype.on = Br("on"), Vr.prototype.off = Br("off"), Vr.prototype.one = Br("one"), h(Vr, D_); + var OI = Gr.prototype; + OI._onframe = function () { + if (!this._disposed) { + var t = this._scheduler; + if (this[PI]) { + var e = this[PI].silent; + this[kI] = !0, Fr(this), EI.update.call(this), this[kI] = !1, this[PI] = !1, Xr.call(this, e), jr.call(this, e) + } else if (t.unfinished) { + var i = 1, n = this._model; + this._api; + t.unfinished = !1; + do { + var o = +new Date; + t.performSeriesTasks(n), t.performDataProcessorTasks(n), Zr(this, n), t.performVisualTasks(n), Qr(this, this._model, 0, "remain"), i -= +new Date - o + } while (i > 0 && t.unfinished); + t.unfinished || this._zr.flush() + } + } + }, OI.getDom = function () { + return this._dom + }, OI.getZr = function () { + return this._zr + }, OI.setOption = function (t, e, i) { + var n; + if (MI(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[kI] = !0, !this._model || e) { + var o = new La(this._api), a = this._theme, r = this._model = new TM(null, null, a, o); + r.scheduler = this._scheduler, r.init(null, null, a, o) + } + this._model.setOption(t, GI), i ? (this[PI] = {silent: n}, this[kI] = !1) : (Fr(this), EI.update.call(this), this._zr.flush(), this[PI] = !1, this[kI] = !1, Xr.call(this, n), jr.call(this, n)) + }, OI.setTheme = function () { + console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0") + }, OI.getModel = function () { + return this._model + }, OI.getOption = function () { + return this._model && this._model.getOption() + }, OI.getWidth = function () { + return this._zr.getWidth() + }, OI.getHeight = function () { + return this._zr.getHeight() + }, OI.getDevicePixelRatio = function () { + return this._zr.painter.dpr || window.devicePixelRatio || 1 + }, OI.getRenderedCanvas = function (t) { + if (a_.canvasSupported) return (t = t || {}).pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor"), this._zr.painter.getRenderedCanvas(t) + }, OI.getSvgDataUrl = function () { + if (a_.svgSupported) { + var t = this._zr; + return d(t.storage.getDisplayList(), function (t) { + t.stopAnimation(!0) + }), t.painter.pathToDataUrl() + } + }, OI.getDataURL = function (t) { + var e = (t = t || {}).excludeComponents, i = this._model, n = [], o = this; + bI(e, function (t) { + i.eachComponent({mainType: t}, function (t) { + var e = o._componentsMap[t.__viewId]; + e.group.ignore || (n.push(e), e.group.ignore = !0) + }) + }); + var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png")); + return bI(n, function (t) { + t.group.ignore = !1 + }), a + }, OI.getConnectedDataURL = function (t) { + if (a_.canvasSupported) { + var e = this.group, n = Math.min, o = Math.max; + if (XI[e]) { + var a = 1 / 0, r = 1 / 0, s = -1 / 0, l = -1 / 0, u = [], h = t && t.pixelRatio || 1; + d(UI, function (h, c) { + if (h.group === e) { + var d = h.getRenderedCanvas(i(t)), f = h.getDom().getBoundingClientRect(); + a = n(f.left, a), r = n(f.top, r), s = o(f.right, s), l = o(f.bottom, l), u.push({ + dom: d, + left: f.left, + top: f.top + }) + } + }); + var c = (s *= h) - (a *= h), f = (l *= h) - (r *= h), p = m_(); + p.width = c, p.height = f; + var g = _i(p); + return bI(u, function (t) { + var e = new Je({style: {x: t.left * h - a, y: t.top * h - r, image: t.dom}}); + g.add(e) + }), g.refreshImmediately(), p.toDataURL("image/" + (t && t.type || "png")) + } + return this.getDataURL(t) + } + }, OI.convertToPixel = v(Wr, "convertToPixel"), OI.convertFromPixel = v(Wr, "convertFromPixel"), OI.containPixel = function (t, e) { + var i; + return t = Oi(this._model, t), d(t, function (t, n) { + n.indexOf("Models") >= 0 && d(t, function (t) { + var o = t.coordinateSystem; + if (o && o.containPoint) i |= !!o.containPoint(e); else if ("seriesModels" === n) { + var a = this._chartsMap[t.__viewId]; + a && a.containPoint && (i |= a.containPoint(e, t)) + } + }, this) + }, this), !!i + }, OI.getVisual = function (t, e) { + var i = (t = Oi(this._model, t, {defaultMainType: "series"})).seriesModel.getData(), + n = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? i.indexOfRawIndex(t.dataIndex) : null; + return null != n ? i.getItemVisual(n, e) : i.getVisual(e) + }, OI.getViewOfComponentModel = function (t) { + return this._componentsMap[t.__viewId] + }, OI.getViewOfSeriesModel = function (t) { + return this._chartsMap[t.__viewId] + }; + var EI = { + prepareAndUpdate: function (t) { + Fr(this), EI.update.call(this, t) + }, update: function (t) { + var e = this._model, i = this._api, n = this._zr, o = this._coordSysMgr, a = this._scheduler; + if (e) { + a.restoreData(e, t), a.performSeriesTasks(e), o.create(e, i), a.performDataProcessorTasks(e, t), Zr(this, e), o.update(e, i), Kr(e), a.performVisualTasks(e, t), $r(this, e, i, t); + var r = e.get("backgroundColor") || "transparent"; + if (a_.canvasSupported) n.setBackgroundColor(r); else { + var s = At(r); + r = zt(s, "rgb"), 0 === s[3] && (r = "transparent") + } + ts(e, i) + } + }, updateTransform: function (t) { + var e = this._model, i = this, n = this._api; + if (e) { + var o = []; + e.eachComponent(function (a, r) { + var s = i.getViewOfComponentModel(r); + if (s && s.__alive) if (s.updateTransform) { + var l = s.updateTransform(r, e, n, t); + l && l.update && o.push(s) + } else o.push(s) + }); + var a = R(); + e.eachSeries(function (o) { + var r = i._chartsMap[o.__viewId]; + if (r.updateTransform) { + var s = r.updateTransform(o, e, n, t); + s && s.update && a.set(o.uid, 1) + } else a.set(o.uid, 1) + }), Kr(e), this._scheduler.performVisualTasks(e, t, { + setDirty: !0, + dirtyMap: a + }), Qr(i, e, 0, t, a), ts(e, this._api) + } + }, updateView: function (t) { + var e = this._model; + e && (gr.markUpdateMethod(t, "updateView"), Kr(e), this._scheduler.performVisualTasks(e, t, {setDirty: !0}), $r(this, this._model, this._api, t), ts(e, this._api)) + }, updateVisual: function (t) { + EI.update.call(this, t) + }, updateLayout: function (t) { + EI.update.call(this, t) + } + }; + OI.resize = function (t) { + this._zr.resize(t); + var e = this._model; + if (this._loadingFX && this._loadingFX.resize(), e) { + var i = e.resetOption("media"), n = t && t.silent; + this[kI] = !0, i && Fr(this), EI.update.call(this), this[kI] = !1, Xr.call(this, n), jr.call(this, n) + } + }, OI.showLoading = function (t, e) { + if (MI(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), ZI[t]) { + var i = ZI[t](this._api, e), n = this._zr; + this._loadingFX = i, n.add(i) + } + }, OI.hideLoading = function () { + this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null + }, OI.makeActionFromEvent = function (t) { + var e = a({}, t); + return e.type = BI[t.type], e + }, OI.dispatchAction = function (t, e) { + MI(e) || (e = {silent: !!e}), zI[t.type] && this._model && (this[kI] ? this._pendingActions.push(t) : (Ur.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : !1 !== e.flush && a_.browser.weChat && this._throttledZrFlush(), Xr.call(this, e.silent), jr.call(this, e.silent))) + }, OI.appendData = function (t) { + var e = t.seriesIndex; + this.getModel().getSeriesByIndex(e).appendData(t), this._scheduler.unfinished = !0 + }, OI.on = Br("on"), OI.off = Br("off"), OI.one = Br("one"); + var RI = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"]; + OI._initEvents = function () { + bI(RI, function (t) { + this._zr.on(t, function (e) { + var i, n = this.getModel(), o = e.target; + if ("globalout" === t) i = {}; else if (o && null != o.dataIndex) { + var r = o.dataModel || n.getSeriesByIndex(o.seriesIndex); + i = r && r.getDataParams(o.dataIndex, o.dataType) || {} + } else o && o.eventData && (i = a({}, o.eventData)); + i && (i.event = e, i.type = t, this.trigger(t, i)) + }, this) + }, this), bI(BI, function (t, e) { + this._messageCenter.on(e, function (t) { + this.trigger(e, t) + }, this) + }, this) + }, OI.isDisposed = function () { + return this._disposed + }, OI.clear = function () { + this.setOption({series: []}, !0) + }, OI.dispose = function () { + if (!this._disposed) { + this._disposed = !0, Ri(this.getDom(), qI, ""); + var t = this._api, e = this._model; + bI(this._componentsViews, function (i) { + i.dispose(e, t) + }), bI(this._chartsViews, function (i) { + i.dispose(e, t) + }), this._zr.dispose(), delete UI[this.id] + } + }, h(Gr, D_); + var zI = {}, BI = {}, VI = [], GI = [], WI = [], FI = [], HI = {}, ZI = {}, UI = {}, XI = {}, jI = new Date - 0, + YI = new Date - 0, qI = "_echarts_instance_", KI = {}, $I = rs; + ps(2e3, sI), us(GM), hs(5e3, function (t) { + var e = R(); + t.eachSeries(function (t) { + var i = t.get("stack"); + if (i) { + var n = e.get(i) || e.set(i, []), o = t.getData(), a = { + stackResultDimension: o.getCalculationInfo("stackResultDimension"), + stackedOverDimension: o.getCalculationInfo("stackedOverDimension"), + stackedDimension: o.getCalculationInfo("stackedDimension"), + stackedByDimension: o.getCalculationInfo("stackedByDimension"), + isStackedByIndex: o.getCalculationInfo("isStackedByIndex"), + data: o, + seriesModel: t + }; + if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return; + n.length && o.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a) + } + }), e.each(ja) + }), ms("default", function (t, e) { + r(e = e || {}, { + text: "loading", + color: "#c23531", + textColor: "#000", + maskColor: "rgba(255, 255, 255, 0.8)", + zlevel: 0 + }); + var i = new SS({style: {fill: e.maskColor}, zlevel: e.zlevel, z: 1e4}), n = new DS({ + shape: {startAngle: -hI / 2, endAngle: -hI / 2 + .1, r: 10}, + style: {stroke: e.color, lineCap: "round", lineWidth: 5}, + zlevel: e.zlevel, + z: 10001 + }), o = new SS({ + 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 * hI / 2}).start("circularInOut"), n.animateShape(!0).when(1e3, {startAngle: 3 * hI / 2}).delay(300).start("circularInOut"); + var a = new sw; + return a.add(n), a.add(o), a.add(i), a.resize = function () { + var e = t.getWidth() / 2, a = t.getHeight() / 2; + n.setShape({cx: e, cy: a}); + var r = n.shape.r; + o.setShape({x: e - r, y: a - r, width: 2 * r, height: 2 * r}), i.setShape({ + x: 0, + y: 0, + width: t.getWidth(), + height: t.getHeight() + }) + }, a.resize(), a + }), cs({type: "highlight", event: "highlight", update: "highlight"}, B), cs({ + type: "downplay", + event: "downplay", + update: "downplay" + }, B), ls("light", yI), ls("dark", _I); + var JI = {}; + Ss.prototype = { + constructor: Ss, 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 = [], o = []; + for (Ms(t, {}, n, "_oldKeyGetter", this), Ms(e, i, o, "_newKeyGetter", this), a = 0; a < t.length; a++) null != (s = i[r = n[a]]) ? ((u = s.length) ? (1 === u && (i[r] = null), s = s.unshift()) : i[r] = null, this._update && this._update(s, a)) : this._remove && this._remove(a); + for (var a = 0; a < o.length; a++) { + var r = o[a]; + if (i.hasOwnProperty(r)) { + var s = i[r]; + if (null == s) continue; + if (s.length) for (var l = 0, u = s.length; l < u; l++) this._add && this._add(s[l]); else this._add && this._add(s) + } + } + } + }; + var QI = R(["tooltip", "label", "itemName", "itemId", "seriesName"]), tT = w, eT = "e\0\0", iT = { + float: "undefined" == typeof Float64Array ? Array : Float64Array, + int: "undefined" == typeof Int32Array ? Array : Int32Array, + ordinal: Array, + number: Array, + time: Array + }, nT = "undefined" == typeof Uint32Array ? Array : Uint32Array, + oT = "undefined" == typeof Uint16Array ? Array : Uint16Array, + aT = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"], + rT = ["_extent", "_approximateExtent", "_rawExtent"], sT = function (t, e) { + t = t || ["x", "y"]; + for (var i = {}, n = [], o = {}, a = 0; a < t.length; a++) { + var r = t[a]; + _(r) && (r = {name: r}); + var s = r.name; + r.type = r.type || "float", r.coordDim || (r.coordDim = s, r.coordDimIndex = 0), r.otherDims = r.otherDims || {}, n.push(s), i[s] = r, r.index = a, r.createInvertedIndices && (o[s] = []) + } + this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = Is(this), this._invertedIndicesMap = o, this._calculationInfo = {} + }, lT = sT.prototype; + lT.type = "list", lT.hasItemOption = !0, lT.getDimension = function (t) { + return isNaN(t) || (t = this.dimensions[t] || t), t + }, lT.getDimensionInfo = function (t) { + return this._dimensionInfos[this.getDimension(t)] + }, lT.getDimensionsOnCoord = function () { + return this._dimensionsSummary.dataDimsOnCoord.slice() + }, lT.mapDimension = function (t, e) { + var i = this._dimensionsSummary; + if (null == e) return i.encodeFirstDimNotExtra[t]; + var n = i.encode[t]; + return !0 === e ? (n || []).slice() : n && n[e] + }, lT.initData = function (t, e, i) { + (la.isInstance(t) || c(t)) && (t = new Ya(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices = null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = ZM[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1) + }, lT.getProvider = function () { + return this._rawData + }, lT.appendData = function (t) { + var e = this._rawData, i = this.count(); + e.appendData(t); + var n = e.count(); + e.persistent || (n += i), this._initDataFromProvider(i, n) + }, lT._initDataFromProvider = function (t, e) { + if (!(t >= e)) { + for (var i, n = this._chunkSize, o = this._rawData, a = this._storage, r = this.dimensions, s = r.length, l = this._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f = this._chunkCount, p = f - 1, g = 0; g < s; g++) { + c[T = r[g]] || (c[T] = [1 / 0, -1 / 0]); + var m = l[T]; + 0 === m.otherDims.itemName && (i = this._nameDimIdx = g), 0 === m.otherDims.itemId && (this._idDimIdx = g); + var v = iT[m.type]; + a[T] || (a[T] = []); + var y = a[T][p]; + if (y && y.length < n) { + for (var x = new v(Math.min(e - p * n, n)), _ = 0; _ < y.length; _++) x[_] = y[_]; + a[T][p] = x + } + for (I = f * n; I < e; I += n) a[T].push(new v(Math.min(e - I, n))); + this._chunkCount = a[T].length + } + for (var w = new Array(s), b = t; b < e; b++) { + w = o.getItem(b, w); + for (var S = Math.floor(b / n), M = b % n, I = 0; I < s; I++) { + var T = r[I], D = a[T][S], A = this._dimValueGetter(w, T, b, I); + D[M] = A; + var C = c[T]; + A < C[0] && (C[0] = A), A > C[1] && (C[1] = A) + } + if (!o.pure) { + var L = u[b]; + if (w && null == L) if (null != w.name) u[b] = L = w.name; else if (null != i) { + var k = r[i], P = a[k][S]; + if (P) { + L = P[M]; + var N = l[k].ordinalMeta; + N && N.categories.length && (L = N.categories[L]) + } + } + var O = null == w ? null : w.id; + null == O && null != L && (d[L] = d[L] || 0, O = L, d[L] > 0 && (O += "__ec__" + d[L]), d[L]++), null != O && (h[b] = O) + } + } + !o.persistent && o.clean && o.clean(), this._rawCount = this._count = e, this._extent = {}, ks(this) + } + }, lT.count = function () { + return this._count + }, lT.getIndices = function () { + var t = this._indices; + if (t) { + var e = t.constructor, i = this._count; + if (e === Array) { + n = new e(i); + for (o = 0; o < i; o++) n[o] = t[o] + } else n = new e(t.buffer, 0, i) + } else for (var n = new (e = As(this))(this.count()), o = 0; o < n.length; o++) n[o] = o; + return n + }, lT.get = function (t, e) { + if (!(e >= 0 && e < this._count)) return NaN; + var i = this._storage; + if (!i[t]) return NaN; + e = this.getRawIndex(e); + var n = Math.floor(e / this._chunkSize), o = e % this._chunkSize; + return i[t][n][o] + }, lT.getByRawIndex = function (t, e) { + if (!(e >= 0 && e < this._rawCount)) return NaN; + var i = this._storage[t]; + if (!i) return NaN; + var n = Math.floor(e / this._chunkSize), o = e % this._chunkSize; + return i[n][o] + }, lT._getFast = function (t, e) { + var i = Math.floor(e / this._chunkSize), n = e % this._chunkSize; + return this._storage[t][i][n] + }, lT.getValues = function (t, e) { + var i = []; + y(t) || (e = t, t = this.dimensions); + for (var n = 0, o = t.length; n < o; n++) i.push(this.get(t[n], e)); + return i + }, lT.hasValue = function (t) { + for (var e = this._dimensionsSummary.dataDimsOnCoord, i = this._dimensionInfos, n = 0, o = e.length; n < o; n++) if ("ordinal" !== i[e[n]].type && isNaN(this.get(e[n], t))) return !1; + return !0 + }, lT.getDataExtent = function (t) { + t = this.getDimension(t); + var e = [1 / 0, -1 / 0]; + if (!this._storage[t]) return e; + var i, n = this.count(); + if (!this._indices) return this._rawExtent[t].slice(); + if (i = this._extent[t]) return i.slice(); + for (var o = (i = e)[0], a = i[1], r = 0; r < n; r++) { + var s = this._getFast(t, this.getRawIndex(r)); + s < o && (o = s), s > a && (a = s) + } + return i = [o, a], this._extent[t] = i, i + }, lT.getApproximateExtent = function (t) { + return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t) + }, lT.setApproximateExtent = function (t, e) { + e = this.getDimension(e), this._approximateExtent[e] = t.slice() + }, lT.getCalculationInfo = function (t) { + return this._calculationInfo[t] + }, lT.setCalculationInfo = function (t, e) { + tT(t) ? a(this._calculationInfo, t) : this._calculationInfo[t] = e + }, lT.getSum = function (t) { + var e = 0; + if (this._storage[t]) for (var i = 0, n = this.count(); i < n; i++) { + var o = this.get(t, i); + isNaN(o) || (e += o) + } + return e + }, lT.getMedian = function (t) { + var e = []; + this.each(t, function (t, i) { + isNaN(t) || e.push(t) + }); + var i = [].concat(e).sort(function (t, e) { + return t - e + }), n = this.count(); + return 0 === n ? 0 : n % 2 == 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2 + }, lT.rawIndexOf = function (t, e) { + var i = (t && this._invertedIndicesMap[t])[e]; + return null == i || isNaN(i) ? -1 : i + }, lT.indexOfName = function (t) { + for (var e = 0, i = this.count(); e < i; e++) if (this.getName(e) === t) return e; + return -1 + }, lT.indexOfRawIndex = function (t) { + if (!this._indices) return t; + if (t >= this._rawCount || t < 0) return -1; + var e = this._indices, i = e[t]; + if (null != i && i < this._count && i === t) return t; + for (var n = 0, o = this._count - 1; n <= o;) { + var a = (n + o) / 2 | 0; + if (e[a] < t) n = a + 1; else { + if (!(e[a] > t)) return a; + o = a - 1 + } + } + return -1 + }, lT.indicesOfNearest = function (t, e, i) { + var n = []; + if (!this._storage[t]) return n; + null == i && (i = 1 / 0); + for (var o = Number.MAX_VALUE, a = -1, r = 0, s = this.count(); r < s; r++) { + var l = e - this.get(t, r), u = Math.abs(l); + l <= i && u <= o && ((u < o || l >= 0 && a < 0) && (o = u, a = l, n.length = 0), n.push(r)) + } + return n + }, lT.getRawIndex = Ns, lT.getRawDataItem = function (t) { + if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t)); + for (var e = [], i = 0; i < this.dimensions.length; i++) { + var n = this.dimensions[i]; + e.push(this.get(n, t)) + } + return e + }, lT.getName = function (t) { + var e = this.getRawIndex(t); + return this._nameList[e] || Ps(this, this._nameDimIdx, e) || "" + }, lT.getId = function (t) { + return Es(this, this.getRawIndex(t)) + }, lT.each = function (t, e, i, n) { + if (this._count) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this; + for (var o = (t = f(Rs(t), this.getDimension, this)).length, a = 0; a < this.count(); a++) switch (o) { + case 0: + e.call(i, a); + break; + case 1: + e.call(i, this.get(t[0], a), a); + break; + case 2: + e.call(i, this.get(t[0], a), this.get(t[1], a), a); + break; + default: + for (var r = 0, s = []; r < o; r++) s[r] = this.get(t[r], a); + s[r] = a, e.apply(i, s) + } + } + }, lT.filterSelf = function (t, e, i, n) { + if (this._count) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = f(Rs(t), this.getDimension, this); + for (var o = this.count(), a = new (As(this))(o), r = [], s = t.length, l = 0, u = t[0], h = 0; h < o; h++) { + var c, d = this.getRawIndex(h); + if (0 === s) c = e.call(i, h); else if (1 === s) { + var p = this._getFast(u, d); + c = e.call(i, p, h) + } else { + for (var g = 0; g < s; g++) r[g] = this._getFast(u, d); + r[g] = h, c = e.apply(i, r) + } + c && (a[l++] = d) + } + return l < o && (this._indices = a), this._count = l, this._extent = {}, this.getRawIndex = this._indices ? Os : Ns, this + } + }, lT.selectRange = function (t) { + if (this._count) { + var e = []; + for (var i in t) t.hasOwnProperty(i) && e.push(i); + var n = e.length; + if (n) { + var o = this.count(), a = new (As(this))(o), r = 0, s = e[0], l = t[s][0], u = t[s][1], h = !1; + if (!this._indices) { + var c = 0; + if (1 === n) { + for (var d = this._storage[e[0]], f = 0; f < this._chunkCount; f++) for (var p = d[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) ((w = p[m]) >= l && w <= u || isNaN(w)) && (a[r++] = c), c++; + h = !0 + } else if (2 === n) { + for (var d = this._storage[s], v = this._storage[e[1]], y = t[e[1]][0], x = t[e[1]][1], f = 0; f < this._chunkCount; f++) for (var p = d[f], _ = v[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) { + var w = p[m], b = _[m]; + (w >= l && w <= u || isNaN(w)) && (b >= y && b <= x || isNaN(b)) && (a[r++] = c), c++ + } + h = !0 + } + } + if (!h) if (1 === n) for (m = 0; m < o; m++) { + M = this.getRawIndex(m); + ((w = this._getFast(s, M)) >= l && w <= u || isNaN(w)) && (a[r++] = M) + } else for (m = 0; m < o; m++) { + for (var S = !0, M = this.getRawIndex(m), f = 0; f < n; f++) { + var I = e[f]; + ((w = this._getFast(i, M)) < t[I][0] || w > t[I][1]) && (S = !1) + } + S && (a[r++] = this.getRawIndex(m)) + } + return r < o && (this._indices = a), this._count = r, this._extent = {}, this.getRawIndex = this._indices ? Os : Ns, this + } + } + }, lT.mapArray = function (t, e, i, n) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this; + var o = []; + return this.each(t, function () { + o.push(e && e.apply(this, arguments)) + }, i), o + }, lT.map = function (t, e, i, n) { + i = i || n || this; + var o = zs(this, t = f(Rs(t), this.getDimension, this)); + o._indices = this._indices, o.getRawIndex = o._indices ? Os : Ns; + for (var a = o._storage, r = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = o._rawExtent, d = 0; d < u; d++) { + for (var p = 0; p < l; p++) h[p] = this.get(t[p], d); + h[l] = d; + var g = e && e.apply(i, h); + if (null != g) { + "object" != typeof g && (r[0] = g, g = r); + for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, x = 0; x < g.length; x++) { + var _ = t[x], w = g[x], b = c[_], S = a[_]; + S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w) + } + } + } + return o + }, lT.downSample = function (t, e, i, n) { + for (var o = zs(this, [t]), a = o._storage, r = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize, c = o._rawExtent[t], d = new (As(this))(u), f = 0, p = 0; p < u; p += s) { + s > u - p && (s = u - p, r.length = s); + for (var g = 0; g < s; g++) { + var m = this.getRawIndex(p + g), v = Math.floor(m / h), y = m % h; + r[g] = l[v][y] + } + var x = i(r), _ = this.getRawIndex(Math.min(p + n(r, x) || 0, u - 1)), w = _ % h; + l[Math.floor(_ / h)][w] = x, x < c[0] && (c[0] = x), x > c[1] && (c[1] = x), d[f++] = _ + } + return o._count = f, o._indices = d, o.getRawIndex = Os, o + }, lT.getItemModel = function (t) { + var e = this.hostModel; + return new wo(this.getRawDataItem(t), e, e && e.ecModel) + }, lT.diff = function (t) { + var e = this; + return new Ss(t ? t.getIndices() : [], this.getIndices(), function (e) { + return Es(t, e) + }, function (t) { + return Es(e, t) + }) + }, lT.getVisual = function (t) { + var e = this._visual; + return e && e[t] + }, lT.setVisual = function (t, e) { + if (tT(t)) for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]); else this._visual = this._visual || {}, this._visual[t] = e + }, lT.setLayout = function (t, e) { + if (tT(t)) for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]); else this._layout[t] = e + }, lT.getLayout = function (t) { + return this._layout[t] + }, lT.getItemLayout = function (t) { + return this._itemLayouts[t] + }, lT.setItemLayout = function (t, e, i) { + this._itemLayouts[t] = i ? a(this._itemLayouts[t] || {}, e) : e + }, lT.clearItemLayouts = function () { + this._itemLayouts.length = 0 + }, lT.getItemVisual = function (t, e, i) { + var n = this._itemVisuals[t], o = n && n[e]; + return null != o || i ? o : this.getVisual(e) + }, lT.setItemVisual = function (t, e, i) { + var n = this._itemVisuals[t] || {}, o = this.hasItemVisual; + if (this._itemVisuals[t] = n, tT(e)) for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], o[a] = !0); else n[e] = i, o[e] = !0 + }, lT.clearAllVisual = function () { + this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {} + }; + var uT = function (t) { + t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType + }; + lT.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(uT, e)), this._graphicEls[t] = e + }, lT.getItemGraphicEl = function (t) { + return this._graphicEls[t] + }, lT.eachItemGraphicEl = function (t, e) { + d(this._graphicEls, function (i, n) { + i && t && t.call(e, i, n) + }) + }, lT.cloneShallow = function (t) { + if (!t) { + var e = f(this.dimensions, this.getDimensionInfo, this); + t = new sT(e, this.hostModel) + } + if (t._storage = this._storage, Ls(t, this), this._indices) { + var i = this._indices.constructor; + t._indices = new i(this._indices) + } else t._indices = null; + return t.getRawIndex = t._indices ? Os : Ns, t + }, lT.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(C(arguments))) + }) + }, lT.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], lT.CHANGABLE_METHODS = ["filterSelf", "selectRange"]; + var hT = function (t, e) { + return e = e || {}, Gs(e.coordDimensions || [], t, { + dimsDef: e.dimensionsDefine || t.dimensionsDefine, + encodeDef: e.encodeDefine || t.encodeDefine, + dimCount: e.dimensionsCount, + generateCoord: e.generateCoord, + generateCoordCount: e.generateCoordCount + }) + }; + qs.prototype.parse = function (t) { + return t + }, qs.prototype.getSetting = function (t) { + return this._setting[t] + }, qs.prototype.contain = function (t) { + var e = this._extent; + return t >= e[0] && t <= e[1] + }, qs.prototype.normalize = function (t) { + var e = this._extent; + return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0]) + }, qs.prototype.scale = function (t) { + var e = this._extent; + return t * (e[1] - e[0]) + e[0] + }, qs.prototype.unionExtent = function (t) { + var e = this._extent; + t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]) + }, qs.prototype.unionExtentFromData = function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, qs.prototype.getExtent = function () { + return this._extent.slice() + }, qs.prototype.setExtent = function (t, e) { + var i = this._extent; + isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e) + }, qs.prototype.isBlank = function () { + return this._isBlank + }, qs.prototype.setBlank = function (t) { + this._isBlank = t + }, qs.prototype.getLabel = null, Gi(qs), Zi(qs, {registerWhenExtend: !0}), Ks.createByAxisModel = function (t) { + var e = t.option, i = e.data, n = i && f(i, Js); + return new Ks({categories: n, needCollect: !n, deduplication: !1 !== e.dedplication}) + }; + var cT = Ks.prototype; + cT.getOrdinal = function (t) { + return $s(this).get(t) + }, cT.parseAndCollect = function (t) { + var e, i = this._needCollect; + if ("string" != typeof t && !i) return t; + if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e; + var n = $s(this); + return null == (e = n.get(t)) && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = NaN), e + }; + var dT = qs.prototype, fT = qs.extend({ + type: "ordinal", init: function (t, e) { + t && !y(t) || (t = new Ks({categories: t})), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1] + }, parse: function (t) { + return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t) + }, contain: function (t) { + return t = this.parse(t), dT.contain.call(this, t) && null != this._ordinalMeta.categories[t] + }, normalize: function (t) { + return dT.normalize.call(this, this.parse(t)) + }, scale: function (t) { + return Math.round(dT.scale.call(this, t)) + }, getTicks: function () { + for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++; + return t + }, getLabel: function (t) { + if (!this.isBlank()) return this._ordinalMeta.categories[t] + }, count: function () { + return this._extent[1] - this._extent[0] + 1 + }, unionExtentFromData: function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, getOrdinalMeta: function () { + return this._ordinalMeta + }, niceTicks: B, niceExtent: B + }); + fT.create = function () { + return new fT + }; + var pT = Ao, gT = Ao, mT = qs.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]), mT.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 = tl(t) + }, getTicks: function () { + return nl(this._interval, this._extent, this._niceExtent, this._intervalPrecision) + }, getLabel: function (t, e) { + if (null == t) return ""; + var i = e && e.precision; + return null == i ? i = ko(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = gT(t, i, !0), Fo(t) + }, niceTicks: function (t, e, i) { + t = t || 5; + var n = this._extent, o = n[1] - n[0]; + if (isFinite(o)) { + o < 0 && (o = -o, n.reverse()); + var a = Qs(n, t, e, i); + this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent + } + }, niceExtent: function (t) { + var e = this._extent; + if (e[0] === e[1]) if (0 !== e[0]) { + var i = e[0]; + t.fixMax ? e[0] -= i / 2 : (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 o = this._interval; + t.fixMin || (e[0] = gT(Math.floor(e[0] / o) * o)), t.fixMax || (e[1] = gT(Math.ceil(e[1] / o) * o)) + } + }); + mT.create = function () { + return new mT + }; + var vT = "__ec_stack_", yT = "undefined" != typeof Float32Array ? Float32Array : Array, xT = { + seriesType: "bar", plan: QM(), reset: function (t) { + if (dl(t) && fl(t)) { + var e = t.getData(), i = t.coordinateSystem, n = i.getBaseAxis(), o = i.getOtherAxis(n), + a = e.mapDimension(o.dim), r = e.mapDimension(n.dim), s = o.isHorizontal(), l = s ? 0 : 1, + u = hl(ll([t]), n, t).width; + return u > .5 || (u = .5), { + progress: function (t, e) { + for (var h, c = new yT(2 * t.count), d = [], f = [], p = 0; null != (h = t.next());) f[l] = e.get(a, h), f[1 - l] = e.get(r, h), d = i.dataToPoint(f, null, d), c[p++] = d[0], c[p++] = d[1]; + e.setLayout({ + largePoints: c, + barWidth: u, + valueAxisStart: pl(n, o, !1), + valueAxisHorizontal: s + }) + } + } + } + } + }, _T = mT.prototype, wT = Math.ceil, bT = Math.floor, ST = function (t, e, i, n) { + for (; i < n;) { + var o = i + n >>> 1; + t[o][1] < e ? i = o + 1 : n = o + } + return i + }, MT = mT.extend({ + type: "time", getLabel: function (t) { + var e = this._stepLvl, i = new Date(t); + return qo(e[0], i, this.getSetting("useUTC")) + }, niceExtent: function (t) { + var e = this._extent; + if (e[0] === e[1] && (e[0] -= 864e5, e[1] += 864e5), 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] - 864e5 + } + this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval); + var n = this._interval; + t.fixMin || (e[0] = Ao(bT(e[0] / n) * n)), t.fixMax || (e[1] = Ao(wT(e[1] / n) * n)) + }, niceTicks: function (t, e, i) { + t = t || 10; + var n = this._extent, o = n[1] - n[0], a = o / t; + null != e && a < e && (a = e), null != i && a > i && (a = i); + var r = IT.length, s = ST(IT, a, 0, r), l = IT[Math.min(s, r - 1)], u = l[1]; + "year" === l[0] && (u *= Vo(o / u / t, !0)); + var h = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3, + c = [Math.round(wT((n[0] - h) / u) * u + h), Math.round(bT((n[1] - h) / u) * u + h)]; + il(c, n), this._stepLvl = l, this._interval = u, this._niceExtent = c + }, parse: function (t) { + return +Ro(t) + } + }); + d(["contain", "normalize"], function (t) { + MT.prototype[t] = function (e) { + return _T[t].call(this, this.parse(e)) + } + }); + var IT = [["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", 864e5], ["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]]; + MT.create = function (t) { + return new MT({useUTC: t.ecModel.get("useUTC")}) + }; + var TT = qs.prototype, DT = mT.prototype, AT = ko, CT = Ao, LT = Math.floor, kT = Math.ceil, PT = Math.pow, + NT = Math.log, OT = qs.extend({ + type: "log", base: 10, $constructor: function () { + qs.apply(this, arguments), this._originalScale = new mT + }, getTicks: function () { + var t = this._originalScale, e = this._extent, i = t.getExtent(); + return f(DT.getTicks.call(this), function (n) { + var o = Ao(PT(this.base, n)); + return o = n === e[0] && t.__fixMin ? gl(o, i[0]) : o, o = n === e[1] && t.__fixMax ? gl(o, i[1]) : o + }, this) + }, getLabel: DT.getLabel, scale: function (t) { + return t = TT.scale.call(this, t), PT(this.base, t) + }, setExtent: function (t, e) { + var i = this.base; + t = NT(t) / NT(i), e = NT(e) / NT(i), DT.setExtent.call(this, t, e) + }, getExtent: function () { + var t = this.base, e = TT.getExtent.call(this); + e[0] = PT(t, e[0]), e[1] = PT(t, e[1]); + var i = this._originalScale, n = i.getExtent(); + return i.__fixMin && (e[0] = gl(e[0], n[0])), i.__fixMax && (e[1] = gl(e[1], n[1])), e + }, unionExtent: function (t) { + this._originalScale.unionExtent(t); + var e = this.base; + t[0] = NT(t[0]) / NT(e), t[1] = NT(t[1]) / NT(e), TT.unionExtent.call(this, t) + }, unionExtentFromData: function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, niceTicks: function (t) { + t = t || 10; + var e = this._extent, i = e[1] - e[0]; + if (!(i === 1 / 0 || i <= 0)) { + var n = zo(i); + for (t / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10; + var o = [Ao(kT(e[0] / n) * n), Ao(LT(e[1] / n) * n)]; + this._interval = n, this._niceExtent = o + } + }, niceExtent: function (t) { + DT.niceExtent.call(this, t); + var e = this._originalScale; + e.__fixMin = t.fixMin, e.__fixMax = t.fixMax + } + }); + d(["contain", "normalize"], function (t) { + OT.prototype[t] = function (e) { + return e = NT(e) / NT(this.base), TT[t].call(this, e) + } + }), OT.create = function () { + return new OT + }; + var ET = { + 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 && !I(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 && !I(i) && (i = this.axis.scale.parse(i)), i + }, getNeedCrossZero: function () { + var t = this.option; + return null == t.rangeStart && null == t.rangeEnd && !t.scale + }, getCoordSysModel: B, setRange: function (t, e) { + this.option.rangeStart = t, this.option.rangeEnd = e + }, resetRange: function () { + this.option.rangeStart = this.option.rangeEnd = null + } + }, RT = En({ + type: "triangle", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = e.width / 2, a = e.height / 2; + t.moveTo(i, n - a), t.lineTo(i + o, n + a), t.lineTo(i - o, n + a), t.closePath() + } + }), zT = En({ + type: "diamond", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = e.width / 2, a = e.height / 2; + t.moveTo(i, n - a), t.lineTo(i + o, n), t.lineTo(i, n + a), t.lineTo(i - o, n), t.closePath() + } + }), BT = En({ + type: "pin", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.x, n = e.y, o = e.width / 5 * 3, a = Math.max(o, e.height), r = o / 2, s = r * r / (a - r), + l = n - a + r + s, u = Math.asin(s / r), h = Math.cos(u) * r, c = Math.sin(u), d = Math.cos(u), + f = .6 * r, p = .7 * r; + t.moveTo(i - h, l + s), t.arc(i, l, r, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d * f, i, n - p, i, n), t.bezierCurveTo(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s), t.closePath() + } + }), VT = En({ + type: "arrow", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.height, n = e.width, o = e.x, a = e.y, r = n / 3 * 2; + t.moveTo(o, a), t.lineTo(o + r, a + i), t.lineTo(o, a + i / 4 * 3), t.lineTo(o - r, a + i), t.lineTo(o, a), t.closePath() + } + }), GT = { + line: function (t, e, i, n, o) { + o.x1 = t, o.y1 = e + n / 2, o.x2 = t + i, o.y2 = e + n / 2 + }, rect: function (t, e, i, n, o) { + o.x = t, o.y = e, o.width = i, o.height = n + }, roundRect: function (t, e, i, n, o) { + o.x = t, o.y = e, o.width = i, o.height = n, o.r = Math.min(i, n) / 4 + }, square: function (t, e, i, n, o) { + var a = Math.min(i, n); + o.x = t, o.y = e, o.width = a, o.height = a + }, circle: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.r = Math.min(i, n) / 2 + }, diamond: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n + }, pin: function (t, e, i, n, o) { + o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n + }, arrow: function (t, e, i, n, o) { + o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n + }, triangle: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n + } + }, WT = {}; + d({ + line: MS, + rect: SS, + roundRect: SS, + square: SS, + circle: pS, + diamond: zT, + pin: BT, + arrow: VT, + triangle: RT + }, function (t, e) { + WT[e] = new t + }); + var FT = En({ + 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, o = WT[n]; + "none" !== e.symbolType && (o || (o = WT[n = "rect"]), GT[n](e.x, e.y, e.width, e.height, o.shape), o.buildPath(t, o.shape, i)) + } + }), HT = {isDimensionStacked: Zs, enableDataStack: Hs, getStackedDimension: Us}, ZT = (Object.freeze || Object)({ + createList: function (t) { + return Xs(t.getSource(), t) + }, getLayoutRect: Qo, dataStack: HT, createScale: function (t, e) { + var i = e; + wo.isInstance(e) || h(i = new wo(e), ET); + var n = xl(i); + return n.setExtent(t[0], t[1]), yl(n, i), n + }, mixinAxisModelCommonMethods: function (t) { + h(t, ET) + }, completeDimensions: Gs, createDimensions: hT, createSymbol: Tl + }), UT = 1e-8; + Cl.prototype = { + constructor: Cl, properties: null, getBoundingRect: function () { + var t = this._rect; + if (t) return t; + for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++) "polygon" === r[s].type && (rn(r[s].exterior, o, a), tt(i, i, o), et(n, n, a)); + return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new $t(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, o = i.length; n < o; n++) if ("polygon" === i[n].type) { + var a = i[n].exterior, r = i[n].interiors; + if (Al(a, t[0], t[1])) { + for (var s = 0; s < (r ? r.length : 0); s++) if (Al(r[s])) continue t; + return !0 + } + } + return !1 + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(), a = o.width / o.height; + i ? n || (n = i / a) : i = a * n; + for (var r = new $t(t, e, i, n), s = o.calculateTransform(r), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) { + for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) Q(h[d], h[d], s); + for (var f = 0; f < (c ? c.length : 0); f++) for (d = 0; d < c[f].length; d++) Q(c[f][d], c[f][d], s) + } + (o = this._rect).copy(r), this.center = [o.x + o.width / 2, o.y + o.height / 2] + } + }; + var XT = function (t) { + return Ll(t), f(g(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, o = []; + "Polygon" === i.type && o.push({ + type: "polygon", + exterior: n[0], + interiors: n.slice(1) + }), "MultiPolygon" === i.type && d(n, function (t) { + t[0] && o.push({type: "polygon", exterior: t[0], interiors: t.slice(1)}) + }); + var a = new Cl(e.name, o, e.cp); + return a.properties = e, a + }) + }, jT = Ni(), YT = [0, 1], qT = function (t, e, i) { + this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1 + }; + qT.prototype = { + constructor: qT, 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 Po(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 && jl(i = i.slice(), n.count()), To(t, YT, i, e) + }, coordToData: function (t, e) { + var i = this._extent, n = this.scale; + this.onBand && "ordinal" === n.type && jl(i = i.slice(), n.count()); + var o = To(t, i, YT, e); + return this.scale.scale(o) + }, pointToData: function (t, e) { + }, getTicksCoords: function (t) { + var e = (t = t || {}).tickModel || this.getTickModel(), i = Nl(this, e), n = f(i.ticks, function (t) { + return {coord: this.dataToCoord(t), tickValue: t} + }, this), o = e.get("alignWithLabel"); + return Yl(this, n, i.tickCategoryInterval, o, t.clamp), n + }, getViewLabels: function () { + return Pl(this).labels + }, getLabelModel: function () { + return this.model.getModel("axisLabel") + }, getTickModel: function () { + return this.model.getModel("axisTick") + }, 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, calculateCategoryInterval: function () { + return Fl(this) + } + }; + var KT = XT, $T = {}; + d(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (t) { + $T[t] = x_[t] + }), KM.extend({ + type: "series.line", + dependencies: ["grid", "polar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + clipOverflow: !0, + label: {position: "top"}, + lineStyle: {width: 2, type: "solid"}, + step: !1, + smooth: !1, + smoothMonotone: null, + symbol: "emptyCircle", + symbolSize: 4, + symbolRotate: null, + showSymbol: !0, + showAllSymbol: "auto", + connectNulls: !1, + sampling: "none", + animationEasing: "linear", + progressive: 0, + hoverLayerThreshold: 1 / 0 + } + }); + var JT = Kl.prototype, QT = Kl.getSymbolSize = function (t, e) { + var i = t.getItemVisual(e, "symbolSize"); + return i instanceof Array ? i.slice() : [+i, +i] + }; + JT._createSymbol = function (t, e, i, n, o) { + this.removeAll(); + var a = Tl(t, -1, -1, 2, 2, e.getItemVisual(i, "color"), o); + a.attr({z2: 100, culling: !0, scale: $l(n)}), a.drift = Jl, this._symbolType = t, this.add(a) + }, JT.stopSymbolAnimation = function (t) { + this.childAt(0).stopAnimation(t) + }, JT.getSymbolPath = function () { + return this.childAt(0) + }, JT.getScale = function () { + return this.childAt(0).scale + }, JT.highlight = function () { + this.childAt(0).trigger("emphasis") + }, JT.downplay = function () { + this.childAt(0).trigger("normal") + }, JT.setZ = function (t, e) { + var i = this.childAt(0); + i.zlevel = t, i.z = e + }, JT.setDraggable = function (t) { + var e = this.childAt(0); + e.draggable = t, e.cursor = t ? "move" : "pointer" + }, JT.updateData = function (t, e, i) { + this.silent = !1; + var n = t.getItemVisual(e, "symbol") || "circle", o = t.hostModel, a = QT(t, e), r = n !== this._symbolType; + if (r) { + var s = t.getItemVisual(e, "symbolKeepAspect"); + this._createSymbol(n, t, e, a, s) + } else (l = this.childAt(0)).silent = !1, fo(l, {scale: $l(a)}, o, e); + if (this._updateCommon(t, e, a, i), r) { + var l = this.childAt(0), u = i && i.fadeIn, h = {scale: l.scale.slice()}; + u && (h.style = {opacity: l.style.opacity}), l.scale = [0, 0], u && (l.style.opacity = 0), po(l, h, o, e) + } + this._seriesModel = o + }; + var tD = ["itemStyle"], eD = ["emphasis", "itemStyle"], iD = ["label"], nD = ["emphasis", "label"]; + JT._updateCommon = function (t, e, i, n) { + var o = this.childAt(0), r = t.hostModel, s = t.getItemVisual(e, "color"); + "image" !== o.type && o.useStyle({strokeNoScale: !0}); + var l = n && n.itemStyle, u = n && n.hoverItemStyle, h = n && n.symbolRotate, c = n && n.symbolOffset, + d = n && n.labelModel, f = n && n.hoverLabelModel, p = n && n.hoverAnimation, g = n && n.cursorStyle; + if (!n || t.hasItemOption) { + var m = n && n.itemModel ? n.itemModel : t.getItemModel(e); + l = m.getModel(tD).getItemStyle(["color"]), u = m.getModel(eD).getItemStyle(), h = m.getShallow("symbolRotate"), c = m.getShallow("symbolOffset"), d = m.getModel(iD), f = m.getModel(nD), p = m.getShallow("hoverAnimation"), g = m.getShallow("cursor") + } else u = a({}, u); + var v = o.style; + o.attr("rotation", (h || 0) * Math.PI / 180 || 0), c && o.attr("position", [Do(c[0], i[0]), Do(c[1], i[1])]), g && o.attr("cursor", g), o.setColor(s, n && n.symbolInnerColor), o.setStyle(l); + var y = t.getItemVisual(e, "opacity"); + null != y && (v.opacity = y); + var x = t.getItemVisual(e, "liftZ"), _ = o.__z2Origin; + null != x ? null == _ && (o.__z2Origin = o.z2, o.z2 += x) : null != _ && (o.z2 = _, o.__z2Origin = null); + var w = n && n.useNameLabel; + io(v, u, d, f, { + labelFetcher: r, labelDataIndex: e, defaultText: function (e, i) { + return w ? t.getName(e) : ql(t, e) + }, isRectText: !0, autoColor: s + }), o.off("mouseover").off("mouseout").off("emphasis").off("normal"), o.hoverStyle = u, eo(o); + var b = $l(i); + if (p && r.isAnimationEnabled()) { + var S = function () { + if (!this.incremental) { + var t = b[1] / b[0]; + this.animateTo({scale: [Math.max(1.1 * b[0], b[0] + 3), Math.max(1.1 * b[1], b[1] + 3 * t)]}, 400, "elasticOut") + } + }, M = function () { + this.incremental || this.animateTo({scale: b}, 400, "elasticOut") + }; + o.on("mouseover", S).on("mouseout", M).on("emphasis", S).on("normal", M) + } + }, JT.fadeOut = function (t, e) { + var i = this.childAt(0); + this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), fo(i, { + style: {opacity: 0}, + scale: [0, 0] + }, this._seriesModel, this.dataIndex, t) + }, u(Kl, sw); + var oD = Ql.prototype; + oD.updateData = function (t, e) { + e = eu(e); + var i = this.group, n = t.hostModel, o = this._data, a = this._symbolCtor, r = iu(t); + o || i.removeAll(), t.diff(o).add(function (n) { + var o = t.getItemLayout(n); + if (tu(t, o, n, e)) { + var s = new a(t, n, r); + s.attr("position", o), t.setItemGraphicEl(n, s), i.add(s) + } + }).update(function (s, l) { + var u = o.getItemGraphicEl(l), h = t.getItemLayout(s); + tu(t, h, s, e) ? (u ? (u.updateData(t, s, r), fo(u, {position: h}, n)) : (u = new a(t, s)).attr("position", h), i.add(u), t.setItemGraphicEl(s, u)) : i.remove(u) + }).remove(function (t) { + var e = o.getItemGraphicEl(t); + e && e.fadeOut(function () { + i.remove(e) + }) + }).execute(), this._data = t + }, oD.isPersistent = function () { + return !0 + }, oD.updateLayout = function () { + var t = this._data; + t && t.eachItemGraphicEl(function (e, i) { + var n = t.getItemLayout(i); + e.attr("position", n) + }) + }, oD.incrementalPrepareUpdate = function (t) { + this._seriesScope = iu(t), this._data = null, this.group.removeAll() + }, oD.incrementalUpdate = function (t, e, i) { + i = eu(i); + for (var n = t.start; n < t.end; n++) { + var o = e.getItemLayout(n); + if (tu(e, o, n, i)) { + var a = new this._symbolCtor(e, n, this._seriesScope); + a.traverse(function (t) { + t.isGroup || (t.incremental = t.useHoverLayer = !0) + }), a.attr("position", o), this.group.add(a), e.setItemGraphicEl(n, a) + } + } + }, oD.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 aD = function (t, e, i, n, o, a, r, s) { + for (var l = ru(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = nu(o, e, r), v = nu(a, t, s), y = 0; y < l.length; y++) { + var x = l[y], _ = !0; + switch (x.cmd) { + case"=": + var w = t.getItemLayout(x.idx), b = e.getItemLayout(x.idx1); + (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[x.idx]), d.push(n[x.idx1]), g.push(e.getRawIndex(x.idx1)); + break; + case"+": + S = x.idx; + u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(S).slice()), c.push(au(m, o, e, S)), d.push(n[S]), g.push(e.getRawIndex(S)); + break; + case"-": + var S = x.idx, M = t.getRawIndex(S); + M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[1], S)])), c.push(i[S]), d.push(au(v, a, t, S)), g.push(M)) : _ = !1 + } + _ && (f.push(x), p.push(p.length)) + } + p.sort(function (t, e) { + return g[t] - g[e] + }); + for (var I = [], T = [], D = [], A = [], C = [], y = 0; y < p.length; y++) { + S = p[y]; + I[y] = u[S], T[y] = h[S], D[y] = c[S], A[y] = d[S], C[y] = f[S] + } + return {current: I, next: T, stackedOnCurrent: D, stackedOnNext: A, status: C} + }, rD = tt, sD = et, lD = Z, uD = G, hD = [], cD = [], dD = [], fD = In.extend({ + type: "ec-polyline", + shape: {points: [], smooth: 0, smoothConstraint: !0, smoothMonotone: null, connectNulls: !1}, + style: {fill: null, stroke: "#000"}, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.points, n = 0, o = i.length, a = cu(i, e.smoothConstraint); + if (e.connectNulls) { + for (; o > 0 && su(i[o - 1]); o--) ; + for (; n < o && su(i[n]); n++) ; + } + for (; n < o;) n += lu(t, i, n, o, o, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1 + } + }), pD = In.extend({ + type: "ec-polygon", + shape: { + points: [], + stackedOnPoints: [], + smooth: 0, + stackedOnSmooth: 0, + smoothConstraint: !0, + smoothMonotone: null, + connectNulls: !1 + }, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.points, n = e.stackedOnPoints, o = 0, a = i.length, r = e.smoothMonotone, + s = cu(i, e.smoothConstraint), l = cu(n, e.smoothConstraint); + if (e.connectNulls) { + for (; a > 0 && su(i[a - 1]); a--) ; + for (; o < a && su(i[o]); o++) ; + } + for (; o < a;) { + var u = lu(t, i, o, a, a, 1, s.min, s.max, e.smooth, r, e.connectNulls); + lu(t, n, o + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, r, e.connectNulls), o += u + 1, t.closePath() + } + } + }); + gr.extend({ + type: "line", init: function () { + var t = new sw, e = new Ql; + this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t + }, render: function (t, e, i) { + var n = t.coordinateSystem, o = this.group, a = t.getData(), s = t.getModel("lineStyle"), + l = t.getModel("areaStyle"), u = a.mapArray(a.getItemLayout), h = "polar" === n.type, + c = this._coordSys, d = this._symbolDraw, f = this._polyline, p = this._polygon, g = this._lineGroup, + m = t.get("animation"), v = !l.isEmpty(), y = l.get("origin"), x = gu(n, a, nu(n, a, y)), + _ = t.get("showSymbol"), w = _ && !h && wu(t, a, n), b = this._data; + b && b.eachItemGraphicEl(function (t, e) { + t.__temp && (o.remove(t), b.setItemGraphicEl(e, null)) + }), _ || d.remove(), o.add(g); + var S = !h && t.get("step"); + f && c.type === n.type && S === this._step ? (v && !p ? p = this._newPolygon(u, x, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setClipPath(yu(n, !1, !1, t)), _ && d.updateData(a, { + isIgnore: w, + clipShape: yu(n, !1, !0, t) + }), a.eachItemGraphicEl(function (t) { + t.stopAnimation(!0) + }), du(this._stackedOnPoints, x) && du(this._points, u) || (m ? this._updateAnimation(a, x, n, i, S, y) : (S && (u = xu(u, n, S), x = xu(x, n, S)), f.setShape({points: u}), p && p.setShape({ + points: u, + stackedOnPoints: x + })))) : (_ && d.updateData(a, { + isIgnore: w, + clipShape: yu(n, !1, !0, t) + }), S && (u = xu(u, n, S), x = xu(x, n, S)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, x, n, m)), g.setClipPath(yu(n, !0, !1, t))); + var M = _u(a, n) || a.getVisual("color"); + f.useStyle(r(s.getLineStyle(), {fill: "none", stroke: M, lineJoin: "bevel"})); + var I = t.get("smooth"); + if (I = fu(t.get("smooth")), f.setShape({ + smooth: I, + smoothMonotone: t.get("smoothMonotone"), + connectNulls: t.get("connectNulls") + }), p) { + var T = a.getCalculationInfo("stackedOnSeries"), D = 0; + p.useStyle(r(l.getAreaStyle(), { + fill: M, + opacity: .7, + lineJoin: "bevel" + })), T && (D = fu(T.get("smooth"))), p.setShape({ + smooth: I, + stackedOnSmooth: D, + smoothMonotone: t.get("smoothMonotone"), + connectNulls: t.get("connectNulls") + }) + } + this._data = a, this._coordSys = n, this._stackedOnPoints = x, this._points = u, this._step = S, this._valueOrigin = y + }, dispose: function () { + }, highlight: function (t, e, i, n) { + var o = t.getData(), a = Pi(o, n); + if (!(a instanceof Array) && null != a && a >= 0) { + var r = o.getItemGraphicEl(a); + if (!r) { + var s = o.getItemLayout(a); + if (!s) return; + (r = new Kl(o, a)).position = s, r.setZ(t.get("zlevel"), t.get("z")), r.ignore = isNaN(s[0]) || isNaN(s[1]), r.__temp = !0, o.setItemGraphicEl(a, r), r.stopSymbolAnimation(!0), this.group.add(r) + } + r.highlight() + } else gr.prototype.highlight.call(this, t, e, i, n) + }, downplay: function (t, e, i, n) { + var o = t.getData(), a = Pi(o, n); + if (null != a && a >= 0) { + var r = o.getItemGraphicEl(a); + r && (r.__temp ? (o.setItemGraphicEl(a, null), this.group.remove(r)) : r.downplay()) + } else gr.prototype.downplay.call(this, t, e, i, n) + }, _newPolyline: function (t) { + var e = this._polyline; + return e && this._lineGroup.remove(e), e = new fD({ + 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 pD({ + shape: {points: t, stackedOnPoints: e}, + silent: !0 + }), this._lineGroup.add(i), this._polygon = i, i + }, _updateAnimation: function (t, e, i, n, o, a) { + var r = this._polyline, s = this._polygon, l = t.hostModel, + u = aD(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a), h = u.current, + c = u.stackedOnCurrent, d = u.next, f = u.stackedOnNext; + o && (h = xu(u.current, i, o), c = xu(u.stackedOnCurrent, i, o), d = xu(u.next, i, o), f = xu(u.stackedOnNext, i, o)), r.shape.__points = u.current, r.shape.points = h, fo(r, {shape: {points: d}}, l), s && (s.setShape({ + points: h, + stackedOnPoints: c + }), fo(s, {shape: {points: d, stackedOnPoints: f}}, l)); + for (var p = [], g = u.status, m = 0; m < g.length; m++) if ("=" === g[m].cmd) { + var v = t.getItemGraphicEl(g[m].idx1); + v && p.push({el: v, ptIdx: m}) + } + r.animators && r.animators.length && r.animators[0].during(function () { + for (var t = 0; t < p.length; t++) p[t].el.attr("position", r.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 gD = function (t, e, i) { + return { + seriesType: t, performRawSeries: !0, reset: function (t, n, o) { + var a = t.getData(), r = t.get("symbol") || e, s = t.get("symbolSize"), l = t.get("symbolKeepAspect"); + if (a.setVisual({ + legendSymbol: i || r, + symbol: r, + symbolSize: s, + symbolKeepAspect: l + }), !n.isSeriesFiltered(t)) { + var u = "function" == typeof s; + return { + dataEach: a.hasItemOption || u ? function (e, i) { + if ("function" == typeof s) { + var n = t.getRawValue(i), o = t.getDataParams(i); + e.setItemVisual(i, "symbolSize", s(n, o)) + } + if (e.hasItemOption) { + var a = e.getItemModel(i), r = a.getShallow("symbol", !0), + l = a.getShallow("symbolSize", !0), u = a.getShallow("symbolKeepAspect", !0); + null != r && e.setItemVisual(i, "symbol", r), null != l && e.setItemVisual(i, "symbolSize", l), null != u && e.setItemVisual(i, "symbolKeepAspect", u) + } + } : null + } + } + } + } + }, mD = function (t) { + return { + seriesType: t, plan: QM(), reset: function (t) { + var e = t.getData(), i = t.coordinateSystem, n = t.pipelineContext.large; + if (i) { + var o = f(i.dimensions, function (t) { + return e.mapDimension(t) + }).slice(0, 2), a = o.length, r = e.getCalculationInfo("stackResultDimension"); + return Zs(e, o[0]) && (o[0] = r), Zs(e, o[1]) && (o[1] = r), a && { + progress: function (t, e) { + for (var r = t.end - t.start, s = n && new Float32Array(r * a), l = t.start, u = 0, h = [], c = []; l < t.end; l++) { + var d; + if (1 === a) f = e.get(o[0], l), d = !isNaN(f) && i.dataToPoint(f, null, c); else { + var f = h[0] = e.get(o[0], l), p = h[1] = e.get(o[1], l); + d = !isNaN(f) && !isNaN(p) && i.dataToPoint(h, null, c) + } + n ? (s[u++] = d ? d[0] : NaN, s[u++] = d ? d[1] : NaN) : e.setItemLayout(l, d && d.slice() || [NaN, NaN]) + } + n && e.setLayout("symbolPoints", s) + } + } + } + } + } + }, vD = { + 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 isFinite(e) ? e : NaN + }, min: function (t) { + for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]); + return isFinite(e) ? e : NaN + }, nearest: function (t) { + return t[0] + } + }, yD = function (t, e) { + return Math.round(t.length / 2) + }, xD = function (t) { + this._axes = {}, this._dimList = [], this.name = t || "" + }; + xD.prototype = { + constructor: xD, type: "cartesian", getAxis: function (t) { + return this._axes[t] + }, getAxes: function () { + return f(this._dimList, Su, this) + }, getAxesByScale: function (t) { + return t = t.toLowerCase(), g(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 ? [] : {}, o = 0; o < i.length; o++) { + var a = i[o], r = this._axes[a]; + n[a] = r[e](t[a]) + } + return n + } + }, Mu.prototype = { + constructor: Mu, 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, i) { + var n = this.getAxis("x"), o = this.getAxis("y"); + return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = o.toGlobalCoord(o.dataToCoord(t[1])), i + }, clampData: function (t, e) { + var i = this.getAxis("x").scale, n = this.getAxis("y").scale, o = i.getExtent(), a = n.getExtent(), + r = i.parse(t[0]), s = n.parse(t[1]); + return e = e || [], e[0] = Math.min(Math.max(Math.min(o[0], o[1]), r), Math.max(o[0], o[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e + }, pointToData: function (t, e) { + var i = this.getAxis("x"), n = this.getAxis("y"); + return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e + }, getOtherAxis: function (t) { + return this.getAxis("x" === t.dim ? "y" : "x") + } + }, u(Mu, xD); + var _D = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom" + }; + _D.prototype = { + constructor: _D, index: 0, getAxesOnZeroOf: null, 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() + }, pointToData: function (t, e) { + return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e) + }, toLocalCoord: null, toGlobalCoord: null + }, u(_D, qT); + var wD = { + 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)"]}} + }, bD = {}; + bD.categoryAxis = n({ + boundaryGap: !0, + deduplication: null, + splitLine: {show: !1}, + axisTick: {alignWithLabel: !1, interval: "auto"}, + axisLabel: {interval: "auto"} + }, wD), bD.valueAxis = n({boundaryGap: [0, 0], splitNumber: 5}, wD), bD.timeAxis = r({ + scale: !0, + min: "dataMin", + max: "dataMax" + }, bD.valueAxis), bD.logAxis = r({scale: !0, logBase: 10}, bD.valueAxis); + var SD = ["value", "category", "time", "log"], MD = function (t, e, i, a) { + d(SD, function (r) { + e.extend({ + type: t + "Axis." + r, mergeDefaultAndTheme: function (e, o) { + var a = this.layoutMode, s = a ? na(e) : {}; + n(e, o.getTheme().get(r + "Axis")), n(e, this.getDefaultOption()), e.type = i(t, e), a && ia(e, s, a) + }, optionUpdated: function () { + "category" === this.option.type && (this.__ordinalMeta = Ks.createByAxisModel(this)) + }, getCategories: function (t) { + var e = this.option; + if ("category" === e.type) return t ? e.data : this.__ordinalMeta.categories + }, getOrdinalMeta: function () { + return this.__ordinalMeta + }, defaultOption: o([{}, bD[r + "Axis"], a], !0) + }) + }), hM.registerSubTypeDefaulter(t + "Axis", v(i, t)) + }, ID = hM.extend({ + type: "cartesian2dAxis", axis: null, init: function () { + ID.superApply(this, "init", arguments), this.resetRange() + }, mergeOption: function () { + ID.superApply(this, "mergeOption", arguments), this.resetRange() + }, restoreData: function () { + ID.superApply(this, "restoreData", arguments), this.resetRange() + }, getCoordSysModel: function () { + return this.ecModel.queryComponents({ + mainType: "grid", + index: this.option.gridIndex, + id: this.option.gridId + })[0] + } + }); + n(ID.prototype, ET); + var TD = {offset: 0}; + MD("x", ID, Iu, TD), MD("y", ID, Iu, TD), hM.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 DD = Du.prototype; + DD.type = "grid", DD.axisPointerEnabled = !0, DD.getRect = function () { + return this._rect + }, DD.update = function (t, e) { + var i = this._axesMap; + this._updateScale(t, this.model), d(i.x, function (t) { + yl(t.scale, t.model) + }), d(i.y, function (t) { + yl(t.scale, t.model) + }), d(i.x, function (t) { + Au(i, "y", t) + }), d(i.y, function (t) { + Au(i, "x", t) + }), this.resize(this.model, e) + }, DD.resize = function (t, e, i) { + function n() { + d(a, function (t) { + var e = t.isHorizontal(), i = e ? [0, o.width] : [0, o.height], n = t.inverse ? 1 : 0; + t.setExtent(i[n], i[1 - n]), Lu(t, e ? o.x : o.y) + }) + } + + var o = Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}); + this._rect = o; + var a = this._axesList; + n(), !i && t.get("containLabel") && (d(a, function (t) { + if (!t.model.get("axisLabel.inside")) { + var e = Sl(t); + if (e) { + var i = t.isHorizontal() ? "height" : "width", n = t.model.get("axisLabel.margin"); + o[i] -= e[i] + n, "top" === t.position ? o.y += e.height + n : "left" === t.position && (o.x += e.width + n) + } + } + }), n()) + }, DD.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] + } + }, DD.getAxes = function () { + return this._axesList.slice() + }, DD.getCartesian = function (t, e) { + if (null != t && null != e) { + var i = "x" + t + "y" + e; + return this._coordsMap[i] + } + w(t) && (e = t.yAxisIndex, t = t.xAxisIndex); + for (var n = 0, o = this._coordsList; n < o.length; n++) if (o[n].getAxis("x").index === t || o[n].getAxis("y").index === e) return o[n] + }, DD.getCartesians = function () { + return this._coordsList.slice() + }, DD.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 + }, DD.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 + }, DD._findConvertTarget = function (t, e) { + var i, n, o = e.seriesModel, a = e.xAxisModel || o && o.getReferringComponents("xAxis")[0], + r = e.yAxisModel || o && o.getReferringComponents("yAxis")[0], s = e.gridModel, u = this._coordsList; + return o ? l(u, i = o.coordinateSystem) < 0 && (i = null) : a && r ? i = this.getCartesian(a.componentIndex, r.componentIndex) : a ? n = this.getAxis("x", a.componentIndex) : r ? n = this.getAxis("y", r.componentIndex) : s && s.coordinateSystem === this && (i = this._coordsList[0]), { + cartesian: i, + axis: n + } + }, DD.containPoint = function (t) { + var e = this._coordsList[0]; + if (e) return e.containPoint(t) + }, DD._initCartesian = function (t, e, i) { + function n(i) { + return function (n, s) { + if (Tu(n, t, e)) { + var l = n.get("position"); + "x" === i ? "top" !== l && "bottom" !== l && o[l = "bottom"] && (l = "top" === l ? "bottom" : "top") : "left" !== l && "right" !== l && o[l = "left"] && (l = "left" === l ? "right" : "left"), o[l] = !0; + var u = new _D(i, xl(n), [0, 0], n.get("type"), l), h = "category" === u.type; + u.onBand = h && n.get("boundaryGap"), u.inverse = n.get("inverse"), n.axis = u, u.model = n, u.grid = this, u.index = s, this._axesList.push(u), a[i][s] = u, r[i]++ + } + } + } + + var o = {left: !1, right: !1, top: !1, bottom: !1}, a = {x: {}, y: {}}, r = {x: 0, y: 0}; + if (e.eachComponent("xAxis", n("x"), this), e.eachComponent("yAxis", n("y"), this), !r.x || !r.y) return this._axesMap = {}, void (this._axesList = []); + this._axesMap = a, d(a.x, function (e, i) { + d(a.y, function (n, o) { + var a = "x" + i + "y" + o, r = new Mu(a); + r.grid = this, r.model = t, this._coordsMap[a] = r, this._coordsList.push(r), r.addAxis(e), r.addAxis(n) + }, this) + }, this) + }, DD._updateScale = function (t, e) { + function i(t, e, i) { + d(t.mapDimension(e.dim, !0), function (i) { + e.scale.unionExtentFromData(t, Us(t, i)) + }) + } + + d(this._axesList, function (t) { + t.scale.setExtent(1 / 0, -1 / 0) + }), t.eachSeries(function (n) { + if (Pu(n)) { + var o = ku(n), a = o[0], r = o[1]; + if (!Tu(a, e, t) || !Tu(r, e, t)) return; + var s = this.getCartesian(a.componentIndex, r.componentIndex), l = n.getData(), u = s.getAxis("x"), + h = s.getAxis("y"); + "list" === l.type && (i(l, u), i(l, h)) + } + }, this) + }, DD.getTooltipAxes = function (t) { + var e = [], i = []; + return d(this.getCartesians(), function (n) { + var o = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(), a = n.getOtherAxis(o); + l(e, o) < 0 && e.push(o), l(i, a) < 0 && i.push(a) + }), {baseAxes: e, otherAxes: i} + }; + var AD = ["xAxis", "yAxis"]; + Du.create = function (t, e) { + var i = []; + return t.eachComponent("grid", function (n, o) { + var a = new Du(n, t, e); + a.name = "grid_" + o, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a) + }), t.eachSeries(function (t) { + if (Pu(t)) { + var e = ku(t), i = e[0], n = e[1], o = i.getCoordSysModel().coordinateSystem; + t.coordinateSystem = o.getCartesian(i.componentIndex, n.componentIndex) + } + }), i + }, Du.dimensions = Du.prototype.dimensions = Mu.prototype.dimensions, Ca.register("cartesian2d", Du); + var CD = Math.PI, LD = function (t, e) { + this.opt = e, this.axisModel = t, r(e, { + labelOffset: 0, + nameDirection: 1, + tickDirection: 1, + labelDirection: 1, + silent: !0 + }), this.group = new sw; + var i = new sw({position: e.position.slice(), rotation: e.rotation}); + i.updateTransform(), this._transform = i.transform, this._dumbGroup = i + }; + LD.prototype = { + constructor: LD, hasBuilder: function (t) { + return !!kD[t] + }, add: function (t) { + kD[t].call(this) + }, getGroup: function () { + return this.group + } + }; + var kD = { + axisLine: function () { + var t = this.opt, e = this.axisModel; + if (e.get("axisLine.show")) { + var i = this.axisModel.axis.getExtent(), n = this._transform, o = [i[0], 0], r = [i[1], 0]; + n && (Q(o, o, n), Q(r, r, n)); + var s = a({lineCap: "round"}, e.getModel("axisLine.lineStyle").getLineStyle()); + this.group.add(new MS(Gn({ + anid: "line", + shape: {x1: o[0], y1: o[1], x2: r[0], y2: r[1]}, + style: s, + strokeContainThreshold: t.strokeContainThreshold || 5, + silent: !0, + z2: 1 + }))); + var l = e.get("axisLine.symbol"), u = e.get("axisLine.symbolSize"), + h = e.get("axisLine.symbolOffset") || 0; + if ("number" == typeof h && (h = [h, h]), null != l) { + "string" == typeof l && (l = [l, l]), "string" != typeof u && "number" != typeof u || (u = [u, u]); + var c = u[0], f = u[1]; + d([{rotate: t.rotation + Math.PI / 2, offset: h[0], r: 0}, { + rotate: t.rotation - Math.PI / 2, + offset: h[1], + r: Math.sqrt((o[0] - r[0]) * (o[0] - r[0]) + (o[1] - r[1]) * (o[1] - r[1])) + }], function (e, i) { + if ("none" !== l[i] && null != l[i]) { + var n = Tl(l[i], -c / 2, -f / 2, c, f, s.stroke, !0), a = e.r + e.offset, + r = [o[0] + a * Math.cos(t.rotation), o[1] - a * Math.sin(t.rotation)]; + n.attr({rotation: e.rotate, position: r, silent: !0}), this.group.add(n) + } + }, this) + } + } + }, axisTickLabel: function () { + var t = this.axisModel, e = this.opt, i = Gu(this, t, e); + Ru(t, Wu(this, t, e), i) + }, axisName: function () { + var t = this.opt, e = this.axisModel, i = T(t.axisName, e.get("name")); + if (i) { + var n, o = e.get("nameLocation"), r = t.nameDirection, s = e.getModel("nameTextStyle"), + l = e.get("nameGap") || 0, u = this.axisModel.axis.getExtent(), h = u[0] > u[1] ? -1 : 1, + c = ["start" === o ? u[0] - h * l : "end" === o ? u[1] + h * l : (u[0] + u[1]) / 2, Vu(o) ? t.labelOffset + r * l : 0], + d = e.get("nameRotate"); + null != d && (d = d * CD / 180); + var f; + Vu(o) ? n = PD(t.rotation, null != d ? d : t.rotation, r) : (n = Ou(t, o, d || 0, u), null != (f = t.axisNameAvailableWidth) && (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null))); + var p = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, + v = T(t.nameTruncateMaxWidth, g.maxWidth, f), + y = null != m && null != v ? eM(i, v, p, m, {minChar: 2, placeholder: g.placeholder}) : i, + x = e.get("tooltip", !0), _ = e.mainType, w = {componentType: _, name: i, $vars: ["name"]}; + w[_ + "Index"] = e.componentIndex; + var b = new fS({ + anid: "name", + __fullText: i, + __truncatedText: y, + position: c, + rotation: n.rotation, + silent: Eu(e), + z2: 1, + tooltip: x && x.show ? a({ + content: i, formatter: function () { + return i + }, formatterParams: w + }, x) : null + }); + no(b.style, s, { + text: y, + textFont: p, + textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"), + textAlign: n.textAlign, + textVerticalAlign: n.textVerticalAlign + }), e.get("triggerEvent") && (b.eventData = Nu(e), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform() + } + } + }, PD = LD.innerTextLayout = function (t, e, i) { + var n, o, a = Oo(e - t); + return Eo(a) ? (o = i > 0 ? "top" : "bottom", n = "center") : Eo(a - CD) ? (o = i > 0 ? "bottom" : "top", n = "center") : (o = "middle", n = a > 0 && a < CD ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), { + rotation: a, + textAlign: n, + textVerticalAlign: o + } + }, ND = d, OD = v, ED = ys({ + type: "axis", _axisPointer: null, axisPointerClass: null, render: function (t, e, i, n) { + this.axisPointerClass && Yu(t), ED.superApply(this, "render", arguments), Qu(this, t, 0, i, 0, !0) + }, updateAxisPointer: function (t, e, i, n, o) { + Qu(this, t, 0, i, 0, !1) + }, remove: function (t, e) { + var i = this._axisPointer; + i && i.remove(e), ED.superApply(this, "remove", arguments) + }, dispose: function (t, e) { + th(this, e), ED.superApply(this, "dispose", arguments) + } + }), RD = []; + ED.registerAxisPointerClass = function (t, e) { + RD[t] = e + }, ED.getAxisPointerClass = function (t) { + return t && RD[t] + }; + var zD = ["axisLine", "axisTickLabel", "axisName"], BD = ["splitArea", "splitLine"], VD = ED.extend({ + type: "cartesianAxis", axisPointerClass: "CartesianAxisPointer", render: function (t, e, i, n) { + this.group.removeAll(); + var o = this._axisGroup; + if (this._axisGroup = new sw, this.group.add(this._axisGroup), t.get("show")) { + var a = t.getCoordSysModel(), r = eh(a, t), s = new LD(t, r); + d(zD, s.add, s), this._axisGroup.add(s.getGroup()), d(BD, function (e) { + t.get(e + ".show") && this["_" + e](t, a) + }, this), yo(o, this._axisGroup, t), VD.superCall(this, "render", t, e, i, n) + } + }, remove: function () { + this._splitAreaColors = null + }, _splitLine: function (t, e) { + var i = t.axis; + if (!i.scale.isBlank()) { + var n = t.getModel("splitLine"), o = n.getModel("lineStyle"), a = o.get("color"); + a = y(a) ? a : [a]; + for (var s = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({tickModel: n}), c = [], d = [], f = o.getLineStyle(), p = 0; p < h.length; p++) { + var g = i.toGlobalCoord(h[p].coord); + l ? (c[0] = g, c[1] = s.y, d[0] = g, d[1] = s.y + s.height) : (c[0] = s.x, c[1] = g, d[0] = s.x + s.width, d[1] = g); + var m = u++ % a.length, v = h[p].tickValue; + this._axisGroup.add(new MS(Gn({ + anid: null != v ? "line_" + h[p].tickValue : null, + shape: {x1: c[0], y1: c[1], x2: d[0], y2: d[1]}, + style: r({stroke: a[m]}, f), + silent: !0 + }))) + } + } + }, _splitArea: function (t, e) { + var i = t.axis; + if (!i.scale.isBlank()) { + var n = t.getModel("splitArea"), o = n.getModel("areaStyle"), a = o.get("color"), + s = e.coordinateSystem.getRect(), l = i.getTicksCoords({tickModel: n, clamp: !0}); + if (l.length) { + var u = a.length, h = this._splitAreaColors, c = R(), d = 0; + if (h) for (m = 0; m < l.length; m++) { + var f = h.get(l[m].tickValue); + if (null != f) { + d = (f + (u - 1) * m) % u; + break + } + } + var p = i.toGlobalCoord(l[0].coord), g = o.getAreaStyle(); + a = y(a) ? a : [a]; + for (var m = 1; m < l.length; m++) { + var v, x, _, w, b = i.toGlobalCoord(l[m].coord); + i.isHorizontal() ? (v = p, x = s.y, _ = b - v, w = s.height, p = v + _) : (v = s.x, x = p, _ = s.width, p = x + (w = b - x)); + var S = l[m - 1].tickValue; + null != S && c.set(S, d), this._axisGroup.add(new SS({ + anid: null != S ? "area_" + S : null, + shape: {x: v, y: x, width: _, height: w}, + style: r({fill: a[d]}, g), + silent: !0 + })), d = (d + 1) % u + } + this._splitAreaColors = c + } + } + } + }); + VD.extend({type: "xAxis"}), VD.extend({type: "yAxis"}), ys({ + type: "grid", render: function (t, e) { + this.group.removeAll(), t.get("show") && this.group.add(new SS({ + shape: t.coordinateSystem.getRect(), + style: r({fill: t.get("backgroundColor")}, t.getItemStyle()), + silent: !0, + z2: -1 + })) + } + }), us(function (t) { + t.xAxis && t.yAxis && !t.grid && (t.grid = {}) + }), ps(gD("line", "circle", "line")), fs(mD("line")), hs(LI.PROCESSOR.STATISTIC, function (t) { + return { + seriesType: t, modifyOutputEnd: !0, reset: function (t, e, i) { + var n = t.getData(), o = t.get("sampling"), a = t.coordinateSystem; + if ("cartesian2d" === a.type && o) { + var r = a.getBaseAxis(), s = a.getOtherAxis(r), l = r.getExtent(), u = l[1] - l[0], + h = Math.round(n.count() / u); + if (h > 1) { + var c; + "string" == typeof o ? c = vD[o] : "function" == typeof o && (c = o), c && t.setData(n.downSample(n.mapDimension(s.dim), 1 / h, c, yD)) + } + } + } + } + }("line")); + var GD = KM.extend({ + type: "series.__base_bar__", + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + getMarkerPosition: function (t) { + var e = this.coordinateSystem; + if (e) { + var i = e.dataToPoint(e.clampData(t)), n = this.getData(), o = n.getLayout("offset"), + a = n.getLayout("size"); + return i[e.getBaseAxis().isHorizontal() ? 0 : 1] += o + a / 2, i + } + return [NaN, NaN] + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + barMinHeight: 0, + barMinAngle: 0, + large: !1, + largeThreshold: 400, + progressive: 3e3, + progressiveChunkMode: "mod", + itemStyle: {}, + emphasis: {} + } + }); + GD.extend({ + type: "series.bar", dependencies: ["grid", "polar"], brushSelector: "rect", getProgressive: function () { + return !!this.get("large") && this.get("progressive") + }, getProgressiveThreshold: function () { + var t = this.get("progressiveThreshold"), e = this.get("largeThreshold"); + return e > t && (t = e), t + } + }); + var WD = sb([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + FD = { + getBarItemStyle: function (t) { + var e = WD(this, t); + if (this.getBorderLineDash) { + var i = this.getBorderLineDash(); + i && (e.lineDash = i) + } + return e + } + }, HD = ["itemStyle", "barBorderWidth"]; + a(wo.prototype, FD), _s({ + type: "bar", render: function (t, e, i) { + this._updateDrawMode(t); + var n = t.get("coordinateSystem"); + return "cartesian2d" !== n && "polar" !== n || (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(t, e, i)), this.group + }, incrementalPrepareRender: function (t, e, i) { + this._clear(), this._updateDrawMode(t) + }, incrementalRender: function (t, e, i, n) { + this._incrementalRenderLarge(t, e) + }, _updateDrawMode: function (t) { + var e = t.pipelineContext.large; + (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear()) + }, _renderNormal: function (t, e, i) { + var n, o = this.group, a = 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 u = t.isAnimationEnabled() ? t : null; + a.diff(r).add(function (e) { + if (a.hasValue(e)) { + var i = a.getItemModel(e), r = UD[s.type](a, e, i), l = ZD[s.type](a, e, i, r, n, u); + a.setItemGraphicEl(e, l), o.add(l), rh(l, a, e, i, r, t, n, "polar" === s.type) + } + }).update(function (e, i) { + var l = r.getItemGraphicEl(i); + if (a.hasValue(e)) { + var h = a.getItemModel(e), c = UD[s.type](a, e, h); + l ? fo(l, {shape: c}, u, e) : l = ZD[s.type](a, e, h, c, n, u, !0), a.setItemGraphicEl(e, l), o.add(l), rh(l, a, e, h, c, t, n, "polar" === s.type) + } else o.remove(l) + }).remove(function (t) { + var e = r.getItemGraphicEl(t); + "cartesian2d" === s.type ? e && oh(t, u, e) : e && ah(t, u, e) + }).execute(), this._data = a + }, _renderLarge: function (t, e, i) { + this._clear(), lh(t, this.group) + }, _incrementalRenderLarge: function (t, e) { + lh(e, this.group, !0) + }, dispose: B, remove: function (t) { + this._clear(t) + }, _clear: function (t) { + var e = this.group, i = this._data; + t && t.get("animation") && i && !this._isLargeDraw ? i.eachItemGraphicEl(function (e) { + "sector" === e.type ? ah(e.dataIndex, t, e) : oh(e.dataIndex, t, e) + }) : e.removeAll(), this._data = null + } + }); + var ZD = { + cartesian2d: function (t, e, i, n, o, r, s) { + var l = new SS({shape: a({}, n)}); + if (r) { + var u = l.shape, h = o ? "height" : "width", c = {}; + u[h] = 0, c[h] = n[h], BS[s ? "updateProps" : "initProps"](l, {shape: c}, r, e) + } + return l + }, polar: function (t, e, i, n, o, a, s) { + var l = n.startAngle < n.endAngle, u = new vS({shape: r({clockwise: l}, n)}); + if (a) { + var h = u.shape, c = o ? "r" : "endAngle", d = {}; + h[c] = o ? 0 : n.startAngle, d[c] = n[c], BS[s ? "updateProps" : "initProps"](u, {shape: d}, a, e) + } + return u + } + }, UD = { + cartesian2d: function (t, e, i) { + var n = t.getItemLayout(e), o = sh(i, n), a = n.width > 0 ? 1 : -1, r = n.height > 0 ? 1 : -1; + return {x: n.x + a * o / 2, y: n.y + r * o / 2, width: n.width - a * o, height: n.height - r * o} + }, 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} + } + }, XD = In.extend({ + type: "largeBar", shape: {points: []}, buildPath: function (t, e) { + for (var i = e.points, n = this.__startPoint, o = this.__valueIdx, a = 0; a < i.length; a += 2) n[this.__valueIdx] = i[a + o], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1]) + } + }); + fs(v(cl, "bar")), fs(xT), ps({ + seriesType: "bar", reset: function (t) { + t.getData().setVisual("legendSymbol", "roundRect") + } + }); + var jD = function (t, e, i) { + e = y(e) && {coordDimensions: e} || a({}, e); + var n = t.getSource(), o = hT(n, e), r = new sT(o, t); + return r.initData(n, i), r + }, YD = { + updateSelectedMap: function (t) { + this._targetList = y(t) ? t.slice() : [], this._selectTargetMap = p(t || [], function (t, e) { + return t.set(e.name, e), t + }, R()) + }, 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 + } + }, qD = xs({ + type: "series.pie", + init: function (t) { + qD.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t) + }, + mergeOption: function (t) { + qD.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList()) + }, + getInitialData: function (t, e) { + return jD(this, ["value"]) + }, + _createSelectableList: function () { + for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({ + name: t.getName(n), + value: t.get(e, n), + selected: ir(t, n, "selected") + }); + return i + }, + getDataParams: function (t) { + var e = this.getData(), i = qD.superCall(this, "getDataParams", t), n = []; + return e.each(e.mapDimension("value"), function (t) { + n.push(t) + }), i.percent = No(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i + }, + _defaultLabelLine: function (t) { + Mi(t, "labelLine", ["show"]); + var e = t.labelLine, i = t.emphasis.labelLine; + e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.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: {rotate: !1, show: !0, position: "outer"}, + labelLine: {show: !0, length: 15, length2: 15, smooth: !1, lineStyle: {width: 1, type: "solid"}}, + itemStyle: {borderWidth: 1}, + animationType: "expansion", + animationEasing: "cubicOut" + } + }); + h(qD, YD); + var KD = dh.prototype; + KD.updateData = function (t, e, i) { + function n() { + s.stopAnimation(!0), s.animateTo({shape: {r: h.r + l.get("hoverOffset")}}, 300, "elasticOut") + } + + function o() { + s.stopAnimation(!0), s.animateTo({shape: {r: h.r}}, 300, "elasticOut") + } + + var s = this.childAt(0), l = t.hostModel, u = t.getItemModel(e), h = t.getItemLayout(e), c = a({}, h); + c.label = null, i ? (s.setShape(c), "scale" === l.getShallow("animationType") ? (s.shape.r = h.r0, po(s, {shape: {r: h.r}}, l, e)) : (s.shape.endAngle = h.startAngle, fo(s, {shape: {endAngle: h.endAngle}}, l, e))) : fo(s, {shape: c}, l, e); + var d = t.getItemVisual(e, "color"); + s.useStyle(r({ + lineJoin: "bevel", + fill: d + }, u.getModel("itemStyle").getItemStyle())), s.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle(); + var f = u.getShallow("cursor"); + f && s.attr("cursor", f), ch(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get("animation")), s.off("mouseover").off("mouseout").off("emphasis").off("normal"), u.get("hoverAnimation") && l.isAnimationEnabled() && s.on("mouseover", n).on("mouseout", o).on("emphasis", n).on("normal", o), this._updateLabel(t, e), eo(this) + }, KD._updateLabel = function (t, e) { + var i = this.childAt(1), n = this.childAt(2), o = t.hostModel, a = t.getItemModel(e), + r = t.getItemLayout(e).label, s = t.getItemVisual(e, "color"); + fo(i, {shape: {points: r.linePoints || [[r.x, r.y], [r.x, r.y], [r.x, r.y]]}}, o, e), fo(n, { + style: { + x: r.x, + y: r.y + } + }, o, e), n.attr({rotation: r.rotation, origin: [r.x, r.y], z2: 10}); + var l = a.getModel("label"), u = a.getModel("emphasis.label"), h = a.getModel("labelLine"), + c = a.getModel("emphasis.labelLine"), s = t.getItemVisual(e, "color"); + io(n.style, n.hoverStyle = {}, l, u, { + 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 = !u.get("show"), i.ignore = i.normalIgnore = !h.get("show"), i.hoverIgnore = !c.get("show"), i.setStyle({ + stroke: s, + opacity: t.getItemVisual(e, "opacity") + }), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle(); + var d = h.get("smooth"); + d && !0 === d && (d = .4), i.setShape({smooth: d}) + }, u(dh, sw); + gr.extend({ + type: "pie", init: function () { + var t = new sw; + this._sectorGroup = t + }, render: function (t, e, i, n) { + if (!n || n.from !== this.uid) { + var o = t.getData(), a = this._data, r = this.group, s = e.get("animation"), l = !a, + u = t.get("animationType"), h = v(hh, this.uid, t, s, i), c = t.get("selectedMode"); + if (o.diff(a).add(function (t) { + var e = new dh(o, t); + l && "scale" !== u && e.eachChild(function (t) { + t.stopAnimation(!0) + }), c && e.on("click", h), o.setItemGraphicEl(t, e), r.add(e) + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + i.updateData(o, t), i.off("click"), c && i.on("click", h), r.add(i), o.setItemGraphicEl(t, i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + r.remove(e) + }).execute(), s && l && o.count() > 0 && "scale" !== u) { + var d = o.getItemLayout(0), f = Math.max(i.getWidth(), i.getHeight()) / 2, + p = m(r.removeClipPath, r); + r.setClipPath(this._createClipPath(d.cx, d.cy, f, d.startAngle, d.clockwise, p, t)) + } + this._data = o + } + }, dispose: function () { + }, _createClipPath: function (t, e, i, n, o, a, r) { + var s = new vS({shape: {cx: t, cy: e, r0: 0, r: i, startAngle: n, endAngle: n, clockwise: o}}); + return po(s, {shape: {endAngle: n + (o ? 1 : -1) * Math.PI * 2}}, r, a), s + }, containPoint: function (t, e) { + var i = e.getData().getItemLayout(0); + if (i) { + var n = t[0] - i.cx, o = t[1] - i.cy, a = Math.sqrt(n * n + o * o); + return a <= i.r && a >= i.r0 + } + } + }); + var $D = function (t, e) { + d(e, function (e) { + e.update = "updateView", cs(e, function (i, n) { + var o = {}; + 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); + o[i] = t.isSelected(i) || !1 + }) + }), {name: i.name, selected: o} + }) + }) + }, JD = function (t) { + return { + getTargetSeries: function (e) { + var i = {}, n = R(); + return e.eachSeriesByType(t, function (t) { + t.__paletteScope = i, n.set(t.uid, t) + }), n + }, reset: function (t, e) { + var i = t.getRawData(), n = {}, o = t.getData(); + o.each(function (t) { + var e = o.getRawIndex(t); + n[e] = t + }), i.each(function (e) { + var a = n[e], r = null != a && o.getItemVisual(a, "color", !0); + if (r) i.setItemVisual(e, "color", r); else { + var s = i.getItemModel(e).get("itemStyle.color") || t.getColorFromPalette(i.getName(e) || e + "", t.__paletteScope, i.count()); + i.setItemVisual(e, "color", s), null != a && o.setItemVisual(a, "color", s) + } + }) + } + } + }, QD = function (t, e, i, n) { + var o, a, r = t.getData(), s = [], l = !1; + r.each(function (i) { + var n, u, h, c, d = r.getItemLayout(i), f = r.getItemModel(i), p = f.getModel("label"), + g = p.get("position") || f.get("emphasis.label.position"), m = f.getModel("labelLine"), + v = m.get("length"), y = m.get("length2"), x = (d.startAngle + d.endAngle) / 2, _ = Math.cos(x), + w = Math.sin(x); + o = d.cx, a = d.cy; + var b = "inside" === g || "inner" === g; + if ("center" === g) n = d.cx, u = d.cy, c = "center"; else { + var S = (b ? (d.r + d.r0) / 2 * _ : d.r * _) + o, M = (b ? (d.r + d.r0) / 2 * w : d.r * w) + a; + if (n = S + 3 * _, u = M + 3 * w, !b) { + var I = S + _ * (v + e - d.r), T = M + w * (v + e - d.r), D = I + (_ < 0 ? -1 : 1) * y, A = T; + n = D + (_ < 0 ? -5 : 5), u = A, h = [[S, M], [I, T], [D, A]] + } + c = b ? "center" : _ > 0 ? "left" : "right" + } + var C = p.getFont(), L = p.get("rotate") ? _ < 0 ? -x + Math.PI : -x : 0, + k = me(t.getFormattedLabel(i, "normal") || r.getName(i), C, c, "top"); + l = !!L, d.label = { + x: n, + y: u, + position: g, + height: k.height, + len: v, + len2: y, + linePoints: h, + textAlign: c, + verticalAlign: "middle", + rotation: L, + inside: b + }, b || s.push(d.label) + }), !l && t.get("avoidLabelOverlap") && ph(s, o, a, e, i, n) + }, tA = 2 * Math.PI, eA = Math.PI / 180, iA = function (t) { + return { + seriesType: t, reset: function (t, e) { + var i = e.findComponents({mainType: "legend"}); + if (i && i.length) { + var n = t.getData(); + n.filterSelf(function (t) { + for (var e = n.getName(t), o = 0; o < i.length; o++) if (!i[o].isSelected(e)) return !1; + return !0 + }) + } + } + } + }; + $D("pie", [{type: "pieToggleSelect", event: "pieselectchanged", method: "toggleSelected"}, { + type: "pieSelect", + event: "pieselected", + method: "select" + }, {type: "pieUnSelect", event: "pieunselected", method: "unSelect"}]), ps(JD("pie")), fs(v(function (t, e, i, n) { + e.eachSeriesByType(t, function (t) { + var e = t.getData(), n = e.mapDimension("value"), o = t.get("center"), a = t.get("radius"); + y(a) || (a = [0, a]), y(o) || (o = [o, o]); + var r = i.getWidth(), s = i.getHeight(), l = Math.min(r, s), u = Do(o[0], r), h = Do(o[1], s), + c = Do(a[0], l / 2), d = Do(a[1], l / 2), f = -t.get("startAngle") * eA, p = t.get("minAngle") * eA, + g = 0; + e.each(n, function (t) { + !isNaN(t) && g++ + }); + var m = e.getSum(n), v = Math.PI / (m || g) * 2, x = t.get("clockwise"), _ = t.get("roseType"), + w = t.get("stillShowZeroSum"), b = e.getDataExtent(n); + b[0] = 0; + var S = tA, M = 0, I = f, T = x ? 1 : -1; + if (e.each(n, function (t, i) { + var n; + if (isNaN(t)) e.setItemLayout(i, { + angle: NaN, + startAngle: NaN, + endAngle: NaN, + clockwise: x, + cx: u, + cy: h, + r0: c, + r: _ ? NaN : d + }); else { + (n = "area" !== _ ? 0 === m && w ? v : t * v : tA / g) < p ? (n = p, S -= p) : M += t; + var o = I + T * n; + e.setItemLayout(i, { + angle: n, + startAngle: I, + endAngle: o, + clockwise: x, + cx: u, + cy: h, + r0: c, + r: _ ? To(t, b, [c, d]) : d + }), I = o + } + }), S < tA && g) if (S <= .001) { + var D = tA / g; + e.each(n, function (t, i) { + if (!isNaN(t)) { + var n = e.getItemLayout(i); + n.angle = D, n.startAngle = f + T * i * D, n.endAngle = f + T * (i + 1) * D + } + }) + } else v = S / M, I = f, e.each(n, function (t, i) { + if (!isNaN(t)) { + var n = e.getItemLayout(i), o = n.angle === p ? p : t * v; + n.startAngle = I, n.endAngle = I + T * o, I += T * o + } + }); + QD(t, d, r, s) + }) + }, "pie")), hs(iA("pie")), KM.extend({ + type: "series.scatter", + dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + brushSelector: "point", + getProgressive: function () { + var t = this.option.progressive; + return null == t ? this.option.large ? 5e3 : this.get("progressive") : t + }, + getProgressiveThreshold: function () { + var t = this.option.progressiveThreshold; + return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t + }, + defaultOption: { + coordinateSystem: "cartesian2d", + zlevel: 0, + z: 2, + legendHoverLink: !0, + hoverAnimation: !0, + symbolSize: 10, + large: !1, + largeThreshold: 2e3, + itemStyle: {opacity: .8} + } + }); + var nA = En({ + shape: {points: null}, symbolProxy: null, buildPath: function (t, e) { + var i = e.points, n = e.size, o = this.symbolProxy, a = o.shape; + if (!((t.getContext ? t.getContext() : t) && n[0] < 4)) for (var r = 0; r < i.length;) { + var s = i[r++], l = i[r++]; + isNaN(s) || isNaN(l) || (a.x = s - n[0] / 2, a.y = l - n[1] / 2, a.width = n[0], a.height = n[1], o.buildPath(t, a, !0)) + } + }, afterBrush: function (t) { + var e = this.shape, i = e.points, n = e.size; + if (n[0] < 4) { + this.setTransform(t); + for (var o = 0; o < i.length;) { + var a = i[o++], r = i[o++]; + isNaN(a) || isNaN(r) || t.fillRect(a - n[0] / 2, r - n[1] / 2, n[0], n[1]) + } + this.restoreTransform(t) + } + }, findDataIndex: function (t, e) { + for (var i = this.shape, n = i.points, o = i.size, a = Math.max(o[0], 4), r = Math.max(o[1], 4), s = n.length / 2 - 1; s >= 0; s--) { + var l = 2 * s, u = n[l] - a / 2, h = n[l + 1] - r / 2; + if (t >= u && e >= h && t <= u + a && e <= h + r) return s + } + return -1 + } + }), oA = gh.prototype; + oA.isPersistent = function () { + return !this._incremental + }, oA.updateData = function (t) { + this.group.removeAll(); + var e = new nA({rectHover: !0, cursor: "default"}); + e.setShape({points: t.getLayout("symbolPoints")}), this._setCommon(e, t), this.group.add(e), this._incremental = null + }, oA.updateLayout = function (t) { + if (!this._incremental) { + var e = t.getLayout("symbolPoints"); + this.group.eachChild(function (t) { + if (null != t.startIndex) { + var i = 2 * (t.endIndex - t.startIndex), n = 4 * t.startIndex * 2; + e = new Float32Array(e.buffer, n, i) + } + t.setShape("points", e) + }) + } + }, oA.incrementalPrepareUpdate = function (t) { + this.group.removeAll(), this._clearIncremental(), t.count() > 2e6 ? (this._incremental || (this._incremental = new On({silent: !0})), this.group.add(this._incremental)) : this._incremental = null + }, oA.incrementalUpdate = function (t, e) { + var i; + this._incremental ? (i = new nA, this._incremental.addDisplayable(i, !0)) : ((i = new nA({ + rectHover: !0, + cursor: "default", + startIndex: t.start, + endIndex: t.end + })).incremental = !0, this.group.add(i)), i.setShape({points: e.getLayout("symbolPoints")}), this._setCommon(i, e, !!this._incremental) + }, oA._setCommon = function (t, e, i) { + var n = e.hostModel, o = e.getVisual("symbolSize"); + t.setShape("size", o instanceof Array ? o : [o, o]), t.symbolProxy = Tl(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor = t.symbolProxy.setColor; + var a = t.shape.size[0] < 4; + t.useStyle(n.getModel("itemStyle").getItemStyle(a ? ["color", "shadowBlur", "shadowColor"] : ["color"])); + var r = e.getVisual("color"); + r && t.setColor(r), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function (e) { + t.dataIndex = null; + var i = t.findDataIndex(e.offsetX, e.offsetY); + i >= 0 && (t.dataIndex = i + (t.startIndex || 0)) + })) + }, oA.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, oA._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }, _s({ + type: "scatter", render: function (t, e, i) { + var n = t.getData(); + this._updateSymbolDraw(n, t).updateData(n), this._finished = !0 + }, incrementalPrepareRender: function (t, e, i) { + var n = t.getData(); + this._updateSymbolDraw(n, t).incrementalPrepareUpdate(n), this._finished = !1 + }, incrementalRender: function (t, e, i) { + this._symbolDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count() + }, updateTransform: function (t, e, i) { + var n = t.getData(); + if (this.group.dirty(), !this._finished || n.count() > 1e4 || !this._symbolDraw.isPersistent()) return {update: !0}; + var o = mD().reset(t); + o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n) + }, _updateSymbolDraw: function (t, e) { + var i = this._symbolDraw, n = e.pipelineContext.large; + return i && n === this._isLargeDraw || (i && i.remove(), i = this._symbolDraw = n ? new gh : new Ql, this._isLargeDraw = n, this.group.removeAll()), this.group.add(i.group), i + }, remove: function (t, e) { + this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null + }, dispose: function () { + } + }), ps(gD("scatter", "circle")), fs(mD("scatter")), u(mh, qT), vh.prototype.getIndicatorAxes = function () { + return this._indicatorAxes + }, vh.prototype.dataToPoint = function (t, e) { + var i = this._indicatorAxes[e]; + return this.coordToPoint(i.dataToCoord(t), e) + }, vh.prototype.coordToPoint = function (t, e) { + var i = this._indicatorAxes[e].angle; + return [this.cx + t * Math.cos(i), this.cy - t * Math.sin(i)] + }, vh.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 o, a = Math.atan2(-i, e), r = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) { + var u = this._indicatorAxes[l], h = Math.abs(a - u.angle); + h < r && (o = u, s = l, r = h) + } + return [s, +(o && o.coodToData(n))] + }, vh.prototype.resize = function (t, e) { + var i = t.get("center"), n = e.getWidth(), o = e.getHeight(), a = Math.min(n, o) / 2; + this.cx = Do(i[0], n), this.cy = Do(i[1], o), this.startAngle = t.get("startAngle") * Math.PI / 180, this.r = Do(t.get("radius"), a), d(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) + }, vh.prototype.update = function (t, e) { + function i(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 + } + + var n = this._indicatorAxes, o = this._model; + d(n, function (t) { + t.scale.setExtent(1 / 0, -1 / 0) + }), t.eachSeriesByType("radar", function (e, i) { + if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === o) { + var a = e.getData(); + d(n, function (t) { + t.scale.unionExtentFromData(a, a.mapDimension(t.dim)) + }) + } + }, this); + var a = o.get("splitNumber"); + d(n, function (t, e) { + var n = ml(t.scale, t.model); + yl(t.scale, t.model); + var o = t.model, r = t.scale, s = o.getMin(), l = o.getMax(), u = r.getInterval(); + if (null != s && null != l) r.setExtent(+s, +l), r.setInterval((l - s) / a); else if (null != s) { + var h; + do { + h = s + u * a, r.setExtent(+s, h), r.setInterval(u), u = i(u) + } while (h < n[1] && isFinite(h) && isFinite(n[1])) + } else if (null != l) { + var c; + do { + c = l - u * a, r.setExtent(c, +l), r.setInterval(u), u = i(u) + } while (c > n[0] && isFinite(c) && isFinite(n[0])) + } else { + r.getTicks().length - 1 > a && (u = i(u)); + var d = Math.round((n[0] + n[1]) / 2 / u) * u, f = Math.round(a / 2); + r.setExtent(Ao(d - f * u), Ao(d + (a - f) * u)), r.setInterval(u) + } + }) + }, vh.dimensions = [], vh.create = function (t, e) { + var i = []; + return t.eachComponent("radar", function (n) { + var o = new vh(n, t, e); + i.push(o), n.coordinateSystem = o + }), t.eachSeriesByType("radar", function (t) { + "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0]) + }), i + }, Ca.register("radar", vh); + var aA = bD.valueAxis, rA = (vs({ + type: "radar", + optionUpdated: function () { + var t = this.get("boundaryGap"), e = this.get("splitNumber"), o = this.get("scale"), + s = this.get("axisLine"), l = this.get("axisTick"), u = this.get("axisLabel"), h = this.get("name"), + c = this.get("name.show"), d = this.get("name.formatter"), p = this.get("nameGap"), + g = this.get("triggerEvent"), m = f(this.get("indicator") || [], function (f) { + null != f.max && f.max > 0 && !f.min ? f.min = 0 : null != f.min && f.min < 0 && !f.max && (f.max = 0); + var m = h; + if (null != f.color && (m = r({color: f.color}, h)), f = n(i(f), { + boundaryGap: t, + splitNumber: e, + scale: o, + axisLine: s, + axisTick: l, + axisLabel: u, + name: f.text, + nameLocation: "end", + nameGap: p, + nameTextStyle: m, + triggerEvent: g + }, !1), c || (f.name = ""), "string" == typeof d) { + var v = f.name; + f.name = d.replace("{value}", null != v ? v : "") + } else "function" == typeof d && (f.name = d(f.name, f)); + var y = a(new wo(f, null, this.ecModel), ET); + return y.mainType = "radar", y.componentIndex = this.componentIndex, y + }, this); + this.getIndicatorModels = function () { + return m + } + }, + 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: n({lineStyle: {color: "#bbb"}}, aA.axisLine), + axisLabel: yh(aA.axisLabel, !1), + axisTick: yh(aA.axisTick, !1), + splitLine: yh(aA.splitLine, !0), + splitArea: yh(aA.splitArea, !0), + indicator: [] + } + }), ["axisLine", "axisTickLabel", "axisName"]); + ys({ + type: "radar", render: function (t, e, i) { + this.group.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t) + }, _buildAxes: function (t) { + var e = t.coordinateSystem; + d(f(e.getIndicatorAxes(), function (t) { + return new LD(t.model, { + position: [e.cx, e.cy], + rotation: t.angle, + labelDirection: -1, + tickDirection: -1, + nameDirection: 1 + }) + }), function (t) { + d(rA, t.add, t), this.group.add(t.getGroup()) + }, this) + }, _buildSplitLineAndArea: function (t) { + function e(t, e, i) { + var n = i % e.length; + return t[n] = t[n] || [], n + } + + var i = t.coordinateSystem, n = i.getIndicatorAxes(); + if (n.length) { + var o = t.get("shape"), a = t.getModel("splitLine"), s = t.getModel("splitArea"), + l = a.getModel("lineStyle"), u = s.getModel("areaStyle"), h = a.get("show"), c = s.get("show"), + p = l.get("color"), g = u.get("color"); + p = y(p) ? p : [p], g = y(g) ? g : [g]; + var m = [], v = []; + if ("circle" === o) for (var x = n[0].getTicksCoords(), _ = i.cx, w = i.cy, b = 0; b < x.length; b++) h && m[A = e(m, p, b)].push(new pS({ + shape: { + cx: _, + cy: w, + r: x[b].coord + } + })), c && b < x.length - 1 && v[A = e(v, g, b)].push(new yS({ + shape: { + cx: _, + cy: w, + r0: x[b].coord, + r: x[b + 1].coord + } + })); else for (var S, M = f(n, function (t, e) { + var n = t.getTicksCoords(); + return S = null == S ? n.length - 1 : Math.min(n.length - 1, S), f(n, function (t) { + return i.coordToPoint(t.coord, e) + }) + }), I = [], b = 0; b <= S; b++) { + for (var T = [], D = 0; D < n.length; D++) T.push(M[D][b]); + if (T[0] && T.push(T[0].slice()), h && m[A = e(m, p, b)].push(new bS({shape: {points: T}})), c && I) { + var A = e(v, g, b - 1); + v[A].push(new wS({shape: {points: T.concat(I)}})) + } + I = T.slice().reverse() + } + var C = l.getLineStyle(), L = u.getAreaStyle(); + d(v, function (t, e) { + this.group.add(zS(t, {style: r({stroke: "none", fill: g[e % g.length]}, L), silent: !0})) + }, this), d(m, function (t, e) { + this.group.add(zS(t, {style: r({fill: "none", stroke: p[e % p.length]}, C), silent: !0})) + }, this) + } + } + }); + var sA = KM.extend({ + type: "series.radar", + dependencies: ["radar"], + init: function (t) { + sA.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + } + }, + getInitialData: function (t, e) { + return jD(this, {generateCoord: "indicator_", generateCoordCount: 1 / 0}) + }, + formatTooltip: function (t) { + var e = this.getData(), i = this.coordinateSystem.getIndicatorAxes(), n = this.getData().getName(t); + return Zo("" === n ? this.name : n) + "
" + f(i, function (i, n) { + var o = e.get(e.mapDimension(i.dim), t); + return Zo(i.name + " : " + o) + }).join("
") + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "radar", + legendHoverLink: !0, + radarIndex: 0, + lineStyle: {width: 2, type: "solid"}, + label: {position: "top"}, + symbol: "emptyCircle", + symbolSize: 4 + } + }); + _s({ + type: "radar", render: function (t, e, n) { + function o(t, e) { + var i = t.getItemVisual(e, "symbol") || "circle", n = t.getItemVisual(e, "color"); + if ("none" !== i) { + var o = xh(t.getItemVisual(e, "symbolSize")), a = Tl(i, -1, -1, 2, 2, n); + return a.attr({style: {strokeNoScale: !0}, z2: 100, scale: [o[0] / 2, o[1] / 2]}), a + } + } + + function a(e, i, n, a, r, s) { + n.removeAll(); + for (var l = 0; l < i.length - 1; l++) { + var u = o(a, r); + u && (u.__dimIdx = l, e[l] ? (u.attr("position", e[l]), BS[s ? "initProps" : "updateProps"](u, {position: i[l]}, t, r)) : u.attr("position", i[l]), n.add(u)) + } + } + + function s(t) { + return f(t, function (t) { + return [l.cx, l.cy] + }) + } + + var l = t.coordinateSystem, u = this.group, h = t.getData(), c = this._data; + h.diff(c).add(function (e) { + var i = h.getItemLayout(e); + if (i) { + var n = new wS, o = new bS, r = {shape: {points: i}}; + n.shape.points = s(i), o.shape.points = s(i), po(n, r, t, e), po(o, r, t, e); + var l = new sw, u = new sw; + l.add(o), l.add(n), l.add(u), a(o.shape.points, i, u, h, e, !0), h.setItemGraphicEl(e, l) + } + }).update(function (e, i) { + var n = c.getItemGraphicEl(i), o = n.childAt(0), r = n.childAt(1), s = n.childAt(2), + l = {shape: {points: h.getItemLayout(e)}}; + l.shape.points && (a(o.shape.points, l.shape.points, s, h, e, !1), fo(o, l, t), fo(r, l, t), h.setItemGraphicEl(e, n)) + }).remove(function (t) { + u.remove(c.getItemGraphicEl(t)) + }).execute(), h.eachItemGraphicEl(function (t, e) { + function n() { + l.attr("ignore", m) + } + + function o() { + l.attr("ignore", g) + } + + var a = h.getItemModel(e), s = t.childAt(0), l = t.childAt(1), c = t.childAt(2), + d = h.getItemVisual(e, "color"); + u.add(t), s.useStyle(r(a.getModel("lineStyle").getLineStyle(), { + fill: "none", + stroke: d + })), s.hoverStyle = a.getModel("emphasis.lineStyle").getLineStyle(); + var f = a.getModel("areaStyle"), p = a.getModel("emphasis.areaStyle"), + g = f.isEmpty() && f.parentModel.isEmpty(), m = p.isEmpty() && p.parentModel.isEmpty(); + m = m && g, l.ignore = g, l.useStyle(r(f.getAreaStyle(), { + fill: d, + opacity: .7 + })), l.hoverStyle = p.getAreaStyle(); + var v = a.getModel("itemStyle").getItemStyle(["color"]), + y = a.getModel("emphasis.itemStyle").getItemStyle(), x = a.getModel("label"), + _ = a.getModel("emphasis.label"); + c.eachChild(function (t) { + t.setStyle(v), t.hoverStyle = i(y), io(t.style, t.hoverStyle, x, _, { + labelFetcher: h.hostModel, + labelDataIndex: e, + labelDimIndex: t.__dimIdx, + defaultText: h.get(h.dimensions[t.__dimIdx], e), + autoColor: d, + isRectText: !0 + }) + }), t.off("mouseover").off("mouseout").off("normal").off("emphasis"), t.on("emphasis", n).on("mouseover", n).on("normal", o).on("mouseout", o), eo(t) + }), this._data = h + }, remove: function () { + this.group.removeAll(), this._data = null + }, dispose: function () { + } + }); + ps(JD("radar")), ps(gD("radar", "circle")), fs(function (t) { + t.eachSeriesByType("radar", function (t) { + var e = t.getData(), i = [], n = t.coordinateSystem; + if (n) { + for (var o = n.getIndicatorAxes(), a = 0; a < o.length; a++) e.each(e.mapDimension(o[a].dim), function (t, e) { + i[e] = i[e] || [], i[e][a] = n.dataToPoint(t, a) + }); + e.each(function (t) { + i[t][0] && i[t].push(i[t][0].slice()), e.setItemLayout(t, i[t]) + }) + } + }) + }), hs(iA("radar")), us(function (t) { + var e = t.polar; + if (e) { + y(e) || (e = [e]); + var i = []; + d(e, function (e, n) { + e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], y(t.radar) || (t.radar = [t.radar]), t.radar.push(e)) : i.push(e) + }), t.polar = i + } + d(t.series, function (t) { + t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex) + }) + }); + var lA = Q; + h(_h, E_), wh.prototype = { + constructor: wh, type: "view", dimensions: ["x", "y"], setBoundingRect: function (t, e, i, n) { + return this._rect = new $t(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 $t(t, e, i, n) + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(), a = this._rawTransformable; + a.transform = o.calculateTransform(new $t(t, e, i, n)), a.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._roamTransformable.getLocalTransform() + }, _updateCenterAndZoom: function () { + var t = this._rawTransformable.getLocalTransform(), e = this._roamTransformable, + i = this.getDefaultCenter(), n = this.getCenter(), o = this.getZoom(); + n = Q([], n, t), i = Q([], i, t), e.origin = n, e.position = [i[0] - n[0], i[1] - n[1]], e.scale = [o, o], this._updateTransform() + }, _updateTransform: function () { + var t = this._roamTransformable, e = this._rawTransformable; + e.parent = t, t.updateTransform(), e.updateTransform(), ut(this.transform || (this.transform = []), e.transform || st()), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], pt(this.invTransform, this.transform), this.decomposeTransform() + }, getViewRect: function () { + return this._viewRect + }, getViewRectAfterRoam: function () { + var t = this.getBoundingRect().clone(); + return t.applyTransform(this.transform), t + }, dataToPoint: function (t, e, i) { + var n = e ? this._rawTransform : this.transform; + return i = i || [], n ? lA(i, t, n) : G(i, t) + }, pointToData: function (t) { + var e = this.invTransform; + return e ? lA([], t, e) : [t[0], t[1]] + }, convertToPixel: v(bh, "dataToPoint"), convertFromPixel: v(bh, "pointToData"), containPoint: function (t) { + return this.getViewRectAfterRoam().contain(t[0], t[1]) + } + }, h(wh, E_); + for (var uA = [126, 25], hA = [[[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]]], cA = 0; cA < hA.length; cA++) for (var dA = 0; dA < hA[cA].length; dA++) hA[cA][dA][0] /= 10.5, hA[cA][dA][1] /= -14, hA[cA][dA][0] += uA[0], hA[cA][dA][1] += uA[1]; + var fA = {"南海诸岛": [32, 80], "广东": [0, -10], "香港": [10, 5], "澳门": [-10, 10], "天津": [5, 5]}, + pA = {Russia: [100, 60], "United States": [-99, 38], "United States of America": [-99, 38]}, + gA = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]], + mA = [function (t) { + "china" === t.map && t.regions.push(new Cl("南海诸岛", f(hA, function (t) { + return {type: "polygon", exterior: t} + }), uA)) + }, function (t) { + d(t.regions, function (t) { + var e = fA[t.name]; + if (e) { + var i = t.center; + i[0] += e[0] / 10.5, i[1] += -e[1] / 14 + } + }) + }, function (t) { + d(t.regions, function (t) { + var e = pA[t.name]; + if (e) { + var i = t.center; + i[0] = e[0], i[1] = e[1] + } + }) + }, 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: gA[0] + }) + }]; + Sh.prototype = { + constructor: Sh, 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 ? XT(t) : [] + } catch (t) { + throw"Invalid geoJson format\n" + t.message + } + e = e || {}, i = i || {}; + for (var n = this.regions, o = R(), a = 0; a < n.length; a++) { + var r = n[a].name; + r = i.hasOwnProperty(r) ? i[r] : r, n[a].name = r, o.set(r, n[a]), this.addGeoCoord(r, n[a].center); + var s = e[r]; + s && n[a].transformTo(s.left, s.top, s.width, s.height) + } + this._regionsMap = o, this._rect = null, d(mA, function (t) { + t(this) + }, this) + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(); + (o = o.clone()).y = -o.y - o.height; + var a = this._rawTransformable; + a.transform = o.calculateTransform(new $t(t, e, i, n)), a.decomposeTransform(); + var r = a.scale; + r[1] = -r[1], a.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 $t(0, 0, 0, 0) + }, dataToPoint: function (t, e, i) { + if ("string" == typeof t && (t = this.getGeoCoord(t)), t) return wh.prototype.dataToPoint.call(this, t, e, i) + }, convertToPixel: v(Mh, "dataToPoint"), convertFromPixel: v(Mh, "pointToData") + }, h(Sh, wh); + var vA = { + dimensions: Sh.prototype.dimensions, create: function (t, e) { + var i = []; + t.eachComponent("geo", function (t, n) { + var o = t.get("map"), a = ws(o), + r = new Sh(o + n, o, a && a.geoJson, a && a.specialAreas, t.get("nameMap")); + r.zoomLimit = t.get("scaleLimit"), i.push(r), Th(r, t), t.coordinateSystem = r, r.model = t, r.resize = Ih, 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) + } + }), d(n, function (t, n) { + var a = ws(n), r = f(t, function (t) { + return t.get("nameMap") + }), s = new Sh(n, n, a && a.geoJson, a && a.specialAreas, o(r)); + s.zoomLimit = T.apply(null, f(t, function (t) { + return t.get("scaleLimit") + })), i.push(s), s.resize = Ih, s.resize(t[0], e), d(t, function (t) { + t.coordinateSystem = s, Th(s, t) + }) + }), i + }, getFilledRegions: function (t, e, i) { + var n = (t || []).slice(); + i = i || {}; + var o = ws(e), a = o && o.geoJson; + if (!a) return t; + for (var r = R(), s = a.features, l = 0; l < n.length; l++) r.set(n[l].name, n[l]); + for (l = 0; l < s.length; l++) { + var u = s[l].properties.name; + r.get(u) || (i.hasOwnProperty(u) && (u = i[u]), n.push({name: u})) + } + return n + } + }; + ds("geo", vA); + var yA = KM.extend({ + type: "series.map", + dependencies: ["geo"], + layoutMode: "box", + needsDrawMap: !1, + seriesGroup: [], + init: function (t) { + yA.superApply(this, "init", arguments), this.updateSelectedMap(this._createSelectableList()) + }, + getInitialData: function (t) { + return jD(this, ["value"]) + }, + mergeOption: function (t) { + yA.superApply(this, "mergeOption", arguments), this.updateSelectedMap(this._createSelectableList()) + }, + _createSelectableList: function () { + for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({ + name: t.getName(n), + value: t.get(e, n), + selected: ir(t, n, "selected") + }); + return i = vA.getFilledRegions(i, this.getMapType(), this.option.nameMap) + }, + 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) { + }, + getRawValue: function (t) { + var e = this.getData(); + return e.get(e.mapDimension("value"), t) + }, + getRegionModel: function (t) { + var e = this.getData(); + return e.getItemModel(e.indexOfName(t)) + }, + formatTooltip: function (t) { + for (var e = this.getData(), i = Fo(this.getRawValue(t)), n = e.getName(t), o = this.seriesGroup, a = [], r = 0; r < o.length; r++) { + var s = o[r].originalData.indexOfName(n), l = e.mapDimension("value"); + isNaN(o[r].originalData.get(l, s)) || a.push(Zo(o[r].name)) + } + return a.join(", ") + "
" + Zo(n + " : " + i) + }, + getTooltipPosition: function (t) { + if (null != t) { + var e = this.getData().getName(t), i = this.coordinateSystem, n = i.getRegion(e); + return n && i.dataToPoint(n.center) + } + }, + setZoom: function (t) { + this.option.zoom = t + }, + setCenter: function (t) { + this.option.center = t + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "geo", + map: "", + left: "center", + top: "center", + aspectScale: .75, + showLegendSymbol: !0, + dataRangeHoverLink: !0, + boundingCoords: null, + center: null, + zoom: 1, + scaleLimit: null, + label: {show: !1, color: "#000"}, + itemStyle: {borderWidth: .5, borderColor: "#444", areaColor: "#eee"}, + emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {areaColor: "rgba(255,215,0,0.8)"}} + } + }); + h(yA, YD); + var xA = "\0_ec_interaction_mutex"; + cs({type: "takeGlobalCursor", event: "globalCursorTaken", update: "update"}, function () { + }), h(kh, D_); + var _A = {axisPointer: 1, tooltip: 1, brush: 1}; + Uh.prototype = { + constructor: Uh, draw: function (t, e, i, n, o) { + var a = "geo" === t.mainType, r = t.getData && t.getData(); + a && e.eachComponent({mainType: "series", subType: "map"}, function (e) { + r || e.getHostGeoModel() !== t || (r = e.getData()) + }); + var s = t.coordinateSystem, l = this.group, u = s.scale, h = {position: s.position, scale: u}; + !l.childAt(0) || o ? l.attr(h) : fo(l, h, t), l.removeAll(); + var c = ["itemStyle"], f = ["emphasis", "itemStyle"], p = ["label"], g = ["emphasis", "label"], m = R(); + d(s.regions, function (e) { + var i = m.get(e.name) || m.set(e.name, new sw), n = new AS({shape: {paths: []}}); + i.add(n); + var o, s = (C = t.getRegionModel(e.name) || t).getModel(c), h = C.getModel(f), v = Fh(s), y = Fh(h), + x = C.getModel(p), _ = C.getModel(g); + if (r) { + o = r.indexOfName(e.name); + var w = r.getItemVisual(o, "color", !0); + w && (v.fill = w) + } + d(e.geometries, function (t) { + if ("polygon" === t.type) { + n.shape.paths.push(new wS({shape: {points: t.exterior}})); + for (var e = 0; e < (t.interiors ? t.interiors.length : 0); e++) n.shape.paths.push(new wS({shape: {points: t.interiors[e]}})) + } + }), n.setStyle(v), n.style.strokeNoScale = !0, n.culling = !0; + var b = x.get("show"), S = _.get("show"), M = r && isNaN(r.get(r.mapDimension("value"), o)), + I = r && r.getItemLayout(o); + if (a || M && (b || S) || I && I.showLabel) { + var T, D = a ? e.name : o; + (!r || o >= 0) && (T = t); + var A = new fS({position: e.center.slice(), scale: [1 / u[0], 1 / u[1]], z2: 10, silent: !0}); + io(A.style, A.hoverStyle = {}, x, _, { + labelFetcher: T, + labelDataIndex: D, + defaultText: e.name, + useInsideStyle: !1 + }, {textAlign: "center", textVerticalAlign: "middle"}), i.add(A) + } + if (r) r.setItemGraphicEl(o, 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), eo(i, y, {hoverSilentOnTouch: !!t.get("selectedMode")}), l.add(i) + }), this._updateController(t, e, i), Hh(this, t, l, i, n), Zh(t, l) + }, remove: function () { + this.group.removeAll(), this._controller.dispose(), this._controllerHost = {} + }, _updateController: function (t, e, i) { + function n() { + var e = {type: "geoRoam", componentType: l}; + return e[l + "Id"] = t.id, e + } + + var o = t.coordinateSystem, r = this._controller, s = this._controllerHost; + s.zoomLimit = t.get("scaleLimit"), s.zoom = o.getZoom(), r.enable(t.get("roam") || !1); + var l = t.mainType; + r.off("pan").on("pan", function (t, e) { + this._mouseDownFlag = !1, Vh(s, t, e), i.dispatchAction(a(n(), {dx: t, dy: e})) + }, this), r.off("zoom").on("zoom", function (t, e, o) { + if (this._mouseDownFlag = !1, Gh(s, t, e, o), i.dispatchAction(a(n(), { + zoom: t, + originX: e, + originY: o + })), this._updateGroup) { + var r = this.group, l = r.scale; + r.traverse(function (t) { + "text" === t.type && t.attr("scale", [1 / l[0], 1 / l[1]]) + }) + } + }, this), r.setPointerChecker(function (e, n, a) { + return o.getViewRectAfterRoam().contain(n, a) && !Wh(e, i, t) + }) + } + }, _s({ + type: "map", render: function (t, e, i, n) { + if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) { + var o = this.group; + if (o.removeAll(), !t.getHostGeoModel()) { + if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id) (a = this._mapDraw) && o.add(a.group); else if (t.needsDrawMap) { + var a = this._mapDraw || new Uh(i, !0); + o.add(a.group), a.draw(t, e, i, this, n), this._mapDraw = a + } 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, o = this.group; + n.each(n.mapDimension("value"), function (e, i) { + if (!isNaN(e)) { + var a = n.getItemLayout(i); + if (a && a.point) { + var r = a.point, s = a.offset, l = new pS({ + 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 u = t.mainSeries.getData(), h = n.getName(i), c = u.indexOfName(h), + d = n.getItemModel(i), f = d.getModel("label"), p = d.getModel("emphasis.label"), + g = u.getItemGraphicEl(c), m = D(t.getFormattedLabel(i, "normal"), h), + v = D(t.getFormattedLabel(i, "emphasis"), m), y = function () { + var t = no({}, p, {text: p.get("show") ? v : null}, { + isRectText: !0, + useInsideStyle: !1 + }, !0); + l.style.extendFrom(t), l.__mapOriginalZ2 = l.z2, l.z2 += 1 + }, x = function () { + no(l.style, f, { + text: f.get("show") ? m : null, + textPosition: f.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() + } + o.add(l) + } + } + }) + } + }), cs({type: "geoRoam", event: "geoRoam", update: "updateTransform"}, 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 o = Xh(n, t, e.get("scaleLimit")); + e.setCenter && e.setCenter(o.center), e.setZoom && e.setZoom(o.zoom), "series" === i && d(e.seriesGroup, function (t) { + t.setCenter(o.center), t.setZoom(o.zoom) + }) + } + }) + }); + fs(function (t) { + var e = {}; + t.eachSeriesByType("map", function (i) { + var n = i.getMapType(); + if (!i.getHostGeoModel() && !e[n]) { + var o = {}; + d(i.seriesGroup, function (e) { + var i = e.coordinateSystem, n = e.originalData; + e.get("showLegendSymbol") && t.getComponent("legend") && n.each(n.mapDimension("value"), function (t, e) { + var a = n.getName(e), r = i.getRegion(a); + if (r && !isNaN(t)) { + var s = o[a] || 0, l = i.dataToPoint(r.center); + o[a] = s + 1, n.setItemLayout(e, {point: l, offset: s}) + } + }) + }); + var a = i.getData(); + a.each(function (t) { + var e = a.getName(t), i = a.getItemLayout(t) || {}; + i.showLabel = !o[e], a.setItemLayout(t, i) + }), e[n] = !0 + } + }) + }), ps(function (t) { + t.eachSeriesByType("map", function (t) { + var e = t.get("color"), i = t.getModel("itemStyle"), n = i.get("areaColor"), + o = i.get("color") || e[t.seriesIndex % e.length]; + t.getData().setVisual({areaColor: n, color: o}) + }) + }), hs(LI.PROCESSOR.STATISTIC, 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) + }), d(e, function (t, e) { + for (var i = jh(f(t, function (t) { + return t.getData() + }), t[0].get("mapValueCalculation")), n = 0; n < t.length; n++) t[n].originalData = t[n].getData(); + for (n = 0; n < t.length; n++) t[n].seriesGroup = t, t[n].needsDrawMap = 0 === n && !t[n].getHostGeoModel(), t[n].setData(i.cloneShallow()), t[n].mainSeries = t[0] + }) + }), us(function (t) { + var e = []; + d(t.series, function (t) { + t && "map" === t.type && (e.push(t), t.map = t.map || t.mapType, r(t, t.mapLocation)) + }) + }), $D("map", [{type: "mapToggleSelect", event: "mapselectchanged", method: "toggleSelected"}, { + type: "mapSelect", + event: "mapselected", + method: "select" + }, {type: "mapUnSelect", event: "mapunselected", method: "unSelect"}]); + var wA = d, bA = "\0__link_datas", SA = "\0__link_mainData", MA = 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 + }; + MA.prototype = { + constructor: MA, isRemoved: function () { + return this.dataIndex < 0 + }, eachNode: function (t, e, i) { + "function" == typeof t && (i = e, e = t, t = null), _(t = t || {}) && (t = {order: t}); + var n, o = t.order || "preorder", a = this[t.attr || "children"]; + "preorder" === o && (n = e.call(i, this)); + for (var r = 0; !n && r < a.length; r++) a[r].eachNode(t, e, i); + "postorder" === o && 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 o = i[e].getNodeById(t); + if (o) return o + } + }, contains: function (t) { + if (t === this) return !0; + for (var e = 0, i = this.children, n = i.length; e < n; e++) { + var o = i[e].contains(t); + if (o) return o + } + }, 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), o = this.getLevelModel(); + return o || 0 !== this.children.length && (0 === this.children.length || !1 !== this.isExpand) || (e = this.getLeavesModel()), n.getModel(t, (o || 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) + }, isAncestorOf: function (t) { + for (var e = t.parentNode; e;) { + if (e === this) return !0; + e = e.parentNode + } + return !1 + }, isDescendantOf: function (t) { + return t !== this && t.isAncestorOf(this) + } + }, ic.prototype = { + constructor: ic, 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 (var i = 0, n = t.count(); i < n; i++) e[t.getRawIndex(i)].dataIndex = i + }, clearLayouts: function () { + this.data.clearItemLayouts() + } + }, ic.createTree = function (t, e, i) { + function n(t, e) { + var i = t.value; + r = Math.max(r, y(i) ? i.length : 1), a.push(t); + var s = new MA(t.name, o); + e ? nc(s, e) : o.root = s, o._nodes.push(s); + var l = t.children; + if (l) for (var u = 0; u < l.length; u++) n(l[u], s) + } + + var o = new ic(e, i.levels, i.leaves), a = [], r = 1; + n(t), o.root.updateDepthAndHeight(0); + var s = hT(a, {coordDimensions: ["value"], dimensionsCount: r}), l = new sT(s, e); + return l.initData(a), Yh({mainData: l, struct: o, structAttr: "tree"}), o.update(), o + }, KM.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 o = ic.createTree(e, this, n), a = 0; + o.eachNode("preorder", function (t) { + t.depth > a && (a = t.depth) + }); + var r = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : a; + return o.root.eachNode("preorder", function (t) { + var e = t.hostTree.data.getRawDataItem(t.dataIndex); + t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= r + }), o.data + }, + getOrient: function () { + var t = this.get("orient"); + return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"), t + }, + formatTooltip: function (t) { + for (var e = this.getData().tree, i = e.root.children[0], n = e.getNodeByDataIndex(t), o = n.getValue(), a = n.name; n && n !== i;) a = n.parentNode.name + "." + a, n = n.parentNode; + return Zo(a + (isNaN(o) || null == o ? "" : " : " + o)) + }, + defaultOption: { + zlevel: 0, + z: 2, + left: "12%", + top: "12%", + right: "12%", + bottom: "12%", + layout: "orthogonal", + orient: "LR", + symbol: "emptyCircle", + symbolSize: 7, + expandAndCollapse: !0, + initialTreeDepth: 2, + lineStyle: {color: "#ccc", width: 1.5, curveness: .5}, + itemStyle: {color: "lightsteelblue", borderColor: "#c23531", borderWidth: 1.5}, + label: {show: !0, color: "#555"}, + leaves: {label: {show: !0}}, + animationEasing: "linear", + animationDuration: 700, + animationDurationUpdate: 1e3 + } + }), _s({ + type: "tree", init: function (t, e) { + this._oldTree, this._mainGroup = new sw, this.group.add(this._mainGroup) + }, render: function (t, e, i, n) { + var o = t.getData(), a = t.layoutInfo, r = this._mainGroup, s = t.get("layout"); + "radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]); + var l = this._data, u = { + expandAndCollapse: t.get("expandAndCollapse"), + layout: s, + orient: t.getOrient(), + curvature: t.get("lineStyle.curveness"), + symbolRotate: t.get("symbolRotate"), + symbolOffset: t.get("symbolOffset"), + hoverAnimation: t.get("hoverAnimation"), + useNameLabel: !0, + fadeIn: !0 + }; + o.diff(l).add(function (e) { + vc(o, e) && xc(o, e, null, r, t, u) + }).update(function (e, i) { + var n = l.getItemGraphicEl(i); + vc(o, e) ? xc(o, e, n, r, t, u) : n && _c(l, i, n, r, t, u) + }).remove(function (e) { + var i = l.getItemGraphicEl(e); + i && _c(l, e, i, r, t, u) + }).execute(), !0 === u.expandAndCollapse && o.eachItemGraphicEl(function (e, n) { + e.off("click").on("click", function () { + i.dispatchAction({type: "treeExpandAndCollapse", seriesId: t.id, dataIndex: n}) + }) + }), this._data = o + }, dispose: function () { + }, remove: function () { + this._mainGroup.removeAll(), this._data = null + } + }), cs({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 + }) + }); + ps(gD("tree", "circle")), fs(function (t, e) { + t.eachSeriesByType("tree", function (t) { + Mc(t, e) + }) + }), KM.extend({ + type: "series.treemap", layoutMode: "box", dependencies: ["grid", "polar"], _viewRoot: null, defaultOption: { + progressive: 0, + hoverLayerThreshold: 1 / 0, + left: "center", + top: "middle", + right: null, + bottom: null, + width: "80%", + height: "80%", + sort: !0, + clipWindow: "origin", + squareRatio: .5 * (1 + Math.sqrt(5)), + leafDepth: null, + drillDownIcon: "▶", + zoomToNodeRatio: .1024, + roam: !0, + nodeClick: "zoomToNode", + animation: !0, + animationDurationUpdate: 900, + animationEasing: "quinticInOut", + breadcrumb: { + show: !0, + height: 22, + left: "center", + top: "bottom", + emptyItemWidth: 25, + itemStyle: { + color: "rgba(0,0,0,0.7)", + borderColor: "rgba(255,255,255,0.7)", + borderWidth: 1, + shadowColor: "rgba(150,150,150,1)", + shadowBlur: 3, + shadowOffsetX: 0, + shadowOffsetY: 0, + textStyle: {color: "#fff"} + }, + emphasis: {textStyle: {}} + }, + label: {show: !0, distance: 0, padding: 5, position: "inside", color: "#fff", ellipsis: !0}, + upperLabel: { + show: !1, + position: [0, "50%"], + height: 20, + color: "#fff", + ellipsis: !0, + verticalAlign: "middle" + }, + itemStyle: { + color: null, + colorAlpha: null, + colorSaturation: null, + borderWidth: 0, + gapWidth: 0, + borderColor: "#fff", + borderColorSaturation: null + }, + emphasis: { + upperLabel: { + show: !0, + position: [0, "50%"], + color: "#fff", + ellipsis: !0, + verticalAlign: "middle" + } + }, + visualDimension: 0, + visualMin: null, + visualMax: null, + color: [], + colorAlpha: null, + colorSaturation: null, + colorMappingBy: "index", + visibleMin: 10, + childrenVisibleMin: null, + levels: [] + }, getInitialData: function (t, e) { + var i = {name: t.name, children: t.data}; + Cc(i); + var n = t.levels || []; + n = t.levels = Lc(n, e); + var o = {}; + return o.levels = n, ic.createTree(i, this, o).data + }, optionUpdated: function () { + this.resetViewRoot() + }, formatTooltip: function (t) { + var e = this.getData(), i = this.getRawValue(t), n = Fo(y(i) ? i[0] : i); + return Zo(e.getName(t) + ": " + n) + }, getDataParams: function (t) { + var e = KM.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); + return e.treePathInfo = Ac(i, this), e + }, setLayoutInfo: function (t) { + this.layoutInfo = this.layoutInfo || {}, a(this.layoutInfo, t) + }, mapIdToIndex: function (t) { + var e = this._idIndexMap; + e || (e = this._idIndexMap = R(), this._idIndexMapCount = 0); + var i = e.get(t); + return null == i && e.set(t, i = this._idIndexMapCount++), i + }, getViewRoot: function () { + return this._viewRoot + }, resetViewRoot: function (t) { + t ? this._viewRoot = t : t = this._viewRoot; + var e = this.getRawData().tree.root; + t && (t === e || e.contains(t)) || (this._viewRoot = e) + } + }); + var IA = 5; + kc.prototype = { + constructor: kc, render: function (t, e, i, n) { + var o = t.getModel("breadcrumb"), a = this.group; + if (a.removeAll(), o.get("show") && i) { + var r = o.getModel("itemStyle"), s = r.getModel("textStyle"), l = { + pos: {left: o.get("left"), right: o.get("right"), top: o.get("top"), bottom: o.get("bottom")}, + box: {width: e.getWidth(), height: e.getHeight()}, + emptyItemWidth: o.get("emptyItemWidth"), + totalWidth: 0, + renderList: [] + }; + this._prepare(i, l, s), this._renderContent(t, l, r, s, n), ta(a, l.pos, l.box) + } + }, _prepare: function (t, e, i) { + for (var n = t; n; n = n.parentNode) { + var o = n.getModel().get("name"), a = i.getTextRect(o), r = Math.max(a.width + 16, e.emptyItemWidth); + e.totalWidth += r + 8, e.renderList.push({node: n, text: o, width: r}) + } + }, _renderContent: function (t, e, i, n, o) { + for (var a = 0, s = e.emptyItemWidth, l = t.get("breadcrumb.height"), u = Jo(e.pos, e.box), h = e.totalWidth, c = e.renderList, d = c.length - 1; d >= 0; d--) { + var f = c[d], p = f.node, g = f.width, m = f.text; + h > u.width && (h -= g - s, g = s, m = null); + var y = new wS({ + shape: {points: Pc(a, 0, g, l, d === c.length - 1, 0 === d)}, + style: r(i.getItemStyle(), { + lineJoin: "bevel", + text: m, + textFill: n.getTextColor(), + textFont: n.getFont() + }), + z: 10, + onclick: v(o, p) + }); + this.group.add(y), Nc(y, t, p), a += g + 8 + } + }, remove: function () { + this.group.removeAll() + } + }; + var TA = m, DA = sw, AA = SS, CA = d, LA = ["label"], kA = ["emphasis", "label"], PA = ["upperLabel"], + NA = ["emphasis", "upperLabel"], OA = 10, EA = 1, RA = 2, + zA = sb([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + BA = function (t) { + var e = zA(t); + return e.stroke = e.fill = e.lineWidth = null, e + }; + _s({ + type: "treemap", init: function (t, e) { + this._containerGroup, this._storage = { + nodeGroup: [], + background: [], + content: [] + }, this._oldTree, this._breadcrumb, this._controller, this._state = "ready" + }, render: function (t, e, i, n) { + if (!(l(e.findComponents({mainType: "series", subType: "treemap", query: n}), t) < 0)) { + this.seriesModel = t, this.api = i, this.ecModel = e; + var o = Ic(n, ["treemapZoomToNode", "treemapRootToNode"], t), a = n && n.type, r = t.layoutInfo, + s = !this._oldTree, u = this._storage, h = "treemapRootToNode" === a && o && u ? { + rootNodeGroup: u.nodeGroup[o.node.getRawIndex()], + direction: n.direction + } : null, c = this._giveContainerGroup(r), d = this._doRender(c, t, h); + s || a && "treemapZoomToNode" !== a && "treemapRootToNode" !== a ? d.renderFinally() : this._doAnimation(c, d, t, h), this._resetController(i), this._renderBreadcrumb(t, i, o) + } + }, _giveContainerGroup: function (t) { + var e = this._containerGroup; + return e || (e = this._containerGroup = new DA, this._initEvents(e), this.group.add(e)), e.attr("position", [t.x, t.y]), e + }, _doRender: function (t, e, i) { + function n(t, e, i, o, a) { + function r(t) { + return t.getId() + } + + function s(r, s) { + var l = null != r ? t[r] : null, u = null != s ? e[s] : null, c = h(l, u, i, a); + c && n(l && l.viewChildren || [], u && u.viewChildren || [], c, o, a + 1) + } + + o ? (e = t, CA(t, function (t, e) { + !t.isRemoved() && s(e, e) + })) : new Ss(e, t, r, r).add(s).update(s).remove(v(s, null)).execute() + } + + var o = e.getData().tree, a = this._oldTree, r = {nodeGroup: [], background: [], content: []}, + s = {nodeGroup: [], background: [], content: []}, l = this._storage, u = [], + h = v(Ec, e, s, l, i, r, u); + n(o.root ? [o.root] : [], a && a.root ? [a.root] : [], t, o === a || !a, 0); + var c = function (t) { + var e = {nodeGroup: [], background: [], content: []}; + return t && CA(t, function (t, i) { + var n = e[i]; + CA(t, function (t) { + t && (n.push(t), t.__tmWillDelete = 1) + }) + }), e + }(l); + return this._oldTree = o, this._storage = s, { + lastsForAnimation: r, + willDeleteEls: c, + renderFinally: function () { + CA(c, function (t) { + CA(t, function (t) { + t.parent && t.parent.remove(t) + }) + }), CA(u, function (t) { + t.invisible = !0, t.dirty() + }) + } + } + }, _doAnimation: function (t, e, i, n) { + if (i.get("animation")) { + var o = i.get("animationDurationUpdate"), r = i.get("animationEasing"), s = Oc(); + CA(e.willDeleteEls, function (t, e) { + CA(t, function (t, i) { + if (!t.invisible) { + var a, l = t.parent; + if (n && "drillDown" === n.direction) a = l === n.rootNodeGroup ? { + shape: { + x: 0, + y: 0, + width: l.__tmNodeWidth, + height: l.__tmNodeHeight + }, style: {opacity: 0} + } : {style: {opacity: 0}}; else { + var u = 0, h = 0; + l.__tmWillDelete || (u = l.__tmNodeWidth / 2, h = l.__tmNodeHeight / 2), a = "nodeGroup" === e ? { + position: [u, h], + style: {opacity: 0} + } : {shape: {x: u, y: h, width: 0, height: 0}, style: {opacity: 0}} + } + a && s.add(t, a, o, r) + } + }) + }), CA(this._storage, function (t, i) { + CA(t, function (t, n) { + var l = e.lastsForAnimation[i][n], u = {}; + l && ("nodeGroup" === i ? l.old && (u.position = t.position.slice(), t.attr("position", l.old)) : (l.old && (u.shape = a({}, t.shape), t.setShape(l.old)), l.fadein ? (t.setStyle("opacity", 0), u.style = {opacity: 1}) : 1 !== t.style.opacity && (u.style = {opacity: 1})), s.add(t, u, o, r)) + }) + }, this), this._state = "animating", s.done(TA(function () { + this._state = "ready", e.renderFinally() + }, this)).start() + } + }, _resetController: function (t) { + var e = this._controller; + e || ((e = this._controller = new kh(t.getZr())).enable(this.seriesModel.get("roam")), e.on("pan", TA(this._onPan, this)), e.on("zoom", TA(this._onZoom, this))); + var i = new $t(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 o = n.getLayout(); + if (!o) return; + var a = new $t(o.x, o.y, o.width, o.height), r = this.seriesModel.layoutInfo; + e -= r.x, i -= r.y; + var s = st(); + ct(s, s, [-e, -i]), ft(s, s, [t, t]), ct(s, s, [e, i]), a.applyTransform(s), this.api.dispatchAction({ + type: "treemapRender", + from: this.uid, + seriesId: this.seriesModel.id, + rootRect: {x: a.x, y: a.y, width: a.width, height: a.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 o = n.hostTree.data.getItemModel(n.dataIndex), a = o.get("link", !0), + r = o.get("target", !0) || "blank"; + a && window.open(a, 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 kc(this.group))).render(t, e, i.node, TA(function (e) { + "animating" !== this._state && (Dc(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 o = this._storage.background[n.getRawIndex()]; + if (o) { + var a = o.transformCoordToLocal(t, e), r = o.shape; + if (!(r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height)) return !1; + i = {node: n, offsetX: a[0], offsetY: a[1]} + } + }, this), i + } + }); + for (var VA = ["treemapZoomToNode", "treemapRender", "treemapMove"], GA = 0; GA < VA.length; GA++) cs({ + type: VA[GA], + update: "updateView" + }, function () { + }); + cs({type: "treemapRootToNode", update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "treemap", query: t}, function (e, i) { + var n = Ic(t, ["treemapZoomToNode", "treemapRootToNode"], e); + if (n) { + var o = e.getViewRoot(); + o && (t.direction = Dc(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node) + } + }) + }); + var WA = d, FA = w, HA = -1, ZA = function (t) { + var e = t.mappingMethod, n = t.type, o = this.option = i(t); + this.type = n, this.mappingMethod = e, this._normalizeData = XA[e]; + var a = UA[n]; + this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._doMap = a._doMap[e], "piecewise" === e ? (Vc(o), zc(o)) : "category" === e ? o.categories ? Bc(o) : Vc(o, !0) : (k("linear" !== e || o.dataExtent), Vc(o)) + }; + ZA.prototype = { + constructor: ZA, mapValueToVisual: function (t) { + var e = this._normalizeData(t); + return this._doMap(e, t) + }, getNormalizer: function () { + return m(this._normalizeData, this) + } + }; + var UA = ZA.visualHandlers = { + color: { + applyVisual: Fc("color"), getColorMapper: function () { + var t = this.option; + return m("category" === t.mappingMethod ? function (t, e) { + return !e && (t = this._normalizeData(t)), Hc.call(this, t) + } : function (e, i, n) { + var o = !!n; + return !i && (e = this._normalizeData(e)), n = Nt(e, t.parsedVisual, n), o ? n : zt(n, "rgba") + }, this) + }, _doMap: { + linear: function (t) { + return zt(Nt(t, this.option.parsedVisual), "rgba") + }, category: Hc, piecewise: function (t, e) { + var i = Xc.call(this, e); + return null == i && (i = zt(Nt(t, this.option.parsedVisual), "rgba")), i + }, fixed: Zc + } + }, + colorHue: Gc(function (t, e) { + return Et(t, e) + }), + colorSaturation: Gc(function (t, e) { + return Et(t, null, e) + }), + colorLightness: Gc(function (t, e) { + return Et(t, null, null, e) + }), + colorAlpha: Gc(function (t, e) { + return Rt(t, e) + }), + opacity: {applyVisual: Fc("opacity"), _doMap: Uc([0, 1])}, + liftZ: {applyVisual: Fc("liftZ"), _doMap: {linear: Zc, category: Zc, piecewise: Zc, fixed: Zc}}, + symbol: { + applyVisual: function (t, e, i) { + var n = this.mapValueToVisual(t); + if (_(n)) i("symbol", n); else if (FA(n)) for (var o in n) n.hasOwnProperty(o) && i(o, n[o]) + }, _doMap: { + linear: Wc, category: Hc, piecewise: function (t, e) { + var i = Xc.call(this, e); + return null == i && (i = Wc.call(this, t)), i + }, fixed: Zc + } + }, + symbolSize: {applyVisual: Fc("symbolSize"), _doMap: Uc([0, 1])} + }, XA = { + linear: function (t) { + return To(t, this.option.dataExtent, [0, 1], !0) + }, piecewise: function (t) { + var e = this.option.pieceList, i = ZA.findPieceIndex(t, e, !0); + if (null != i) return To(i, [0, e.length - 1], [0, 1], !0) + }, category: function (t) { + var e = this.option.categories ? this.option.categoryMap[t] : t; + return null == e ? HA : e + }, fixed: B + }; + ZA.listVisualTypes = function () { + var t = []; + return d(UA, function (e, i) { + t.push(i) + }), t + }, ZA.addVisualHandler = function (t, e) { + UA[t] = e + }, ZA.isValidType = function (t) { + return UA.hasOwnProperty(t) + }, ZA.eachVisual = function (t, e, i) { + w(t) ? d(t, e, i) : e.call(i, t) + }, ZA.mapVisual = function (t, e, i) { + var n, o = y(t) ? [] : w(t) ? {} : (n = !0, null); + return ZA.eachVisual(t, function (t, a) { + var r = e.call(i, t, a); + n ? o = r : o[a] = r + }), o + }, ZA.retrieveVisuals = function (t) { + var e, i = {}; + return t && WA(UA, function (n, o) { + t.hasOwnProperty(o) && (i[o] = t[o], e = !0) + }), e ? i : null + }, ZA.prepareVisualTypes = function (t) { + if (FA(t)) { + var e = []; + WA(t, function (t, i) { + e.push(i) + }), t = e + } else { + if (!y(t)) return []; + t = t.slice() + } + return t.sort(function (t, e) { + return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1 + }), t + }, ZA.dependsOn = function (t, e) { + return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e + }, ZA.findPieceIndex = function (t, e, i) { + function n(e, i) { + var n = Math.abs(e - t); + n < a && (a = n, o = i) + } + + for (var o, a = 1 / 0, r = 0, s = e.length; r < s; r++) { + var l = e[r].value; + if (null != l) { + if (l === t || "string" == typeof l && l === t + "") return r; + i && n(l, r) + } + } + for (var r = 0, s = e.length; r < s; r++) { + var u = e[r], h = u.interval, c = u.close; + if (h) { + if (h[0] === -1 / 0) { + if (Yc(c[1], t, h[1])) return r + } else if (h[1] === 1 / 0) { + if (Yc(c[0], h[0], t)) return r + } else if (Yc(c[0], h[0], t) && Yc(c[1], t, h[1])) return r; + i && n(h[0], r), i && n(h[1], r) + } + } + if (i) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : o + }; + var jA = y, YA = "itemStyle", qA = { + seriesType: "treemap", reset: function (t, e, i, n) { + var o = t.getData().tree, a = o.root, r = t.getModel(YA); + a.isRemoved() || qc(a, {}, f(o.levelModels, function (t) { + return t ? t.get(YA) : null + }), r, t.getViewRoot().getAncestors(), t) + } + }, KA = Math.max, $A = Math.min, JA = T, QA = d, tC = ["itemStyle", "borderWidth"], eC = ["itemStyle", "gapWidth"], + iC = ["upperLabel", "show"], nC = ["upperLabel", "height"], oC = { + seriesType: "treemap", reset: function (t, e, i, n) { + var o = i.getWidth(), r = i.getHeight(), s = t.option, + l = Qo(t.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}), u = s.size || [], + h = Do(JA(l.width, u[0]), o), c = Do(JA(l.height, u[1]), r), d = n && n.type, + f = Ic(n, ["treemapZoomToNode", "treemapRootToNode"], t), + p = "treemapRender" === d || "treemapMove" === d ? n.rootRect : null, g = t.getViewRoot(), m = Tc(g); + if ("treemapMove" !== d) { + var v = "treemapZoomToNode" === d ? hd(t, f, g, h, c) : p ? [p.width, p.height] : [h, c], y = s.sort; + y && "asc" !== y && "desc" !== y && (y = "desc"); + var x = {squareRatio: s.squareRatio, sort: y, leafDepth: s.leafDepth}; + g.hostTree.clearLayouts(); + _ = {x: 0, y: 0, width: v[0], height: v[1], area: v[0] * v[1]}; + g.setLayout(_), nd(g, x, !1, 0); + var _ = g.getLayout(); + QA(m, function (t, e) { + var i = (m[e + 1] || g).getValue(); + t.setLayout(a({dataExtent: [i, i], borderWidth: 0, upperHeight: 0}, _)) + }) + } + var w = t.getData().tree.root; + w.setLayout(cd(l, p, f), !0), t.setLayoutInfo(l), dd(w, new $t(-l.x, -l.y, o, r), m, g, 0) + } + }; + ps(qA), fs(oC); + var aC = function (t) { + this._directed = t || !1, this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this.data, this.edgeData + }, rC = aC.prototype; + rC.type = "graph", rC.isDirected = function () { + return this._directed + }, rC.addNode = function (t, e) { + t = t || "" + e; + var i = this._nodesMap; + if (!i[pd(t)]) { + var n = new gd(t, e); + return n.hostGraph = this, this.nodes.push(n), i[pd(t)] = n, n + } + }, rC.getNodeByIndex = function (t) { + var e = this.data.getRawIndex(t); + return this.nodes[e] + }, rC.getNodeById = function (t) { + return this._nodesMap[pd(t)] + }, rC.addEdge = function (t, e, i) { + var n = this._nodesMap, o = this._edgesMap; + if ("number" == typeof t && (t = this.nodes[t]), "number" == typeof e && (e = this.nodes[e]), gd.isInstance(t) || (t = n[pd(t)]), gd.isInstance(e) || (e = n[pd(e)]), t && e) { + var a = t.id + "-" + e.id; + if (!o[a]) { + var r = new md(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), o[a] = r, r + } + } + }, rC.getEdgeByIndex = function (t) { + var e = this.edgeData.getRawIndex(t); + return this.edges[e] + }, rC.getEdge = function (t, e) { + gd.isInstance(t) && (t = t.id), gd.isInstance(e) && (e = e.id); + var i = this._edgesMap; + return this._directed ? i[t + "-" + e] : i[t + "-" + e] || i[e + "-" + t] + }, rC.eachNode = function (t, e) { + for (var i = this.nodes, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && t.call(e, i[o], o) + }, rC.eachEdge = function (t, e) { + for (var i = this.edges, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && i[o].node1.dataIndex >= 0 && i[o].node2.dataIndex >= 0 && t.call(e, i[o], o) + }, rC.breadthFirstTraverse = function (t, e, i, n) { + if (gd.isInstance(e) || (e = this._nodesMap[pd(e)]), e) { + for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", a = 0; a < this.nodes.length; a++) this.nodes[a].__visited = !1; + if (!t.call(n, e, null)) for (var r = [e]; r.length;) for (var s = r.shift(), l = s[o], a = 0; a < l.length; a++) { + var u = l[a], h = u.node1 === s ? u.node2 : u.node1; + if (!h.__visited) { + if (t.call(n, h, s)) return; + r.push(h), h.__visited = !0 + } + } + } + }, rC.update = function () { + for (var t = this.data, e = this.edgeData, i = this.nodes, n = this.edges, o = 0, a = i.length; o < a; o++) i[o].dataIndex = -1; + for (var o = 0, a = t.count(); o < a; o++) i[t.getRawIndex(o)].dataIndex = o; + e.filterSelf(function (t) { + var i = n[e.getRawIndex(t)]; + return i.node1.dataIndex >= 0 && i.node2.dataIndex >= 0 + }); + for (var o = 0, a = n.length; o < a; o++) n[o].dataIndex = -1; + for (var o = 0, a = e.count(); o < a; o++) n[e.getRawIndex(o)].dataIndex = o + }, rC.clone = function () { + for (var t = new aC(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 o = i[n]; + t.addEdge(o.node1.id, o.node2.id, o.dataIndex) + } + return t + }, gd.prototype = { + constructor: gd, 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) + } + }, md.prototype.getModel = function (t) { + if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t) + }; + var sC = 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) + } + } + }; + h(gd, sC("hostGraph", "data")), h(md, sC("hostGraph", "edgeData")), aC.Node = gd, aC.Edge = md, Wi(gd), Wi(md); + var lC = function (t, e, i, n, o) { + for (var a = new aC(n), r = 0; r < t.length; r++) a.addNode(T(t[r].id, t[r].name, r), r); + for (var s = [], u = [], h = 0, r = 0; r < e.length; r++) { + var c = e[r], d = c.source, f = c.target; + a.addEdge(d, f, h) && (u.push(c), s.push(T(c.id, d + " > " + f)), h++) + } + var p, g = i.get("coordinateSystem"); + if ("cartesian2d" === g || "polar" === g) p = Xs(t, i); else { + var m = Ca.get(g), v = m && "view" !== m.type ? m.dimensions || [] : []; + l(v, "value") < 0 && v.concat(["value"]); + var y = hT(t, {coordDimensions: v}); + (p = new sT(y, i)).initData(t) + } + var x = new sT(["value"], i); + return x.initData(u, s), o && o(p, x), Yh({ + mainData: p, + struct: a, + structAttr: "graph", + datas: {node: p, edge: x}, + datasAttr: {node: "data", edge: "edgeData"} + }), a.update(), a + }, uC = xs({ + type: "series.graph", + init: function (t) { + uC.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this._categoriesData + }, this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData() + }, + mergeOption: function (t) { + uC.superApply(this, "mergeOption", arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData() + }, + mergeDefaultAndTheme: function (t) { + uC.superApply(this, "mergeDefaultAndTheme", arguments), Mi(t, ["edgeLabel"], ["show"]) + }, + getInitialData: function (t, e) { + var i = t.edges || t.links || [], n = t.data || t.nodes || [], o = this; + if (n && i) return lC(n, i, this, !0, function (t, i) { + function n(t) { + return (t = this.parsePath(t)) && "label" === t[0] ? r : t && "emphasis" === t[0] && "label" === t[1] ? l : this.parentModel + } + + t.wrapMethod("getItemModel", function (t) { + var e = o._categoriesModels[t.getShallow("category")]; + return e && (e.parentModel = t.parentModel, t.parentModel = e), t + }); + var a = o.getModel("edgeLabel"), r = new wo({label: a.option}, a.parentModel, e), + s = o.getModel("emphasis.edgeLabel"), l = new wo({emphasis: {label: s.option}}, s.parentModel, e); + i.wrapMethod("getItemModel", function (t) { + return t.customizeGetParent(n), 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(), o = this.getDataParams(t, i), a = n.graph.getEdgeByIndex(t), + r = n.getName(a.node1.dataIndex), s = n.getName(a.node2.dataIndex), l = []; + return null != r && l.push(r), null != s && l.push(s), l = Zo(l.join(" > ")), o.value && (l += " : " + Zo(o.value)), l + } + return uC.superApply(this, "formatTooltip", arguments) + }, + _updateCategoriesData: function () { + var t = f(this.option.categories || [], function (t) { + return null != t.value ? t : a({value: 0}, t) + }), e = new sT(["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 uC.superCall(this, "isAnimationEnabled") && !("force" === this.get("layout") && this.get("force.layoutAnimation")) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "view", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + focusNodeAdjacency: !1, + circular: {rotateLabel: !1}, + force: {initLayout: null, repulsion: [0, 50], gravity: .1, edgeLength: 30, layoutAnimation: !0}, + left: "center", + top: "center", + symbol: "circle", + symbolSize: 10, + edgeSymbol: ["none", "none"], + edgeSymbolSize: 10, + edgeLabel: {position: "middle"}, + draggable: !1, + roam: !1, + center: null, + zoom: 1, + nodeScaleRatio: .6, + label: {show: !1, formatter: "{b}"}, + itemStyle: {}, + lineStyle: {color: "#aaa", width: 1, curveness: 0, opacity: .5}, + emphasis: {label: {show: !0}} + } + }), hC = MS.prototype, cC = TS.prototype, dC = En({ + 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) { + (vd(e) ? hC : cC).buildPath(t, e) + }, + pointAt: function (t) { + return vd(this.shape) ? hC.pointAt.call(this, t) : cC.pointAt.call(this, t) + }, + tangentAt: function (t) { + var e = this.shape, i = vd(e) ? [e.x2 - e.x1, e.y2 - e.y1] : cC.tangentAt.call(this, t); + return q(i, i) + } + }), fC = ["fromSymbol", "toSymbol"], pC = bd.prototype; + pC.beforeUpdate = function () { + var t = this, e = t.childOfName("fromSymbol"), i = t.childOfName("toSymbol"), n = t.childOfName("label"); + if (e || i || !n.ignore) { + for (var o = 1, a = this.parent; a;) a.scale && (o /= a.scale[0]), a = a.parent; + var r = t.childOfName("line"); + if (this.__dirty || r.__dirty) { + var s = r.shape.percent, l = r.pointAt(0), u = r.pointAt(s), h = U([], u, l); + if (q(h, h), e && (e.attr("position", l), c = r.tangentAt(0), e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[0])), e.attr("scale", [o * s, o * s])), i) { + i.attr("position", u); + var c = r.tangentAt(1); + i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])), i.attr("scale", [o * s, o * s]) + } + if (!n.ignore) { + n.attr("position", u); + var d, f, p, g = 5 * o; + if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]], f = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[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], f = "center", p = "bottom"; + var x = -Math.atan2(c[1], c[0]); + u[0] < l[0] && (x = Math.PI + x), n.attr("rotation", x) + } else d = [-h[0] * g + l[0], -h[1] * g + l[1]], f = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle"; + n.attr({ + style: {textVerticalAlign: n.__verticalAlign || p, textAlign: n.__textAlign || f}, + position: d, + scale: [o, o] + }) + } + } + } + }, pC._createLine = function (t, e, i) { + var n = t.hostModel, o = _d(t.getItemLayout(e)); + o.shape.percent = 0, po(o, {shape: {percent: 1}}, n, e), this.add(o); + var a = new fS({name: "label"}); + this.add(a), d(fC, function (i) { + var n = xd(i, t, e); + this.add(n), this[yd(i)] = t.getItemVisual(e, i) + }, this), this._updateCommonStl(t, e, i) + }, pC.updateData = function (t, e, i) { + var n = t.hostModel, o = this.childOfName("line"), a = t.getItemLayout(e), r = {shape: {}}; + wd(r.shape, a), fo(o, r, n, e), d(fC, function (i) { + var n = t.getItemVisual(e, i), o = yd(i); + if (this[o] !== n) { + this.remove(this.childOfName(i)); + var a = xd(i, t, e); + this.add(a) + } + this[o] = n + }, this), this._updateCommonStl(t, e, i) + }, pC._updateCommonStl = function (t, e, i) { + var n = t.hostModel, o = this.childOfName("line"), a = i && i.lineStyle, s = i && i.hoverLineStyle, + l = i && i.labelModel, u = i && i.hoverLabelModel; + if (!i || t.hasItemOption) { + var h = t.getItemModel(e); + a = h.getModel("lineStyle").getLineStyle(), s = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel("label"), u = h.getModel("emphasis.label") + } + var c = t.getItemVisual(e, "color"), f = A(t.getItemVisual(e, "opacity"), a.opacity, 1); + o.useStyle(r({ + strokeNoScale: !0, + fill: "none", + stroke: c, + opacity: f + }, a)), o.hoverStyle = s, d(fC, function (t) { + var e = this.childOfName(t); + e && (e.setColor(c), e.setStyle({opacity: f})) + }, this); + var p, g, m = l.getShallow("show"), v = u.getShallow("show"), y = this.childOfName("label"); + if ((m || v) && (p = c || "#000", null == (g = n.getFormattedLabel(e, "normal", t.dataType)))) { + var x = n.getRawValue(e); + g = null == x ? t.getName(e) : isFinite(x) ? Ao(x) : x + } + var _ = m ? g : null, w = v ? D(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null, b = y.style; + null == _ && null == w || (no(y.style, l, {text: _}, {autoColor: p}), y.__textAlign = b.textAlign, y.__verticalAlign = b.textVerticalAlign, y.__position = l.get("position") || "middle"), y.hoverStyle = null != w ? { + text: w, + textFill: u.getTextColor(!0), + fontStyle: u.getShallow("fontStyle"), + fontWeight: u.getShallow("fontWeight"), + fontSize: u.getShallow("fontSize"), + fontFamily: u.getShallow("fontFamily") + } : {text: null}, y.ignore = !m && !v, eo(this) + }, pC.highlight = function () { + this.trigger("emphasis") + }, pC.downplay = function () { + this.trigger("normal") + }, pC.updateLayout = function (t, e) { + this.setLinePoints(t.getItemLayout(e)) + }, pC.setLinePoints = function (t) { + var e = this.childOfName("line"); + wd(e.shape, t), e.dirty() + }, u(bd, sw); + var gC = Sd.prototype; + gC.isPersistent = function () { + return !0 + }, gC.updateData = function (t) { + var e = this, i = e.group, n = e._lineData; + e._lineData = t, n || i.removeAll(); + var o = Td(t); + t.diff(n).add(function (i) { + Md(e, t, i, o) + }).update(function (i, a) { + Id(e, n, t, a, i, o) + }).remove(function (t) { + i.remove(n.getItemGraphicEl(t)) + }).execute() + }, gC.updateLayout = function () { + var t = this._lineData; + t && t.eachItemGraphicEl(function (e, i) { + e.updateLayout(t, i) + }, this) + }, gC.incrementalPrepareUpdate = function (t) { + this._seriesScope = Td(t), this._lineData = null, this.group.removeAll() + }, gC.incrementalUpdate = function (t, e) { + for (var i = t.start; i < t.end; i++) if (Ad(e.getItemLayout(i))) { + var n = new this._ctor(e, i, this._seriesScope); + n.traverse(function (t) { + t.isGroup || (t.incremental = t.useHoverLayer = !0) + }), this.group.add(n), e.setItemGraphicEl(i, n) + } + }, gC.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, gC._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }; + var mC = [], vC = [], yC = [], xC = Qi, _C = M_, wC = Math.abs, bC = function (t, e) { + function i(t) { + var e = t.getVisual("symbolSize"); + return e instanceof Array && (e = (e[0] + e[1]) / 2), e + } + + var n = [], o = on, a = [[], [], []], r = [[], []], s = []; + e /= 2, t.eachEdge(function (t, l) { + var u = t.getLayout(), h = t.getVisual("fromSymbol"), c = t.getVisual("toSymbol"); + u.__original || (u.__original = [W(u[0]), W(u[1])], u[2] && u.__original.push(W(u[2]))); + var d = u.__original; + if (null != u[2]) { + if (G(a[0], d[0]), G(a[1], d[2]), G(a[2], d[1]), h && "none" != h) { + var f = i(t.node1), p = Cd(a, d[0], f * e); + o(a[0][0], a[1][0], a[2][0], p, n), a[0][0] = n[3], a[1][0] = n[4], o(a[0][1], a[1][1], a[2][1], p, n), a[0][1] = n[3], a[1][1] = n[4] + } + if (c && "none" != c) { + var f = i(t.node2), p = Cd(a, d[1], f * e); + o(a[0][0], a[1][0], a[2][0], p, n), a[1][0] = n[1], a[2][0] = n[2], o(a[0][1], a[1][1], a[2][1], p, n), a[1][1] = n[1], a[2][1] = n[2] + } + G(u[0], a[0]), G(u[1], a[2]), G(u[2], a[1]) + } else { + if (G(r[0], d[0]), G(r[1], d[1]), U(s, r[1], r[0]), q(s, s), h && "none" != h) { + f = i(t.node1); + Z(r[0], r[0], s, f * e) + } + if (c && "none" != c) { + f = i(t.node2); + Z(r[1], r[1], s, -f * e) + } + G(u[0], r[0]), G(u[1], r[1]) + } + }) + }, SC = ["itemStyle", "opacity"], MC = ["lineStyle", "opacity"]; + _s({ + type: "graph", init: function (t, e) { + var i = new Ql, n = new Sd, o = this.group; + this._controller = new kh(e.getZr()), this._controllerHost = {target: o}, o.add(i.group), o.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 o = this._symbolDraw, a = this._lineDraw, r = this.group; + if ("view" === n.type) { + var s = {position: n.position, scale: n.scale}; + this._firstRender ? r.attr(s) : fo(r, s, t) + } + bC(t.getGraph(), this._getNodeGlobalScale(t)); + var l = t.getData(); + o.updateData(l); + var u = t.getEdgeData(); + a.updateData(u), this._updateNodeAndLinkScale(), this._updateController(t, e, i), clearTimeout(this._layoutTimeout); + var h = t.forceLayout, c = t.get("force.layoutAnimation"); + h && this._startForceLayoutIteration(h, c), l.eachItemGraphicEl(function (e, n) { + var o = l.getItemModel(n); + e.off("drag").off("dragend"); + var a = l.getItemModel(n).get("draggable"); + a && e.on("drag", function () { + h && (h.warmUp(), !this._layouting && this._startForceLayoutIteration(h, c), h.setFixed(n), l.setItemLayout(n, e.position)) + }, this).on("dragend", function () { + h && h.setUnfixed(n) + }, this), e.setDraggable(a && h), e.off("mouseover", e.__focusNodeAdjacency), e.off("mouseout", e.__unfocusNodeAdjacency), o.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"), f = l.getLayout("cx"), + p = l.getLayout("cy"); + l.eachItemGraphicEl(function (t, e) { + var i = t.getSymbolPath(); + if (d) { + var n = l.getItemLayout(e), o = Math.atan2(n[1] - p, n[0] - f); + o < 0 && (o = 2 * Math.PI + o); + var a = n[0] < f; + a && (o -= Math.PI); + var r = a ? "left" : "right"; + i.setStyle({ + textRotation: -o, + 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 o = this._model.getData().graph, a = n.dataIndex, r = n.edgeDataIndex, s = o.getNodeByIndex(a), + l = o.getEdgeByIndex(r); + (s || l) && (o.eachNode(function (t) { + kd(t, SC, .1) + }), o.eachEdge(function (t) { + kd(t, MC, .1) + }), s && (Pd(s, SC), d(s.edges, function (t) { + t.dataIndex < 0 || (Pd(t, MC), Pd(t.node1, SC), Pd(t.node2, SC)) + })), l && (Pd(l, MC), Pd(l.node1, SC), Pd(l.node2, SC))) + }, unfocusNodeAdjacency: function (t, e, i, n) { + var o = this._model.getData().graph; + o.eachNode(function (t) { + kd(t, SC) + }), o.eachEdge(function (t) { + kd(t, MC) + }) + }, _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, o = this._controllerHost, a = this.group; + n.setPointerChecker(function (e, n, o) { + var r = a.getBoundingRect(); + return r.applyTransform(a.transform), r.contain(n, o) && !Wh(e, i, t) + }), "view" === t.coordinateSystem.type ? (n.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), n.off("pan").off("zoom").on("pan", function (e, n) { + Vh(o, e, n), i.dispatchAction({seriesId: t.id, type: "graphRoam", dx: e, dy: n}) + }).on("zoom", function (e, n, a) { + Gh(o, e, n, a), i.dispatchAction({ + seriesId: t.id, + type: "graphRoam", + zoom: e, + originX: n, + originY: a + }), this._updateNodeAndLinkScale(), bC(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, o = n && n[0] || 1; + return ((e.getZoom() - 1) * i + 1) / o + }, updateLayout: function (t) { + bC(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() + } + }), cs({type: "graphRoam", event: "graphRoam", update: "none"}, function (t, e) { + e.eachComponent({mainType: "series", query: t}, function (e) { + var i = Xh(e.coordinateSystem, t); + e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom) + }) + }), cs({ + type: "focusNodeAdjacency", + event: "focusNodeAdjacency", + update: "series.graph:focusNodeAdjacency" + }, function () { + }), cs({ + type: "unfocusNodeAdjacency", + event: "unfocusNodeAdjacency", + update: "series.graph:unfocusNodeAdjacency" + }, function () { + }); + var IC = Z; + hs(function (t) { + var e = t.findComponents({mainType: "legend"}); + e && e.length && t.eachSeriesByType("graph", function (t) { + var i = t.getCategoriesData(), n = t.getGraph().data, o = i.mapArray(i.getName); + n.filterSelf(function (t) { + var i = n.getItemModel(t).getShallow("category"); + if (null != i) { + "number" == typeof i && (i = o[i]); + for (var a = 0; a < e.length; a++) if (!e[a].isSelected(i)) return !1 + } + return !0 + }) + }, this) + }), ps(gD("graph", "circle", null)), ps(function (t) { + var e = {}; + t.eachSeriesByType("graph", function (t) { + var i = t.getCategoriesData(), n = t.getData(), o = {}; + i.each(function (n) { + var a = i.getName(n); + o["ec-" + a] = n; + var r = i.getItemModel(n).get("itemStyle.color") || t.getColorFromPalette(a, 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 = o["ec-" + e]), n.getItemVisual(t, "color", !0) || n.setItemVisual(t, "color", i.getItemVisual(e, "color"))) + }) + }) + }), ps(function (t) { + t.eachSeriesByType("graph", function (t) { + var e = t.getGraph(), i = t.getEdgeData(), n = Nd(t.get("edgeSymbol")), o = Nd(t.get("edgeSymbolSize")), + a = "lineStyle.color".split("."), r = "lineStyle.opacity".split("."); + i.setVisual("fromSymbol", n && n[0]), i.setVisual("toSymbol", n && n[1]), i.setVisual("fromSymbolSize", o && o[0]), i.setVisual("toSymbolSize", o && o[1]), i.setVisual("color", t.get(a)), i.setVisual("opacity", t.get(r)), i.each(function (t) { + var n = i.getItemModel(t), o = e.getEdgeByIndex(t), s = Nd(n.getShallow("symbol", !0)), + l = Nd(n.getShallow("symbolSize", !0)), u = n.get(a), h = n.get(r); + switch (u) { + case"source": + u = o.node1.getVisual("color"); + break; + case"target": + u = o.node2.getVisual("color") + } + s[0] && o.setVisual("fromSymbol", s[0]), s[1] && o.setVisual("toSymbol", s[1]), l[0] && o.setVisual("fromSymbolSize", l[0]), l[1] && o.setVisual("toSymbolSize", l[1]), o.setVisual("color", u), o.setVisual("opacity", h) + }) + }) + }), fs(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(), o = []; + d(i.dimensions, function (t) { + o = o.concat(n.mapDimension(t, !0)) + }); + for (var a = 0; a < n.count(); a++) { + for (var r = [], s = !1, l = 0; l < o.length; l++) { + var u = n.get(o[l], a); + isNaN(u) || (s = !0), r.push(u) + } + s ? n.setItemLayout(a, i.dataToPoint(r)) : n.setItemLayout(a, [NaN, NaN]) + } + Ed(n.graph) + } else e && "none" !== e || Od(t) + }) + }), fs(function (t) { + t.eachSeriesByType("graph", function (t) { + "circular" === t.get("layout") && Rd(t) + }) + }), fs(function (t) { + t.eachSeriesByType("graph", function (t) { + var e = t.coordinateSystem; + if (!e || "view" === e.type) if ("force" === t.get("layout")) { + var i = t.preservedPoints || {}, n = t.getGraph(), o = n.data, a = n.edgeData, r = t.getModel("force"), + s = r.get("initLayout"); + t.preservedPoints ? o.each(function (t) { + var e = o.getId(t); + o.setItemLayout(t, i[e] || [NaN, NaN]) + }) : s && "none" !== s ? "circular" === s && Rd(t) : Od(t); + var l = o.getDataExtent("value"), u = a.getDataExtent("value"), h = r.get("repulsion"), + c = r.get("edgeLength"); + y(h) || (h = [h, h]), y(c) || (c = [c, c]), c = [c[1], c[0]]; + var d = o.mapArray("value", function (t, e) { + var i = o.getItemLayout(e), n = To(t, l, h); + return isNaN(n) && (n = (h[0] + h[1]) / 2), { + w: n, + rep: n, + fixed: o.getItemModel(e).get("fixed"), + p: !i || isNaN(i[0]) || isNaN(i[1]) ? null : i + } + }), f = a.mapArray("value", function (t, e) { + var i = n.getEdgeByIndex(e), o = To(t, u, c); + return isNaN(o) && (o = (c[0] + c[1]) / 2), { + n1: d[i.node1.dataIndex], + n2: d[i.node2.dataIndex], + d: o, + curveness: i.getModel().get("lineStyle.curveness") || 0 + } + }), p = (e = t.coordinateSystem).getBoundingRect(), g = zd(d, f, {rect: p, gravity: r.get("gravity")}), + m = g.step; + g.step = function (t) { + for (var e = 0, a = d.length; e < a; e++) d[e].fixed && G(d[e].p, n.getNodeByIndex(e).getLayout()); + m(function (e, a, r) { + for (var s = 0, l = e.length; s < l; s++) e[s].fixed || n.getNodeByIndex(s).setLayout(e[s].p), i[o.getId(s)] = e[s].p; + for (var s = 0, l = a.length; s < l; s++) { + var u = a[s], h = n.getEdgeByIndex(s), c = u.n1.p, d = u.n2.p, f = h.getLayout(); + (f = f ? f.slice() : [])[0] = f[0] || [], f[1] = f[1] || [], G(f[0], c), G(f[1], d), +u.curveness && (f[2] = [(c[0] + d[0]) / 2 - (c[1] - d[1]) * u.curveness, (c[1] + d[1]) / 2 - (d[0] - c[0]) * u.curveness]), h.setLayout(f) + } + t && t(r) + }) + }, t.forceLayout = g, t.preservedPoints = i, g.step() + } else t.forceLayout = null + }) + }), ds("graphView", { + create: function (t, e) { + var i = []; + return t.eachSeriesByType("graph", function (t) { + var n = t.get("coordinateSystem"); + if (!n || "view" === n) { + var o = t.getData(), a = [], r = []; + rn(o.mapArray(function (t) { + var e = o.getItemModel(t); + return [+e.get("x"), +e.get("y")] + }), a, r), r[0] - a[0] == 0 && (r[0] += 1, a[0] -= 1), r[1] - a[1] == 0 && (r[1] += 1, a[1] -= 1); + var s = (r[0] - a[0]) / (r[1] - a[1]), l = Bd(t, e, s); + isNaN(s) && (a = [l.x, l.y], r = [l.x + l.width, l.y + l.height]); + var u = r[0] - a[0], h = r[1] - a[1], c = l.width, d = l.height, f = t.coordinateSystem = new wh; + f.zoomLimit = t.get("scaleLimit"), f.setBoundingRect(a[0], a[1], u, h), f.setViewRect(l.x, l.y, c, d), f.setCenter(t.get("center")), f.setZoom(t.get("zoom")), i.push(f) + } + }), i + } + }); + KM.extend({ + type: "series.gauge", + getInitialData: function (t, e) { + var i = t.data || []; + return y(i) || (i = [i]), t.data = i, jD(this, ["value"]) + }, + 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: {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 TC = In.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, o = e.r, a = e.width, r = e.angle, + s = e.x - i(r) * a * (a >= o / 3 ? 1 : 2), l = e.y - n(r) * a * (a >= o / 3 ? 1 : 2); + r = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(r) * a, e.y + n(r) * a), t.lineTo(e.x + i(e.angle) * o, e.y + n(e.angle) * o), t.lineTo(e.x - i(r) * a, e.y - n(r) * a), t.lineTo(s, l) + } + }), DC = 2 * Math.PI, AC = (gr.extend({ + type: "gauge", render: function (t, e, i) { + this.group.removeAll(); + var n = t.get("axisLine.lineStyle.color"), o = Vd(t, i); + this._renderMain(t, e, i, n, o) + }, dispose: function () { + }, _renderMain: function (t, e, i, n, o) { + for (var a = this.group, r = t.getModel("axisLine").getModel("lineStyle"), s = t.get("clockwise"), l = -t.get("startAngle") / 180 * Math.PI, u = -t.get("endAngle") / 180 * Math.PI, h = (u - l) % DC, c = l, d = r.get("width"), f = 0; f < n.length; f++) { + var p = Math.min(Math.max(n[f][0], 0), 1), g = new vS({ + shape: { + startAngle: c, + endAngle: u = l + h * p, + cx: o.cx, + cy: o.cy, + clockwise: s, + r0: o.r - d, + r: o.r + }, silent: !0 + }); + g.setStyle({fill: n[f][1]}), g.setStyle(r.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(g), c = u + } + var m = 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 v = l; + l = u, u = v + } + this._renderTicks(t, e, i, m, o, l, u, s), this._renderPointer(t, e, i, m, o, l, u, s), this._renderTitle(t, e, i, m, o), this._renderDetail(t, e, i, m, o) + }, _renderTicks: function (t, e, i, n, o, a, r, s) { + for (var l = this.group, u = o.cx, h = o.cy, c = o.r, d = +t.get("min"), f = +t.get("max"), p = t.getModel("splitLine"), g = t.getModel("axisTick"), m = t.getModel("axisLabel"), v = t.get("splitNumber"), y = g.get("splitNumber"), x = Do(p.get("length"), c), _ = Do(g.get("length"), c), w = a, b = (r - a) / v, S = b / y, M = p.getModel("lineStyle").getLineStyle(), I = g.getModel("lineStyle").getLineStyle(), T = 0; T <= v; T++) { + var D = Math.cos(w), A = Math.sin(w); + if (p.get("show")) { + var C = new MS({ + shape: {x1: D * c + u, y1: A * c + h, x2: D * (c - x) + u, y2: A * (c - x) + h}, + style: M, + silent: !0 + }); + "auto" === M.stroke && C.setStyle({stroke: n(T / v)}), l.add(C) + } + if (m.get("show")) { + var L = Gd(Ao(T / v * (f - d) + d), m.get("formatter")), k = m.get("distance"), P = n(T / v); + l.add(new fS({ + style: no({}, m, { + text: L, + x: D * (c - x - k) + u, + y: A * (c - x - k) + h, + textVerticalAlign: A < -.4 ? "top" : A > .4 ? "bottom" : "middle", + textAlign: D < -.4 ? "left" : D > .4 ? "right" : "center" + }, {autoColor: P}), silent: !0 + })) + } + if (g.get("show") && T !== v) { + for (var N = 0; N <= y; N++) { + var D = Math.cos(w), A = Math.sin(w), O = new MS({ + shape: {x1: D * c + u, y1: A * c + h, x2: D * (c - _) + u, y2: A * (c - _) + h}, + silent: !0, + style: I + }); + "auto" === I.stroke && O.setStyle({stroke: n((T + N / y) / v)}), l.add(O), w += S + } + w -= S + } else w += b + } + }, _renderPointer: function (t, e, i, n, o, a, r, s) { + var l = this.group, u = this._data; + if (t.get("pointer.show")) { + var h = [+t.get("min"), +t.get("max")], c = [a, r], d = t.getData(), f = d.mapDimension("value"); + d.diff(u).add(function (e) { + var i = new TC({shape: {angle: a}}); + po(i, {shape: {angle: To(d.get(f, e), h, c, !0)}}, t), l.add(i), d.setItemGraphicEl(e, i) + }).update(function (e, i) { + var n = u.getItemGraphicEl(i); + fo(n, {shape: {angle: To(d.get(f, e), h, c, !0)}}, t), l.add(n), d.setItemGraphicEl(e, n) + }).remove(function (t) { + var e = u.getItemGraphicEl(t); + l.remove(e) + }).execute(), d.eachItemGraphicEl(function (t, e) { + var i = d.getItemModel(e), a = i.getModel("pointer"); + t.setShape({ + x: o.cx, + y: o.cy, + width: Do(a.get("width"), o.r), + r: Do(a.get("length"), o.r) + }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(To(d.get(f, e), h, [0, 1], !0))), eo(t, i.getModel("emphasis.itemStyle").getItemStyle()) + }), this._data = d + } else u && u.eachItemGraphicEl(function (t) { + l.remove(t) + }) + }, _renderTitle: function (t, e, i, n, o) { + var a = t.getData(), r = a.mapDimension("value"), s = t.getModel("title"); + if (s.get("show")) { + var l = s.get("offsetCenter"), u = o.cx + Do(l[0], o.r), h = o.cy + Do(l[1], o.r), c = +t.get("min"), + d = +t.get("max"), f = n(To(t.getData().get(r, 0), [c, d], [0, 1], !0)); + this.group.add(new fS({ + silent: !0, + style: no({}, s, { + x: u, + y: h, + text: a.getName(0), + textAlign: "center", + textVerticalAlign: "middle" + }, {autoColor: f, forceRich: !0}) + })) + } + }, _renderDetail: function (t, e, i, n, o) { + var a = t.getModel("detail"), r = +t.get("min"), s = +t.get("max"); + if (a.get("show")) { + var l = a.get("offsetCenter"), u = o.cx + Do(l[0], o.r), h = o.cy + Do(l[1], o.r), + c = Do(a.get("width"), o.r), d = Do(a.get("height"), o.r), f = t.getData(), + p = f.get(f.mapDimension("value"), 0), g = n(To(p, [r, s], [0, 1], !0)); + this.group.add(new fS({ + silent: !0, + style: no({}, a, { + x: u, + y: h, + text: Gd(p, a.get("formatter")), + textWidth: isNaN(c) ? null : c, + textHeight: isNaN(d) ? null : d, + textAlign: "center", + textVerticalAlign: "middle" + }, {autoColor: g, forceRich: !0}) + })) + } + } + }), xs({ + type: "series.funnel", + init: function (t) { + AC.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + }, this._defaultLabelLine(t) + }, + getInitialData: function (t, e) { + return jD(this, ["value"]) + }, + _defaultLabelLine: function (t) { + Mi(t, "labelLine", ["show"]); + var e = t.labelLine, i = t.emphasis.labelLine; + e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show + }, + getDataParams: function (t) { + var e = this.getData(), i = AC.superCall(this, "getDataParams", t), n = e.mapDimension("value"), + o = e.getSum(n); + return i.percent = o ? +(e.get(n, t) / o * 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: {show: !0, position: "outer"}, + labelLine: {show: !0, length: 20, lineStyle: {width: 1, type: "solid"}}, + itemStyle: {borderColor: "#fff", borderWidth: 1}, + emphasis: {label: {show: !0}} + } + })), CC = Wd.prototype, LC = ["itemStyle", "opacity"]; + CC.updateData = function (t, e, i) { + var n = this.childAt(0), o = t.hostModel, a = t.getItemModel(e), s = t.getItemLayout(e), + l = t.getItemModel(e).get(LC); + l = null == l ? 1 : l, n.useStyle({}), i ? (n.setShape({points: s.points}), n.setStyle({opacity: 0}), po(n, {style: {opacity: l}}, o, e)) : fo(n, { + style: {opacity: l}, + shape: {points: s.points} + }, o, e); + var u = a.getModel("itemStyle"), h = t.getItemVisual(e, "color"); + n.setStyle(r({ + lineJoin: "round", + fill: h + }, u.getItemStyle(["opacity"]))), n.hoverStyle = u.getModel("emphasis").getItemStyle(), this._updateLabel(t, e), eo(this) + }, CC._updateLabel = function (t, e) { + var i = this.childAt(1), n = this.childAt(2), o = t.hostModel, a = t.getItemModel(e), + r = t.getItemLayout(e).label, s = t.getItemVisual(e, "color"); + fo(i, {shape: {points: r.linePoints || r.linePoints}}, o, e), fo(n, { + style: { + x: r.x, + y: r.y + } + }, o, e), n.attr({rotation: r.rotation, origin: [r.x, r.y], z2: 10}); + var l = a.getModel("label"), u = a.getModel("emphasis.label"), h = a.getModel("labelLine"), + c = a.getModel("emphasis.labelLine"), s = t.getItemVisual(e, "color"); + io(n.style, n.hoverStyle = {}, l, u, { + 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 = !u.get("show"), i.ignore = i.normalIgnore = !h.get("show"), i.hoverIgnore = !c.get("show"), i.setStyle({stroke: s}), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle() + }, u(Wd, sw); + gr.extend({ + type: "funnel", render: function (t, e, i) { + var n = t.getData(), o = this._data, a = this.group; + n.diff(o).add(function (t) { + var e = new Wd(n, t); + n.setItemGraphicEl(t, e), a.add(e) + }).update(function (t, e) { + var i = o.getItemGraphicEl(e); + i.updateData(n, t), a.add(i), n.setItemGraphicEl(t, i) + }).remove(function (t) { + var e = o.getItemGraphicEl(t); + a.remove(e) + }).execute(), this._data = n + }, remove: function () { + this.group.removeAll(), this._data = null + }, dispose: function () { + } + }); + ps(JD("funnel")), fs(function (t, e, i) { + t.eachSeriesByType("funnel", function (t) { + var i = t.getData(), n = i.mapDimension("value"), o = t.get("sort"), a = Fd(t, e), r = Hd(i, o), + s = [Do(t.get("minSize"), a.width), Do(t.get("maxSize"), a.width)], l = i.getDataExtent(n), + u = t.get("min"), h = t.get("max"); + null == u && (u = Math.min(l[0], 0)), null == h && (h = l[1]); + var c = t.get("funnelAlign"), d = t.get("gap"), f = (a.height - d * (i.count() - 1)) / i.count(), p = a.y, + g = function (t, e) { + var o, r = To(i.get(n, t) || 0, [u, h], s, !0); + switch (c) { + case"left": + o = a.x; + break; + case"center": + o = a.x + (a.width - r) / 2; + break; + case"right": + o = a.x + a.width - r + } + return [[o, e], [o + r, e]] + }; + "ascending" === o && (f = -f, d = -d, p += a.height, r = r.reverse()); + for (var m = 0; m < r.length; m++) { + var v = r[m], y = r[m + 1], x = i.getItemModel(v).get("itemStyle.height"); + null == x ? x = f : (x = Do(x, a.height), "ascending" === o && (x = -x)); + var _ = g(v, p), w = g(y, p + x); + p += x + d, i.setItemLayout(v, {points: _.concat(w.slice().reverse())}) + } + Zd(i) + }) + }), hs(iA("funnel")); + var kC = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.axisIndex = o + }; + kC.prototype = { + constructor: kC, model: null, isHorizontal: function () { + return "horizontal" !== this.coordinateSystem.getModel().get("layout") + } + }, u(kC, qT); + var PC = function (t, e, i, n, o, a) { + e[0] = Yd(e[0], i), e[1] = Yd(e[1], i), t = t || 0; + var r = i[1] - i[0]; + null != o && (o = Yd(o, [0, r])), null != a && (a = Math.max(a, null != o ? o : 0)), "all" === n && (o = a = Math.abs(e[1] - e[0]), n = 0); + var s = jd(e, n); + e[n] += t; + var l = o || 0, u = i.slice(); + s.sign < 0 ? u[0] += l : u[1] -= l, e[n] = Yd(e[n], u); + h = jd(e, n); + null != o && (h.sign !== s.sign || h.span < o) && (e[1 - n] = e[n] + s.sign * o); + var h = jd(e, n); + return null != a && h.span > a && (e[1 - n] = e[n] + h.sign * a), e + }, NC = d, OC = Math.min, EC = Math.max, RC = Math.floor, zC = Math.ceil, BC = Ao, VC = Math.PI; + qd.prototype = { + type: "parallel", constructor: qd, _init: function (t, e, i) { + var n = t.dimensions, o = t.parallelAxisIndex; + NC(n, function (t, i) { + var n = o[i], a = e.getComponent("parallelAxis", n), + r = this._axesMap.set(t, new kC(t, xl(a), [0, 0], a.get("type"), n)), s = "category" === r.type; + r.onBand = s && a.get("boundaryGap"), r.inverse = a.get("inverse"), a.axis = r, r.model = a, r.coordinateSystem = a.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, o = e.pixelDimIndex, a = t[1 - o], + r = t[o]; + return a >= i && a <= 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(); + NC(this.dimensions, function (t) { + var e = this._axesMap.get(t); + e.scale.unionExtentFromData(n, n.mapDimension(t)), yl(e.scale, e.model) + }, this) + } + }, this) + }, resize: function (t, e) { + this._rect = Qo(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"], o = ["width", "height"], a = e.get("layout"), + r = "horizontal" === a ? 0 : 1, s = i[o[r]], l = [0, s], u = this.dimensions.length, + h = Kd(e.get("axisExpandWidth"), l), c = Kd(e.get("axisExpandCount") || 0, [0, u]), + d = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0, f = e.get("axisExpandWindow"); + f ? (t = Kd(f[1] - f[0], l), f[1] = f[0] + t) : (t = Kd(h * (c - 1), l), (f = [h * (e.get("axisExpandCenter") || RC(u / 2)) - t / 2])[1] = f[0] + t); + var p = (s - t) / (u - c); + p < 3 && (p = 0); + var g = [RC(BC(f[0] / h, 1)) + 1, zC(BC(f[1] / h, 1)) - 1], m = p / h * f[0]; + return { + layout: a, + pixelDimIndex: r, + layoutBase: i[n[r]], + layoutLength: s, + axisBase: i[n[1 - r]], + axisLength: i[o[1 - r]], + axisExpandable: d, + axisExpandWidth: h, + axisCollapseWidth: p, + axisExpandWindow: f, + axisCount: u, + winInnerIndices: g, + axisExpandWindow0Pos: m + } + }, _layoutAxes: function () { + var t = this._rect, e = this._axesMap, i = this.dimensions, n = this._makeLayoutInfo(), o = n.layout; + e.each(function (t) { + var e = [0, n.axisLength], i = t.inverse ? 1 : 0; + t.setExtent(e[i], e[1 - i]) + }), NC(i, function (e, i) { + var a = (n.axisExpandable ? Jd : $d)(i, n), + r = {horizontal: {x: a.position, y: n.axisLength}, vertical: {x: 0, y: a.position}}, + s = {horizontal: VC / 2, vertical: 0}, l = [r[o].x + t.x, r[o].y + t.y], u = s[o], h = st(); + dt(h, h, u), ct(h, h, l), this._axesLayout[e] = { + position: l, + rotation: u, + transform: h, + axisNameAvailableWidth: a.axisNameAvailableWidth, + axisLabelShow: a.axisLabelShow, + nameTruncateMaxWidth: a.nameTruncateMaxWidth, + tickDirection: 1, + labelDirection: 1 + } + }, 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, n) { + null == i && (i = 0), null == n && (n = t.count()); + var o = this._axesMap, a = this.dimensions, r = [], s = []; + d(a, function (e) { + r.push(t.mapDimension(e)), s.push(o.get(e).model) + }); + for (var l = this.hasAxisBrushed(), u = i; u < n; u++) { + var h; + if (l) { + h = "active"; + for (var c = t.getValues(r, u), f = 0, p = a.length; f < p; f++) if ("inactive" === s[f].getActiveState(c[f])) { + h = "inactive"; + break + } + } else h = "normal"; + e(h, u) + } + }, hasAxisBrushed: function () { + for (var t = this.dimensions, e = this._axesMap, i = !1, n = 0, o = t.length; n < o; n++) "normal" !== e.get(t[n]).model.getActiveState() && (i = !0); + return i + }, axisCoordToPoint: function (t, e) { + return mo([t, 0], this._axesLayout[e].transform) + }, getAxisLayout: function (t) { + return i(this._axesLayout[t]) + }, getSlidedAxisExpandWindow: function (t) { + var e = this._makeLayoutInfo(), i = e.pixelDimIndex, n = e.axisExpandWindow.slice(), o = n[1] - n[0], + a = [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", u = e.axisCollapseWidth, + h = this._model.get("axisExpandSlideTriggerArea"), c = null != h[0]; + if (u) c && u && s < o * h[0] ? (l = "jump", r = s - o * h[2]) : c && u && s > o * (1 - h[0]) ? (l = "jump", r = s - o * (1 - h[2])) : (r = s - o * h[1]) >= 0 && (r = s - o * (1 - h[1])) <= 0 && (r = 0), (r *= e.axisExpandWidth / u) ? PC(r, n, a, "all") : l = "none"; else { + o = n[1] - n[0]; + (n = [EC(0, a[1] * s / o - o / 2)])[1] = OC(a[1], n[0] + o), n[0] = n[1] - o + } + return {axisExpandWindow: n, behavior: l} + } + }, Ca.register("parallel", { + create: function (t, e) { + var i = []; + return t.eachComponent("parallel", function (n, o) { + var a = new qd(n, t, e); + a.name = "parallel_" + o, a.resize(n, e), n.coordinateSystem = a, a.model = n, i.push(a) + }), 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 GC = hM.extend({ + type: "baseParallelAxis", axis: null, activeIntervals: [], getAreaSelectStyle: function () { + return sb([["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"]])(this.getModel("areaSelectStyle")) + }, setActiveIntervals: function (t) { + var e = this.activeIntervals = i(t); + if (e) for (var n = e.length - 1; n >= 0; n--) Co(e[n]) + }, getActiveState: function (t) { + var e = this.activeIntervals; + if (!e.length) return "normal"; + if (null == t || isNaN(t)) return "inactive"; + if (1 === e.length) { + var i = e[0]; + if (i[0] <= t && t <= i[1]) return "active" + } else for (var n = 0, o = e.length; n < o; n++) if (e[n][0] <= t && t <= e[n][1]) return "active"; + return "inactive" + } + }), WC = { + 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 + }; + n(GC.prototype, ET), MD("parallel", GC, function (t, e) { + return e.type || (e.data ? "category" : "value") + }, WC), hM.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 () { + hM.prototype.init.apply(this, arguments), this.mergeOption({}) + }, + mergeOption: function (t) { + var e = this.option; + t && n(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) { + d(["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 = []; + d(g(this.dependentModels.parallelAxis, function (t) { + return (t.get("parallelIndex") || 0) === this.componentIndex + }, this), function (i) { + t.push("dim" + i.get("dim")), e.push(i.componentIndex) + }) + } + }), cs({type: "axisAreaSelect", event: "axisAreaSelected"}, function (t, e) { + e.eachComponent({mainType: "parallelAxis", query: t}, function (e) { + e.axis.model.setActiveIntervals(t.intervals) + }) + }), cs("parallelAxisExpand", function (t, e) { + e.eachComponent({mainType: "parallel", query: t}, function (e) { + e.setAxisExpand(t) + }) + }); + var FC = v, HC = d, ZC = f, UC = Math.min, XC = Math.max, jC = Math.pow, YC = 1e4, qC = 6, KC = 6, $C = "globalPan", + JC = {w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1]}, + QC = {w: "ew", e: "ew", n: "ns", s: "ns", ne: "nesw", sw: "nesw", nw: "nwse", se: "nwse"}, tL = { + brushStyle: {lineWidth: 2, stroke: "rgba(0,0,0,0.3)", fill: "rgba(0,0,0,0.1)"}, + transformable: !0, + brushMode: "single", + removeOnClick: !1 + }, eL = 0; + Qd.prototype = { + constructor: Qd, enableBrush: function (t) { + return this._brushType && ef(this), t.brushType && tf(this, t), this + }, setPanels: function (t) { + if (t && t.length) { + var e = this._panels = {}; + d(t, function (t) { + e[t.panelId] = i(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) { + HC(this._covers, t, e) + }, updateCovers: function (t) { + function e(t, e) { + return (null != t.id ? t.id : a + e) + "-" + t.brushType + } + + function o(e, i) { + var n = t[e]; + if (null != i && r[i] === u) s[e] = r[i]; else { + var o = s[e] = null != i ? (r[i].__brushOption = n, r[i]) : of(l, nf(l, n)); + sf(l, o) + } + } + + t = f(t, function (t) { + return n(i(tL), t, !0) + }); + var a = "\0-brush-index-", r = this._covers, s = this._covers = [], l = this, u = this._creatingCover; + return new Ss(r, t, function (t, i) { + return e(t.__brushOption, i) + }, e).add(o).update(o).remove(function (t) { + r[t] !== u && l.group.remove(r[t]) + }).execute(), this + }, unmount: function () { + return this.enableBrush(!1), cf(this), this._zr.remove(this.group), this + }, dispose: function () { + this.unmount(), this.off() + } + }, h(Qd, D_); + var iL = { + mousedown: function (t) { + if (this._dragging) Nf.call(this, t); else if (!t.target || !t.target.draggable) { + Cf(t); + var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY); + this._creatingCover = null, (this._creatingPanel = uf(this, t, e)) && (this._dragging = !0, this._track = [e.slice()]) + } + }, mousemove: function (t) { + var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY); + if (Af(this, t, e), this._dragging) { + Cf(t); + var i = kf(this, t, e, !1); + i && df(this, i) + } + }, mouseup: Nf + }, nL = { + lineX: Of(0), lineY: Of(1), rect: { + createCover: function (t, e) { + return gf(FC(Sf, function (t) { + return t + }, function (t) { + return t + }), t, e, ["w", "e", "n", "s", "se", "sw", "ne", "nw"]) + }, getCreatingRange: function (t) { + var e = pf(t); + return _f(e[1][0], e[1][1], e[0][0], e[0][1]) + }, updateCoverShape: function (t, e, i, n) { + mf(t, e, i, n) + }, updateCommon: vf, contain: Lf + }, polygon: { + createCover: function (t, e) { + var i = new sw; + return i.add(new bS({name: "main", style: xf(e), silent: !0})), i + }, getCreatingRange: function (t) { + return t + }, endCreating: function (t, e) { + e.remove(e.childAt(0)), e.add(new wS({ + name: "main", + draggable: !0, + drift: FC(Mf, t, e), + ondragend: FC(df, t, {isEnd: !0}) + })) + }, updateCoverShape: function (t, e, i, n) { + e.childAt(0).setShape({points: Tf(t, e, i)}) + }, updateCommon: vf, contain: Lf + } + }, oL = ["axisLine", "axisTickLabel", "axisName"], aL = ys({ + type: "parallelAxis", init: function (t, e) { + aL.superApply(this, "init", arguments), (this._brushController = new Qd(e.getZr())).on("brush", m(this._onBrush, this)) + }, render: function (t, e, i, n) { + if (!Vf(t, e, n)) { + this.axisModel = t, this.api = i, this.group.removeAll(); + var o = this._axisGroup; + if (this._axisGroup = new sw, this.group.add(this._axisGroup), t.get("show")) { + var r = Wf(t, e), s = r.coordinateSystem, l = t.getAreaSelectStyle(), u = l.width, h = t.axis.dim, + c = a({strokeContainThreshold: u}, s.getAxisLayout(h)), f = new LD(t, c); + d(oL, f.add, f), this._axisGroup.add(f.getGroup()), this._refreshBrushController(c, l, t, r, u, i); + var p = n && !1 === n.animation ? null : t; + yo(o, this._axisGroup, p) + } + } + }, _refreshBrushController: function (t, e, i, n, o, a) { + var r = i.axis.getExtent(), s = r[1] - r[0], l = Math.min(30, .1 * Math.abs(s)), + u = $t.create({x: r[0], y: -o / 2, width: s, height: o}); + u.x -= l, u.width += 2 * l, this._brushController.mount({ + enableGlobalPan: !0, + rotation: t.rotation, + position: t.position + }).setPanels([{ + panelId: "pl", + clipPath: Ef(u), + isTargetByCursor: zf(u, a, n), + getLinearBrushOtherExtent: Rf(u, 0) + }]).enableBrush({brushType: "lineX", brushStyle: e, removeOnClick: !0}).updateCovers(Gf(i)) + }, _onBrush: function (t, e) { + var i = this.axisModel, n = i.axis, o = f(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: o + }) + }, dispose: function () { + this._brushController.dispose() + } + }); + ys({ + type: "parallel", render: function (t, e, i) { + this._model = t, this._api = i, this._handlers || (this._handlers = {}, d(rL, function (t, e) { + i.getZr().on(e, this._handlers[e] = m(t, this)) + }, this)), wr(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate") + }, dispose: function (t, e) { + d(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(a({type: "parallelAxisExpand"}, t)) + } + }); + var rL = { + mousedown: function (t) { + Ff(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]) + }, mouseup: function (t) { + var e = this._mouseDownPoint; + if (Ff(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 && Ff(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 + }) + } + } + }; + us(function (t) { + Ud(t), Xd(t) + }), KM.extend({ + type: "series.parallel", + dependencies: ["parallel"], + visualColorAccessPath: "lineStyle.color", + getInitialData: function (t, e) { + var i = this.getSource(); + return Hf(i, this), Xs(i, this) + }, + getRawIndicesByActiveState: function (t) { + var e = this.coordinateSystem, i = this.getData(), n = []; + return e.eachActiveState(i, function (e, o) { + t === e && n.push(i.getRawIndex(o)) + }), n + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "parallel", + parallelIndex: 0, + label: {show: !1}, + inactiveOpacity: .05, + activeOpacity: 1, + lineStyle: {width: 1, opacity: .45, type: "solid"}, + emphasis: {label: {show: !1}}, + progressive: 500, + smooth: !1, + animationEasing: "linear" + } + }); + var sL = .3, lL = (gr.extend({ + type: "parallel", init: function () { + this._dataGroup = new sw, this.group.add(this._dataGroup), this._data, this._initialized + }, render: function (t, e, i, n) { + var o = this._dataGroup, a = t.getData(), r = this._data, s = t.coordinateSystem, l = s.dimensions, + u = Yf(t); + if (a.diff(r).add(function (t) { + qf(jf(a, o, t, l, s), a, t, u) + }).update(function (e, i) { + var o = r.getItemGraphicEl(i), h = Xf(a, e, l, s); + a.setItemGraphicEl(e, o), fo(o, {shape: {points: h}}, n && !1 === n.animation ? null : t, e), qf(o, a, e, u) + }).remove(function (t) { + var e = r.getItemGraphicEl(t); + o.remove(e) + }).execute(), !this._initialized) { + this._initialized = !0; + var h = Uf(s, t, function () { + setTimeout(function () { + o.removeClipPath() + }) + }); + o.setClipPath(h) + } + this._data = a + }, incrementalPrepareRender: function (t, e, i) { + this._initialized = !0, this._data = null, this._dataGroup.removeAll() + }, incrementalRender: function (t, e, i) { + for (var n = e.getData(), o = e.coordinateSystem, a = o.dimensions, r = Yf(e), s = t.start; s < t.end; s++) { + var l = jf(n, this._dataGroup, s, a, o); + l.incremental = !0, qf(l, n, s, r) + } + }, dispose: function () { + }, remove: function () { + this._dataGroup && this._dataGroup.removeAll(), this._data = null + } + }), ["lineStyle", "normal", "opacity"]); + ps({ + seriesType: "parallel", reset: function (t, e, i) { + var n = t.getModel("itemStyle"), o = t.getModel("lineStyle"), a = e.get("color"), + r = o.get("color") || n.get("color") || a[t.seriesIndex % a.length], s = t.get("inactiveOpacity"), + l = t.get("activeOpacity"), u = t.getModel("lineStyle").getLineStyle(), h = t.coordinateSystem, + c = t.getData(), d = {normal: u.opacity, active: l, inactive: s}; + return c.setVisual("color", r), { + progress: function (t, e) { + h.eachActiveState(e, function (t, i) { + var n = d[t]; + if ("normal" === t && e.hasItemOption) { + var o = e.getItemModel(i).get(lL, !0); + null != o && (n = o) + } + e.setItemVisual(i, "opacity", n) + }, t.start, t.end) + } + } + } + }); + var uL = KM.extend({ + type: "series.sankey", + layoutInfo: null, + getInitialData: function (t) { + var e = t.edges || t.links, i = t.data || t.nodes; + if (i && e) return lC(i, e, this, !0).data + }, + setNodePosition: function (t, e) { + var i = this.option.data[t]; + i.localX = e[0], i.localY = e[1] + }, + 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), o = n.data, a = o.source + " -- " + o.target; + return n.value && (a += " : " + n.value), Zo(a) + } + return uL.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, + draggable: !0, + layoutIterations: 32, + label: {show: !0, position: "right", color: "#000", fontSize: 12}, + itemStyle: {borderWidth: 1, borderColor: "#333"}, + lineStyle: {color: "#314656", opacity: .2, curveness: .5}, + emphasis: {label: {show: !0}, lineStyle: {opacity: .6}}, + animationEasing: "linear", + animationDuration: 1e3 + } + }), hL = En({ + 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() + } + }); + _s({ + type: "sankey", _model: null, render: function (t, e, i) { + var n = t.getGraph(), o = this.group, a = t.layoutInfo, r = a.width, s = a.height, l = t.getData(), + u = t.getData("edge"); + this._model = t, o.removeAll(), o.attr("position", [a.x, a.y]), n.eachEdge(function (e) { + var i = new hL; + i.dataIndex = e.dataIndex, i.seriesIndex = t.seriesIndex, i.dataType = "edge"; + var n = e.getModel("lineStyle"), a = n.get("curveness"), l = e.node1.getLayout(), + h = e.node1.getModel(), c = h.get("localX"), d = h.get("localY"), f = e.node2.getLayout(), + p = e.node2.getModel(), g = p.get("localX"), m = p.get("localY"), v = e.getLayout(); + i.shape.extent = Math.max(1, v.dy); + var y = (null != c ? c * r : l.x) + l.dx, x = (null != d ? d * s : l.y) + v.sy + v.dy / 2, + _ = null != g ? g * r : f.x, w = (null != m ? m * s : f.y) + v.ty + v.dy / 2, + b = y * (1 - a) + _ * a, S = x, M = y * a + _ * (1 - a), I = w; + switch (i.setShape({ + x1: y, + y1: x, + x2: _, + y2: w, + cpx1: b, + cpy1: S, + cpx2: M, + cpy2: I + }), 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") + } + eo(i, e.getModel("emphasis.lineStyle").getItemStyle()), o.add(i), u.setItemGraphicEl(e.dataIndex, i) + }), n.eachNode(function (e) { + var i = e.getLayout(), n = e.getModel(), a = n.get("localX"), u = n.get("localY"), + h = n.getModel("label"), c = n.getModel("emphasis.label"), d = new SS({ + shape: { + x: null != a ? a * r : i.x, + y: null != u ? u * s : i.y, + width: i.dx, + height: i.dy + }, style: n.getModel("itemStyle").getItemStyle() + }), f = e.getModel("emphasis.itemStyle").getItemStyle(); + io(d.style, f, h, c, { + labelFetcher: t, + labelDataIndex: e.dataIndex, + defaultText: e.id, + isRectText: !0 + }), d.setStyle("fill", e.getVisual("color")), eo(d, f), o.add(d), l.setItemGraphicEl(e.dataIndex, d), d.dataType = "node" + }), t.get("draggable") && l.eachItemGraphicEl(function (e, n) { + e.drift = function (e, o) { + this.shape.x += e, this.shape.y += o, this.dirty(), i.dispatchAction({ + type: "dragNode", + seriesId: t.id, + dataIndex: l.getRawIndex(n), + localX: this.shape.x / r, + localY: this.shape.y / s + }) + }, e.draggable = !0, e.cursor = "move" + }), !this._data && t.get("animation") && o.setClipPath($f(o.getBoundingRect(), t, function () { + o.removeClipPath() + })), this._data = t.getData() + }, dispose: function () { + } + }), cs({type: "dragNode", event: "dragNode", update: "update"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sankey", query: t}, function (e) { + e.setNodePosition(t.dataIndex, [t.localX, t.localY]) + }) + }); + fs(function (t, e, i) { + t.eachSeriesByType("sankey", function (t) { + var i = t.get("nodeWidth"), n = t.get("nodeGap"), o = Qf(t, e); + t.layoutInfo = o; + var a = o.width, r = o.height, s = t.getGraph(), l = s.nodes, u = s.edges; + ep(l), tp(l, u, i, n, a, r, 0 !== g(l, function (t) { + return 0 === t.getLayout().value + }).length ? 0 : t.get("layoutIterations")) + }) + }), ps(function (t, e) { + t.eachSeriesByType("sankey", function (t) { + var e = t.getGraph().nodes; + if (e.length) { + var i = 1 / 0, n = -1 / 0; + d(e, function (t) { + var e = t.getLayout().value; + e < i && (i = e), e > n && (n = e) + }), d(e, function (e) { + var o = new ZA({ + type: "color", + mappingMethod: "linear", + dataExtent: [i, n], + visual: t.get("color") + }).mapValueToVisual(e.getLayout().value); + e.setVisual("color", o); + var a = e.getModel().get("itemStyle.color"); + null != a && e.setVisual("color", a) + }) + } + }) + }); + var cL = { + _baseAxisDim: null, getInitialData: function (t, e) { + var i, n, o = e.getComponent("xAxis", this.get("xAxisIndex")), + a = e.getComponent("yAxis", this.get("yAxisIndex")), r = o.get("type"), s = a.get("type"); + "category" === r ? (t.layout = "horizontal", i = o.getOrdinalMeta(), n = !0) : "category" === s ? (t.layout = "vertical", i = a.getOrdinalMeta(), n = !0) : t.layout = t.layout || "horizontal"; + var l = ["x", "y"], u = "horizontal" === t.layout ? 0 : 1, h = this._baseAxisDim = l[u], c = l[1 - u], + f = [o, a], p = f[u].get("type"), g = f[1 - u].get("type"), m = t.data; + if (m && n) { + var v = []; + d(m, function (t, e) { + var i; + t.value && y(t.value) ? (i = t.value.slice(), t.value.unshift(e)) : y(t) ? (i = t.slice(), t.unshift(e)) : i = t, v.push(i) + }), t.data = v + } + var x = this.defaultValueDimensions; + return jD(this, { + coordDimensions: [{ + name: h, + type: Ts(p), + ordinalMeta: i, + otherDims: {tooltip: !1, itemName: 0}, + dimsDef: ["base"] + }, {name: c, type: Ts(g), dimsDef: x.slice()}], dimensionsCount: x.length + 1 + }) + }, getBaseAxis: function () { + var t = this._baseAxisDim; + return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis + } + }; + h(KM.extend({ + type: "series.boxplot", + dependencies: ["xAxis", "yAxis", "grid"], + defaultValueDimensions: [{name: "min", defaultTooltip: !0}, {name: "Q1", defaultTooltip: !0}, { + name: "median", + defaultTooltip: !0 + }, {name: "Q3", defaultTooltip: !0}, {name: "max", defaultTooltip: !0}], + dimensions: null, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + boxWidth: [7, 50], + itemStyle: {color: "#fff", borderWidth: 1}, + emphasis: { + itemStyle: { + borderWidth: 2, + shadowBlur: 5, + shadowOffsetX: 2, + shadowOffsetY: 2, + shadowColor: "rgba(0,0,0,0.4)" + } + }, + animationEasing: "elasticOut", + animationDuration: 800 + } + }), cL, !0); + var dL = ["itemStyle"], fL = ["emphasis", "itemStyle"], pL = (gr.extend({ + type: "boxplot", render: function (t, e, i) { + var n = t.getData(), o = this.group, a = this._data; + this._data || o.removeAll(); + var r = "horizontal" === t.get("layout") ? 1 : 0; + n.diff(a).add(function (t) { + if (n.hasValue(t)) { + var e = _p(n.getItemLayout(t), n, t, r, !0); + n.setItemGraphicEl(t, e), o.add(e) + } + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + if (n.hasValue(t)) { + var s = n.getItemLayout(t); + i ? wp(s, i, n, t) : i = _p(s, n, t, r), o.add(i), n.setItemGraphicEl(t, i) + } else o.remove(i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + e && o.remove(e) + }).execute(), this._data = n + }, remove: function (t) { + var e = this.group, i = this._data; + this._data = null, i && i.eachItemGraphicEl(function (t) { + t && e.remove(t) + }) + }, dispose: B + }), In.extend({ + type: "boxplotBoxPath", shape: {}, buildPath: function (t, e) { + var i = e.points, n = 0; + for (t.moveTo(i[n][0], i[n][1]), n++; n < 4; n++) t.lineTo(i[n][0], i[n][1]); + for (t.closePath(); n < i.length; n++) t.moveTo(i[n][0], i[n][1]), n++, t.lineTo(i[n][0], i[n][1]) + } + })), gL = ["itemStyle", "borderColor"], mL = d; + ps(function (t, e) { + var i = t.get("color"); + t.eachRawSeriesByType("boxplot", function (e) { + var n = i[e.seriesIndex % i.length], o = e.getData(); + o.setVisual({ + legendSymbol: "roundRect", + color: e.get(gL) || n + }), t.isSeriesFiltered(e) || o.each(function (t) { + var e = o.getItemModel(t); + o.setItemVisual(t, {color: e.get(gL, !0)}) + }) + }) + }), fs(function (t) { + var e = Sp(t); + mL(e, function (t) { + var e = t.seriesModels; + e.length && (Mp(t), mL(e, function (e, i) { + Ip(e, t.boxOffsetList[i], t.boxWidthList[i]) + })) + }) + }), h(KM.extend({ + type: "series.candlestick", + dependencies: ["xAxis", "yAxis", "grid"], + defaultValueDimensions: [{name: "open", defaultTooltip: !0}, { + name: "close", + defaultTooltip: !0 + }, {name: "lowest", defaultTooltip: !0}, {name: "highest", defaultTooltip: !0}], + dimensions: null, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + itemStyle: { + color: "#c23531", + color0: "#314656", + borderWidth: 1, + borderColor: "#c23531", + borderColor0: "#314656" + }, + emphasis: {itemStyle: {borderWidth: 2}}, + barMaxWidth: null, + barMinWidth: null, + barWidth: null, + large: !0, + largeThreshold: 600, + progressive: 3e3, + progressiveThreshold: 1e4, + progressiveChunkMode: "mod", + animationUpdate: !1, + animationEasing: "linear", + animationDuration: 300 + }, + getShadowDim: function () { + return "open" + }, + brushSelector: function (t, e, i) { + var n = e.getItemLayout(t); + return n && i.rect(n.brushRect) + } + }), cL, !0); + var vL = ["itemStyle"], yL = ["emphasis", "itemStyle"], xL = ["color", "color0", "borderColor", "borderColor0"], + _L = (gr.extend({ + type: "candlestick", render: function (t, e, i) { + this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t) + }, incrementalPrepareRender: function (t, e, i) { + this._clear(), this._updateDrawMode(t) + }, incrementalRender: function (t, e, i, n) { + this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e) + }, _updateDrawMode: function (t) { + var e = t.pipelineContext.large; + (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear()) + }, _renderNormal: function (t) { + var e = t.getData(), i = this._data, n = this.group, o = e.getLayout("isSimpleBox"); + this._data || n.removeAll(), e.diff(i).add(function (i) { + if (e.hasValue(i)) { + var a, r = e.getItemLayout(i); + po(a = Tp(r, 0, !0), {shape: {points: r.ends}}, t, i), Dp(a, e, i, o), n.add(a), e.setItemGraphicEl(i, a) + } + }).update(function (a, r) { + var s = i.getItemGraphicEl(r); + if (e.hasValue(a)) { + var l = e.getItemLayout(a); + s ? fo(s, {shape: {points: l.ends}}, t, a) : s = Tp(l), Dp(s, e, a, o), n.add(s), e.setItemGraphicEl(a, s) + } else n.remove(s) + }).remove(function (t) { + var e = i.getItemGraphicEl(t); + e && n.remove(e) + }).execute(), this._data = e + }, _renderLarge: function (t) { + this._clear(), Cp(t, this.group) + }, _incrementalRenderNormal: function (t, e) { + for (var i, n = e.getData(), o = n.getLayout("isSimpleBox"); null != (i = t.next());) { + var a; + Dp(a = Tp(n.getItemLayout(i)), n, i, o), a.incremental = !0, this.group.add(a) + } + }, _incrementalRenderLarge: function (t, e) { + Cp(e, this.group, !0) + }, remove: function (t) { + this._clear() + }, _clear: function () { + this.group.removeAll(), this._data = null + }, dispose: B + }), In.extend({ + type: "normalCandlestickBox", shape: {}, buildPath: function (t, e) { + var i = e.points; + this.__simpleBox ? (t.moveTo(i[4][0], i[4][1]), t.lineTo(i[6][0], i[6][1])) : (t.moveTo(i[0][0], i[0][1]), t.lineTo(i[1][0], i[1][1]), t.lineTo(i[2][0], i[2][1]), t.lineTo(i[3][0], i[3][1]), t.closePath(), t.moveTo(i[4][0], i[4][1]), t.lineTo(i[5][0], i[5][1]), t.moveTo(i[6][0], i[6][1]), t.lineTo(i[7][0], i[7][1])) + } + })), wL = In.extend({ + type: "largeCandlestickBox", shape: {}, buildPath: function (t, e) { + for (var i = e.points, n = 0; n < i.length;) if (this.__sign === i[n++]) { + var o = i[n++]; + t.moveTo(o, i[n++]), t.lineTo(o, i[n++]) + } else n += 3 + } + }), bL = ["itemStyle", "borderColor"], SL = ["itemStyle", "borderColor0"], ML = ["itemStyle", "color"], + IL = ["itemStyle", "color0"], TL = { + seriesType: "candlestick", plan: QM(), performRawSeries: !0, reset: function (t, e) { + function i(t, e) { + return e.get(t > 0 ? ML : IL) + } + + function n(t, e) { + return e.get(t > 0 ? bL : SL) + } + + var o = t.getData(), a = t.pipelineContext.large; + if (o.setVisual({ + legendSymbol: "roundRect", + colorP: i(1, t), + colorN: i(-1, t), + borderColorP: n(1, t), + borderColorN: n(-1, t) + }), !e.isSeriesFiltered(t)) return !a && { + progress: function (t, e) { + for (var o; null != (o = t.next());) { + var a = e.getItemModel(o), r = e.getItemLayout(o).sign; + e.setItemVisual(o, {color: i(r, a), borderColor: n(r, a)}) + } + } + } + } + }, DL = "undefined" != typeof Float32Array ? Float32Array : Array, AL = { + seriesType: "candlestick", plan: QM(), reset: function (t) { + var e = t.coordinateSystem, i = t.getData(), n = Pp(t, i), o = 0, a = 1, r = ["x", "y"], + s = i.mapDimension(r[o]), l = i.mapDimension(r[a], !0), u = l[0], h = l[1], c = l[2], d = l[3]; + if (i.setLayout({candleWidth: n, isSimpleBox: n <= 1.3}), !(null == s || l.length < 4)) return { + progress: t.pipelineContext.large ? function (t, i) { + for (var n, r, l = new DL(5 * t.count), f = 0, p = [], g = []; null != (r = t.next());) { + var m = i.get(s, r), v = i.get(u, r), y = i.get(h, r), x = i.get(c, r), _ = i.get(d, r); + isNaN(m) || isNaN(x) || isNaN(_) ? (l[f++] = NaN, f += 4) : (l[f++] = kp(i, r, v, y, h), p[o] = m, p[a] = x, n = e.dataToPoint(p, null, g), l[f++] = n ? n[0] : NaN, l[f++] = n ? n[1] : NaN, p[a] = _, n = e.dataToPoint(p, null, g), l[f++] = n ? n[1] : NaN) + } + i.setLayout("largePoints", l) + } : function (t, i) { + function r(t, i) { + var n = []; + return n[o] = i, n[a] = t, isNaN(i) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(n) + } + + function l(t, e, i) { + var a = e.slice(), r = e.slice(); + a[o] = Fn(a[o] + n / 2, 1, !1), r[o] = Fn(r[o] - n / 2, 1, !0), i ? t.push(a, r) : t.push(r, a) + } + + function f(t) { + return t[o] = Fn(t[o], 1), t + } + + for (var p; null != (p = t.next());) { + var g = i.get(s, p), m = i.get(u, p), v = i.get(h, p), y = i.get(c, p), x = i.get(d, p), + _ = Math.min(m, v), w = Math.max(m, v), b = r(_, g), S = r(w, g), M = r(y, g), I = r(x, g), + T = []; + l(T, S, 0), l(T, b, 1), T.push(f(I), f(S), f(M), f(b)), i.setItemLayout(p, { + sign: kp(i, p, m, v, h), + initBaseline: m > v ? S[a] : b[a], + ends: T, + brushRect: function (t, e, i) { + var s = r(t, i), l = r(e, i); + return s[o] -= n / 2, l[o] -= n / 2, { + x: s[0], + y: s[1], + width: a ? n : l[0] - s[0], + height: a ? l[1] - s[1] : n + } + }(y, x, g) + }) + } + } + } + } + }; + us(function (t) { + t && y(t.series) && d(t.series, function (t) { + w(t) && "k" === t.type && (t.type = "candlestick") + }) + }), ps(TL), fs(AL), KM.extend({ + type: "series.effectScatter", + dependencies: ["grid", "polar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + 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 CL = Ep.prototype; + CL.stopEffectAnimation = function () { + this.childAt(1).removeAll() + }, CL.startEffectAnimation = function (t) { + for (var e = t.symbolType, i = t.color, n = this.childAt(1), o = 0; o < 3; o++) { + var a = Tl(e, -1, -1, 2, 2, i); + a.attr({style: {strokeNoScale: !0}, z2: 99, silent: !0, scale: [.5, .5]}); + var r = -o / 3 * t.period + t.effectOffset; + a.animate("", !0).when(t.period, {scale: [t.rippleScale / 2, t.rippleScale / 2]}).delay(r).start(), a.animateStyle(!0).when(t.period, {opacity: 0}).delay(r).start(), n.add(a) + } + Op(n, t) + }, CL.updateEffectAnimation = function (t) { + for (var e = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) { + var a = n[o]; + if (e[a] !== t[a]) return this.stopEffectAnimation(), void this.startEffectAnimation(t) + } + Op(i, t) + }, CL.highlight = function () { + this.trigger("emphasis") + }, CL.downplay = function () { + this.trigger("normal") + }, CL.updateData = function (t, e) { + var i = t.hostModel; + this.childAt(0).updateData(t, e); + var n = this.childAt(1), o = t.getItemModel(e), a = t.getItemVisual(e, "symbol"), + r = Np(t.getItemVisual(e, "symbolSize")), s = t.getItemVisual(e, "color"); + n.attr("scale", r), n.traverse(function (t) { + t.attr({fill: s}) + }); + var l = o.getShallow("symbolOffset"); + if (l) { + var u = n.position; + u[0] = Do(l[0], r[0]), u[1] = Do(l[1], r[1]) + } + n.rotation = (o.getShallow("symbolRotate") || 0) * Math.PI / 180 || 0; + var h = {}; + if (h.showEffectOn = i.get("showEffectOn"), h.rippleScale = o.get("rippleEffect.scale"), h.brushType = o.get("rippleEffect.brushType"), h.period = 1e3 * o.get("rippleEffect.period"), h.effectOffset = e / t.count(), h.z = o.getShallow("z") || 0, h.zlevel = o.getShallow("zlevel") || 0, h.symbolType = a, h.color = s, this.off("mouseover").off("mouseout").off("emphasis").off("normal"), "render" === h.showEffectOn) this._effectCfg ? this.updateEffectAnimation(h) : this.startEffectAnimation(h), this._effectCfg = h; else { + this._effectCfg = null, this.stopEffectAnimation(); + var c = this.childAt(0), d = function () { + c.highlight(), "render" !== h.showEffectOn && this.startEffectAnimation(h) + }, f = function () { + c.downplay(), "render" !== h.showEffectOn && this.stopEffectAnimation() + }; + this.on("mouseover", d, this).on("mouseout", f, this).on("emphasis", d, this).on("normal", f, this) + } + this._effectCfg = h + }, CL.fadeOut = function (t) { + this.off("mouseover").off("mouseout").off("emphasis").off("normal"), t && t() + }, u(Ep, sw), _s({ + type: "effectScatter", init: function () { + this._symbolDraw = new Ql(Ep) + }, render: function (t, e, i) { + var n = t.getData(), o = this._symbolDraw; + o.updateData(n), this.group.add(o.group) + }, updateTransform: function (t, e, i) { + var n = t.getData(); + this.group.dirty(); + var o = mD().reset(t); + o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n) + }, _updateGroupTransform: function (t) { + var e = t.coordinateSystem; + e && e.getRoamTransform && (this.group.transform = gt(e.getRoamTransform()), this.group.decomposeTransform()) + }, remove: function (t, e) { + this._symbolDraw && this._symbolDraw.remove(e) + }, dispose: function () { + } + }), ps(gD("effectScatter", "circle")), fs(mD("effectScatter")); + var LL = "undefined" == typeof Uint32Array ? Array : Uint32Array, + kL = "undefined" == typeof Float64Array ? Array : Float64Array, PL = KM.extend({ + type: "series.lines", + dependencies: ["grid", "polar"], + visualColorAccessPath: "lineStyle.color", + init: function (t) { + t.data = t.data || [], Rp(t); + var e = this._processFlatCoordsArray(t.data); + this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(e.count)), PL.superApply(this, "init", arguments) + }, + mergeOption: function (t) { + if (t.data = t.data || [], Rp(t), t.data) { + var e = this._processFlatCoordsArray(t.data); + this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(e.count)) + } + PL.superApply(this, "mergeOption", arguments) + }, + appendData: function (t) { + var e = this._processFlatCoordsArray(t.data); + e.flatCoords && (this._flatCoords ? (this._flatCoords = z(this._flatCoords, e.flatCoords), this._flatCoordsOffset = z(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset), t.data = new Float32Array(e.count)), this.getRawData().appendData(t.data) + }, + _getCoordsFromItemModel: function (t) { + var e = this.getData().getItemModel(t); + return e.option instanceof Array ? e.option : e.getShallow("coords") + }, + getLineCoordsCount: function (t) { + return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length + }, + getLineCoords: function (t, e) { + if (this._flatCoordsOffset) { + for (var i = this._flatCoordsOffset[2 * t], n = this._flatCoordsOffset[2 * t + 1], o = 0; o < n; o++) e[o] = e[o] || [], e[o][0] = this._flatCoords[i + 2 * o], e[o][1] = this._flatCoords[i + 2 * o + 1]; + return n + } + for (var a = this._getCoordsFromItemModel(t), o = 0; o < a.length; o++) e[o] = e[o] || [], e[o][0] = a[o][0], e[o][1] = a[o][1]; + return a.length + }, + _processFlatCoordsArray: function (t) { + var e = 0; + if (this._flatCoords && (e = this._flatCoords.length), "number" == typeof t[0]) { + for (var i = t.length, n = new LL(i), o = new kL(i), a = 0, r = 0, s = 0, l = 0; l < i;) { + s++; + var u = t[l++]; + n[r++] = a + e, n[r++] = u; + for (var h = 0; h < u; h++) { + var c = t[l++], d = t[l++]; + o[a++] = c, o[a++] = d + } + } + return {flatCoordsOffset: new Uint32Array(n.buffer, 0, r), flatCoords: o, count: s} + } + return {flatCoordsOffset: null, flatCoords: null, count: t.length} + }, + getInitialData: function (t, e) { + var i = new sT(["value"], this); + return i.hasItemOption = !1, i.initData(t.data, [], function (t, e, n, o) { + if (t instanceof Array) return NaN; + i.hasItemOption = !0; + var a = t.value; + return null != a ? a instanceof Array ? a[o] : a : 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"), o = e.get("toName"), a = []; + return null != n && a.push(n), null != o && a.push(o), Zo(a.join(" > ")) + }, + preventIncremental: function () { + return !!this.get("effect.show") + }, + getProgressive: function () { + var t = this.option.progressive; + return null == t ? this.option.large ? 1e4 : this.get("progressive") : t + }, + getProgressiveThreshold: function () { + var t = this.option.progressiveThreshold; + return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t + }, + defaultOption: { + coordinateSystem: "geo", + zlevel: 0, + z: 2, + legendHoverLink: !0, + hoverAnimation: !0, + xAxisIndex: 0, + yAxisIndex: 0, + symbol: ["none", "none"], + symbolSize: [10, 10], + geoIndex: 0, + effect: {show: !1, period: 4, constantSpeed: 0, symbol: "circle", symbolSize: 3, loop: !0, trailLength: .2}, + large: !1, + largeThreshold: 2e3, + polyline: !1, + label: {show: !1, position: "end"}, + lineStyle: {opacity: .5} + } + }), NL = zp.prototype; + NL.createLine = function (t, e, i) { + return new bd(t, e, i) + }, NL._updateEffectSymbol = function (t, e) { + var i = t.getItemModel(e).getModel("effect"), n = i.get("symbolSize"), o = i.get("symbol"); + y(n) || (n = [n, n]); + var a = i.get("color") || t.getItemVisual(e, "color"), r = this.childAt(1); + this._symbolType !== o && (this.remove(r), (r = Tl(o, -.5, -.5, 1, 1, a)).z2 = 100, r.culling = !0, this.add(r)), r && (r.setStyle("shadowColor", a), r.setStyle(i.getItemStyle(["color"])), r.attr("scale", n), r.setColor(a), r.attr("scale", n), this._symbolType = o, this._updateEffectAnimation(t, i, e)) + }, NL._updateEffectAnimation = function (t, e, i) { + var n = this.childAt(1); + if (n) { + var o = this, a = t.getItemLayout(i), r = 1e3 * e.get("period"), s = e.get("loop"), + l = e.get("constantSpeed"), u = T(e.get("delay"), function (e) { + return e / t.count() * r / 3 + }), h = "function" == typeof u; + if (n.ignore = !0, this.updateAnimationPoints(n, a), l > 0 && (r = this.getLineLength(n) / l * 1e3), r !== this._period || s !== this._loop) { + n.stopAnimation(); + var c = u; + h && (c = u(i)), n.__t > 0 && (c = -r * n.__t), n.__t = 0; + var d = n.animate("", s).when(r, {__t: 1}).delay(c).during(function () { + o.updateSymbolPosition(n) + }); + s || d.done(function () { + o.remove(n) + }), d.start() + } + this._period = r, this._loop = s + } + }, NL.getLineLength = function (t) { + return S_(t.__p1, t.__cp1) + S_(t.__cp1, t.__p2) + }, NL.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] + }, NL.updateData = function (t, e, i) { + this.childAt(0).updateData(t, e, i), this._updateEffectSymbol(t, e) + }, NL.updateSymbolPosition = function (t) { + var e = t.__p1, i = t.__p2, n = t.__cp1, o = t.__t, a = t.position, r = Qi, s = tn; + a[0] = r(e[0], n[0], i[0], o), a[1] = r(e[1], n[1], i[1], o); + var l = s(e[0], n[0], i[0], o), u = s(e[1], n[1], i[1], o); + t.rotation = -Math.atan2(u, l) - Math.PI / 2, t.ignore = !1 + }, NL.updateLayout = function (t, e) { + this.childAt(0).updateLayout(t, e); + var i = t.getItemModel(e).getModel("effect"); + this._updateEffectAnimation(t, i, e) + }, u(zp, sw); + var OL = Bp.prototype; + OL._createPolyline = function (t, e, i) { + var n = t.getItemLayout(e), o = new bS({shape: {points: n}}); + this.add(o), this._updateCommonStl(t, e, i) + }, OL.updateData = function (t, e, i) { + var n = t.hostModel; + fo(this.childAt(0), {shape: {points: t.getItemLayout(e)}}, n, e), this._updateCommonStl(t, e, i) + }, OL._updateCommonStl = function (t, e, i) { + var n = this.childAt(0), o = t.getItemModel(e), a = t.getItemVisual(e, "color"), s = i && i.lineStyle, + l = i && i.hoverLineStyle; + i && !t.hasItemOption || (s = o.getModel("lineStyle").getLineStyle(), l = o.getModel("emphasis.lineStyle").getLineStyle()), n.useStyle(r({ + strokeNoScale: !0, + fill: "none", + stroke: a + }, s)), n.hoverStyle = l, eo(this) + }, OL.updateLayout = function (t, e) { + this.childAt(0).setShape("points", t.getItemLayout(e)) + }, u(Bp, sw); + var EL = Vp.prototype; + EL.createLine = function (t, e, i) { + return new Bp(t, e, i) + }, EL.updateAnimationPoints = function (t, e) { + this._points = e; + for (var i = [0], n = 0, o = 1; o < e.length; o++) { + var a = e[o - 1], r = e[o]; + n += S_(a, r), i.push(n) + } + if (0 !== n) { + for (o = 0; o < i.length; o++) i[o] /= n; + this._offsets = i, this._length = n + } + }, EL.getLineLength = function (t) { + return this._length + }, EL.updateSymbolPosition = function (t) { + var e = t.__t, i = this._points, n = this._offsets, o = i.length; + if (n) { + var a = this._lastFrame; + if (e < this._lastFramePercent) { + for (r = Math.min(a + 1, o - 1); r >= 0 && !(n[r] <= e); r--) ; + r = Math.min(r, o - 2) + } else { + for (var r = a; r < o && !(n[r] > e); r++) ; + r = Math.min(r - 1, o - 2) + } + J(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 + } + }, u(Vp, zp); + var RL = En({ + shape: {polyline: !1, curveness: 0, segs: []}, buildPath: function (t, e) { + var i = e.segs, n = e.curveness; + if (e.polyline) for (r = 0; r < i.length;) { + var o = i[r++]; + if (o > 0) { + t.moveTo(i[r++], i[r++]); + for (var a = 1; a < o; a++) t.lineTo(i[r++], i[r++]) + } + } else for (var r = 0; r < i.length;) { + var s = i[r++], l = i[r++], u = i[r++], h = i[r++]; + if (t.moveTo(s, l), n > 0) { + var c = (s + u) / 2 - (l - h) * n, d = (l + h) / 2 - (u - s) * n; + t.quadraticCurveTo(c, d, u, h) + } else t.lineTo(u, h) + } + }, findDataIndex: function (t, e) { + var i = this.shape, n = i.segs, o = i.curveness; + if (i.polyline) for (var a = 0, r = 0; r < n.length;) { + var s = n[r++]; + if (s > 0) for (var l = n[r++], u = n[r++], h = 1; h < s; h++) if (cn(l, u, c = n[r++], d = n[r++])) return a; + a++ + } else for (var a = 0, r = 0; r < n.length;) { + var l = n[r++], u = n[r++], c = n[r++], d = n[r++]; + if (o > 0) { + if (fn(l, u, (l + c) / 2 - (u - d) * o, (u + d) / 2 - (c - l) * o, c, d)) return a + } else if (cn(l, u, c, d)) return a; + a++ + } + return -1 + } + }), zL = Gp.prototype; + zL.isPersistent = function () { + return !this._incremental + }, zL.updateData = function (t) { + this.group.removeAll(); + var e = new RL({rectHover: !0, cursor: "default"}); + e.setShape({segs: t.getLayout("linesPoints")}), this._setCommon(e, t), this.group.add(e), this._incremental = null + }, zL.incrementalPrepareUpdate = function (t) { + this.group.removeAll(), this._clearIncremental(), t.count() > 5e5 ? (this._incremental || (this._incremental = new On({silent: !0})), this.group.add(this._incremental)) : this._incremental = null + }, zL.incrementalUpdate = function (t, e) { + var i = new RL; + i.setShape({segs: e.getLayout("linesPoints")}), this._setCommon(i, e, !!this._incremental), this._incremental ? this._incremental.addDisplayable(i, !0) : (i.rectHover = !0, i.cursor = "default", i.__startIndex = t.start, this.group.add(i)) + }, zL.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, zL._setCommon = function (t, e, i) { + var n = e.hostModel; + t.setShape({ + polyline: n.get("polyline"), + curveness: n.get("lineStyle.curveness") + }), t.useStyle(n.getModel("lineStyle").getLineStyle()), t.style.strokeNoScale = !0; + var o = e.getVisual("color"); + o && t.setStyle("stroke", o), t.setStyle("fill"), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function (e) { + t.dataIndex = null; + var i = t.findDataIndex(e.offsetX, e.offsetY); + i > 0 && (t.dataIndex = i + t.__startIndex) + })) + }, zL._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }; + var BL = { + seriesType: "lines", plan: QM(), reset: function (t) { + var e = t.coordinateSystem, i = t.get("polyline"), n = t.pipelineContext.large; + return { + progress: function (o, a) { + var r = []; + if (n) { + var s, l = o.end - o.start; + if (i) { + for (var u = 0, h = o.start; h < o.end; h++) u += t.getLineCoordsCount(h); + s = new Float32Array(l + 2 * u) + } else s = new Float32Array(4 * l); + for (var c = 0, d = [], h = o.start; h < o.end; h++) { + g = t.getLineCoords(h, r), i && (s[c++] = g); + for (var f = 0; f < g; f++) d = e.dataToPoint(r[f], !1, d), s[c++] = d[0], s[c++] = d[1] + } + a.setLayout("linesPoints", s) + } else for (h = o.start; h < o.end; h++) { + var p = a.getItemModel(h), g = t.getLineCoords(h, r), m = []; + if (i) for (var v = 0; v < g; v++) m.push(e.dataToPoint(r[v])); else { + m[0] = e.dataToPoint(r[0]), m[1] = e.dataToPoint(r[1]); + var y = p.get("lineStyle.curveness"); + +y && (m[2] = [(m[0][0] + m[1][0]) / 2 - (m[0][1] - m[1][1]) * y, (m[0][1] + m[1][1]) / 2 - (m[1][0] - m[0][0]) * y]) + } + a.setItemLayout(h, m) + } + } + } + } + }; + _s({ + type: "lines", init: function () { + }, render: function (t, e, i) { + var n = t.getData(), o = this._updateLineDraw(n, t), a = t.get("zlevel"), r = t.get("effect.trailLength"), + s = i.getZr(), l = "svg" === s.painter.getType(); + l || s.painter.getLayer(a).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {motionBlur: !1}), this._showEffect(t) && r && (l || s.configLayer(a, { + motionBlur: !0, + lastFrameAlpha: Math.max(Math.min(r / 10 + .9, 1), 0) + })), o.updateData(n), this._lastZlevel = a, this._finished = !0 + }, incrementalPrepareRender: function (t, e, i) { + var n = t.getData(); + this._updateLineDraw(n, t).incrementalPrepareUpdate(n), this._clearLayer(i), this._finished = !1 + }, incrementalRender: function (t, e, i) { + this._lineDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count() + }, updateTransform: function (t, e, i) { + var n = t.getData(), o = t.pipelineContext; + if (!this._finished || o.large || o.progressiveRender) return {update: !0}; + var a = BL.reset(t); + a.progress && a.progress({start: 0, end: n.count()}, n), this._lineDraw.updateLayout(), this._clearLayer(i) + }, _updateLineDraw: function (t, e) { + var i = this._lineDraw, n = this._showEffect(e), o = !!e.get("polyline"), a = e.pipelineContext.large; + return i && n === this._hasEffet && o === this._isPolyline && a === this._isLargeDraw || (i && i.remove(), i = this._lineDraw = a ? new Gp : new Sd(o ? n ? Vp : Bp : n ? zp : bd), this._hasEffet = n, this._isPolyline = o, this._isLargeDraw = a, this.group.removeAll()), this.group.add(i.group), i + }, _showEffect: function (t) { + return !!t.get("effect.show") + }, _clearLayer: function (t) { + var e = t.getZr(); + "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0) + }, remove: function (t, e) { + this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(e) + }, dispose: function () { + } + }); + var VL = "lineStyle.opacity".split("."), GL = { + seriesType: "lines", reset: function (t, e, i) { + var n = Wp(t.get("symbol")), o = Wp(t.get("symbolSize")), a = t.getData(); + return a.setVisual("fromSymbol", n && n[0]), a.setVisual("toSymbol", n && n[1]), a.setVisual("fromSymbolSize", o && o[0]), a.setVisual("toSymbolSize", o && o[1]), a.setVisual("opacity", t.get(VL)), { + dataEach: a.hasItemOption ? function (t, e) { + var i = t.getItemModel(e), n = Wp(i.getShallow("symbol", !0)), + o = Wp(i.getShallow("symbolSize", !0)), a = i.get(VL); + n[0] && t.setItemVisual(e, "fromSymbol", n[0]), n[1] && t.setItemVisual(e, "toSymbol", n[1]), o[0] && t.setItemVisual(e, "fromSymbolSize", o[0]), o[1] && t.setItemVisual(e, "toSymbolSize", o[1]), t.setItemVisual(e, "opacity", a) + } : null + } + } + }; + fs(BL), ps(GL), KM.extend({ + type: "series.heatmap", + getInitialData: function (t, e) { + return Xs(this.getSource(), this, {generateCoord: "value"}) + }, + preventIncremental: function () { + var t = Ca.get(this.get("coordinateSystem")); + if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1] + }, + defaultOption: { + coordinateSystem: "cartesian2d", + zlevel: 0, + z: 2, + geoIndex: 0, + blurSize: 30, + pointSize: 20, + maxOpacity: 1, + minOpacity: 0 + } + }); + Fp.prototype = { + update: function (t, e, i, n, o, a) { + var r = this._getBrush(), s = this._getGradient(t, o, "inRange"), l = this._getGradient(t, o, "outOfRange"), + u = this.pointSize + this.blurSize, h = this.canvas, c = h.getContext("2d"), d = t.length; + h.width = e, h.height = i; + for (var f = 0; f < d; ++f) { + var p = t[f], g = p[0], m = p[1], v = n(p[2]); + c.globalAlpha = v, c.drawImage(r, g - u, m - u) + } + if (!h.width || !h.height) return h; + for (var y = c.getImageData(0, 0, h.width, h.height), x = y.data, _ = 0, w = x.length, b = this.minOpacity, S = this.maxOpacity - b; _ < w;) { + var v = x[_ + 3] / 256, M = 4 * Math.floor(255 * v); + if (v > 0) { + var I = a(v) ? s : l; + v > 0 && (v = v * S + b), 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), h + }, _getBrush: function () { + var t = this._brushCanvas || (this._brushCanvas = m_()), 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, o = n[i] || (n[i] = new Uint8ClampedArray(1024)), a = [0, 0, 0, 0], r = 0, s = 0; s < 256; s++) e[i](s / 255, !0, a), o[r++] = a[0], o[r++] = a[1], o[r++] = a[2], o[r++] = a[3]; + return o + } + }, _s({ + 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(), this._incrementalDisplayable = null; + var o = t.coordinateSystem; + "cartesian2d" === o.type || "calendar" === o.type ? this._renderOnCartesianAndCalendar(t, i, 0, t.getData().count()) : Up(o) && this._renderOnGeo(o, t, n, i) + }, incrementalPrepareRender: function (t, e, i) { + this.group.removeAll() + }, incrementalRender: function (t, e, i, n) { + e.coordinateSystem && this._renderOnCartesianAndCalendar(e, n, t.start, t.end, !0) + }, _renderOnCartesianAndCalendar: function (t, e, i, n, o) { + var r, s, l = t.coordinateSystem; + if ("cartesian2d" === l.type) { + var u = l.getAxis("x"), h = l.getAxis("y"); + r = u.getBandWidth(), s = h.getBandWidth() + } + for (var c = this.group, d = t.getData(), f = t.getModel("itemStyle").getItemStyle(["color"]), p = t.getModel("emphasis.itemStyle").getItemStyle(), g = t.getModel("label"), m = t.getModel("emphasis.label"), v = l.type, y = "cartesian2d" === v ? [d.mapDimension("x"), d.mapDimension("y"), d.mapDimension("value")] : [d.mapDimension("time"), d.mapDimension("value")], x = i; x < n; x++) { + var _; + if ("cartesian2d" === v) { + if (isNaN(d.get(y[2], x))) continue; + var w = l.dataToPoint([d.get(y[0], x), d.get(y[1], x)]); + _ = new SS({ + shape: {x: w[0] - r / 2, y: w[1] - s / 2, width: r, height: s}, + style: {fill: d.getItemVisual(x, "color"), opacity: d.getItemVisual(x, "opacity")} + }) + } else { + if (isNaN(d.get(y[1], x))) continue; + _ = new SS({ + z2: 1, + shape: l.dataToRect([d.get(y[0], x)]).contentShape, + style: {fill: d.getItemVisual(x, "color"), opacity: d.getItemVisual(x, "opacity")} + }) + } + var b = d.getItemModel(x); + d.hasItemOption && (f = b.getModel("itemStyle").getItemStyle(["color"]), p = b.getModel("emphasis.itemStyle").getItemStyle(), g = b.getModel("label"), m = b.getModel("emphasis.label")); + var S = t.getRawValue(x), M = "-"; + S && null != S[2] && (M = S[2]), io(f, p, g, m, { + labelFetcher: t, + labelDataIndex: x, + defaultText: M, + isRectText: !0 + }), _.setStyle(f), eo(_, d.hasItemOption ? p : a({}, p)), _.incremental = o, o && (_.useHoverLayer = !0), c.add(_), d.setItemGraphicEl(x, _) + } + }, _renderOnGeo: function (t, e, i, n) { + var o = i.targetVisuals.inRange, a = i.targetVisuals.outOfRange, r = e.getData(), + s = this._hmLayer || this._hmLayer || new Fp; + 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(), u = t.getRoamTransform(); + l.applyTransform(u); + var h = Math.max(l.x, 0), c = Math.max(l.y, 0), d = Math.min(l.width + l.x, n.getWidth()), + f = Math.min(l.height + l.y, n.getHeight()), p = d - h, g = f - c, + m = [r.mapDimension("lng"), r.mapDimension("lat"), r.mapDimension("value")], + v = r.mapArray(m, function (e, i, n) { + var o = t.dataToPoint([e, i]); + return o[0] -= h, o[1] -= c, o.push(n), o + }), y = i.getExtent(), + x = "visualMap.continuous" === i.type ? Zp(y, i.option.range) : Hp(y, i.getPieceList(), i.option.selected); + s.update(v, p, g, o.color.getNormalizer(), { + inRange: o.color.getColorMapper(), + outOfRange: a.color.getColorMapper() + }, x); + var _ = new Je({style: {width: p, height: g, x: h, y: c, image: s.canvas}, silent: !0}); + this.group.add(_) + }, dispose: function () { + } + }); + var WL = GD.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, WL.superApply(this, "getInitialData", arguments) + } + }), FL = ["itemStyle", "borderWidth"], HL = [{xy: "x", wh: "width", index: 0, posDesc: ["left", "right"]}, { + xy: "y", + wh: "height", + index: 1, + posDesc: ["top", "bottom"] + }], ZL = new pS; + _s({ + type: "pictorialBar", render: function (t, e, i) { + var n = this.group, o = t.getData(), a = this._data, r = t.coordinateSystem, + s = !!r.getBaseAxis().isHorizontal(), l = r.grid.getRect(), u = { + 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: HL[+s], + categoryDim: HL[1 - s] + }; + return o.diff(a).add(function (t) { + if (o.hasValue(t)) { + var e = ng(o, t), i = Xp(o, t, e, u), a = sg(o, u, i); + o.setItemGraphicEl(t, a), n.add(a), fg(a, u, i) + } + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + if (o.hasValue(t)) { + var r = ng(o, t), s = Xp(o, t, r, u), l = hg(o, s); + i && l !== i.__pictorialShapeStr && (n.remove(i), o.setItemGraphicEl(t, null), i = null), i ? lg(i, u, s) : i = sg(o, u, s, !0), o.setItemGraphicEl(t, i), i.__pictorialSymbolMeta = s, n.add(i), fg(i, u, s) + } else n.remove(i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + e && ug(a, t, e.__pictorialSymbolMeta.animationModel, e) + }).execute(), this._data = o, this.group + }, dispose: B, remove: function (t, e) { + var i = this.group, n = this._data; + t.get("animation") ? n && n.eachItemGraphicEl(function (e) { + ug(n, e.dataIndex, t, e) + }) : i.removeAll() + } + }); + fs(v(cl, "pictorialBar")), ps(gD("pictorialBar", "roundRect")); + var UL = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom", this.orient = null + }; + UL.prototype = { + constructor: UL, 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 + }, u(UL, qT), gg.prototype = { + type: "singleAxis", axisPointerEnabled: !0, constructor: gg, _init: function (t, e, i) { + var n = this.dimension, o = new UL(n, xl(t), [0, 0], t.get("type"), t.get("position")), + a = "category" === o.type; + o.onBand = a && t.get("boundaryGap"), o.inverse = t.get("inverse"), o.orient = t.get("orient"), t.axis = o, o.model = t, o.coordinateSystem = this, this._axis = o + }, update: function (t, e) { + t.eachSeries(function (t) { + if (t.coordinateSystem === this) { + var e = t.getData(); + d(e.mapDimension(this.dimension, !0), function (t) { + this._axis.scale.unionExtentFromData(e, t) + }, this), yl(this._axis.scale, this._axis.model) + } + }, this) + }, resize: function (t, e) { + this._rect = Qo({ + 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], + o = e.reverse ? 1 : 0; + e.setExtent(n[o], n[1 - o]), this._updateAxisTransform(e, i ? t.x : t.y) + }, _updateAxisTransform: function (t, e) { + var i = t.getExtent(), n = i[0] + i[1], o = t.isHorizontal(); + t.toGlobalCoord = o ? function (t) { + return t + e + } : function (t) { + return n - t + e + }, t.toLocalCoord = o ? 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 = [], o = "horizontal" === e.orient ? 0 : 1; + return t instanceof Array && (t = t[0]), n[o] = e.toGlobalCoord(e.dataToCoord(+t)), n[1 - o] = 0 === o ? i.y + i.height / 2 : i.x + i.width / 2, n + } + }, Ca.register("single", { + create: function (t, e) { + var i = []; + return t.eachComponent("singleAxis", function (n, o) { + var a = new gg(n, t, e); + a.name = "single_" + o, a.resize(n, e), n.coordinateSystem = a, i.push(a) + }), 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: gg.prototype.dimensions + }); + var XL = ["axisLine", "axisTickLabel", "axisName"], jL = ED.extend({ + type: "singleAxis", axisPointerClass: "SingleAxisPointer", render: function (t, e, i, n) { + var o = this.group; + o.removeAll(); + var a = mg(t), r = new LD(t, a); + d(XL, r.add, r), o.add(r.getGroup()), t.get("splitLine.show") && this._splitLine(t), jL.superCall(this, "render", t, e, i, n) + }, _splitLine: function (t) { + var e = t.axis; + if (!e.scale.isBlank()) { + var i = t.getModel("splitLine"), n = i.getModel("lineStyle"), o = n.get("width"), a = n.get("color"); + a = a instanceof Array ? a : [a]; + for (var r = t.coordinateSystem.getRect(), s = e.isHorizontal(), l = [], u = 0, h = e.getTicksCoords({tickModel: i}), c = [], d = [], f = 0; f < h.length; ++f) { + var p = e.toGlobalCoord(h[f].coord); + s ? (c[0] = p, c[1] = r.y, d[0] = p, d[1] = r.y + r.height) : (c[0] = r.x, c[1] = p, d[0] = r.x + r.width, d[1] = p); + var g = u++ % a.length; + l[g] = l[g] || [], l[g].push(new MS(Gn({ + shape: {x1: c[0], y1: c[1], x2: d[0], y2: d[1]}, + style: {lineWidth: o}, + silent: !0 + }))) + } + for (f = 0; f < l.length; ++f) this.group.add(zS(l[f], { + style: { + stroke: a[f % a.length], + lineDash: n.getLineDash(o), + lineWidth: o + }, silent: !0 + })) + } + } + }), YL = hM.extend({ + type: "singleAxis", + layoutMode: "box", + axis: null, + coordinateSystem: null, + getCoordSysModel: function () { + return this + } + }), qL = { + 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}} + }; + n(YL.prototype, ET), MD("single", YL, function (t, e) { + return e.type || (e.data ? "category" : "value") + }, qL); + var KL = function (t, e) { + var i, n = [], o = t.seriesIndex; + if (null == o || !(i = e.getSeriesByIndex(o))) return {point: []}; + var a = i.getData(), r = Pi(a, t); + if (null == r || r < 0 || y(r)) return {point: []}; + var s = a.getItemGraphicEl(r), l = i.coordinateSystem; + if (i.getTooltipPosition) n = i.getTooltipPosition(r) || []; else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(f(l.dimensions, function (t) { + return a.mapDimension(t) + }), r, !0)) || []; else if (s) { + var u = s.getBoundingRect().clone(); + u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2] + } + return {point: n, el: s} + }, $L = d, JL = v, QL = Ni(), tk = (vs({ + 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 + } + } + }), Ni()), ek = d, ik = ys({ + type: "axisPointer", render: function (t, e, i) { + var n = e.getComponent("tooltip"), o = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click"; + Dg("axisPointer", i, function (t, e, i) { + "none" !== o && ("leave" === t || o.indexOf(t) >= 0) && i({ + type: "updateAxisPointer", + currTrigger: t, + x: e && e.offsetX, + y: e && e.offsetY + }) + }) + }, remove: function (t, e) { + Ng(e.getZr(), "axisPointer"), ik.superApply(this._model, "remove", arguments) + }, dispose: function (t, e) { + Ng("axisPointer", e), ik.superApply(this._model, "dispose", arguments) + } + }), nk = Ni(), ok = i, ak = m; + (Og.prototype = { + _group: null, + _lastGraphicKey: null, + _handle: null, + _dragging: !1, + _lastValue: null, + _lastStatus: null, + _payloadInfo: null, + animationThreshold: 15, + render: function (t, e, i, n) { + var o = e.get("value"), a = e.get("status"); + if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== o || this._lastStatus !== a) { + this._lastValue = o, this._lastStatus = a; + var r = this._group, s = this._handle; + if (!a || "hide" === a) return r && r.hide(), void (s && s.hide()); + r && r.show(), s && s.show(); + var l = {}; + this.makeElOption(l, o, t, e, i); + var u = l.graphicKey; + u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u; + var h = this._moveAnimation = this.determineAnimation(t, e); + if (r) { + var c = v(Eg, e, h); + this.updatePointerEl(r, l, c, e), this.updateLabelEl(r, l, c, e) + } else r = this._group = new sw, this.createPointerEl(r, l, t, e), this.createLabelEl(r, l, t, e), i.getZr().add(r); + Vg(r, e, !0), this._renderHandle(o) + } + }, + remove: function (t) { + this.clear(t) + }, + dispose: function (t) { + this.clear(t) + }, + determineAnimation: function (t, e) { + var i = e.get("animation"), n = t.axis, o = "category" === n.type, a = e.get("snap"); + if (!a && !o) return !1; + if ("auto" === i || null == i) { + var r = this.animationThreshold; + if (o && n.getBandWidth() > r) return !0; + if (a) { + var s = qu(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, o) { + }, + createPointerEl: function (t, e, i, n) { + var o = e.pointer; + if (o) { + var a = nk(t).pointerEl = new BS[o.type](ok(e.pointer)); + t.add(a) + } + }, + createLabelEl: function (t, e, i, n) { + if (e.label) { + var o = nk(t).labelEl = new SS(ok(e.label)); + t.add(o), zg(o, n) + } + }, + updatePointerEl: function (t, e, i) { + var n = nk(t).pointerEl; + n && (n.setStyle(e.pointer.style), i(n, {shape: e.pointer.shape})) + }, + updateLabelEl: function (t, e, i, n) { + var o = nk(t).labelEl; + o && (o.setStyle(e.label.style), i(o, {shape: e.label.shape, position: e.label.position}), zg(o, n)) + }, + _renderHandle: function (t) { + if (!this._dragging && this.updateHandleTransform) { + var e = this._axisPointerModel, i = this._api.getZr(), n = this._handle, o = e.getModel("handle"), + a = e.get("status"); + if (!o.get("show") || !a || "hide" === a) return n && i.remove(n), void (this._handle = null); + var r; + this._handle || (r = !0, n = this._handle = _o(o.get("icon"), { + cursor: "move", + draggable: !0, + onmousemove: function (t) { + zw(t.event) + }, + onmousedown: ak(this._onHandleDragMove, this, 0, 0), + drift: ak(this._onHandleDragMove, this), + ondragend: ak(this._onHandleDragEnd, this) + }), i.add(n)), Vg(n, e, !1); + var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]; + n.setStyle(o.getItemStyle(null, s)); + var l = o.get("size"); + y(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), wr(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, r) + } + }, + _moveHandleToValue: function (t, e) { + Eg(this._axisPointerModel, !e && this._moveAnimation, this._handle, Bg(this.getHandleTransform(t, this._axisModel, this._axisPointerModel))) + }, + _onHandleDragMove: function (t, e) { + var i = this._handle; + if (i) { + this._dragging = !0; + var n = this.updateHandleTransform(Bg(i), [t, e], this._axisModel, this._axisPointerModel); + this._payloadInfo = n, i.stopAnimation(), i.attr(Bg(n)), nk(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 i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]} + } + }).constructor = Og, Gi(Og); + var rk = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis, r = a.grid, s = n.get("type"), l = qg(r, a).getOtherAxis(a).getGlobalExtent(), + u = a.toGlobalCoord(a.dataToCoord(e, !0)); + if (s && "none" !== s) { + var h = Gg(n), c = sk[s](a, u, l, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Ug(e, t, eh(r.model, i), i, n, o) + }, getHandleTransform: function (t, e, i) { + var n = eh(e.axis.grid.model, e, {labelInside: !1}); + return n.labelMargin = i.get("handle.margin"), { + position: Zg(e.axis, t, n), + rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0) + } + }, updateHandleTransform: function (t, e, i, n) { + var o = i.axis, a = o.grid, r = o.getGlobalExtent(!0), s = qg(a, o).getOtherAxis(o).getGlobalExtent(), + l = "x" === o.dim ? 0 : 1, u = t.position; + u[l] += e[l], u[l] = Math.min(r[1], u[l]), u[l] = Math.max(r[0], u[l]); + var h = (s[1] + s[0]) / 2, c = [h, h]; + c[l] = u[l]; + var d = [{verticalAlign: "middle"}, {align: "center"}]; + return {position: u, rotation: t.rotation, cursorPoint: c, tooltipOption: d[l]} + } + }), sk = { + line: function (t, e, i, n) { + var o = Xg([e, i[0]], [e, i[1]], Kg(t)); + return Gn({shape: o, style: n}), {type: "Line", shape: o} + }, shadow: function (t, e, i, n) { + var o = Math.max(1, t.getBandWidth()), a = i[1] - i[0]; + return {type: "Rect", shape: jg([e - o / 2, i[0]], [o, a], Kg(t))} + } + }; + ED.registerAxisPointerClass("CartesianAxisPointer", rk), us(function (t) { + if (t) { + (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {}); + var e = t.axisPointer.link; + e && !y(e) && (t.axisPointer.link = [e]) + } + }), hs(LI.PROCESSOR.STATISTIC, function (t, e) { + t.getComponent("axisPointer").coordSysAxesInfo = Fu(t, e) + }), cs({type: "updateAxisPointer", event: "updateAxisPointer", update: ":updateAxisPointer"}, function (t, e, i) { + var n = t.currTrigger, o = [t.x, t.y], a = t, r = t.dispatchAction || m(i.dispatchAction, i), + s = e.getComponent("axisPointer").coordSysAxesInfo; + if (s) { + Tg(o) && (o = KL({seriesIndex: a.seriesIndex, dataIndex: a.dataIndex}, e).point); + var l = Tg(o), u = a.axesInfo, h = s.axesInfo, c = "leave" === n || Tg(o), d = {}, f = {}, + p = {list: [], map: {}}, g = {showPointer: JL(xg, f), showTooltip: JL(_g, p)}; + $L(s.coordSysMap, function (t, e) { + var i = l || t.containPoint(o); + $L(s.coordSysAxesInfo[e], function (t, e) { + var n = t.axis, a = Mg(u, t); + if (!c && i && (!u || a)) { + var r = a && a.value; + null != r || l || (r = n.pointToData(o)), null != r && vg(t, r, g, !1, d) + } + }) + }); + var v = {}; + return $L(h, function (t, e) { + var i = t.linkGroup; + i && !f[e] && $L(i.axesInfo, function (e, n) { + var o = f[n]; + if (e !== t && o) { + var a = o.value; + i.mapper && (a = t.axis.scale.parse(i.mapper(a, Ig(e), Ig(t)))), v[t.key] = a + } + }) + }), $L(v, function (t, e) { + vg(h[e], t, g, !0, d) + }), wg(f, h, d), bg(p, o, t, r), Sg(h, 0, i), d + } + }); + var lk = ["x", "y"], uk = ["width", "height"], hk = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis, r = a.coordinateSystem, s = Jg(r, 1 - $g(a)), l = r.dataToPoint(e)[0], u = n.get("type"); + if (u && "none" !== u) { + var h = Gg(n), c = ck[u](a, l, s, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Ug(e, t, mg(i), i, n, o) + }, getHandleTransform: function (t, e, i) { + var n = mg(e, {labelInside: !1}); + return n.labelMargin = i.get("handle.margin"), { + position: Zg(e.axis, t, n), + rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0) + } + }, updateHandleTransform: function (t, e, i, n) { + var o = i.axis, a = o.coordinateSystem, r = $g(o), s = Jg(a, r), l = t.position; + l[r] += e[r], l[r] = Math.min(s[1], l[r]), l[r] = Math.max(s[0], l[r]); + var u = Jg(a, 1 - r), h = (u[1] + u[0]) / 2, c = [h, h]; + return c[r] = l[r], { + position: l, + rotation: t.rotation, + cursorPoint: c, + tooltipOption: {verticalAlign: "middle"} + } + } + }), ck = { + line: function (t, e, i, n) { + var o = Xg([e, i[0]], [e, i[1]], $g(t)); + return Gn({shape: o, style: n}), {type: "Line", shape: o} + }, shadow: function (t, e, i, n) { + var o = t.getBandWidth(), a = i[1] - i[0]; + return {type: "Rect", shape: jg([e - o / 2, i[0]], [o, a], $g(t))} + } + }; + ED.registerAxisPointerClass("SingleAxisPointer", hk), ys({type: "single"}); + var dk = KM.extend({ + type: "series.themeRiver", + dependencies: ["singleAxis"], + nameMap: null, + init: function (t) { + dk.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + } + }, + fixData: function (t) { + for (var e = t.length, i = f(Jf().key(function (t) { + return t[2] + }).entries(t), function (t) { + return {name: t.key, dataList: t.values} + }), n = i.length, o = -1, a = -1, r = 0; r < n; ++r) { + var s = i[r].dataList.length; + s > o && (o = s, a = r) + } + for (var l = 0; l < n; ++l) if (l !== a) for (var u = i[l].name, h = 0; h < o; ++h) { + for (var c = i[a].dataList[h][0], d = i[l].dataList.length, p = -1, g = 0; g < d; ++g) if (i[l].dataList[g][0] === c) { + p = g; + break + } + -1 === p && (t[e] = [], t[e][0] = c, t[e][1] = 0, t[e][2] = u, e++) + } + return t + }, + getInitialData: function (t, e) { + for (var i = e.queryComponents({ + mainType: "singleAxis", + index: this.get("singleAxisIndex"), + id: this.get("singleAxisId") + })[0].get("type"), n = g(t.data, function (t) { + return void 0 !== t[2] + }), o = this.fixData(n || []), a = [], r = this.nameMap = R(), s = 0, l = 0; l < o.length; ++l) a.push(o[l][2]), r.get(o[l][2]) || (r.set(o[l][2], s), s++); + var u = hT(o, { + coordDimensions: ["single"], + dimensionsDefine: [{name: "time", type: Ts(i)}, {name: "value", type: "float"}, { + name: "name", + type: "ordinal" + }], + encodeDefine: {single: 0, value: 1, itemName: 2} + }), h = new sT(u, this); + return h.initData(o), h + }, + getLayerSeries: function () { + for (var t = this.getData(), e = t.count(), i = [], n = 0; n < e; ++n) i[n] = n; + for (var o = f(Jf().key(function (e) { + return t.get("name", e) + }).entries(i), function (t) { + return {name: t.key, indices: t.values} + }), a = t.mapDimension("single"), r = 0; r < o.length; ++r) o[r].indices.sort(function (e, i) { + return t.get(a, e) - t.get(a, i) + }); + return o + }, + getAxisTooltipData: function (t, e, i) { + y(t) || (t = t ? [t] : []); + for (var n, o = this.getData(), a = this.getLayerSeries(), r = [], s = a.length, l = 0; l < s; ++l) { + for (var u = Number.MAX_VALUE, h = -1, c = a[l].indices.length, d = 0; d < c; ++d) { + var f = o.get(t[0], a[l].indices[d]), p = Math.abs(f - e); + p <= u && (n = f, u = p, h = a[l].indices[d]) + } + r.push(h) + } + return {dataIndices: r, nestestValue: n} + }, + formatTooltip: function (t) { + var e = this.getData(), i = e.getName(t), n = e.get(e.mapDimension("value"), t); + return (isNaN(n) || null == n) && (n = "-"), Zo(i + " : " + n) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "singleAxis", + boundaryGap: ["10%", "10%"], + singleAxisIndex: 0, + animationEasing: "linear", + label: {margin: 4, show: !0, position: "left", color: "#000", fontSize: 11}, + emphasis: {label: {show: !0}} + } + }); + _s({ + type: "themeRiver", init: function () { + this._layers = [] + }, render: function (t, e, i) { + function n(t) { + return t.name + } + + function o(e, i, n) { + var o = this._layers; + if ("remove" !== e) { + for (var u, h = [], c = [], f = l[i].indices, p = 0; p < f.length; p++) { + var g = r.getItemLayout(f[p]), m = g.x, v = g.y0, y = g.y; + h.push([m, v]), c.push([m, v + y]), u = r.getItemVisual(f[p], "color") + } + var x, _, w = r.getItemLayout(f[0]), b = r.getItemModel(f[p - 1]), S = b.getModel("label"), + M = S.get("margin"); + if ("add" === e) { + I = d[i] = new sw; + x = new pD({ + shape: { + points: h, + stackedOnPoints: c, + smooth: .4, + stackedOnSmooth: .4, + smoothConstraint: !1 + }, z2: 0 + }), _ = new fS({ + style: { + x: w.x - M, + y: w.y0 + w.y / 2 + } + }), I.add(x), I.add(_), s.add(I), x.setClipPath(Qg(x.getBoundingRect(), t, function () { + x.removeClipPath() + })) + } else { + var I = o[n]; + x = I.childAt(0), _ = I.childAt(1), s.add(I), d[i] = I, fo(x, { + shape: { + points: h, + stackedOnPoints: c + } + }, t), fo(_, {style: {x: w.x - M, y: w.y0 + w.y / 2}}, t) + } + var T = b.getModel("emphasis.itemStyle"), D = b.getModel("itemStyle"); + no(_.style, S, { + text: S.get("show") ? t.getFormattedLabel(f[p - 1], "normal") || r.getName(f[p - 1]) : null, + textVerticalAlign: "middle" + }), x.setStyle(a({fill: u}, D.getItemStyle(["color"]))), eo(x, T.getItemStyle()) + } else s.remove(o[i]) + } + + var r = t.getData(), s = this.group, l = t.getLayerSeries(), u = r.getLayout("layoutInfo"), h = u.rect, + c = u.boundaryGap; + s.attr("position", [0, h.y + c[0]]); + var d = {}; + new Ss(this._layersSeries || [], l, n, n).add(m(o, this, "add")).update(m(o, this, "update")).remove(m(o, this, "remove")).execute(), this._layersSeries = l, this._layers = d + }, dispose: function () { + } + }); + fs(function (t, e) { + t.eachSeriesByType("themeRiver", function (t) { + var e = t.getData(), i = t.coordinateSystem, n = {}, o = i.getRect(); + n.rect = o; + var a = t.get("boundaryGap"), r = i.getAxis(); + n.boundaryGap = a, "horizontal" === r.orient ? (a[0] = Do(a[0], o.height), a[1] = Do(a[1], o.height), tm(e, t, o.height - a[0] - a[1])) : (a[0] = Do(a[0], o.width), a[1] = Do(a[1], o.width), tm(e, t, o.width - a[0] - a[1])), e.setLayout("layoutInfo", n) + }) + }), ps(function (t) { + t.eachSeriesByType("themeRiver", function (t) { + var e = t.getData(), i = t.getRawData(), n = t.get("color"), o = R(); + e.each(function (t) { + o.set(e.getRawIndex(t), t) + }), i.each(function (a) { + var r = i.getName(a), s = n[(t.nameMap.get(r) - 1) % n.length]; + i.setItemVisual(a, "color", s); + var l = o.get(a); + null != l && e.setItemVisual(l, "color", s) + }) + }) + }), hs(iA("themeRiver")), KM.extend({ + type: "series.sunburst", + _viewRoot: null, + getInitialData: function (t, e) { + var i = {name: t.name, children: t.data}; + im(i); + var n = t.levels || [], o = {}; + return o.levels = n, ic.createTree(i, this, o).data + }, + optionUpdated: function () { + this.resetViewRoot() + }, + getDataParams: function (t) { + var e = KM.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); + return e.treePathInfo = Ac(i, this), e + }, + defaultOption: { + zlevel: 0, + z: 2, + center: ["50%", "50%"], + radius: [0, "75%"], + clockwise: !0, + startAngle: 90, + minAngle: 0, + percentPrecision: 2, + stillShowZeroSum: !0, + highlightPolicy: "descendant", + nodeClick: "rootToNode", + renderLabelForZeroData: !1, + label: { + rotate: "radial", + show: !0, + opacity: 1, + align: "center", + position: "inside", + distance: 5, + silent: !0, + emphasis: {} + }, + itemStyle: { + borderWidth: 1, + borderColor: "white", + opacity: 1, + emphasis: {}, + highlight: {opacity: 1}, + downplay: {opacity: .9} + }, + animationType: "expansion", + animationDuration: 1e3, + animationDurationUpdate: 500, + animationEasing: "cubicOut", + data: [], + levels: [], + sort: "desc" + }, + getViewRoot: function () { + return this._viewRoot + }, + resetViewRoot: function (t) { + t ? this._viewRoot = t : t = this._viewRoot; + var e = this.getRawData().tree.root; + t && (t === e || e.contains(t)) || (this._viewRoot = e) + } + }); + var fk = {NONE: "none", DESCENDANT: "descendant", ANCESTOR: "ancestor", SELF: "self"}, pk = 2, gk = 4, + mk = nm.prototype; + mk.updateData = function (t, e, i, o, s) { + this.node = e, e.piece = this, o = o || this._seriesModel, s = s || this._ecModel; + var l = this.childAt(0); + l.dataIndex = e.dataIndex; + var u = e.getModel(), h = e.getLayout(); + h || console.log(e.getLayout()); + var c = a({}, h); + c.label = null; + var d, f = om(e, 0, s), p = u.getModel("itemStyle").getItemStyle(); + d = r({ + lineJoin: "bevel", + fill: (d = "normal" === i ? p : n(u.getModel(i + ".itemStyle").getItemStyle(), p)).fill || f + }, d), t ? (l.setShape(c), l.shape.r = h.r0, fo(l, {shape: {r: h.r}}, o, e.dataIndex), l.useStyle(d)) : "object" == typeof d.fill && d.fill.type || "object" == typeof l.style.fill && l.style.fill.type ? (fo(l, {shape: c}, o), l.useStyle(d)) : fo(l, { + shape: c, + style: d + }, o), this._updateLabel(o, f, i); + var g = u.getShallow("cursor"); + if (g && l.attr("cursor", g), t) { + var m = o.getShallow("highlightPolicy"); + this._initEvents(l, e, o, m) + } + this._seriesModel = o || this._seriesModel, this._ecModel = s || this._ecModel + }, mk.onEmphasis = function (t) { + var e = this; + this.node.hostTree.root.eachNode(function (i) { + i.piece && (e.node === i ? i.piece.updateData(!1, i, "emphasis") : rm(i, e.node, t) ? i.piece.childAt(0).trigger("highlight") : t !== fk.NONE && i.piece.childAt(0).trigger("downplay")) + }) + }, mk.onNormal = function () { + this.node.hostTree.root.eachNode(function (t) { + t.piece && t.piece.updateData(!1, t, "normal") + }) + }, mk.onHighlight = function () { + this.updateData(!1, this.node, "highlight") + }, mk.onDownplay = function () { + this.updateData(!1, this.node, "downplay") + }, mk._updateLabel = function (t, e, i) { + function n(t) { + var e = r.get(t); + return null == e ? a.get(t) : e + } + + var o = this.node.getModel(), a = o.getModel("label"), + r = "normal" === i || "emphasis" === i ? a : o.getModel(i + ".label"), s = o.getModel("emphasis.label"), + l = T(t.getFormattedLabel(this.node.dataIndex, "normal", null, null, "label"), this.node.name); + !1 === n("show") && (l = ""); + var u = this.node.getLayout(), h = r.get("minAngle"); + null == h && (h = a.get("minAngle")), h = h / 180 * Math.PI; + var c = u.endAngle - u.startAngle; + null != h && Math.abs(c) < h && (l = ""); + var d = this.childAt(1); + io(d.style, d.hoverStyle || {}, a, s, { + defaultText: r.getShallow("show") ? l : null, + autoColor: e, + useInsideStyle: !0 + }); + var f, p = (u.startAngle + u.endAngle) / 2, g = Math.cos(p), m = Math.sin(p), v = n("position"), + y = n("distance") || 0, x = n("align"); + "outside" === v ? (f = u.r + y, x = p > Math.PI / 2 ? "right" : "left") : x && "center" !== x ? "left" === x ? (f = u.r0 + y, p > Math.PI / 2 && (x = "right")) : "right" === x && (f = u.r - y, p > Math.PI / 2 && (x = "left")) : (f = (u.r + u.r0) / 2, x = "center"), d.attr("style", { + text: l, + textAlign: x, + textVerticalAlign: n("verticalAlign") || "middle", + opacity: n("opacity") + }); + var _ = f * g + u.cx, w = f * m + u.cy; + d.attr("position", [_, w]); + var b = n("rotate"), S = 0; + "radial" === b ? (S = -p) < -Math.PI / 2 && (S += Math.PI) : "tangential" === b ? (S = Math.PI / 2 - p) > Math.PI / 2 ? S -= Math.PI : S < -Math.PI / 2 && (S += Math.PI) : "number" == typeof b && (S = b * Math.PI / 180), d.attr("rotation", S) + }, mk._initEvents = function (t, e, i, n) { + t.off("mouseover").off("mouseout").off("emphasis").off("normal"); + var o = this, a = function () { + o.onEmphasis(n) + }, r = function () { + o.onNormal() + }; + i.isAnimationEnabled() && t.on("mouseover", a).on("mouseout", r).on("emphasis", a).on("normal", r).on("downplay", function () { + o.onDownplay() + }).on("highlight", function () { + o.onHighlight() + }) + }, u(nm, sw); + gr.extend({ + type: "sunburst", init: function () { + }, render: function (t, e, i, n) { + function o(i, n) { + if (c || !i || i.getValue() || (i = null), i !== l && n !== l) if (n && n.piece) i ? (n.piece.updateData(!1, i, "normal", t, e), s.setItemGraphicEl(i.dataIndex, n.piece)) : a(n); else if (i) { + var o = new nm(i, t, e); + h.add(o), s.setItemGraphicEl(i.dataIndex, o) + } + } + + function a(t) { + t && t.piece && (h.remove(t.piece), t.piece = null) + } + + var r = this; + this.seriesModel = t, this.api = i, this.ecModel = e; + var s = t.getData(), l = s.tree.root, u = t.getViewRoot(), h = this.group, + c = t.get("renderLabelForZeroData"), d = []; + u.eachNode(function (t) { + d.push(t) + }); + var f = this._oldChildren || []; + if (function (t, e) { + function i(t) { + return t.getId() + } + + function n(i, n) { + o(null == i ? null : t[i], null == n ? null : e[n]) + } + + 0 === t.length && 0 === e.length || new Ss(e, t, i, i).add(n).update(n).remove(v(n, null)).execute() + }(d, f), function (i, n) { + if (n.depth > 0) { + r.virtualPiece ? r.virtualPiece.updateData(!1, i, "normal", t, e) : (r.virtualPiece = new nm(i, t, e), h.add(r.virtualPiece)), n.piece._onclickEvent && n.piece.off("click", n.piece._onclickEvent); + var o = function (t) { + r._rootToNode(n.parentNode) + }; + n.piece._onclickEvent = o, r.virtualPiece.on("click", o) + } else r.virtualPiece && (h.remove(r.virtualPiece), r.virtualPiece = null) + }(l, u), n && n.highlight && n.highlight.piece) { + var p = t.getShallow("highlightPolicy"); + n.highlight.piece.onEmphasis(p) + } else if (n && n.unhighlight) { + var g = this.virtualPiece; + !g && l.children.length && (g = l.children[0].piece), g && g.onNormal() + } + this._initEvents(), this._oldChildren = d + }, dispose: function () { + }, _initEvents: function () { + var t = this, e = function (e) { + var i = !1; + t.seriesModel.getViewRoot().eachNode(function (n) { + if (!i && n.piece && n.piece.childAt(0) === e.target) { + var o = n.getModel().get("nodeClick"); + if ("rootToNode" === o) t._rootToNode(n); else if ("link" === o) { + var a = n.getModel(), r = a.get("link"); + if (r) { + var s = a.get("target", !0) || "_blank"; + window.open(r, s) + } + } + i = !0 + } + }) + }; + this.group._onclickEvent && this.group.off("click", this.group._onclickEvent), this.group.on("click", e), this.group._onclickEvent = e + }, _rootToNode: function (t) { + t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({ + type: "sunburstRootToNode", + from: this.uid, + seriesId: this.seriesModel.id, + targetNode: t + }) + }, containPoint: function (t, e) { + var i = e.getData().getItemLayout(0); + if (i) { + var n = t[0] - i.cx, o = t[1] - i.cy, a = Math.sqrt(n * n + o * o); + return a <= i.r && a >= i.r0 + } + } + }); + var vk = "sunburstRootToNode"; + cs({type: vk, update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + var n = Ic(t, [vk], e); + if (n) { + var o = e.getViewRoot(); + o && (t.direction = Dc(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node) + } + }) + }); + var yk = "sunburstHighlight"; + cs({type: yk, update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + var n = Ic(t, [yk], e); + n && (t.highlight = n.node) + }) + }); + cs({type: "sunburstUnhighlight", update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + t.unhighlight = !0 + }) + }); + var xk = Math.PI / 180; + ps(v(JD, "sunburst")), fs(v(function (t, e, i, n) { + e.eachSeriesByType(t, function (t) { + var e = t.get("center"), n = t.get("radius"); + y(n) || (n = [0, n]), y(e) || (e = [e, e]); + var o = i.getWidth(), a = i.getHeight(), r = Math.min(o, a), s = Do(e[0], o), l = Do(e[1], a), + u = Do(n[0], r / 2), h = Do(n[1], r / 2), c = -t.get("startAngle") * xk, f = t.get("minAngle") * xk, + p = t.getData().tree.root, g = t.getViewRoot(), m = g.depth, v = t.get("sort"); + null != v && sm(g, v); + var x = 0; + d(g.children, function (t) { + !isNaN(t.getValue()) && x++ + }); + var _ = g.getValue(), w = Math.PI / (_ || x) * 2, b = g.depth > 0, S = g.height - (b ? -1 : 1), + M = (h - u) / (S || 1), I = t.get("clockwise"), T = t.get("stillShowZeroSum"), D = I ? 1 : -1, + A = function (t, e) { + if (t) { + var i = e; + if (t !== p) { + var n = t.getValue(), o = 0 === _ && T ? w : n * w; + o < f && (o = f), i = e + D * o; + var a = t.depth - m - (b ? -1 : 1), h = u + M * a, c = u + M * (a + 1), g = t.getModel(); + null != g.get("r0") && (h = Do(g.get("r0"), r / 2)), null != g.get("r") && (c = Do(g.get("r"), r / 2)), t.setLayout({ + angle: o, + startAngle: e, + endAngle: i, + clockwise: I, + cx: s, + cy: l, + r0: h, + r: c + }) + } + if (t.children && t.children.length) { + var v = 0; + d(t.children, function (t) { + v += A(t, e + v) + }) + } + return i - e + } + }; + if (b) { + var C = u, L = u + M, k = 2 * Math.PI; + p.setLayout({angle: k, startAngle: c, endAngle: c + k, clockwise: I, cx: s, cy: l, r0: C, r: L}) + } + A(g, c) + }) + }, "sunburst")), hs(v(iA, "sunburst")); + var _k = ["itemStyle"], wk = ["emphasis", "itemStyle"], bk = ["label"], Sk = ["emphasis", "label"], Mk = "e\0\0", + Ik = { + cartesian2d: 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: function (e) { + return t.dataToPoint(e) + }, size: m(um, t) + } + } + }, geo: function (t) { + var e = t.getBoundingRect(); + return { + coordSys: {type: "geo", x: e.x, y: e.y, width: e.width, height: e.height}, + api: { + coord: function (e) { + return t.dataToPoint(e) + }, size: m(hm, t) + } + } + }, singleAxis: function (t) { + var e = t.getRect(); + return { + coordSys: {type: "singleAxis", x: e.x, y: e.y, width: e.width, height: e.height}, + api: { + coord: function (e) { + return t.dataToPoint(e) + }, size: m(cm, t) + } + } + }, polar: 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: m(function (n) { + var o = e.dataToRadius(n[0]), a = i.dataToAngle(n[1]), r = t.coordToPoint([o, a]); + return r.push(o, a * Math.PI / 180), r + }), size: m(dm, t) + } + } + }, calendar: 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: function (e, i) { + return t.dataToPoint(e, i) + } + } + } + } + }; + xs({ + type: "series.custom", + dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"], + defaultOption: {coordinateSystem: "cartesian2d", zlevel: 0, z: 2, legendHoverLink: !0}, + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + } + }), _s({ + type: "custom", _data: null, render: function (t, e, i) { + var n = this._data, o = t.getData(), a = this.group, r = mm(t, o, e, i); + this.group.removeAll(), o.diff(n).add(function (e) { + ym(null, e, r(e), t, a, o) + }).update(function (e, i) { + ym(n.getItemGraphicEl(i), e, r(e), t, a, o) + }).remove(function (t) { + var e = n.getItemGraphicEl(t); + e && a.remove(e) + }).execute(), this._data = o + }, incrementalPrepareRender: function (t, e, i) { + this.group.removeAll(), this._data = null + }, incrementalRender: function (t, e, i, n) { + for (var o = e.getData(), a = mm(e, o, i, n), r = t.start; r < t.end; r++) ym(null, r, a(r), e, this.group, o).traverse(function (t) { + t.isGroup || (t.incremental = !0, t.useHoverLayer = !0) + }) + }, dispose: B + }), us(function (t) { + var e = t.graphic; + y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{elements: e}] : e && !e.elements && (t.graphic = [{elements: [e]}]) + }); + var Tk = vs({ + type: "graphic", + defaultOption: {elements: [], parentId: null}, + _elOptionsToUpdate: null, + mergeOption: function (t) { + var e = this.option.elements; + this.option.elements = null, Tk.superApply(this, "mergeOption", arguments), this.option.elements = e + }, + optionUpdated: function (t, e) { + var i = this.option, n = (e ? i : t).elements, o = i.elements = e ? [] : i.elements, a = []; + this._flatten(n, a); + var r = Di(o, a); + Ai(r); + var s = this._elOptionsToUpdate = []; + d(r, function (t, e) { + var i = t.option; + i && (s.push(i), Am(t, i), Cm(o, e, i), Lm(o[e], i)) + }, this); + for (var l = o.length - 1; l >= 0; l--) null == o[l] ? o.splice(l, 1) : delete o[l].$action + }, + _flatten: function (t, e, i) { + d(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 + } + }); + ys({ + type: "graphic", init: function (t, e) { + this._elMap = R(), 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, o = this.group; + d(i, function (t) { + var e = t.$action, i = t.id, a = n.get(i), r = t.parentId, s = null != r ? n.get(r) : o; + 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 u = Tm(t); + e && "merge" !== e ? "replace" === e ? (Im(a, n), Mm(i, s, u, n)) : "remove" === e && Im(a, n) : a ? a.attr(u) : Mm(i, s, u, n); + var h = n.get(i); + h && (h.__ecGraphicWidth = t.width, h.__ecGraphicHeight = t.height) + }) + } + }, _relocate: function (t, e) { + for (var i = t.option.elements, n = this.group, o = this._elMap, a = i.length - 1; a >= 0; a--) { + var r = i[a], s = o.get(r.id); + if (s) { + var l = s.parent; + ta(s, r, l === n ? {width: e.getWidth(), height: e.getHeight()} : { + width: l.__ecGraphicWidth || 0, + height: l.__ecGraphicHeight || 0 + }, null, {hv: r.hv, boundingMode: r.bounding}) + } + } + }, _clear: function () { + var t = this._elMap; + t.each(function (e) { + Im(e, t) + }), this._elMap = R() + }, dispose: function () { + this._clear() + } + }); + var Dk = vs({ + 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) { + Dk.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 = [], i = []; + t.eachRawSeries(function (n) { + var o = n.name; + i.push(o); + var a; + if (n.legendDataProvider) { + var r = n.legendDataProvider(), s = r.mapArray(r.getName); + t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0 + } else a = !0; + a && Ci(n) && e.push(n.name) + }), this._availableNames = i; + var n = f(this.get("data") || e, function (t) { + return "string" != typeof t && "number" != typeof t || (t = {name: t}), new wo(t, this, this.ecModel) + }, this); + this._data = n + }, + getData: function () { + return this._data + }, + select: function (t) { + var e = this.option.selected; + "single" === this.get("selectedMode") && d(this._data, 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]) && l(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} + } + }); + cs("legendToggleSelect", "legendselectchanged", v(km, "toggleSelected")), cs("legendSelect", "legendselected", v(km, "select")), cs("legendUnSelect", "legendunselected", v(km, "unSelect")); + var Ak = v, Ck = d, Lk = sw, kk = ys({ + type: "legend.plain", newlineDisabled: !1, init: function () { + this.group.add(this._contentGroup = new Lk), 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 o = t.getBoxLayoutParams(), a = {width: i.getWidth(), height: i.getHeight()}, s = t.get("padding"), + l = Qo(o, a, s), u = this.layoutInner(t, n, l), + h = Qo(r({width: u.width, height: u.height}, o), a, s); + this.group.attr("position", [h.x - u.x, h.y - u.y]), this.group.add(this._backgroundEl = Nm(u, t)) + } + }, resetInner: function () { + this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl) + }, renderInner: function (t, e, i, n) { + var o = this.getContentGroup(), a = R(), r = e.get("selectedMode"), s = []; + i.eachRawSeries(function (t) { + !t.get("legendHoverLink") && s.push(t.id) + }), Ck(e.getData(), function (l, u) { + var h = l.get("name"); + if (this.newlineDisabled || "" !== h && "\n" !== h) { + var c = i.getSeriesByName(h)[0]; + if (!a.get(h)) if (c) { + var d = c.getData(), f = d.getVisual("color"); + "function" == typeof f && (f = f(c.getDataParams(0))); + var p = d.getVisual("legendSymbol") || "roundRect", g = d.getVisual("symbol"); + this._createItem(h, u, l, e, p, g, t, f, r).on("click", Ak(Om, h, n)).on("mouseover", Ak(Em, c, null, n, s)).on("mouseout", Ak(Rm, c, null, n, s)), a.set(h, !0) + } else i.eachRawSeries(function (i) { + if (!a.get(h) && i.legendDataProvider) { + var o = i.legendDataProvider(), c = o.indexOfName(h); + if (c < 0) return; + var d = o.getItemVisual(c, "color"); + this._createItem(h, u, l, e, "roundRect", null, t, d, r).on("click", Ak(Om, h, n)).on("mouseover", Ak(Em, i, h, n, s)).on("mouseout", Ak(Rm, i, h, n, s)), a.set(h, !0) + } + }, this) + } else o.add(new Lk({newline: !0})) + }, this) + }, _createItem: function (t, e, i, n, o, r, s, l, u) { + var h = n.get("itemWidth"), c = n.get("itemHeight"), d = n.get("inactiveColor"), + f = n.get("symbolKeepAspect"), p = n.isSelected(t), g = new Lk, m = i.getModel("textStyle"), + v = i.get("icon"), y = i.getModel("tooltip"), x = y.parentModel; + if (o = v || o, g.add(Tl(o, 0, 0, h, c, p ? l : d, null == f || f)), !v && r && (r !== o || "none" == r)) { + var _ = .8 * c; + "none" === r && (r = "circle"), g.add(Tl(r, (h - _) / 2, (c - _) / 2, _, _, p ? l : d, null == f || f)) + } + var w = "left" === s ? h + 5 : -5, b = s, S = n.get("formatter"), M = t; + "string" == typeof S && S ? M = S.replace("{name}", null != t ? t : "") : "function" == typeof S && (M = S(t)), g.add(new fS({ + style: no({}, m, { + text: M, + x: w, + y: c / 2, + textFill: p ? m.getTextColor() : d, + textAlign: b, + textVerticalAlign: "middle" + }) + })); + var I = new SS({ + shape: g.getBoundingRect(), + invisible: !0, + tooltip: y.get("show") ? a({ + content: t, + formatter: x.get("formatter", !0) || function () { + return t + }, + formatterParams: {componentType: "legend", legendIndex: n.componentIndex, name: t, $vars: ["name"]} + }, y.option) : null + }); + return g.add(I), g.eachChild(function (t) { + t.silent = !0 + }), I.silent = !u, this.getContentGroup().add(g), eo(g), g.__legendDataIndex = e, g + }, layoutInner: function (t, e, i) { + var n = this.getContentGroup(); + sM(t.get("orient"), n, t.get("itemGap"), i.width, i.height); + var o = n.getBoundingRect(); + return n.attr("position", [-o.x, -o.y]), this.group.getBoundingRect() + } + }); + hs(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 + }) + }), hM.registerSubTypeDefaulter("legend", function () { + return "plain" + }); + var Pk = Dk.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 o = na(t); + Pk.superCall(this, "init", t, e, i, n), zm(this, t, o) + }, + mergeOption: function (t, e) { + Pk.superCall(this, "mergeOption", t, e), zm(this, this.option, t) + }, + getOrient: function () { + return "vertical" === this.get("orient") ? {index: 1, name: "vertical"} : {index: 0, name: "horizontal"} + } + }), Nk = sw, Ok = ["width", "height"], Ek = ["x", "y"], Rk = kk.extend({ + type: "legend.scroll", newlineDisabled: !0, init: function () { + Rk.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new Nk), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new Nk), this._showController + }, resetInner: function () { + Rk.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null + }, renderInner: function (t, e, i, n) { + function o(t, i) { + var o = t + "DataIndex", + l = _o(e.get("pageIcons", !0)[e.getOrient().name][i], {onclick: m(a._pageGo, a, o, e, n)}, { + x: -s[0] / 2, + y: -s[1] / 2, + width: s[0], + height: s[1] + }); + l.name = t, r.add(l) + } + + var a = this; + Rk.superCall(this, "renderInner", t, e, i, n); + var r = this._controllerGroup, s = e.get("pageIconSize", !0); + y(s) || (s = [s, s]), o("pagePrev", 0); + var l = e.getModel("pageTextStyle"); + r.add(new fS({ + name: "pageText", + style: { + textFill: l.getTextColor(), + font: l.getFont(), + textVerticalAlign: "middle", + textAlign: "center" + }, + silent: !0 + })), o("pageNext", 1) + }, layoutInner: function (t, e, i) { + var n = this.getContentGroup(), o = this._containerGroup, a = this._controllerGroup, + r = t.getOrient().index, s = Ok[r], l = Ok[1 - r], u = Ek[1 - r]; + sM(t.get("orient"), n, t.get("itemGap"), r ? i.width : null, r ? null : i.height), sM("horizontal", a, t.get("pageButtonItemGap", !0)); + var h = n.getBoundingRect(), c = a.getBoundingRect(), d = this._showController = h[s] > i[s], + f = [-h.x, -h.y]; + f[r] = n.position[r]; + var p = [0, 0], g = [-c.x, -c.y], m = D(t.get("pageButtonGap", !0), t.get("itemGap", !0)); + d && ("end" === t.get("pageButtonPosition", !0) ? g[r] += i[s] - c[s] : p[r] += c[s] + m), g[1 - r] += h[l] / 2 - c[l] / 2, n.attr("position", f), o.attr("position", p), a.attr("position", g); + var v = this.group.getBoundingRect(); + if ((v = { + x: 0, + y: 0 + })[s] = d ? i[s] : h[s], v[l] = Math.max(h[l], c[l]), v[u] = Math.min(0, c[u] + g[1 - r]), o.__rectSize = i[s], d) { + var y = {x: 0, y: 0}; + y[s] = Math.max(i[s] - c[s] - m, 0), y[l] = v[l], o.setClipPath(new SS({shape: y})), o.__rectSize = y[s] + } else a.eachChild(function (t) { + t.attr({invisible: !0, silent: !0}) + }); + var x = this._getPageInfo(t); + return null != x.pageIndex && fo(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; + d(["pagePrev", "pageNext"], function (n) { + var o = null != e[n + "DataIndex"], a = i.childOfName(n); + a && (a.setStyle("fill", o ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = o ? "pointer" : "default") + }); + var n = i.childOfName("pageText"), o = t.get("pageFormatter"), a = e.pageIndex, r = null != a ? a + 1 : 0, + s = e.pageCount; + n && o && n.setStyle("text", _(o) ? o.replace("{current}", r).replace("{total}", s) : o({ + current: r, + total: s + })) + }, _getPageInfo: function (t) { + function e(t) { + var e = t.getBoundingRect().clone(); + return e[f] += t.position[h], e + } + + var i, n, o, a, r = t.get("scrollDataIndex", !0), s = this.getContentGroup(), l = s.getBoundingRect(), + u = this._containerGroup.__rectSize, h = t.getOrient().index, c = Ok[h], d = Ok[1 - h], f = Ek[h], + p = s.position.slice(); + this._showController ? s.eachChild(function (t) { + t.__legendDataIndex === r && (a = t) + }) : a = s.childAt(0); + var g = u ? Math.ceil(l[c] / u) : 0; + if (a) { + var m = a.getBoundingRect(), v = a.position[h] + m[f]; + p[h] = -v - l[f], i = Math.floor(g * (v + m[f] + u / 2) / l[c]), i = l[c] && g ? Math.max(0, Math.min(g - 1, i)) : -1; + var y = {x: 0, y: 0}; + y[c] = u, y[d] = l[d], y[f] = -p[h] - l[f]; + var x, _ = s.children(); + if (s.eachChild(function (t, i) { + var n = e(t); + n.intersect(y) && (null == x && (x = i), o = t.__legendDataIndex), i === _.length - 1 && n[f] + n[c] <= y[f] + y[c] && (o = null) + }), null != x) { + var w = e(_[x]); + if (y[f] = w[f] + w[c] - y[c], x <= 0 && w[f] >= y[f]) n = null; else { + for (; x > 0 && e(_[x - 1]).intersect(y);) x--; + n = _[x].__legendDataIndex + } + } + } + return {contentPosition: p, pageIndex: i, pageCount: g, pagePrevDataIndex: n, pageNextDataIndex: o} + } + }); + cs("legendScroll", "legendscroll", function (t, e) { + var i = t.scrollDataIndex; + null != i && e.eachComponent({mainType: "legend", subType: "scroll", query: t}, function (t) { + t.setScrollDataIndex(i) + }) + }), vs({ + 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 zk = d, Bk = Ho, Vk = ["", "-webkit-", "-moz-", "-o-"]; + Wm.prototype = { + constructor: Wm, _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;" + Gm(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 o = this.el.style; + o.left = t + "px", o.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(m(this.hide, this), t)) : this.hide()) + }, isShow: function () { + return this._show + } + }; + var Gk = m, Wk = d, Fk = Do, Hk = new SS({shape: {x: -1, y: -1, width: 2, height: 2}}); + ys({ + type: "tooltip", init: function (t, e) { + if (!a_.node) { + var i = new Wm(e.getDom(), e); + this._tooltipContent = i + } + }, render: function (t, e, i) { + if (!a_.node && !a_.wxa) { + 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"); + Dg("itemTooltip", this._api, Gk(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 && !a_.node) { + var o = Hm(n, i); + this._ticket = ""; + var a = n.dataByCoordSys; + if (n.tooltip && null != n.x && null != n.y) { + var r = Hk; + r.position = [n.x, n.y], r.update(), r.tooltip = n.tooltip, this._tryShow({ + offsetX: n.x, + offsetY: n.y, + target: r + }, o) + } else if (a) this._tryShow({ + offsetX: n.x, + offsetY: n.y, + position: n.position, + event: {}, + dataByCoordSys: n.dataByCoordSys, + tooltipOption: n.tooltipOption + }, o); else if (null != n.seriesIndex) { + if (this._manuallyAxisShowTip(t, e, i, n)) return; + var s = KL(n, e), l = s.point[0], u = s.point[1]; + null != l && null != u && this._tryShow({ + offsetX: l, + offsetY: u, + position: n.position, + target: s.el, + event: {} + }, o) + } 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: {} + }, o)) + } + }, manuallyHideTip: function (t, e, i, n) { + var o = this._tooltipContent; + !this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(Hm(n, i)) + }, _manuallyAxisShowTip: function (t, e, i, n) { + var o = n.seriesIndex, a = n.dataIndex, r = e.getComponent("axisPointer").coordSysAxesInfo; + if (null != o && null != a && null != r) { + var s = e.getSeriesByIndex(o); + if (s && "axis" === (t = Fm([s.getData().getItemModel(a), s, (s.coordinateSystem || {}).model, t])).get("trigger")) return i.dispatchAction({ + type: "updateAxisPointer", + seriesIndex: o, + dataIndex: a, + 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 = m(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e() + }, _showAxisTooltip: function (t, e) { + var i = this._ecModel, n = this._tooltipModel, o = [e.offsetX, e.offsetY], a = [], r = [], + s = Fm([e.tooltipOption, n]); + Wk(t, function (t) { + Wk(t.dataByAxis, function (t) { + var e = i.getComponent(t.axisDim + "Axis", t.axisIndex), n = t.value, o = []; + if (e && null != n) { + var s = Hg(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt); + d(t.seriesDataIndices, function (a) { + var l = i.getSeriesByIndex(a.seriesIndex), u = a.dataIndexInside, + h = l && l.getDataParams(u); + h.axisDim = t.axisDim, h.axisIndex = t.axisIndex, h.axisType = t.axisType, h.axisId = t.axisId, h.axisValue = bl(e.axis, n), h.axisValueLabel = s, h && (r.push(h), o.push(l.formatTooltip(u, !0))) + }); + var l = s; + a.push((l ? Zo(l) + "
" : "") + o.join("
")) + } + }) + }, this), a.reverse(), a = a.join("

"); + var l = e.position; + this._showOrMove(s, function () { + this._updateContentNotChangedOnAxis(t) ? this._updatePosition(s, l, o[0], o[1], this._tooltipContent, r) : this._showTooltipContent(s, a, r, Math.random(), o[0], o[1], l) + }) + }, _showSeriesItemTooltip: function (t, e, i) { + var n = this._ecModel, o = e.seriesIndex, a = n.getSeriesByIndex(o), r = e.dataModel || a, s = e.dataIndex, + l = e.dataType, u = r.getData(), + h = Fm([u.getItemModel(s), r, a && (a.coordinateSystem || {}).model, this._tooltipModel]), + c = h.get("trigger"); + if (null == c || "item" === c) { + var d = r.getDataParams(s, l), f = r.formatTooltip(s, !1, l), p = "item_" + r.name + "_" + s; + this._showOrMove(h, function () { + this._showTooltipContent(h, f, d, p, t.offsetX, t.offsetY, t.position, t.target) + }), i({ + type: "showTip", + dataIndexInside: s, + dataIndex: u.getRawIndex(s), + seriesIndex: o, + from: this.uid + }) + } + }, _showComponentItemTooltip: function (t, e, i) { + var n = e.tooltip; + if ("string" == typeof n) { + var o = n; + n = {content: o, formatter: o} + } + var a = new wo(n, this._tooltipModel, this._ecModel), r = a.get("content"), s = Math.random(); + this._showOrMove(a, function () { + this._showTooltipContent(a, r, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e) + }), i({type: "showTip", from: this.uid}) + }, _showTooltipContent: function (t, e, i, n, o, a, r, s) { + if (this._ticket = "", t.get("showContent") && t.get("show")) { + var l = this._tooltipContent, u = t.get("formatter"); + r = r || t.get("position"); + var h = e; + if (u && "string" == typeof u) h = Uo(u, i, !0); else if ("function" == typeof u) { + var c = Gk(function (e, n) { + e === this._ticket && (l.setContent(n), this._updatePosition(t, r, o, a, l, i, s)) + }, this); + this._ticket = n, h = u(i, n, c) + } + l.setContent(h), l.show(t), this._updatePosition(t, r, o, a, l, i, s) + } + }, _updatePosition: function (t, e, i, n, o, a, r) { + var s = this._api.getWidth(), l = this._api.getHeight(); + e = e || t.get("position"); + var u = o.getSize(), h = 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], a, o.el, d, { + viewSize: [s, l], + contentSize: u.slice() + })), y(e)) i = Fk(e[0], s), n = Fk(e[1], l); else if (w(e)) { + e.width = u[0], e.height = u[1]; + var f = Qo(e, {width: s, height: l}); + i = f.x, n = f.y, h = null, c = null + } else "string" == typeof e && r ? (i = (p = jm(e, d, u))[0], n = p[1]) : (i = (p = Zm(i, n, o.el, s, l, h ? null : 20, c ? null : 20))[0], n = p[1]); + if (h && (i -= Ym(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= Ym(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) { + var p = Um(i, n, o.el, s, l); + i = p[0], n = p[1] + } + o.moveTo(i, n) + }, _updateContentNotChangedOnAxis: function (t) { + var e = this._lastDataByCoordSys, i = !!e && e.length === t.length; + return i && Wk(e, function (e, n) { + var o = e.dataByAxis || {}, a = (t[n] || {}).dataByAxis || []; + (i &= o.length === a.length) && Wk(o, function (t, e) { + var n = a[e] || {}, o = t.seriesDataIndices || [], r = n.seriesDataIndices || []; + (i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && o.length === r.length) && Wk(o, 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) { + a_.node || a_.wxa || (this._tooltipContent.hide(), Ng("itemTooltip", e)) + } + }), cs({type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip"}, function () { + }), cs({type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip"}, function () { + }), Jm.prototype = { + constructor: Jm, pointToData: function (t, e) { + return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1] + }, dataToRadius: qT.prototype.dataToCoord, radiusToData: qT.prototype.coordToData + }, u(Jm, qT), Qm.prototype = { + constructor: Qm, pointToData: function (t, e) { + return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1] + }, dataToAngle: qT.prototype.dataToCoord, angleToData: qT.prototype.coordToData + }, u(Qm, qT); + var Zk = function (t) { + this.name = t || "", this.cx = 0, this.cy = 0, this._radiusAxis = new Jm, this._angleAxis = new Qm, this._radiusAxis.polar = this._angleAxis.polar = this + }; + Zk.prototype = { + type: "polar", + axisPointerEnabled: !0, + constructor: Zk, + 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(), o = n.getExtent(), + a = Math.min(o[0], o[1]), r = Math.max(o[0], o[1]); + n.inverse ? a = r - 360 : r = a + 360; + var s = Math.sqrt(e * e + i * i); + e /= s, i /= s; + for (var l = Math.atan2(-i, e) / Math.PI * 180, u = l < a ? 1 : -1; l < a || l > r;) l += 360 * u; + 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 Uk = hM.extend({ + type: "polarAxis", axis: null, getCoordSysModel: function () { + return this.ecModel.queryComponents({ + mainType: "polar", + index: this.option.polarIndex, + id: this.option.polarId + })[0] + } + }); + n(Uk.prototype, ET); + var Xk = { + angle: {startAngle: 90, clockwise: !0, splitNumber: 12, axisLabel: {rotate: !1}}, + radius: {splitNumber: 5} + }; + MD("angle", Uk, tv, Xk.angle), MD("radius", Uk, tv, Xk.radius), vs({ + 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 jk = { + dimensions: Zk.prototype.dimensions, create: function (t, e) { + var i = []; + return t.eachComponent("polar", function (t, n) { + var o = new Zk(n); + o.update = iv; + var a = o.getRadiusAxis(), r = o.getAngleAxis(), s = t.findAxisModel("radiusAxis"), + l = t.findAxisModel("angleAxis"); + nv(a, s), nv(r, l), ev(o, t, e), i.push(o), t.coordinateSystem = o, o.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 + } + }; + Ca.register("polar", jk); + var Yk = ["axisLine", "axisLabel", "axisTick", "splitLine", "splitArea"]; + ED.extend({ + type: "angleAxis", axisPointerClass: "PolarAxisPointer", render: function (t, e) { + if (this.group.removeAll(), t.get("show")) { + var n = t.axis, o = n.polar, a = o.getRadiusAxis().getExtent(), r = n.getTicksCoords(), + s = f(n.getViewLabels(), function (t) { + return (t = i(t)).coord = n.dataToCoord(t.tickValue), t + }); + rv(s), rv(r), d(Yk, function (e) { + !t.get(e + ".show") || n.scale.isBlank() && "axisLine" !== e || this["_" + e](t, o, r, a, s) + }, this) + } + }, _axisLine: function (t, e, i, n) { + var o = t.getModel("axisLine.lineStyle"), + a = new pS({shape: {cx: e.cx, cy: e.cy, r: n[av(e)]}, style: o.getLineStyle(), z2: 1, silent: !0}); + a.style.fill = null, this.group.add(a) + }, _axisTick: function (t, e, i, n) { + var o = t.getModel("axisTick"), a = (o.get("inside") ? -1 : 1) * o.get("length"), s = n[av(e)], + l = f(i, function (t) { + return new MS({shape: ov(e, [s, s + a], t.coord)}) + }); + this.group.add(zS(l, {style: r(o.getModel("lineStyle").getLineStyle(), {stroke: t.get("axisLine.lineStyle.color")})})) + }, _axisLabel: function (t, e, i, n, o) { + var a = t.getCategories(!0), r = t.getModel("axisLabel"), s = r.get("margin"); + d(o, function (i, o) { + var l = r, u = i.tickValue, h = n[av(e)], c = e.coordToPoint([h + s, i.coord]), d = e.cx, f = e.cy, + p = Math.abs(c[0] - d) / h < .3 ? "center" : c[0] > d ? "left" : "right", + g = Math.abs(c[1] - f) / h < .3 ? "middle" : c[1] > f ? "top" : "bottom"; + a && a[u] && a[u].textStyle && (l = new wo(a[u].textStyle, r, r.ecModel)); + var m = new fS({silent: !0}); + this.group.add(m), no(m.style, l, { + x: c[0], + y: c[1], + textFill: l.getTextColor() || t.get("axisLine.lineStyle.color"), + text: i.formattedLabel, + textAlign: p, + textVerticalAlign: g + }) + }, this) + }, _splitLine: function (t, e, i, n) { + var o = t.getModel("splitLine").getModel("lineStyle"), a = o.get("color"), s = 0; + a = a instanceof Array ? a : [a]; + for (var l = [], u = 0; u < i.length; u++) { + var h = s++ % a.length; + l[h] = l[h] || [], l[h].push(new MS({shape: ov(e, n, i[u].coord)})) + } + for (u = 0; u < l.length; u++) this.group.add(zS(l[u], { + style: r({stroke: a[u % a.length]}, o.getLineStyle()), + silent: !0, + z: t.get("z") + })) + }, _splitArea: function (t, e, i, n) { + if (i.length) { + var o = t.getModel("splitArea").getModel("areaStyle"), a = o.get("color"), s = 0; + a = a instanceof Array ? a : [a]; + for (var l = [], u = Math.PI / 180, h = -i[0].coord * u, c = Math.min(n[0], n[1]), d = Math.max(n[0], n[1]), f = t.get("clockwise"), p = 1; p < i.length; p++) { + var g = s++ % a.length; + l[g] = l[g] || [], l[g].push(new vS({ + shape: { + cx: e.cx, + cy: e.cy, + r0: c, + r: d, + startAngle: h, + endAngle: -i[p].coord * u, + clockwise: f + }, silent: !0 + })), h = -i[p].coord * u + } + for (p = 0; p < l.length; p++) this.group.add(zS(l[p], { + style: r({fill: a[p % a.length]}, o.getAreaStyle()), + silent: !0 + })) + } + } + }); + var qk = ["axisLine", "axisTickLabel", "axisName"], Kk = ["splitLine", "splitArea"]; + ED.extend({ + type: "radiusAxis", axisPointerClass: "PolarAxisPointer", render: function (t, e) { + if (this.group.removeAll(), t.get("show")) { + var i = t.axis, n = i.polar, o = n.getAngleAxis(), a = i.getTicksCoords(), r = o.getExtent()[0], + s = i.getExtent(), l = sv(n, t, r), u = new LD(t, l); + d(qk, u.add, u), this.group.add(u.getGroup()), d(Kk, function (e) { + t.get(e + ".show") && !i.scale.isBlank() && this["_" + e](t, n, r, s, a) + }, this) + } + }, _splitLine: function (t, e, i, n, o) { + var a = t.getModel("splitLine").getModel("lineStyle"), s = a.get("color"), l = 0; + s = s instanceof Array ? s : [s]; + for (var u = [], h = 0; h < o.length; h++) { + var c = l++ % s.length; + u[c] = u[c] || [], u[c].push(new pS({shape: {cx: e.cx, cy: e.cy, r: o[h].coord}, silent: !0})) + } + for (h = 0; h < u.length; h++) this.group.add(zS(u[h], { + style: r({ + stroke: s[h % s.length], + fill: null + }, a.getLineStyle()), silent: !0 + })) + }, _splitArea: function (t, e, i, n, o) { + if (o.length) { + var a = t.getModel("splitArea").getModel("areaStyle"), s = a.get("color"), l = 0; + s = s instanceof Array ? s : [s]; + for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) { + var d = l++ % s.length; + u[d] = u[d] || [], u[d].push(new vS({ + shape: { + cx: e.cx, + cy: e.cy, + r0: h, + r: o[c].coord, + startAngle: 0, + endAngle: 2 * Math.PI + }, silent: !0 + })), h = o[c].coord + } + for (c = 0; c < u.length; c++) this.group.add(zS(u[c], { + style: r({fill: s[c % s.length]}, a.getAreaStyle()), + silent: !0 + })) + } + } + }); + var $k = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis; + "angle" === a.dim && (this.animationThreshold = Math.PI / 18); + var r, s = a.polar, l = s.getOtherAxis(a).getExtent(); + r = a["dataTo" + Ko(a.dim)](e); + var u = n.get("type"); + if (u && "none" !== u) { + var h = Gg(n), c = Jk[u](a, s, r, l, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Wg(t, i, n, o, lv(e, i, 0, s, n.get("label.margin"))) + } + }), Jk = { + line: function (t, e, i, n, o) { + return "angle" === t.dim ? { + type: "Line", + shape: Xg(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, o) { + var a = Math.max(1, t.getBandWidth()), r = Math.PI / 180; + return "angle" === t.dim ? { + type: "Sector", + shape: Yg(e.cx, e.cy, n[0], n[1], (-i - a / 2) * r, (a / 2 - i) * r) + } : {type: "Sector", shape: Yg(e.cx, e.cy, i - a / 2, i + a / 2, 0, 2 * Math.PI)} + } + }; + ED.registerAxisPointerClass("PolarAxisPointer", $k), fs(v(function (t, e, i) { + var n = i.getWidth(), o = i.getHeight(), a = {}, r = $m(g(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, s = i.getBaseAxis(), l = qm(t), u = r[Km(s)][l], + h = u.offset, c = u.width, d = i.getOtherAxis(s), f = t.get("center") || ["50%", "50%"], + p = Do(f[0], n), g = Do(f[1], o), m = t.get("barMinHeight") || 0, v = t.get("barMinAngle") || 0; + a[l] = a[l] || []; + for (var y = e.mapDimension(d.dim), x = e.mapDimension(s.dim), _ = Zs(e, y), w = d.getExtent()[0], b = 0, S = e.count(); b < S; b++) { + var M = e.get(y, b), I = e.get(x, b); + if (!isNaN(M)) { + var T = M >= 0 ? "p" : "n", D = w; + _ && (a[l][I] || (a[l][I] = {p: w, n: w}), D = a[l][I][T]); + var A, C, L, k; + if ("radius" === d.dim) { + var P = d.dataToRadius(M) - w, N = s.dataToAngle(I); + Math.abs(P) < m && (P = (P < 0 ? -1 : 1) * m), A = D, C = D + P, k = (L = N - h) - c, _ && (a[l][I][T] = C) + } else { + var O = d.dataToAngle(M, !0) - w, E = s.dataToRadius(I); + Math.abs(O) < v && (O = (O < 0 ? -1 : 1) * v), C = (A = E + h) + c, L = D, k = D + O, _ && (a[l][I][T] = k) + } + e.setItemLayout(b, { + cx: p, + cy: g, + r0: A, + r: C, + startAngle: -L * Math.PI / 180, + endAngle: -k * Math.PI / 180 + }) + } + } + } + }, this) + }, "bar")), ys({type: "polar"}), h(hM.extend({ + type: "geo", + coordinateSystem: null, + layoutMode: "box", + init: function (t) { + hM.prototype.init.apply(this, arguments), Mi(t, "label", ["show"]) + }, + optionUpdated: function () { + var t = this.option, e = this; + t.regions = vA.getFilledRegions(t.regions, t.map, t.nameMap), this._optionModelMap = p(t.regions || [], function (t, i) { + return i.name && t.set(i.name, new wo(i, e)), t + }, R()), 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: {show: !1, color: "#000"}, + itemStyle: {borderWidth: .5, borderColor: "#444", color: "#eee"}, + emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {color: "rgba(255,215,0,0.8)"}}, + regions: [] + }, + getRegionModel: function (t) { + return this._optionModelMap.get(t) || new wo(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 + } + }), YD), ys({ + type: "geo", init: function (t, e) { + var i = new Uh(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 o = this._mapDraw; + t.get("show") ? o.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = t.get("silent") + } + }, dispose: function () { + this._mapDraw && this._mapDraw.remove() + } + }), uv("toggleSelected", {type: "geoToggleSelect", event: "geoselectchanged"}), uv("select", { + type: "geoSelect", + event: "geoselected" + }), uv("unSelect", {type: "geoUnSelect", event: "geounselected"}); + var Qk = ["rect", "polygon", "keep", "clear"], tP = d, eP = { + lineX: mv(0), lineY: mv(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]) && Al(i.range, t[0], t[1]) + }, rect: function (t, e, i) { + var n = i.range; + if (!t || n.length <= 1) return !1; + var o = t.x, a = t.y, r = t.width, s = t.height, l = n[0]; + return !!(Al(n, o, a) || Al(n, o + r, a) || Al(n, o, a + s) || Al(n, o + r, a + s) || $t.create(t).contain(l[0], l[1]) || yv(o, a, o + r, a, n) || yv(o, a, o, a + s, n) || yv(o + r, a, o + r, a + s, n) || yv(o, a + s, o + r, a + s, n)) || void 0 + } + } + }, iP = d, nP = l, oP = v, aP = ["dataToPoint", "pointToData"], + rP = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], sP = bv.prototype; + sP.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 = cP[t.brushType](0, i, e); + t.__rangeOffset = {offset: dP[t.brushType](n.values, t.range, [1, 1]), xyMinMax: n.xyMinMax} + } + }) + }, sP.matchOutputRanges = function (t, e, i) { + iP(t, function (t) { + var n = this.findTargetInfo(t, e); + n && !0 !== n && d(n.coordSyses, function (n) { + var o = cP[t.brushType](1, n, t.range); + i(t, o.values, n, e) + }) + }, this) + }, sP.setInputRanges = function (t, e) { + iP(t, function (t) { + var i = this.findTargetInfo(t, e); + if (t.range = t.range || [], i && !0 !== i) { + t.panelId = i.panelId; + var n = cP[t.brushType](0, i.coordSys, t.coordRange), o = t.__rangeOffset; + t.range = o ? dP[t.brushType](n.values, o.offset, Dv(n.xyMinMax, o.xyMinMax)) : n.values + } + }, this) + }, sP.makePanelOpts = function (t, e) { + return f(this._targetInfoList, function (i) { + var n = i.getPanelRect(); + return { + panelId: i.panelId, + defaultBrushType: e && e(i), + clipPath: Ef(n), + isTargetByCursor: zf(n, t, i.coordSysModel), + getLinearBrushOtherExtent: Rf(n) + } + }) + }, sP.controlSeries = function (t, e, i) { + var n = this.findTargetInfo(t, i); + return !0 === n || n && nP(n.coordSyses, e.coordinateSystem) >= 0 + }, sP.findTargetInfo = function (t, e) { + for (var i = this._targetInfoList, n = Mv(e, t), o = 0; o < i.length; o++) { + var a = i[o], r = t.panelId; + if (r) { + if (a.panelId === r) return a + } else for (o = 0; o < uP.length; o++) if (uP[o](n, a)) return a + } + return !0 + }; + var lP = { + grid: function (t, e) { + var i = t.xAxisModels, n = t.yAxisModels, o = t.gridModels, a = R(), r = {}, s = {}; + (i || n || o) && (iP(i, function (t) { + var e = t.axis.grid.model; + a.set(e.id, e), r[e.id] = !0 + }), iP(n, function (t) { + var e = t.axis.grid.model; + a.set(e.id, e), s[e.id] = !0 + }), iP(o, function (t) { + a.set(t.id, t), r[t.id] = !0, s[t.id] = !0 + }), a.each(function (t) { + var o = t.coordinateSystem, a = []; + iP(o.getCartesians(), function (t, e) { + (nP(i, t.getAxis("x").model) >= 0 || nP(n, t.getAxis("y").model) >= 0) && a.push(t) + }), e.push({ + panelId: "grid--" + t.id, + gridModel: t, + coordSysModel: t, + coordSys: a[0], + coordSyses: a, + getPanelRect: hP.grid, + xAxisDeclared: r[t.id], + yAxisDeclared: s[t.id] + }) + })) + }, geo: function (t, e) { + iP(t.geoModels, function (t) { + var i = t.coordinateSystem; + e.push({ + panelId: "geo--" + t.id, + geoModel: t, + coordSysModel: t, + coordSys: i, + coordSyses: [i], + getPanelRect: hP.geo + }) + }) + } + }, uP = [function (t, e) { + var i = t.xAxisModel, n = t.yAxisModel, o = t.gridModel; + return !o && i && (o = i.axis.grid.model), !o && n && (o = n.axis.grid.model), o && o === e.gridModel + }, function (t, e) { + var i = t.geoModel; + return i && i === e.geoModel + }], hP = { + grid: function () { + return this.coordSys.grid.getRect().clone() + }, geo: function () { + var t = this.coordSys, e = t.getBoundingRect().clone(); + return e.applyTransform(go(t)), e + } + }, cP = { + lineX: oP(Iv, 0), lineY: oP(Iv, 1), rect: function (t, e, i) { + var n = e[aP[t]]([i[0][0], i[1][0]]), o = e[aP[t]]([i[0][1], i[1][1]]), + a = [Sv([n[0], o[0]]), Sv([n[1], o[1]])]; + return {values: a, xyMinMax: a} + }, polygon: function (t, e, i) { + var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]]; + return { + values: f(i, function (i) { + var o = e[aP[t]](i); + return n[0][0] = Math.min(n[0][0], o[0]), n[1][0] = Math.min(n[1][0], o[1]), n[0][1] = Math.max(n[0][1], o[0]), n[1][1] = Math.max(n[1][1], o[1]), o + }), xyMinMax: n + } + } + }, dP = { + lineX: oP(Tv, 0), lineY: oP(Tv, 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 f(t, function (t, n) { + return [t[0] - i[0] * e[n][0], t[1] - i[1] * e[n][1]] + }) + } + }, fP = ["inBrush", "outOfBrush"], pP = "__ecBrushSelect", gP = "__ecInBrushSelectEvent", mP = LI.VISUAL.BRUSH; + fs(mP, 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 bv(e.option, t)).setInputRanges(e.areas, t) + }) + }), ps(mP, function (t, e, n) { + var o, a, s = []; + t.eachComponent({mainType: "brush"}, function (e, n) { + function l(t) { + return "all" === m || v[t] + } + + function u(t) { + return !!t.length + } + + function h(t, e) { + var i = t.coordinateSystem; + w |= i.hasAxisBrushed(), l(e) && i.eachActiveState(t.getData(), function (t, e) { + "active" === t && (x[e] = 1) + }) + } + + function c(i, n, o) { + var a = Pv(i); + if (a && !Nv(e, n) && (d(b, function (n) { + a[n.brushType] && e.brushTargetManager.controlSeries(n, i, t) && o.push(n), w |= u(o) + }), l(n) && u(o))) { + var r = i.getData(); + r.each(function (t) { + kv(a, o, r, t) && (x[t] = 1) + }) + } + } + + var p = {brushId: e.id, brushIndex: n, brushName: e.name, areas: i(e.areas), selected: []}; + s.push(p); + var g = e.option, m = g.brushLink, v = [], x = [], _ = [], w = 0; + n || (o = g.throttleType, a = g.throttleDelay); + var b = f(e.areas, function (t) { + return Ov(r({boundingRect: vP[t.brushType](t)}, t)) + }), S = dv(e.option, fP, function (t) { + t.mappingMethod = "fixed" + }); + y(m) && d(m, function (t) { + v[t] = 1 + }), t.eachSeries(function (t, e) { + var i = _[e] = []; + "parallel" === t.subType ? h(t, e) : c(t, e, i) + }), t.eachSeries(function (t, e) { + var i = {seriesId: t.id, seriesIndex: e, seriesName: t.name, dataIndex: []}; + p.selected.push(i); + var n = Pv(t), o = _[e], a = t.getData(), r = l(e) ? function (t) { + return x[t] ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush" + } : function (t) { + return kv(n, o, a, t) ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush" + }; + (l(e) ? w : u(o)) && pv(fP, S, a, r) + }) + }), Cv(e, o, a, s, n) + }); + var vP = { + lineX: B, lineY: B, rect: function (t) { + return Ev(t.range) + }, polygon: function (t) { + for (var e, i = t.range, n = 0, o = i.length; n < o; n++) { + e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]]; + var a = i[n]; + a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]) + } + return e && Ev(e) + } + }, yP = ["#ddd"]; + vs({ + 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 && fv(i, t, ["inBrush", "outOfBrush"]); + var n = i.inBrush = i.inBrush || {}; + i.outOfBrush = i.outOfBrush || {color: yP}, n.hasOwnProperty("liftZ") || (n.liftZ = 5) + }, + setAreas: function (t) { + t && (this.areas = f(t, function (t) { + return Rv(this.option, t) + }, this)) + }, + setBrushOption: function (t) { + this.brushOption = Rv(this.option, t), this.brushType = this.brushOption.brushType + } + }); + ys({ + type: "brush", init: function (t, e) { + this.ecModel = t, this.api = e, this.model, (this._brushController = new Qd(e.getZr())).on("brush", m(this._onBrush, this)).mount() + }, render: function (t) { + return this.model = t, zv.apply(this, arguments) + }, updateTransform: zv, updateView: zv, dispose: function () { + this._brushController.dispose() + }, _onBrush: function (t, e) { + var n = this.model.id; + this.model.brushTargetManager.setOutputRanges(t, this.ecModel), (!e.isEnd || e.removeOnClick) && this.api.dispatchAction({ + type: "brush", + brushId: n, + areas: i(t), + $from: n + }) + } + }), cs({type: "brush", event: "brush"}, function (t, e) { + e.eachComponent({mainType: "brush", query: t}, function (e) { + e.setAreas(t.areas) + }) + }), cs({type: "brushSelect", event: "brushSelected", update: "none"}, function () { + }); + var xP = {}, _P = lI.toolbox.brush; + Gv.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: i(_P.title) + }; + var wP = Gv.prototype; + wP.render = wP.updateView = function (t, e, i) { + var n, o, a; + e.eachComponent({mainType: "brush"}, function (t) { + n = t.brushType, o = t.brushOption.brushMode || "single", a |= t.areas.length + }), this._brushType = n, this._brushMode = o, d(t.get("type", !0), function (e) { + t.setIconStatus(e, ("keep" === e ? "multiple" === o : "clear" === e ? a : e === n) ? "emphasis" : "normal") + }) + }, wP.getIcons = function () { + var t = this.model, e = t.get("icon", !0), i = {}; + return d(t.get("type", !0), function (t) { + e[t] && (i[t] = e[t]) + }), i + }, wP.onclick = function (t, e, i) { + var n = this._brushType, o = 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" === o ? "single" : "multiple" : o + } + }) + }, Bv("brush", Gv), us(function (t, e) { + var i = t && t.brush; + if (y(i) || (i = i ? [i] : []), i.length) { + var n = []; + d(i, function (t) { + var e = t.hasOwnProperty("toolbox") ? t.toolbox : []; + e instanceof Array && (n = n.concat(e)) + }); + var o = t && t.toolbox; + y(o) && (o = o[0]), o || (o = {feature: {}}, t.toolbox = [o]); + var a = o.feature || (o.feature = {}), r = a.brush || (a.brush = {}), s = r.type || (r.type = []); + s.push.apply(s, n), hv(s), e && !s.length && s.push.apply(s, Qk) + } + }); + Wv.prototype = { + constructor: Wv, type: "calendar", dimensions: ["time", "value"], getDimensionsInfo: function () { + return [{name: "time", type: "time"}, "value"] + }, getRangeInfo: function () { + return this._rangeInfo + }, getModel: function () { + return this._model + }, getRect: function () { + return this._rect + }, getCellWidth: function () { + return this._sw + }, getCellHeight: function () { + return this._sh + }, getOrient: function () { + return this._orient + }, getFirstDayOfWeek: function () { + return this._firstDayOfWeek + }, getDateInfo: function (t) { + var e = (t = Ro(t)).getFullYear(), i = t.getMonth() + 1; + i = i < 10 ? "0" + i : i; + var n = t.getDate(); + n = n < 10 ? "0" + n : n; + var o = t.getDay(); + return o = Math.abs((o + 7 - this.getFirstDayOfWeek()) % 7), { + y: e, + m: i, + d: n, + day: o, + time: t.getTime(), + formatedDate: e + "-" + i + "-" + n, + date: t + } + }, getNextNDay: function (t, e) { + return 0 === (e = e || 0) ? this.getDateInfo(t) : ((t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e), this.getDateInfo(t)) + }, update: function (t, e) { + function i(t, e) { + return null != t[e] && "auto" !== t[e] + } + + this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption()); + var n = this._rangeInfo.weeks || 1, o = ["width", "height"], a = this._model.get("cellSize").slice(), + r = this._model.getBoxLayoutParams(), s = "horizontal" === this._orient ? [n, 7] : [7, n]; + d([0, 1], function (t) { + i(a, t) && (r[o[t]] = a[t] * s[t]) + }); + var l = {width: e.getWidth(), height: e.getHeight()}, u = this._rect = Qo(r, l); + d([0, 1], function (t) { + i(a, t) || (a[t] = u[o[t]] / s[t]) + }), this._sw = a[0], this._sh = a[1] + }, dataToPoint: function (t, e) { + y(t) && (t = t[0]), null == e && (e = !0); + var i = this.getDateInfo(t), n = this._rangeInfo, o = i.formatedDate; + if (e && !(i.time >= n.start.time && i.time < n.end.time + 864e5)) return [NaN, NaN]; + var a = i.day, r = this._getRangeInfo([n.start.time, o]).nthWeek; + return "vertical" === this._orient ? [this._rect.x + a * 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 + a * 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: v(Fv, "dataToPoint"), convertFromPixel: v(Fv, "pointToData"), _initRangeOption: function () { + var t = this._model.get("range"), e = t; + if (y(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 o = this.getNextNDay(n, -1); + t = [i.formatedDate, o.formatedDate] + } + /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e) && (t = [e, e]); + var a = this._getRangeInfo(t); + return a.start.time > a.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), + o = n.getDate(), a = t[1].date.getDate(); + if (n.setDate(o + i - 1), n.getDate() !== a) for (var r = n.getTime() - t[1].time > 0 ? 1 : -1; n.getDate() !== a && (n.getTime() - t[1].time) * r > 0;) i -= r, n.setDate(o + 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 o = 7 * (t - 1) - n.fweek + e, a = new Date(n.start.time); + return a.setDate(n.start.d + o), this.getDateInfo(a) + } + }, Wv.dimensions = Wv.prototype.dimensions, Wv.getDimensionsInfo = Wv.prototype.getDimensionsInfo, Wv.create = function (t, e) { + var i = []; + return t.eachComponent("calendar", function (n) { + var o = new Wv(n, t, e); + i.push(o), n.coordinateSystem = o + }), t.eachSeries(function (t) { + "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0]) + }), i + }, Ca.register("calendar", Wv); + var bP = hM.extend({ + type: "calendar", + coordinateSystem: null, + defaultOption: { + zlevel: 0, + z: 2, + left: 80, + top: 60, + cellSize: 20, + orient: "horizontal", + splitLine: {show: !0, lineStyle: {color: "#000", width: 1, type: "solid"}}, + itemStyle: {color: "#fff", borderWidth: 1, borderColor: "#ccc"}, + dayLabel: {show: !0, firstDay: 0, position: "start", margin: "50%", nameMap: "en", color: "#000"}, + monthLabel: { + show: !0, + position: "start", + margin: 5, + align: "center", + nameMap: "en", + formatter: null, + color: "#000" + }, + yearLabel: { + show: !0, + position: null, + margin: 30, + formatter: null, + color: "#ccc", + fontFamily: "sans-serif", + fontWeight: "bolder", + fontSize: 20 + } + }, + init: function (t, e, i, n) { + var o = na(t); + bP.superApply(this, "init", arguments), Hv(t, o) + }, + mergeOption: function (t, e) { + bP.superApply(this, "mergeOption", arguments), Hv(this.option, t) + } + }), SP = { + EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] + }, MP = {EN: ["S", "M", "T", "W", "T", "F", "S"], CN: ["日", "一", "二", "三", "四", "五", "六"]}; + ys({ + type: "calendar", + _tlpoints: null, + _blpoints: null, + _firstDayOfMonth: null, + _firstDayPoints: null, + render: function (t, e, i) { + var n = this.group; + n.removeAll(); + var o = t.coordinateSystem, a = o.getRangeInfo(), r = o.getOrient(); + this._renderDayRect(t, a, n), this._renderLines(t, a, r, n), this._renderYearText(t, a, r, n), this._renderMonthText(t, r, n), this._renderWeekText(t, a, r, n) + }, + _renderDayRect: function (t, e, i) { + for (var n = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), a = n.getCellWidth(), r = n.getCellHeight(), s = e.start.time; s <= e.end.time; s = n.getNextNDay(s, 1).time) { + var l = n.dataToRect([s], !1).tl, + u = new SS({shape: {x: l[0], y: l[1], width: a, height: r}, cursor: "default", style: o}); + i.add(u) + } + }, + _renderLines: function (t, e, i, n) { + function o(e) { + a._firstDayOfMonth.push(r.getDateInfo(e)), a._firstDayPoints.push(r.dataToRect([e], !1).tl); + var o = a._getLinePointsOfOneWeek(t, e, i); + a._tlpoints.push(o[0]), a._blpoints.push(o[o.length - 1]), l && a._drawSplitline(o, s, n) + } + + var a = this, r = t.coordinateSystem, s = t.getModel("splitLine.lineStyle").getLineStyle(), + l = t.get("splitLine.show"), u = s.lineWidth; + this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = []; + for (var h = e.start, c = 0; h.time <= e.end.time; c++) { + o(h.formatedDate), 0 === c && (h = r.getDateInfo(e.start.y + "-" + e.start.m)); + var d = h.date; + d.setMonth(d.getMonth() + 1), h = r.getDateInfo(d) + } + o(r.getNextNDay(e.end.time, 1).formatedDate), l && this._drawSplitline(a._getEdgesPoints(a._tlpoints, u, i), s, n), l && this._drawSplitline(a._getEdgesPoints(a._blpoints, u, i), s, n) + }, + _getEdgesPoints: function (t, e, i) { + var n = [t[0].slice(), t[t.length - 1].slice()], o = "horizontal" === i ? 0 : 1; + return n[0][o] = n[0][o] - e / 2, n[1][o] = n[1][o] + e / 2, n + }, + _drawSplitline: function (t, e, i) { + var n = new bS({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 o = [], a = 0; a < 7; a++) { + var r = n.getNextNDay(e.time, a), s = n.dataToRect([r.time], !1); + o[2 * r.day] = s.tl, o[2 * r.day + 1] = s["horizontal" === i ? "bl" : "tr"] + } + return o + }, + _formatterLabel: function (t, e) { + return "string" == typeof t && t ? Xo(t, e) : "function" == typeof t ? t(e) : e.nameMap + }, + _yearTextPositionControl: function (t, e, i, n, o) { + e = e.slice(); + var a = ["center", "bottom"]; + "bottom" === n ? (e[1] += o, a = ["center", "top"]) : "left" === n ? e[0] -= o : "right" === n ? (e[0] += o, a = ["center", "top"]) : e[1] -= o; + var r = 0; + return "left" !== n && "right" !== n || (r = Math.PI / 2), { + rotation: r, + position: e, + style: {textAlign: a[0], textVerticalAlign: a[1]} + } + }, + _renderYearText: function (t, e, i, n) { + var o = t.getModel("yearLabel"); + if (o.get("show")) { + var a = o.get("margin"), r = o.get("position"); + r || (r = "horizontal" !== i ? "top" : "left"); + var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], l = (s[0][0] + s[1][0]) / 2, + u = (s[0][1] + s[1][1]) / 2, h = "horizontal" === i ? 0 : 1, + c = {top: [l, s[h][1]], bottom: [l, s[1 - h][1]], left: [s[1 - h][0], u], right: [s[h][0], u]}, + d = e.start.y; + +e.end.y > +e.start.y && (d = d + "-" + e.end.y); + var f = o.get("formatter"), p = {start: e.start.y, end: e.end.y, nameMap: d}, + g = this._formatterLabel(f, p), m = new fS({z2: 30}); + no(m.style, o, {text: g}), m.attr(this._yearTextPositionControl(m, c[r], i, r, a)), n.add(m) + } + }, + _monthTextPositionControl: function (t, e, i, n, o) { + var a = "left", r = "top", s = t[0], l = t[1]; + return "horizontal" === i ? (l += o, e && (a = "center"), "start" === n && (r = "bottom")) : (s += o, e && (r = "middle"), "start" === n && (a = "right")), { + x: s, + y: l, + textAlign: a, + textVerticalAlign: r + } + }, + _renderMonthText: function (t, e, i) { + var n = t.getModel("monthLabel"); + if (n.get("show")) { + var o = n.get("nameMap"), r = n.get("margin"), s = n.get("position"), l = n.get("align"), + u = [this._tlpoints, this._blpoints]; + _(o) && (o = SP[o.toUpperCase()] || []); + var h = "start" === s ? 0 : 1, c = "horizontal" === e ? 0 : 1; + r = "start" === s ? -r : r; + for (var d = "center" === l, f = 0; f < u[h].length - 1; f++) { + var p = u[h][f].slice(), g = this._firstDayOfMonth[f]; + if (d) { + var m = this._firstDayPoints[f]; + p[c] = (m[c] + u[0][f + 1][c]) / 2 + } + var v = n.get("formatter"), y = o[+g.m - 1], + x = {yyyy: g.y, yy: (g.y + "").slice(2), MM: g.m, M: +g.m, nameMap: y}, + w = this._formatterLabel(v, x), b = new fS({z2: 30}); + a(no(b.style, n, {text: w}), this._monthTextPositionControl(p, d, e, s, r)), i.add(b) + } + } + }, + _weekTextPositionControl: function (t, e, i, n, o) { + var a = "center", r = "middle", s = t[0], l = t[1], u = "start" === i; + return "horizontal" === e ? (s = s + n + (u ? 1 : -1) * o[0] / 2, a = u ? "right" : "left") : (l = l + n + (u ? 1 : -1) * o[1] / 2, r = u ? "bottom" : "top"), { + x: s, + y: l, + textAlign: a, + textVerticalAlign: r + } + }, + _renderWeekText: function (t, e, i, n) { + var o = t.getModel("dayLabel"); + if (o.get("show")) { + var r = t.coordinateSystem, s = o.get("position"), l = o.get("nameMap"), u = o.get("margin"), + h = r.getFirstDayOfWeek(); + _(l) && (l = MP[l.toUpperCase()] || []); + var c = r.getNextNDay(e.end.time, 7 - e.lweek).time, d = [r.getCellWidth(), r.getCellHeight()]; + u = Do(u, d["horizontal" === i ? 0 : 1]), "start" === s && (c = r.getNextNDay(e.start.time, -(7 + e.fweek)).time, u = -u); + for (var f = 0; f < 7; f++) { + var p = r.getNextNDay(c, f), g = r.dataToRect([p.time], !1).center, m = f; + m = Math.abs((f + h) % 7); + var v = new fS({z2: 30}); + a(no(v.style, o, {text: l[m]}), this._weekTextPositionControl(g, i, s, u, d)), n.add(v) + } + } + } + }), vs({ + 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"} + } + }), ys({ + type: "title", render: function (t, e, i) { + if (this.group.removeAll(), t.get("show")) { + var n = this.group, o = t.getModel("textStyle"), a = t.getModel("subtextStyle"), r = t.get("textAlign"), + s = t.get("textBaseline"), l = new fS({ + style: no({}, o, {text: t.get("text"), textFill: o.getTextColor()}, {disableBox: !0}), + z2: 10 + }), u = l.getBoundingRect(), h = t.get("subtext"), c = new fS({ + style: no({}, a, { + text: h, + textFill: a.getTextColor(), + y: u.height + t.get("itemGap"), + textVerticalAlign: "top" + }, {disableBox: !0}), z2: 10 + }), d = t.get("link"), f = t.get("sublink"); + l.silent = !d, c.silent = !f, d && l.on("click", function () { + window.open(d, "_" + t.get("target")) + }), f && c.on("click", function () { + window.open(f, "_" + t.get("subtarget")) + }), n.add(l), h && n.add(c); + var p = n.getBoundingRect(), g = t.getBoxLayoutParams(); + g.width = p.width, g.height = p.height; + var m = Qo(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), p = n.getBoundingRect(); + var y = m.margin, x = t.getItemStyle(["color", "opacity"]); + x.fill = t.get("backgroundColor"); + var _ = new SS({ + shape: { + x: p.x - y[3], + y: p.y - y[0], + width: p.width + y[1] + y[3], + height: p.height + y[0] + y[2], + r: t.get("borderRadius") + }, style: x, silent: !0 + }); + Wn(_), n.add(_) + } + } + }), hM.registerSubTypeDefaulter("dataZoom", function () { + return "slider" + }); + var IP = ["cartesian2d", "polar", "singleAxis"], TP = function (t, e) { + var i = f(t = t.slice(), Ko), n = f(e = (e || []).slice(), Ko); + return function (o, a) { + d(t, function (t, r) { + for (var s = {name: t, capital: i[r]}, l = 0; l < e.length; l++) s[e[l]] = t + n[l]; + o.call(a, s) + }) + } + }(["x", "y", "z", "radius", "angle", "single"], ["axisIndex", "axis", "index", "id"]), DP = d, AP = Co, + CP = 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 + }; + CP.prototype = { + constructor: CP, 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 (Zv(i.get("coordinateSystem"))) { + var n = this._dimName, o = e.queryComponents({ + mainType: n + "Axis", + index: i.get(n + "AxisIndex"), + id: i.get(n + "AxisId") + })[0]; + this._axisIndex === (o && o.componentIndex) && t.push(i) + } + }, this), t + }, getAxisModel: function () { + return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex) + }, getOtherAxisModel: function () { + var t, e, i = this._dimName, n = this.ecModel, o = this.getAxisModel(); + "x" === i || "y" === i ? (e = "gridIndex", t = "x" === i ? "y" : "x") : (e = "polarIndex", t = "angle" === i ? "radius" : "angle"); + var a; + return n.eachComponent(t + "Axis", function (t) { + (t.get(e) || 0) === (o.get(e) || 0) && (a = t) + }), a + }, getMinMaxSpan: function () { + return i(this._minMaxSpan) + }, calculateDataWindow: function (t) { + var e = this._dataExtent, i = this.getAxisModel().axis.scale, n = this._dataZoomModel.getRangePropMode(), + o = [0, 100], a = [t.start, t.end], r = []; + return DP(["startValue", "endValue"], function (e) { + r.push(null != t[e] ? i.parse(t[e]) : null) + }), DP([0, 1], function (t) { + var s = r[t], l = a[t]; + "percent" === n[t] ? (null == l && (l = o[t]), s = i.parse(To(l, o, e, !0))) : l = To(s, e, o, !0), r[t] = s, a[t] = l + }), {valueWindow: AP(r), percentWindow: AP(a)} + }, reset: function (t) { + if (t === this._dataZoomModel) { + var e = this.getTargetSeriesModels(); + this._dataExtent = Xv(this, this._dimName, e); + var i = this.calculateDataWindow(t.option); + this._valueWindow = i.valueWindow, this._percentWindow = i.percentWindow, qv(this), Yv(this) + } + }, restore: function (t) { + t === this._dataZoomModel && (this._valueWindow = this._percentWindow = null, Yv(this, !0)) + }, filterData: function (t, e) { + function i(t) { + return t >= r[0] && t <= r[1] + } + + if (t === this._dataZoomModel) { + var n = this._dimName, o = this.getTargetSeriesModels(), a = t.get("filterMode"), r = this._valueWindow; + "none" !== a && DP(o, function (t) { + var e = t.getData(), o = e.mapDimension(n, !0); + "weakFilter" === a ? e.filterSelf(function (t) { + for (var i, n, a, s = 0; s < o.length; s++) { + var l = e.get(o[s], t), u = !isNaN(l), h = l < r[0], c = l > r[1]; + if (u && !h && !c) return !0; + u && (a = !0), h && (i = !0), c && (n = !0) + } + return a && i && n + }) : DP(o, function (n) { + if ("empty" === a) t.setData(e.map(n, function (t) { + return i(t) ? t : NaN + })); else { + var o = {}; + o[n] = r, e.selectRange(o) + } + }), DP(o, function (t) { + e.setApproximateExtent(r, t) + }) + }) + } + } + }; + var LP = d, kP = TP, PP = vs({ + 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 = Kv(t); + this.mergeDefaultAndTheme(t, i), this.doInit(n) + }, + mergeOption: function (t) { + var e = Kv(t); + n(this.option, t, !0), this.doInit(e) + }, + doInit: function (t) { + var e = this.option; + a_.canvasSupported || (e.realtime = !1), this._setDefaultThrottle(t), $v(this, t), LP([["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, o) { + var a = this.dependentModels[e.axis][i], + r = a.__dzAxisProxy || (a.__dzAxisProxy = new CP(e.name, i, this, o)); + t[e.name + "_" + i] = r + }, this) + }, + _resetTarget: function () { + var t = this.option, e = this._judgeAutoMode(); + kP(function (e) { + var i = e.axisIndex; + t[i] = Si(t[i]) + }, this), "axisIndex" === e ? this._autoSetAxisIndex() : "orient" === e && this._autoSetOrient() + }, + _judgeAutoMode: function () { + var t = this.option, e = !1; + kP(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 o = "vertical" === e ? "y" : "x"; + n[o + "Axis"].length ? (i[o + "AxisIndex"] = [0], t = !1) : LP(n.singleAxis, function (n) { + t && n.get("orient", !0) === e && (i.singleAxisIndex = [n.componentIndex], t = !1) + }) + } + t && kP(function (e) { + if (t) { + var n = [], o = this.dependentModels[e.axis]; + if (o.length && !n.length) for (var a = 0, r = o.length; a < r; a++) "category" === o[a].get("type") && n.push(a); + i[e.axisIndex] = n, n.length && (t = !1) + } + }, this), t && this.ecModel.eachSeries(function (t) { + this._isSeriesHasAllAxesTypeOf(t, "value") && kP(function (e) { + var n = i[e.axisIndex], o = t.get(e.axisIndex), a = t.get(e.axisId); + l(n, o = t.ecModel.queryComponents({ + mainType: e.axis, + index: o, + id: a + })[0].componentIndex) < 0 && n.push(o) + }) + }, 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 kP(function (n) { + var o = t.get(n.axisIndex), a = this.dependentModels[n.axis][o]; + a && a.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 kP(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; + kP(function (n) { + LP(this.get(n.axisIndex), function (o) { + t.call(e, n, o, 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; + LP([["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 && $v(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() + } + }), NP = $M.extend({ + type: "dataZoom", render: function (t, e, i, n) { + this.dataZoomModel = t, this.ecModel = e, this.api = i + }, getTargetCoordInfo: function () { + function t(t, e, i, n) { + for (var o, a = 0; a < i.length; a++) if (i[a].model === t) { + o = i[a]; + break + } + o || i.push(o = {model: t, axisModels: [], coordIndex: n}), o.axisModels.push(e) + } + + var e = this.dataZoomModel, i = this.ecModel, n = {}; + return e.eachTargetAxis(function (e, o) { + var a = i.getComponent(e.axis, o); + if (a) { + var r = a.getCoordSysModel(); + r && t(r, a, n[r.mainType] || (n[r.mainType] = []), r.componentIndex) + } + }, this), n + } + }), OP = (PP.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"} + } + }), SS), EP = To, RP = Co, zP = m, BP = d, VP = "horizontal", GP = 5, + WP = ["line", "bar", "candlestick", "scatter"], FP = NP.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) { + FP.superApply(this, "render", arguments), wr(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 () { + FP.superApply(this, "remove", arguments), br(this, "_dispatchZoomAction") + }, dispose: function () { + FP.superApply(this, "dispose", arguments), br(this, "_dispatchZoomAction") + }, _buildView: function () { + var t = this.group; + t.removeAll(), this._resetLocation(), this._resetInterval(); + var e = this._displayables.barGroup = new sw; + 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()}, o = this._orient === VP ? { + 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}, a = na(t.option); + d(["right", "top", "width", "height"], function (t) { + "ph" === a[t] && (a[t] = o[t]) + }); + var r = Qo(a, 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(), + o = n && n.get("inverse"), a = this._displayables.barGroup, + r = (this._dataShadowInfo || {}).otherAxisInverse; + a.attr(i !== VP || o ? i === VP && o ? {scale: r ? [-1, 1] : [-1, -1]} : "vertical" !== i || o ? { + 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([a]); + 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 OP({ + silent: !0, + shape: {x: 0, y: 0, width: e[0], height: e[1]}, + style: {fill: t.get("backgroundColor")}, + z2: -40 + })), i.add(new OP({ + shape: {x: 0, y: 0, width: e[0], height: e[1]}, + style: {fill: "transparent"}, + z2: 0, + onclick: m(this._onClickPanelClick, this) + })) + }, _renderDataShadow: function () { + var t = this._dataShadowInfo = this._prepareDataShadowInfo(); + if (t) { + var e = this._size, i = t.series, n = i.getRawData(), + o = i.getShadowDim ? i.getShadowDim() : t.otherDim; + if (null != o) { + var a = n.getDataExtent(o), s = .3 * (a[1] - a[0]); + a = [a[0] - s, a[1] + s]; + var l, u = [0, e[1]], h = [0, e[0]], c = [[e[0], 0], [0, 0]], d = [], f = h[1] / (n.count() - 1), + p = 0, g = Math.round(n.count() / e[0]); + n.each([o], function (t, e) { + if (g > 0 && e % g) p += f; else { + var i = null == t || isNaN(t) || "" === t, n = i ? 0 : EP(t, a, u, !0); + i && !l && e ? (c.push([c[c.length - 1][0], 0]), d.push([d[d.length - 1][0], 0])) : !i && l && (c.push([p, 0]), d.push([p, 0])), c.push([p, n]), d.push([p, n]), p += f, l = i + } + }); + var m = this.dataZoomModel; + this._displayables.barGroup.add(new wS({ + shape: {points: c}, + style: r({fill: m.get("dataBackgroundColor")}, m.getModel("dataBackground.areaStyle").getAreaStyle()), + silent: !0, + z2: -20 + })), this._displayables.barGroup.add(new bS({ + shape: {points: d}, + style: m.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 (o, a) { + d(t.getAxisProxy(o.name, a).getTargetSeriesModels(), function (t) { + if (!(i || !0 !== e && l(WP, t.get("type")) < 0)) { + var r, s = n.getComponent(o.axis, a).axis, u = Jv(o.name), h = t.coordinateSystem; + null != u && h.getOtherAxis && (r = h.getOtherAxis(s).inverse), u = t.getData().mapDimension(u), i = { + thisAxis: s, + series: t, + thisDim: o.name, + otherDim: u, + otherAxisInverse: r + } + } + }, this) + }, this), i + } + }, _renderHandle: function () { + var t = this._displayables, e = t.handles = [], i = t.handleLabels = [], n = this._displayables.barGroup, + o = this._size, a = this.dataZoomModel; + n.add(t.filler = new OP({ + draggable: !0, + cursor: Qv(this._orient), + drift: zP(this._onDragMove, this, "all"), + onmousemove: function (t) { + zw(t.event) + }, + ondragstart: zP(this._showDataInfo, this, !0), + ondragend: zP(this._onDragEnd, this), + onmouseover: zP(this._showDataInfo, this, !0), + onmouseout: zP(this._showDataInfo, this, !1), + style: {fill: a.get("fillerColor"), textPosition: "inside"} + })), n.add(new OP(Wn({ + silent: !0, + shape: {x: 0, y: 0, width: o[0], height: o[1]}, + style: { + stroke: a.get("dataBackgroundColor") || a.get("borderColor"), + lineWidth: 1, + fill: "rgba(0,0,0,0)" + } + }))), BP([0, 1], function (t) { + var o = _o(a.get("handleIcon"), { + cursor: Qv(this._orient), + draggable: !0, + drift: zP(this._onDragMove, this, t), + onmousemove: function (t) { + zw(t.event) + }, + ondragend: zP(this._onDragEnd, this), + onmouseover: zP(this._showDataInfo, this, !0), + onmouseout: zP(this._showDataInfo, this, !1) + }, {x: -1, y: 0, width: 2, height: 2}), r = o.getBoundingRect(); + this._handleHeight = Do(a.get("handleSize"), this._size[1]), this._handleWidth = r.width / r.height * this._handleHeight, o.setStyle(a.getModel("handleStyle").getItemStyle()); + var s = a.get("handleColor"); + null != s && (o.style.fill = s), n.add(e[t] = o); + var l = a.textStyleModel; + this.group.add(i[t] = new fS({ + 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 = [EP(t[0], [0, 100], e, !0), EP(t[1], [0, 100], e, !0)] + }, _updateInterval: function (t, e) { + var i = this.dataZoomModel, n = this._handleEnds, o = this._getViewExtent(), + a = i.findRepresentativeAxisProxy().getMinMaxSpan(), r = [0, 100]; + PC(e, n, o, i.get("zoomLock") ? "all" : t, null != a.minSpan ? EP(a.minSpan, r, o, !0) : null, null != a.maxSpan ? EP(a.maxSpan, r, o, !0) : null); + var s = this._range, l = this._range = RP([EP(n[0], o, r, !0), EP(n[1], o, r, !0)]); + return !s || s[0] !== l[0] || s[1] !== l[1] + }, _updateView: function (t) { + var e = this._displayables, i = this._handleEnds, n = RP(i.slice()), o = this._size; + BP([0, 1], function (t) { + var n = e.handles[t], a = this._handleHeight; + n.attr({scale: [a / 2, a / 2], position: [i[t], o[1] / 2 - a / 2]}) + }, this), e.filler.setShape({x: n[0], y: 0, width: n[1] - n[0], height: o[1]}), this._updateDataInfo(t) + }, _updateDataInfo: function (t) { + function e(t) { + var e = go(n.handles[t].parent, this.group), i = vo(0 === t ? "right" : "left", e), + s = this._handleWidth / 2 + GP, l = mo([c[t] + (0 === t ? -s : s), this._size[1] / 2], e); + o[t].setStyle({ + x: l[0], + y: l[1], + textVerticalAlign: a === VP ? "middle" : i, + textAlign: a === VP ? i : "center", + text: r[t] + }) + } + + var i = this.dataZoomModel, n = this._displayables, o = n.handleLabels, a = this._orient, r = ["", ""]; + if (i.get("showDetail")) { + var s = i.findRepresentativeAxisProxy(); + if (s) { + var l = s.getAxisModel().axis, u = this._range, + h = t ? s.calculateDataWindow({start: u[0], end: u[1]}).valueWindow : s.getDataValueWindow(); + r = [this._formatLabel(h[0], l), this._formatLabel(h[1], l)] + } + } + var c = RP(this._handleEnds.slice()); + e.call(this, 0), e.call(this, 1) + }, _formatLabel: function (t, e) { + var i = this.dataZoomModel, n = i.get("labelFormatter"), o = i.get("labelPrecision"); + null != o && "auto" !== o || (o = e.getPixelPrecision()); + var a = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel(Math.round(t)) : t.toFixed(Math.min(o, 20)); + return x(n) ? n(t, a) : _(n) ? n.replace("{value}", a) : a + }, _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 = mo([e, i], this._displayables.barGroup.getLocalTransform(), !0), o = this._updateInterval(t, n[0]), + a = this.dataZoomModel.get("realtime"); + this._updateView(!a), o && a && this._dispatchZoomAction() + }, _onDragEnd: function () { + this._dragging = !1, this._showDataInfo(!1), !this.dataZoomModel.get("realtime") && 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, o = (n[0] + n[1]) / 2, a = this._updateInterval("all", i[0] - o); + this._updateView(), a && 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 (BP(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 + } + }); + PP.extend({ + type: "dataZoom.inside", + defaultOption: { + disabled: !1, + zoomLock: !1, + zoomOnMouseWheel: !0, + moveOnMouseMove: !0, + preventDefaultMouseMove: !0 + } + }); + var HP = v, ZP = "\0_ec_dataZoom_roams", UP = m, XP = NP.extend({ + type: "dataZoom.inside", init: function (t, e) { + this._range + }, render: function (t, e, i, n) { + XP.superApply(this, "render", arguments), this._range = t.getPercentRange(), d(this.getTargetCoordInfo(), function (e, n) { + var o = f(e, function (t) { + return iy(t.model) + }); + d(e, function (e) { + var a = e.model, r = t.option; + ty(i, { + coordId: iy(a), + allCoordIds: o, + containsPoint: function (t, e, i) { + return a.coordinateSystem.containPoint([e, i]) + }, + dataZoomId: t.id, + throttleRate: t.get("throttle", !0), + panGetRange: UP(this._onPan, this, e, n), + zoomGetRange: UP(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 () { + ey(this.api, this.dataZoomModel.id), XP.superApply(this, "dispose", arguments), this._range = null + }, _onPan: function (t, e, i, n, o, a, r, s, l) { + var u = this._range, h = u.slice(), c = t.axisModels[0]; + if (c) { + var d = jP[e]([a, r], [s, l], c, i, t), f = d.signal * (h[1] - h[0]) * d.pixel / d.pixelLength; + return PC(f, h, [0, 100], "all"), this._range = h, u[0] !== h[0] || u[1] !== h[1] ? h : void 0 + } + }, _onZoom: function (t, e, i, n, o, a) { + var r = this._range, s = r.slice(), l = t.axisModels[0]; + if (l) { + var u = jP[e](null, [o, a], l, i, t), + h = (u.signal > 0 ? u.pixelStart + u.pixelLength - u.pixel : u.pixel - u.pixelStart) / u.pixelLength * (s[1] - s[0]) + s[0]; + n = Math.max(1 / n, 0), s[0] = (s[0] - h) * n + h, s[1] = (s[1] - h) * n + h; + var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); + return PC(0, s, [0, 100], 0, c.minSpan, c.maxSpan), this._range = s, r[0] !== s[0] || r[1] !== s[1] ? s : void 0 + } + } + }), jP = { + grid: function (t, e, i, n, o) { + var a = i.axis, r = {}, s = o.model.coordinateSystem.getRect(); + return t = t || [0, 0], "x" === a.dim ? (r.pixel = e[0] - t[0], r.pixelLength = s.width, r.pixelStart = s.x, r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixelLength = s.height, r.pixelStart = s.y, r.signal = a.inverse ? -1 : 1), r + }, polar: function (t, e, i, n, o) { + var a = i.axis, r = {}, s = o.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), + u = 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 = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixelLength = u[1] - u[0], r.pixelStart = u[0], r.signal = a.inverse ? -1 : 1), r + }, singleAxis: function (t, e, i, n, o) { + var a = i.axis, r = o.model.coordinateSystem.getRect(), s = {}; + return t = t || [0, 0], "horizontal" === a.orient ? (s.pixel = e[0] - t[0], s.pixelLength = r.width, s.pixelStart = r.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = r.height, s.pixelStart = r.y, s.signal = a.inverse ? -1 : 1), s + } + }; + hs({ + getTargetSeries: function (t) { + var e = R(); + return t.eachComponent("dataZoom", function (t) { + t.eachTargetAxis(function (t, i, n) { + d(n.getAxisProxy(t.name, i).getTargetSeriesModels(), function (t) { + e.set(t.uid, t) + }) + }) + }), e + }, modifyOutputEnd: !0, overallReset: function (t, e) { + t.eachComponent("dataZoom", function (t) { + t.eachTargetAxis(function (t, i, n) { + n.getAxisProxy(t.name, i).reset(n, e) + }), t.eachTargetAxis(function (t, i, n) { + n.getAxisProxy(t.name, i).filterData(n, e) + }) + }), 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) + }) + } + }), cs("dataZoom", function (t, e) { + var i = Uv(m(e.eachComponent, e, "dataZoom"), TP, 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) + }), d(n, function (e, i) { + e.setRawRange({start: t.start, end: t.end, startValue: t.startValue, endValue: t.endValue}) + }) + }); + var YP = d, qP = function (t) { + var e = t && t.visualMap; + y(e) || (e = e ? [e] : []), YP(e, function (t) { + if (t) { + cy(t, "splitList") && !cy(t, "pieces") && (t.pieces = t.splitList, delete t.splitList); + var e = t.pieces; + e && y(e) && YP(e, function (t) { + w(t) && (cy(t, "start") && !cy(t, "min") && (t.min = t.start), cy(t, "end") && !cy(t, "max") && (t.max = t.end)) + }) + } + }) + }; + hM.registerSubTypeDefaulter("visualMap", function (t) { + return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous" + }); + var KP = LI.VISUAL.COMPONENT; + ps(KP, { + createOnAllSeries: !0, reset: function (t, e) { + var i = []; + return e.eachComponent("visualMap", function (e) { + var n = t.pipelineContext; + !e.isTargetSeries(t) || n && n.large || i.push(gv(e.stateList, e.targetVisuals, m(e.getValueState, e), e.getDataDimension(t.getData()))) + }), i + } + }), ps(KP, { + createOnAllSeries: !0, reset: function (t, e) { + var i = t.getData(), n = []; + e.eachComponent("visualMap", function (e) { + if (e.isTargetSeries(t)) { + var o = e.getVisualMeta(m(dy, null, t, e)) || {stops: [], outerColors: []}, + a = e.getDataDimension(i), r = i.getDimensionInfo(a); + null != r && (o.dimension = r.index, n.push(o)) + } + }), t.getData().setVisual("visualMeta", n) + } + }); + var $P = { + get: function (t, e, n) { + var o = i((JP[t] || {})[e]); + return n && y(o) ? o[o.length - 1] : o + } + }, JP = { + 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]} + }, QP = ZA.mapVisual, tN = ZA.eachVisual, eN = y, iN = d, nN = Co, oN = To, aN = B, rN = vs({ + 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; + a_.canvasSupported || (i.realtime = !1), !e && fv(i, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption() + }, + resetVisual: function (t) { + var e = this.stateList; + t = m(t, this), this.controllerVisuals = dv(this.option.controller, e, t), this.targetVisuals = dv(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 = Si(t), e + }, + eachTargetSeries: function (t, e) { + d(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) { + function n(t) { + return t === l[0] ? "min" : t === l[1] ? "max" : (+t).toFixed(Math.min(s, 20)) + } + + var o, a, r = this.option, s = r.precision, l = this.dataBound, u = r.formatter; + return i = i || ["<", ">"], y(t) && (t = t.slice(), o = !0), a = e ? t : o ? [n(t[0]), n(t[1])] : n(t), _(u) ? u.replace("{value}", o ? a[0] : a).replace("{value2}", o ? a[1] : a) : x(u) ? o ? u(t[0], t[1]) : u(t) : o ? t[0] === l[0] ? i[0] + " " + a[1] : t[1] === l[1] ? i[1] + " " + a[0] : a[0] + " - " + a[1] : a + }, + resetExtent: function () { + var t = this.option, e = nN([t.min, t.max]); + this._dataExtent = e + }, + getDataDimension: function (t) { + var e = this.option.dimension, i = t.dimensions; + if (null != e || i.length) { + if (null != e) return t.getDimension(e); + for (var n = t.dimensions, o = n.length - 1; o >= 0; o--) { + var a = n[o]; + if (!t.getDimensionInfo(a).isCalculationCoord) return a + } + } + }, + getExtent: function () { + return this._dataExtent.slice() + }, + completeVisualOption: function () { + function t(t) { + eN(o.color) && !t.inRange && (t.inRange = {color: o.color.slice().reverse()}), t.inRange = t.inRange || {color: e.get("gradientColor")}, iN(this.stateList, function (e) { + var i = t[e]; + if (_(i)) { + var n = $P.get(i, "active", l); + n ? (t[e] = {}, t[e][i] = n) : delete t[e] + } + }, this) + } + + var e = this.ecModel, o = this.option, a = {inRange: o.inRange, outOfRange: o.outOfRange}, + r = o.target || (o.target = {}), s = o.controller || (o.controller = {}); + n(r, a), n(s, a); + var l = this.isCategory(); + t.call(this, r), t.call(this, s), function (t, e, i) { + var n = t[e], o = t[i]; + n && !o && (o = t[i] = {}, iN(n, function (t, e) { + if (ZA.isValidType(e)) { + var i = $P.get(e, "inactive", l); + null != i && (o[e] = i, "color" !== e || o.hasOwnProperty("opacity") || o.hasOwnProperty("colorAlpha") || (o.opacity = [0, 0])) + } + })) + }.call(this, r, "inRange", "outOfRange"), function (t) { + var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol, + n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize, o = this.get("inactiveColor"); + iN(this.stateList, function (a) { + var r = this.itemSize, s = t[a]; + s || (s = t[a] = {color: l ? o : [o]}), null == s.symbol && (s.symbol = e && i(e) || (l ? "roundRect" : ["roundRect"])), null == s.symbolSize && (s.symbolSize = n && i(n) || (l ? r[0] : [r[0], r[0]])), s.symbol = QP(s.symbol, function (t) { + return "none" === t || "square" === t ? "roundRect" : t + }); + var u = s.symbolSize; + if (null != u) { + var h = -1 / 0; + tN(u, function (t) { + t > h && (h = t) + }), s.symbolSize = QP(u, function (t) { + return oN(t, [0, h], [0, r[0]], !0) + }) + } + }, this) + }.call(this, s) + }, + resetItemSize: function () { + this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))] + }, + isCategory: function () { + return !!this.option.categories + }, + setSelected: aN, + getValueState: aN, + getVisualMeta: aN + }), sN = [20, 140], lN = rN.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) { + lN.superApply(this, "optionUpdated", arguments), this.resetExtent(), this.resetVisual(function (t) { + t.mappingMethod = "linear", t.dataExtent = this.getExtent() + }), this._resetRange() + }, + resetItemSize: function () { + lN.superApply(this, "resetItemSize", arguments); + var t = this.itemSize; + "horizontal" === this._orient && t.reverse(), (null == t[0] || isNaN(t[0])) && (t[0] = sN[0]), (null == t[1] || isNaN(t[1])) && (t[1] = sN[1]) + }, + _resetRange: function () { + var t = this.getExtent(), e = this.option.range; + !e || e.auto ? (t.auto = 1, this.option.range = t) : y(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 () { + rN.prototype.completeVisualOption.apply(this, arguments), d(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 = Co((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 = [], o = i.getData(); + o.each(this.getDataDimension(o), function (e, i) { + t[0] <= e && e <= t[1] && n.push(i) + }, this), e.push({seriesId: i.id, dataIndex: n}) + }, this), e + }, + getVisualMeta: function (t) { + function e(e, i) { + o.push({value: e, color: t(e, i)}) + } + + for (var i = fy(0, 0, this.getExtent()), n = fy(0, 0, this.option.range.slice()), o = [], a = 0, r = 0, s = n.length, l = i.length; r < l && (!n.length || i[r] <= n[0]); r++) i[r] < n[a] && e(i[r], "outOfRange"); + for (u = 1; a < s; a++, u = 0) u && o.length && e(n[a], "outOfRange"), e(n[a], "inRange"); + for (var u = 1; r < l; r++) (!n.length || n[n.length - 1] < i[r]) && (u && (o.length && e(o[o.length - 1].value, "outOfRange"), u = 0), e(i[r], "outOfRange")); + var h = o.length; + return {stops: o, outerColors: [h ? o[0].color : "transparent", h ? o[h - 1].color : "transparent"]} + } + }), uN = ys({ + 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 = KS(e.get("padding") || 0), n = t.getBoundingRect(); + t.add(new SS({ + 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) { + function n(t) { + return s[t] + } + + function o(t, e) { + s[t] = e + } + + var a = (i = i || {}).forceState, r = this.visualMapModel, s = {}; + if ("symbol" === e && (s.symbol = r.get("itemSymbol")), "color" === e) { + var l = r.get("contentColor"); + s.color = l + } + var u = r.controllerVisuals[a || r.getValueState(t)]; + return d(ZA.prepareVisualTypes(u), function (a) { + var r = u[a]; + i.convertOpacityToAlpha && "opacity" === a && (a = "colorAlpha", r = u.__alphaForOpacity), ZA.dependsOn(a, e) && r && r.applyVisual(t, n, o) + }), s[e] + }, positionGroup: function (t) { + var e = this.visualMapModel, i = this.api; + ta(t, e.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}) + }, doRender: B + }), hN = To, cN = d, dN = Math.min, fN = Math.max, pN = 12, gN = 6, mN = uN.extend({ + type: "visualMap.continuous", init: function () { + mN.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 o = this.visualMapModel, a = o.get("textGap"), r = o.itemSize, s = this._shapes.barGroup, + l = this._applyTransform([r[0] / 2, 0 === i ? -a : r[1] + a], s), + u = this._applyTransform(0 === i ? "bottom" : "top", s), h = this._orient, + c = this.visualMapModel.textStyleModel; + this.group.add(new fS({ + style: { + x: l[0], + y: l[1], + textVerticalAlign: "horizontal" === h ? "middle" : u, + textAlign: "horizontal" === h ? u : "center", + text: n, + textFont: c.getFont(), + textFill: c.getTextColor() + } + })) + } + }, _renderBar: function (t) { + var e = this.visualMapModel, i = this._shapes, n = e.itemSize, o = this._orient, a = this._useHandle, + r = py(e, this.api, n), s = i.barGroup = this._createBarGroup(r); + s.add(i.outOfRange = my()), s.add(i.inRange = my(null, a ? wy(this._orient) : null, m(this._dragHandle, this, "all", !1), m(this._dragHandle, this, "all", !0))); + var l = e.textStyleModel.getTextRect("国"), u = fN(l.width, l.height); + a && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(s, 0, n, u, o, r), this._createHandle(s, 1, n, u, o, r)), this._createIndicator(s, n, u, o), t.add(s) + }, _createHandle: function (t, e, i, n, o) { + var a = m(this._dragHandle, this, e, !1), r = m(this._dragHandle, this, e, !0), + s = my(vy(e, n), wy(this._orient), a, r); + s.position[0] = i[0], t.add(s); + var l = this.visualMapModel.textStyleModel, u = new fS({ + draggable: !0, drift: a, onmousemove: function (t) { + zw(t.event) + }, ondragend: r, style: {x: 0, y: 0, text: "", textFont: l.getFont(), textFill: l.getTextColor()} + }); + this.group.add(u); + var h = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === e ? -1.5 * n : 1.5 * n : 0 === e ? -n / 2 : n / 2], + c = this._shapes; + c.handleThumbs[e] = s, c.handleLabelPoints[e] = h, c.handleLabels[e] = u + }, _createIndicator: function (t, e, i, n) { + var o = my([[0, 0]], "move"); + o.position[0] = e[0], o.attr({invisible: !0, silent: !0}), t.add(o); + var a = this.visualMapModel.textStyleModel, r = new fS({ + silent: !0, + invisible: !0, + style: {x: 0, y: 0, text: "", textFont: a.getFont(), textFill: a.getTextColor()} + }); + this.group.add(r); + var s = ["horizontal" === n ? i / 2 : gN + 3, 0], l = this._shapes; + l.indicator = o, l.indicatorLabel = r, l.indicatorLabelPoint = s + }, _dragHandle: function (t, e, i, n) { + if (this._useHandle) { + if (this._dragging = !e, !e) { + var o = this._applyTransform([i, n], this._shapes.barGroup, !0); + this._updateInterval(t, o[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() : _y(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 = [hN(e[0], i, n, !0), hN(e[1], i, n, !0)] + }, _updateInterval: function (t, e) { + e = e || 0; + var i = this.visualMapModel, n = this._handleEnds, o = [0, i.itemSize[1]]; + PC(e, n, o, t, 0); + var a = i.getExtent(); + this._dataInterval = [hN(n[0], o, a, !0), hN(n[1], o, a, !0)] + }, _updateView: function (t) { + var e = this.visualMapModel, i = e.getExtent(), n = this._shapes, o = [0, e.itemSize[1]], + a = t ? o : this._handleEnds, r = this._createBarVisual(this._dataInterval, i, a, "inRange"), + s = this._createBarVisual(i, i, o, "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(a, r) + }, _createBarVisual: function (t, e, i, n) { + var o = {forceState: n, convertOpacityToAlpha: !0}, a = this._makeColorGradient(t, o), + r = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)], + s = this._createBarPoints(i, r); + return {barColor: new LS(0, 0, 0, 1, a), barPoints: s, handlesColor: [a[0].color, a[a.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 o = 1; o < 100; o++) { + var a = t[0] + n * o; + if (a > t[1]) break; + i.push({color: this.getControllerVisual(a, "color", e), offset: o / 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 sw("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, o = i.handleThumbs, a = i.handleLabels; + cN([0, 1], function (r) { + var s = o[r]; + s.setStyle("fill", e.handlesColor[r]), s.position[1] = t[r]; + var l = mo(i.handleLabelPoints[r], go(s, this.group)); + a[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 o = this.visualMapModel, a = o.getExtent(), r = o.itemSize, s = [0, r[1]], l = hN(t, a, s, !0), + u = this._shapes, h = u.indicator; + if (h) { + h.position[1] = l, h.attr("invisible", !1), h.setShape("points", yy(!!i, n, l, r[1])); + var c = {convertOpacityToAlpha: !0}, d = this.getControllerVisual(t, "color", c); + h.setStyle("fill", d); + var f = mo(u.indicatorLabelPoint, go(h, this.group)), p = u.indicatorLabel; + p.attr("invisible", !1); + var g = this._applyTransform("left", u.barGroup), m = this._orient; + p.setStyle({ + text: (i || "") + o.formatValueText(e), + textVerticalAlign: "horizontal" === m ? g : "middle", + textAlign: "horizontal" === m ? "center" : g, + x: f[0], + y: f[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] = dN(fN(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 o = [0, n[1]], a = i.getExtent(); + t = dN(fN(o[0], t), o[1]); + var r = xy(i, a, o), s = [t - r, t + r], l = hN(t, o, a, !0), + u = [hN(s[0], o, a, !0), hN(s[1], o, a, !0)]; + s[0] < o[0] && (u[0] = -1 / 0), s[1] > o[1] && (u[1] = 1 / 0), e && (u[0] === -1 / 0 ? this._showIndicator(l, u[1], "< ", r) : u[1] === 1 / 0 ? this._showIndicator(l, u[0], "> ", r) : this._showIndicator(l, l, "≈ ", r)); + var h = this._hoverLinkDataIndices, c = []; + (e || _y(i)) && (c = this._hoverLinkDataIndices = i.findTargetDataIndices(u)); + var d = ki(h, c); + this._dispatchHighDown("downplay", gy(d[0])), this._dispatchHighDown("highlight", gy(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 o = n.getData(e.dataType), a = o.get(i.getDataDimension(o), e.dataIndex, !0); + isNaN(a) || this._showIndicator(a, a) + } + } + }, _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", gy(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 o = go(e, n ? null : this.group); + return BS[y(t) ? "applyTransform" : "transformDirection"](t, o, 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() + } + }); + cs({type: "selectDataRange", event: "dataRangeSelected", update: "update"}, function (t, e) { + e.eachComponent({mainType: "visualMap", query: t}, function (e) { + e.setSelected(t.selected) + }) + }), us(qP); + var vN = rN.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) { + vN.superApply(this, "optionUpdated", arguments), this._pieceList = [], this.resetExtent(); + var n = this._mode = this._determineMode(); + yN[this._mode].call(this), this._resetSelected(t, e); + var o = this.option.categories; + this.resetVisual(function (t, e) { + "categories" === n ? (t.mappingMethod = "category", t.categories = i(o)) : (t.dataExtent = this.getExtent(), t.mappingMethod = "piecewise", t.pieceList = f(this._pieceList, function (t) { + var t = i(t); + return "inRange" !== e && (t.visual = null), t + })) + }) + }, + completeVisualOption: function () { + function t(t, e, i) { + return t && t[e] && (w(t[e]) ? t[e].hasOwnProperty(i) : t[e] === i) + } + + var e = this.option, i = {}, n = ZA.listVisualTypes(), o = this.isCategory(); + d(e.pieces, function (t) { + d(n, function (e) { + t.hasOwnProperty(e) && (i[e] = 1) + }) + }), d(i, function (i, n) { + var a = 0; + d(this.stateList, function (i) { + a |= t(e, i, n) || t(e.target, i, n) + }, this), !a && d(this.stateList, function (t) { + (e[t] || (e[t] = {}))[n] = $P.get(n, "inRange" === t ? "active" : "inactive", o) + }) + }, this), rN.prototype.completeVisualOption.apply(this, arguments) + }, + _resetSelected: function (t, e) { + var i = this.option, n = this._pieceList, o = (e ? i : t).selected || {}; + if (i.selected = o, d(n, function (t, e) { + var i = this.getSelectedMapKey(t); + o.hasOwnProperty(i) || (o[i] = !0) + }, this), "single" === i.selectedMode) { + var a = !1; + d(n, function (t, e) { + var i = this.getSelectedMapKey(t); + o[i] && (a ? o[i] = !1 : a = !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 = i(t) + }, + getValueState: function (t) { + var e = ZA.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 = [], o = i.getData(); + o.each(this.getDataDimension(o), function (e, i) { + ZA.findPieceIndex(e, this._pieceList) === t && n.push(i) + }, 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) { + function e(e, a) { + var r = o.getRepresentValue({interval: e}); + a || (a = o.getValueState(r)); + var s = t(r, a); + e[0] === -1 / 0 ? n[0] = s : e[1] === 1 / 0 ? n[1] = s : i.push({value: e[0], color: s}, { + value: e[1], + color: s + }) + } + + if (!this.isCategory()) { + var i = [], n = [], o = this, a = this._pieceList.slice(); + if (a.length) { + var r = a[0].interval[0]; + r !== -1 / 0 && a.unshift({interval: [-1 / 0, r]}), (r = a[a.length - 1].interval[1]) !== 1 / 0 && a.push({interval: [r, 1 / 0]}) + } else a.push({interval: [-1 / 0, 1 / 0]}); + var s = -1 / 0; + return d(a, function (t) { + var i = t.interval; + i && (i[0] > s && e([s, i[0]], "outOfRange"), e(i.slice()), s = i[1]) + }, this), {stops: i, outerColors: n} + } + } + }), yN = { + splitNumber: function () { + var t = this.option, e = this._pieceList, i = Math.min(t.precision, 20), n = this.getExtent(), + o = t.splitNumber; + o = Math.max(parseInt(o, 10), 1), t.splitNumber = o; + for (var a = (n[1] - n[0]) / o; +a.toFixed(i) !== a && i < 5;) i++; + t.precision = i, a = +a.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 + o; r < l; s += a) { + var u = r === o - 1 ? n[1] : s + a; + e.push({index: r++, interval: [s, u], close: [1, 1]}) + } + t.maxOpen && e.push({index: r++, interval: [n[1], 1 / 0], close: [0, 0]}), Go(e), d(e, function (t) { + t.text = this.formatValueText(t.interval) + }, this) + }, categories: function () { + var t = this.option; + d(t.categories, function (t) { + this._pieceList.push({text: this.formatValueText(t, !0), value: t}) + }, this), by(t, this._pieceList) + }, pieces: function () { + var t = this.option, e = this._pieceList; + d(t.pieces, function (t, i) { + w(t) || (t = {value: t}); + var n = {text: "", index: i}; + if (null != t.label && (n.text = t.label), t.hasOwnProperty("value")) { + var o = n.value = t.value; + n.interval = [o, o], n.close = [1, 1] + } else { + for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) { + for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], d = 0; d < 3 && null == a[h]; d++) a[h] = t[c[d]], r[h] = s[d], u[h] = 2 === d; + null == a[h] && (a[h] = l[h]) + } + u[0] && a[1] === 1 / 0 && (r[0] = 0), u[1] && a[0] === -1 / 0 && (r[1] = 0), a[0] === a[1] && r[0] && r[1] && (n.value = a[0]) + } + n.visual = ZA.retrieveVisuals(t), e.push(n) + }, this), by(t, e), Go(e), d(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) + } + }; + uN.extend({ + type: "visualMap.piecewise", doRender: function () { + var t = this.group; + t.removeAll(); + var e = this.visualMapModel, i = e.get("textGap"), n = e.textStyleModel, o = n.getFont(), + a = n.getTextColor(), r = this._getItemAlign(), s = e.itemSize, l = this._getViewData(), u = l.endsText, + h = T(e.get("showLabel", !0), !u); + u && this._renderEndsText(t, u[0], s, h, r), d(l.viewPieceList, function (n) { + var l = n.piece, u = new sw; + u.onclick = m(this._onItemClick, this, l), this._enableHoverLink(u, n.indexInModelPieceList); + var c = e.getRepresentValue(l); + if (this._createItemSymbol(u, c, [0, 0, s[0], s[1]]), h) { + var d = this.visualMapModel.getValueState(c); + u.add(new fS({ + style: { + x: "right" === r ? -i : s[0] + i, + y: s[1] / 2, + text: l.text, + textVerticalAlign: "middle", + textAlign: r, + textFont: o, + textFill: a, + opacity: "outOfRange" === d ? .5 : 1 + } + })) + } + t.add(u) + }, this), u && this._renderEndsText(t, u[1], s, h, r), sM(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: gy(i.findTargetDataIndices(e))}) + } + + t.on("mouseover", m(i, this, "highlight")).on("mouseout", m(i, this, "downplay")) + }, _getItemAlign: function () { + var t = this.visualMapModel, e = t.option; + if ("vertical" === e.orient) return py(t, this.api, t.itemSize); + var i = e.align; + return i && "auto" !== i || (i = "left"), i + }, _renderEndsText: function (t, e, i, n, o) { + if (e) { + var a = new sw, r = this.visualMapModel.textStyleModel; + a.add(new fS({ + style: { + x: n ? "right" === o ? i[0] : 0 : i[0] / 2, + y: i[1] / 2, + textVerticalAlign: "middle", + textAlign: n ? o : "center", + text: e, + textFont: r.getFont(), + textFill: r.getTextColor() + } + })), t.add(a) + } + }, _getViewData: function () { + var t = this.visualMapModel, e = f(t.getPieceList(), function (t, e) { + return {piece: t, indexInModelPieceList: e} + }), i = t.get("text"), n = t.get("orient"), o = t.get("inverse"); + return ("horizontal" === n ? o : !o) ? e.reverse() : i && (i = i.slice().reverse()), { + viewPieceList: e, + endsText: i + } + }, _createItemSymbol: function (t, e, i) { + t.add(Tl(this.getControllerVisual(e, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(e, "color"))) + }, _onItemClick: function (t) { + var e = this.visualMapModel, n = e.option, o = i(n.selected), a = e.getSelectedMapKey(t); + "single" === n.selectedMode ? (o[a] = !0, d(o, function (t, e) { + o[e] = e === a + })) : o[a] = !o[a], this.api.dispatchAction({ + type: "selectDataRange", + from: this.uid, + visualMapId: this.visualMapModel.id, + selected: o + }) + } + }); + us(qP); + var xN = Fo, _N = Zo, wN = vs({ + 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 (a_.node) return !1; + var t = this.__hostSeries; + return this.getShallow("animation") && t && t.isAnimationEnabled() + }, mergeOption: function (t, e, i, n) { + var o = this.constructor, r = this.mainType + "Model"; + i || e.eachSeries(function (t) { + var i = t.get(this.mainType, !0), s = t[r]; + i && i.data ? (s ? s.mergeOption(i, e, !0) : (n && Sy(i), d(i.data, function (t) { + t instanceof Array ? (Sy(t[0]), Sy(t[1])) : Sy(t) + }), a(s = new o(i, this, e), { + mainType: this.mainType, + seriesIndex: t.seriesIndex, + name: t.name, + createdBySelf: !0 + }), s.__hostSeries = t), t[r] = s) : t[r] = null + }, this) + }, formatTooltip: function (t) { + var e = this.getData(), i = this.getRawValue(t), n = y(i) ? f(i, xN).join(", ") : xN(i), o = e.getName(t), + a = _N(this.name); + return (null != i || o) && (a += "
"), o && (a += _N(o), null != i && (a += " : ")), null != i && (a += _N(n)), a + }, getData: function () { + return this._data + }, setData: function (t) { + this._data = t + } + }); + h(wN, XM), wN.extend({ + type: "markPoint", + defaultOption: { + zlevel: 0, + z: 5, + symbol: "pin", + symbolSize: 50, + tooltip: {trigger: "item"}, + label: {show: !0, position: "inside"}, + itemStyle: {borderWidth: 2}, + emphasis: {label: {show: !0}} + } + }); + var bN = l, SN = v, MN = {min: SN(Ty, "min"), max: SN(Ty, "max"), average: SN(Ty, "average")}, IN = ys({ + type: "marker", init: function () { + this.markerGroupMap = R() + }, render: function (t, e, i) { + var n = this.markerGroupMap; + n.each(function (t) { + t.__keep = !1 + }); + var o = this.type + "Model"; + e.eachSeries(function (t) { + var n = t[o]; + n && this.renderSeries(t, n, e, i) + }, this), n.each(function (t) { + !t.__keep && this.group.remove(t.group) + }, this) + }, renderSeries: function () { + } + }); + IN.extend({ + type: "markPoint", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markPointModel; + e && (Ny(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e)) + }, this) + }, renderSeries: function (t, e, i, n) { + var o = t.coordinateSystem, a = t.id, r = t.getData(), s = this.markerGroupMap, + l = s.get(a) || s.set(a, new Ql), u = Oy(o, t, e); + e.setData(u), Ny(e.getData(), t, n), u.each(function (t) { + var i = u.getItemModel(t), n = i.getShallow("symbolSize"); + "function" == typeof n && (n = n(e.getRawValue(t), e.getDataParams(t))), u.setItemVisual(t, { + symbolSize: n, + color: i.get("itemStyle.color") || r.getVisual("color"), + symbol: i.getShallow("symbol") + }) + }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function (t) { + t.traverse(function (t) { + t.dataModel = e + }) + }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markPoint = t.markPoint || {} + }), wN.extend({ + type: "markLine", + defaultOption: { + zlevel: 0, + z: 5, + symbol: ["circle", "arrow"], + symbolSize: [8, 16], + precision: 2, + tooltip: {trigger: "item"}, + label: {show: !0, position: "end"}, + lineStyle: {type: "dashed"}, + emphasis: {label: {show: !0}, lineStyle: {width: 3}}, + animationEasing: "linear" + } + }); + var TN = function (t, e, o, r) { + var s = t.getData(), l = r.type; + if (!y(r) && ("min" === l || "max" === l || "average" === l || "median" === l || null != r.xAxis || null != r.yAxis)) { + var u, h; + if (null != r.yAxis || null != r.xAxis) u = null != r.yAxis ? "y" : "x", e.getAxis(u), h = T(r.yAxis, r.xAxis); else { + var c = Ay(r, s, e, t); + u = c.valueDataDim, c.valueAxis, h = Py(s, u, l) + } + var d = "x" === u ? 0 : 1, f = 1 - d, p = i(r), g = {}; + p.type = null, p.coord = [], g.coord = [], p.coord[f] = -1 / 0, g.coord[f] = 1 / 0; + var m = o.get("precision"); + m >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(m, 20))), p.coord[d] = g.coord[d] = h, r = [p, g, { + type: l, + valueIndex: r.valueIndex, + value: h + }] + } + return r = [Dy(t, r[0]), Dy(t, r[1]), a({}, r[2])], r[2].type = r[2].type || "", n(r[2], r[0]), n(r[2], r[1]), r + }; + IN.extend({ + type: "markLine", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markLineModel; + if (e) { + var n = e.getData(), o = e.__from, a = e.__to; + o.each(function (e) { + By(o, e, !0, t, i), By(a, e, !1, t, i) + }), n.each(function (t) { + n.setItemLayout(t, [o.getItemLayout(t), a.getItemLayout(t)]) + }), this.markerGroupMap.get(t.id).updateLayout() + } + }, this) + }, renderSeries: function (t, e, i, n) { + function o(e, i, o) { + var a = e.getItemModel(i); + By(e, i, o, t, n), e.setItemVisual(i, { + symbolSize: a.get("symbolSize") || g[o ? 0 : 1], + symbol: a.get("symbol", !0) || p[o ? 0 : 1], + color: a.get("itemStyle.color") || s.getVisual("color") + }) + } + + var a = t.coordinateSystem, r = t.id, s = t.getData(), l = this.markerGroupMap, + u = l.get(r) || l.set(r, new Sd); + this.group.add(u.group); + var h = Vy(a, t, e), c = h.from, d = h.to, f = h.line; + e.__from = c, e.__to = d, e.setData(f); + var p = e.get("symbol"), g = e.get("symbolSize"); + y(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function (t) { + o(c, t, !0), o(d, t, !1) + }), f.each(function (t) { + var e = f.getItemModel(t).get("lineStyle.color"); + f.setItemVisual(t, {color: e || c.getItemVisual(t, "color")}), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, { + fromSymbolSize: c.getItemVisual(t, "symbolSize"), + fromSymbol: c.getItemVisual(t, "symbol"), + toSymbolSize: d.getItemVisual(t, "symbolSize"), + toSymbol: d.getItemVisual(t, "symbol") + }) + }), u.updateData(f), h.line.eachItemGraphicEl(function (t, i) { + t.traverse(function (t) { + t.dataModel = e + }) + }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markLine = t.markLine || {} + }), wN.extend({ + type: "markArea", + defaultOption: { + zlevel: 0, + z: 1, + tooltip: {trigger: "item"}, + animation: !1, + label: {show: !0, position: "top"}, + itemStyle: {borderWidth: 0}, + emphasis: {label: {show: !0, position: "top"}} + } + }); + var DN = function (t, e, i, n) { + var a = Dy(t, n[0]), r = Dy(t, n[1]), s = T, l = a.coord, u = r.coord; + l[0] = s(l[0], -1 / 0), l[1] = s(l[1], -1 / 0), u[0] = s(u[0], 1 / 0), u[1] = s(u[1], 1 / 0); + var h = o([{}, a, r]); + return h.coord = [a.coord, r.coord], h.x0 = a.x, h.y0 = a.y, h.x1 = r.x, h.y1 = r.y, h + }, AN = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]]; + IN.extend({ + type: "markArea", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markAreaModel; + if (e) { + var n = e.getData(); + n.each(function (e) { + var o = f(AN, function (o) { + return Hy(n, e, o, t, i) + }); + n.setItemLayout(e, o), n.getItemGraphicEl(e).setShape("points", o) + }) + } + }, this) + }, renderSeries: function (t, e, i, n) { + var o = t.coordinateSystem, a = t.id, s = t.getData(), l = this.markerGroupMap, + u = l.get(a) || l.set(a, {group: new sw}); + this.group.add(u.group), u.__keep = !0; + var h = Zy(o, t, e); + e.setData(h), h.each(function (e) { + h.setItemLayout(e, f(AN, function (i) { + return Hy(h, e, i, t, n) + })), h.setItemVisual(e, {color: s.getVisual("color")}) + }), h.diff(u.__data).add(function (t) { + var e = new wS({shape: {points: h.getItemLayout(t)}}); + h.setItemGraphicEl(t, e), u.group.add(e) + }).update(function (t, i) { + var n = u.__data.getItemGraphicEl(i); + fo(n, {shape: {points: h.getItemLayout(t)}}, e, t), u.group.add(n), h.setItemGraphicEl(t, n) + }).remove(function (t) { + var e = u.__data.getItemGraphicEl(t); + u.group.remove(e) + }).execute(), h.eachItemGraphicEl(function (t, i) { + var n = h.getItemModel(i), o = n.getModel("label"), a = n.getModel("emphasis.label"), + s = h.getItemVisual(i, "color"); + t.useStyle(r(n.getModel("itemStyle").getItemStyle(), { + fill: Rt(s, .4), + stroke: s + })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), io(t.style, t.hoverStyle, o, a, { + labelFetcher: e, + labelDataIndex: i, + defaultText: h.getName(i) || "", + isRectText: !0, + autoColor: s + }), eo(t, {}), t.dataModel = e + }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markArea = t.markArea || {} + }); + hM.registerSubTypeDefaulter("timeline", function () { + return "slider" + }), cs({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"), r({currentIndex: i.option.currentIndex}, t) + }), cs({type: "timelinePlayChange", event: "timelinePlayChanged", update: "update"}, function (t, e) { + var i = e.getComponent("timeline"); + i && null != t.playState && i.setPlayState(t.playState) + }); + var CN = hM.extend({ + type: "timeline", + layoutMode: "box", + defaultOption: { + zlevel: 0, + z: 4, + show: !0, + axisType: "time", + realtime: !0, + left: "20%", + top: null, + right: "20%", + bottom: 0, + width: null, + height: 40, + padding: 5, + controlPosition: "left", + autoPlay: !1, + rewind: !1, + loop: !0, + playInterval: 2e3, + currentIndex: 0, + itemStyle: {}, + label: {color: "#000"}, + data: [] + }, + init: function (t, e, i) { + this._data, this._names, this.mergeDefaultAndTheme(t, i), this._initData() + }, + mergeOption: function (t) { + CN.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 || [], n = t.axisType, o = this._names = []; + if ("category" === n) { + var a = []; + d(e, function (t, e) { + var n, r = Ii(t); + w(t) ? (n = i(t)).value = e : n = e, a.push(n), _(r) || null != r && !isNaN(r) || (r = ""), o.push(r + "") + }), e = a + } + var r = {category: "ordinal", time: "time"}[n] || "number"; + (this._data = new sT([{name: "value", type: r}], this)).initData(e, o) + }, + getData: function () { + return this._data + }, + getCategories: function () { + if ("category" === this.get("axisType")) return this._names.slice() + } + }); + h(CN.extend({ + type: "timeline.slider", defaultOption: { + backgroundColor: "rgba(0,0,0,0)", + borderColor: "#ccc", + borderWidth: 0, + orient: "horizontal", + inverse: !1, + tooltip: {trigger: "item"}, + symbol: "emptyCircle", + symbolSize: 10, + lineStyle: {show: !0, width: 2, color: "#304654"}, + label: {position: "auto", show: !0, interval: "auto", rotate: 0, color: "#304654"}, + itemStyle: {color: "#304654", borderWidth: 1}, + checkpointStyle: { + symbol: "circle", + symbolSize: 13, + color: "#c23531", + borderWidth: 5, + borderColor: "rgba(194,53,49, 0.5)", + animation: !0, + animationDuration: 300, + animationEasing: "quinticInOut" + }, + controlStyle: { + show: !0, + showPlayBtn: !0, + showPrevBtn: !0, + showNextBtn: !0, + itemSize: 22, + itemGap: 12, + position: "left", + playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z", + stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z", + nextIcon: "path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z", + prevIcon: "path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z", + color: "#304654", + borderColor: "#304654", + borderWidth: 1 + }, + emphasis: { + label: {show: !0, color: "#c23531"}, + itemStyle: {color: "#c23531"}, + controlStyle: {color: "#c23531", borderColor: "#c23531", borderWidth: 2} + }, + data: [] + } + }), XM); + var LN = $M.extend({type: "timeline"}), kN = function (t, e, i, n) { + qT.call(this, t, e, i), this.type = n || "value", this.model = null + }; + kN.prototype = { + constructor: kN, getLabelModel: function () { + return this.model.getModel("label") + }, isHorizontal: function () { + return "horizontal" === this.model.get("orient") + } + }, u(kN, qT); + var PN = m, NN = d, ON = Math.PI; + LN.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 o = this._layout(t, i), a = this._createGroup("mainGroup"), r = this._createGroup("labelGroup"), + s = this._axis = this._createAxis(o, t); + t.formatTooltip = function (t) { + return Zo(s.scale.getLabel(t)) + }, NN(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function (e) { + this["_render" + e](o, a, s, t) + }, this), this._renderAxisLabel(o, r, s, t), this._position(o, t) + } + this._doPlayStop() + }, remove: function () { + this._clearTimer(), this.group.removeAll() + }, dispose: function () { + this._clearTimer() + }, _layout: function (t, e) { + var i = t.get("label.position"), n = t.get("orient"), o = Yy(t, e); + null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < e.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < e.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = { + horizontal: { + top: "-", + bottom: "+" + }, vertical: {left: "-", right: "+"} + }[n][i]); + var a = {horizontal: "center", vertical: i >= 0 || "+" === i ? "left" : "right"}, + r = {horizontal: i >= 0 || "+" === i ? "top" : "bottom", vertical: "middle"}, + s = {horizontal: 0, vertical: ON / 2}, l = "vertical" === n ? o.height : o.width, + u = t.getModel("controlStyle"), h = u.get("show", !0), c = h ? u.get("itemSize") : 0, + d = h ? u.get("itemGap") : 0, f = c + d, p = t.get("label.rotate") || 0; + p = p * ON / 180; + var g, m, v, y, x = u.get("position", !0), _ = h && u.get("showPlayBtn", !0), + w = h && u.get("showPrevBtn", !0), b = h && u.get("showNextBtn", !0), S = 0, M = l; + return "left" === x || "bottom" === x ? (_ && (g = [0, 0], S += f), w && (m = [S, 0], S += f), b && (v = [M - c, 0], M -= f)) : (_ && (g = [M - c, 0], M -= f), w && (m = [0, 0], S += f), b && (v = [M - c, 0], M -= f)), y = [S, M], t.get("inverse") && y.reverse(), { + viewRect: o, + mainLength: l, + orient: n, + rotation: s[n], + labelRotation: p, + labelPosOpt: i, + labelAlign: t.get("label.align") || a[n], + labelBaseline: t.get("label.verticalAlign") || t.get("label.baseline") || r[n], + playPosition: g, + prevBtnPosition: m, + nextBtnPosition: v, + axisExtent: y, + controlSize: c, + controlGap: d + } + }, _position: function (t, e) { + function i(t) { + var e = t.position; + t.origin = [c[0][0] - e[0], c[1][0] - e[1]] + } + + function n(t) { + return [[t.x, t.x + t.width], [t.y, t.y + t.height]] + } + + function o(t, e, i, n, o) { + t[n] += i[n][o] - e[n][o] + } + + var a = this._mainGroup, r = this._labelGroup, s = t.viewRect; + if ("vertical" === t.orient) { + var l = st(), u = s.x, h = s.y + s.height; + ct(l, l, [-u, -h]), dt(l, l, -ON / 2), ct(l, l, [u, h]), (s = s.clone()).applyTransform(l) + } + var c = n(s), d = n(a.getBoundingRect()), f = n(r.getBoundingRect()), p = a.position, g = r.position; + g[0] = p[0] = c[0][0]; + var m = t.labelPosOpt; + if (isNaN(m)) o(p, d, c, 1, v = "+" === m ? 0 : 1), o(g, f, c, 1, 1 - v); else { + var v = m >= 0 ? 0 : 1; + o(p, d, c, 1, v), g[1] = p[1] + m + } + a.attr("position", p), r.attr("position", g), a.rotation = r.rotation = t.rotation, i(a), i(r) + }, _createAxis: function (t, e) { + var i = e.getData(), n = e.get("axisType"), o = xl(e, n); + o.getTicks = function () { + return i.mapArray(["value"], function (t) { + return t + }) + }; + var a = i.getDataExtent("value"); + o.setExtent(a[0], a[1]), o.niceTicks(); + var r = new kN("value", o, t.axisExtent, n); + return r.model = e, r + }, _createGroup: function (t) { + var e = this["_" + t] = new sw; + return this.group.add(e), e + }, _renderAxisLine: function (t, e, i, n) { + var o = i.getExtent(); + n.get("lineStyle.show") && e.add(new MS({ + shape: {x1: o[0], y1: 0, x2: o[1], y2: 0}, + style: a({lineCap: "round"}, n.getModel("lineStyle").getLineStyle()), + silent: !0, + z2: 1 + })) + }, _renderAxisTick: function (t, e, i, n) { + var o = n.getData(), a = i.scale.getTicks(); + NN(a, function (t) { + var a = i.dataToCoord(t), r = o.getItemModel(t), s = r.getModel("itemStyle"), + l = r.getModel("emphasis.itemStyle"), + u = {position: [a, 0], onclick: PN(this._changeTimeline, this, t)}, h = Ky(r, s, e, u); + eo(h, l.getItemStyle()), r.get("tooltip") ? (h.dataIndex = t, h.dataModel = n) : h.dataIndex = h.dataModel = null + }, this) + }, _renderAxisLabel: function (t, e, i, n) { + if (i.getLabelModel().get("show")) { + var o = n.getData(), a = i.getViewLabels(); + NN(a, function (n) { + var a = n.tickValue, r = o.getItemModel(a), s = r.getModel("label"), + l = r.getModel("emphasis.label"), u = i.dataToCoord(n.tickValue), h = new fS({ + position: [u, 0], + rotation: t.labelRotation - t.rotation, + onclick: PN(this._changeTimeline, this, a), + silent: !1 + }); + no(h.style, s, { + text: n.formattedLabel, + textAlign: t.labelAlign, + textVerticalAlign: t.labelBaseline + }), e.add(h), eo(h, no({}, l)) + }, this) + } + }, _renderControl: function (t, e, i, n) { + function o(t, i, o, h) { + if (t) { + var c = qy(n, i, u, { + position: t, + origin: [a / 2, 0], + rotation: h ? -r : 0, + rectHover: !0, + style: s, + onclick: o + }); + e.add(c), eo(c, l) + } + } + + var a = t.controlSize, r = t.rotation, s = n.getModel("controlStyle").getItemStyle(), + l = n.getModel("emphasis.controlStyle").getItemStyle(), u = [0, -a / 2, a, a], h = n.getPlayState(), + c = n.get("inverse", !0); + o(t.nextBtnPosition, "controlStyle.nextIcon", PN(this._changeTimeline, this, c ? "-" : "+")), o(t.prevBtnPosition, "controlStyle.prevIcon", PN(this._changeTimeline, this, c ? "+" : "-")), o(t.playPosition, "controlStyle." + (h ? "stopIcon" : "playIcon"), PN(this._handlePlayClick, this, !h), !0) + }, _renderCurrentPointer: function (t, e, i, n) { + var o = n.getData(), a = n.getCurrentIndex(), r = o.getItemModel(a).getModel("checkpointStyle"), s = this, + l = { + onCreate: function (t) { + t.draggable = !0, t.drift = PN(s._handlePointerDrag, s), t.ondragend = PN(s._handlePointerDragend, s), $y(t, a, i, n, !0) + }, onUpdate: function (t) { + $y(t, a, i, n) + } + }; + this._currentPointer = Ky(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 = Co(this._axis.getExtent().slice()); + i > n[1] && (i = n[1]), i < n[0] && (i = n[0]), this._currentPointer.position[0] = i, this._currentPointer.dirty(); + var o = this._findNearestTick(i), a = this.model; + (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o) + }, _doPlayStop: function () { + this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(PN(function () { + var t = this.model; + this._changeTimeline(t.getCurrentIndex() + (t.get("rewind", !0) ? -1 : 1)) + }, this), this.model.get("playInterval"))) + }, _toAxisCoord: function (t) { + return mo(t, this._mainGroup.getLocalTransform(), !0) + }, _findNearestTick: function (t) { + var e, i = this.model.getData(), n = 1 / 0, o = this._axis; + return i.each(["value"], function (i, a) { + var r = o.dataToCoord(i), s = Math.abs(r - t); + s < n && (n = s, e = a) + }), 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 + }) + } + }), us(function (t) { + var e = t && t.timeline; + y(e) || (e = e ? [e] : []), d(e, function (t) { + t && Uy(t) + }) + }); + var EN = vs({ + type: "toolbox", + layoutMode: {type: "box", ignoreSize: !0}, + optionUpdated: function () { + EN.superApply(this, "optionUpdated", arguments), d(this.option.feature, function (t, e) { + var i = Vv(e); + i && n(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: {borderColor: "#666", color: "none"}, + emphasis: {iconStyle: {borderColor: "#3E98C5"}} + } + }); + ys({ + type: "toolbox", render: function (t, e, i, n) { + function o(o, r) { + var s, c = h[o], d = h[r], f = new wo(l[c], t, t.ecModel); + if (c && !d) { + if (Jy(c)) s = {model: f, onclick: f.option.onclick, featureName: c}; else { + var p = Vv(c); + if (!p) return; + s = new p(f, e, i) + } + u[c] = s + } else { + if (!(s = u[d])) return; + s.model = f, s.ecModel = e, s.api = i + } + c || !d ? f.get("show") && !s.unusable ? (a(f, s, c), f.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) + }, s.render && s.render(f, e, i, n)) : s.remove && s.remove(e, i) : s.dispose && s.dispose(e, i) + } + + function a(n, o, a) { + var l = n.getModel("iconStyle"), u = n.getModel("emphasis.iconStyle"), + h = o.getIcons ? o.getIcons() : n.get("icon"), c = n.get("title") || {}; + if ("string" == typeof h) { + var f = h, p = c; + c = {}, (h = {})[a] = f, c[a] = p + } + var g = n.iconPaths = {}; + d(h, function (a, h) { + var d = _o(a, {}, {x: -s / 2, y: -s / 2, width: s, height: s}); + d.setStyle(l.getItemStyle()), d.hoverStyle = u.getItemStyle(), eo(d), t.get("showTitle") && (d.__title = c[h], d.on("mouseover", function () { + var t = u.getItemStyle(); + d.setStyle({ + text: c[h], + textPosition: t.textPosition || "bottom", + textFill: t.fill || t.stroke || "#000", + textAlign: t.textAlign || "center" + }) + }).on("mouseout", function () { + d.setStyle({textFill: null}) + })), d.trigger(n.get("iconStatus." + h) || "normal"), r.add(d), d.on("click", m(o.onclick, o, e, i, h)), g[h] = d + }) + } + + var r = this.group; + if (r.removeAll(), t.get("show")) { + var s = +t.get("itemSize"), l = t.get("feature") || {}, u = this._features || (this._features = {}), + h = []; + d(l, function (t, e) { + h.push(e) + }), new Ss(this._featureNames || [], h).add(o).update(o).remove(v(o, null)).execute(), this._featureNames = h, Pm(r, t, i), r.add(Nm(r.getBoundingRect(), t)), r.eachChild(function (t) { + var e = t.__title, n = t.hoverStyle; + if (n && e) { + var o = me(e, ke(n)), a = t.position[0] + r.position[0], l = !1; + t.position[1] + r.position[1] + s + o.height > i.getHeight() && (n.textPosition = "top", l = !0); + var u = l ? -5 - o.height : s + 8; + a + o.width / 2 > i.getWidth() ? (n.textPosition = ["100%", u], n.textAlign = "right") : a - o.width / 2 < 0 && (n.textPosition = [0, u], n.textAlign = "left") + } + }) + } + }, updateView: function (t, e, i, n) { + d(this._features, function (t) { + t.updateView && t.updateView(t.model, e, i, n) + }) + }, remove: function (t, e) { + d(this._features, function (i) { + i.remove && i.remove(t, e) + }), this.group.removeAll() + }, dispose: function (t, e) { + d(this._features, function (i) { + i.dispose && i.dispose(t, e) + }) + } + }); + var RN = lI.toolbox.saveAsImage; + Qy.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: RN.title, + type: "png", + name: "", + excludeComponents: ["toolbox"], + pixelRatio: 1, + lang: RN.lang.slice() + }, Qy.prototype.unusable = !a_.canvasSupported, Qy.prototype.onclick = function (t, e) { + var i = this.model, n = i.get("name") || t.get("title.0.text") || "echarts", o = document.createElement("a"), + a = i.get("type", !0) || "png"; + o.download = n + "." + a, o.target = "_blank"; + var r = e.getConnectedDataURL({ + type: a, + backgroundColor: i.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff", + excludeComponents: i.get("excludeComponents"), + pixelRatio: i.get("pixelRatio") + }); + if (o.href = r, "function" != typeof MouseEvent || a_.browser.ie || a_.browser.edge) if (window.navigator.msSaveOrOpenBlob) { + for (var s = atob(r.split(",")[1]), l = s.length, u = new Uint8Array(l); l--;) u[l] = s.charCodeAt(l); + var h = new Blob([u]); + window.navigator.msSaveOrOpenBlob(h, n + "." + a) + } else { + var c = i.get("lang"), + d = ''; + window.open().document.write(d) + } else { + var f = new MouseEvent("click", {view: window, bubbles: !0, cancelable: !1}); + o.dispatchEvent(f) + } + }, Bv("saveAsImage", Qy); + var zN = lI.toolbox.magicType; + tx.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: i(zN.title), + option: {}, + seriesIndex: {} + }; + var BN = tx.prototype; + BN.getIcons = function () { + var t = this.model, e = t.get("icon"), i = {}; + return d(t.get("type"), function (t) { + e[t] && (i[t] = e[t]) + }), i + }; + var VN = { + line: function (t, e, i, o) { + if ("bar" === t) return n({ + id: e, + type: "line", + data: i.get("data"), + stack: i.get("stack"), + markPoint: i.get("markPoint"), + markLine: i.get("markLine") + }, o.get("option.line") || {}, !0) + }, bar: function (t, e, i, o) { + if ("line" === t) return n({ + id: e, + type: "bar", + data: i.get("data"), + stack: i.get("stack"), + markPoint: i.get("markPoint"), + markLine: i.get("markLine") + }, o.get("option.bar") || {}, !0) + }, stack: function (t, e, i, o) { + if ("line" === t || "bar" === t) return n({ + id: e, + stack: "__ec_magicType_stack__" + }, o.get("option.stack") || {}, !0) + }, tiled: function (t, e, i, o) { + if ("line" === t || "bar" === t) return n({id: e, stack: ""}, o.get("option.tiled") || {}, !0) + } + }, GN = [["line", "bar"], ["stack", "tiled"]]; + BN.onclick = function (t, e, i) { + var n = this.model, o = n.get("seriesIndex." + i); + if (VN[i]) { + var a = {series: []}; + d(GN, function (t) { + l(t, i) >= 0 && d(t, function (t) { + n.setIconStatus(t, "normal") + }) + }), n.setIconStatus(i, "emphasis"), t.eachComponent({ + mainType: "series", + query: null == o ? null : {seriesIndex: o} + }, function (e) { + var o = e.subType, s = e.id, l = VN[i](o, s, e, n); + l && (r(l, e.option), a.series.push(l)); + var u = e.coordinateSystem; + if (u && "cartesian2d" === u.type && ("line" === i || "bar" === i)) { + var h = u.getAxesByScale("ordinal")[0]; + if (h) { + var c = h.dim + "Axis", d = t.queryComponents({ + mainType: c, + index: e.get(name + "Index"), + id: e.get(name + "Id") + })[0].componentIndex; + a[c] = a[c] || []; + for (var f = 0; f <= d; f++) a[c][d] = a[c][d] || {}; + a[c][d].boundaryGap = "bar" === i + } + } + }), e.dispatchAction({type: "changeMagicType", currentType: i, newOption: a}) + } + }, cs({type: "changeMagicType", event: "magicTypeChanged", update: "prepareAndUpdate"}, function (t, e) { + e.mergeOption(t.newOption) + }), Bv("magicType", tx); + var WN = lI.toolbox.dataView, FN = new Array(60).join("-"), HN = "\t", ZN = new RegExp("[" + HN + "]+", "g"); + hx.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: i(WN.title), + lang: i(WN.lang), + backgroundColor: "#fff", + textColor: "#000", + textareaColor: "#fff", + textareaBorderColor: "#333", + buttonColor: "#c23531", + buttonTextColor: "#fff" + }, hx.prototype.onclick = function (t, e) { + function i() { + n.removeChild(a), x._dom = null + } + + var n = e.getDom(), o = this.model; + this._dom && n.removeChild(this._dom); + var a = document.createElement("div"); + a.style.cssText = "position:absolute;left:5px;top:5px;bottom:5px;right:5px;", a.style.backgroundColor = o.get("backgroundColor") || "#fff"; + var r = document.createElement("h4"), s = o.get("lang") || []; + r.innerHTML = s[0] || o.get("title"), r.style.cssText = "margin: 10px 20px;", r.style.color = o.get("textColor"); + var l = document.createElement("div"), u = document.createElement("textarea"); + l.style.cssText = "display:block;width:100%;overflow:auto;"; + var h = o.get("optionToContent"), c = o.get("contentToOption"), d = ox(t); + if ("function" == typeof h) { + var f = h(e.getOption()); + "string" == typeof f ? l.innerHTML = f : M(f) && l.appendChild(f) + } else l.appendChild(u), u.readOnly = o.get("readOnly"), u.style.cssText = "width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;", u.style.color = o.get("textColor"), u.style.borderColor = o.get("textareaBorderColor"), u.style.backgroundColor = o.get("textareaColor"), u.value = d.value; + var p = d.meta, g = document.createElement("div"); + g.style.cssText = "position:absolute;bottom:0;left:0;right:0;"; + var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", + v = document.createElement("div"), y = document.createElement("div"); + m += ";background-color:" + o.get("buttonColor"), m += ";color:" + o.get("buttonTextColor"); + var x = this; + ui(v, "click", i), ui(y, "click", function () { + var t; + try { + t = "function" == typeof c ? c(l, e.getOption()) : ux(u.value, p) + } catch (t) { + throw i(), new Error("Data view format error " + t) + } + t && e.dispatchAction({type: "changeDataView", newOption: t}), i() + }), v.innerHTML = s[1], y.innerHTML = s[2], y.style.cssText = m, v.style.cssText = m, !o.get("readOnly") && g.appendChild(y), g.appendChild(v), ui(u, "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) + HN + e.substring(n), this.selectionStart = this.selectionEnd = i + 1, zw(t) + } + }), a.appendChild(r), a.appendChild(l), a.appendChild(g), l.style.height = n.clientHeight - 80 + "px", n.appendChild(a), this._dom = a + }, hx.prototype.remove = function (t, e) { + this._dom && e.getDom().removeChild(this._dom) + }, hx.prototype.dispose = function (t, e) { + this.remove(t, e) + }, Bv("dataView", hx), cs({ + type: "changeDataView", + event: "dataViewChanged", + update: "prepareAndUpdate" + }, function (t, e) { + var i = []; + d(t.newOption.series, function (t) { + var n = e.getSeriesByName(t.name)[0]; + if (n) { + var o = n.get("data"); + i.push({name: t.name, data: cx(t.data, o)}) + } else i.push(a({type: "scatter"}, t)) + }), e.mergeOption(r({series: i}, t.newOption)) + }); + var UN = d, XN = "\0_ec_hist_store"; + PP.extend({type: "dataZoom.select"}), NP.extend({type: "dataZoom.select"}); + var jN = lI.toolbox.dataZoom, YN = d, qN = "\0_ec_\0toolbox-dataZoom_"; + vx.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: i(jN.title) + }; + var KN = vx.prototype; + KN.render = function (t, e, i, n) { + this.model = t, this.ecModel = e, this.api = i, _x(t, e, this, n, i), xx(t, e) + }, KN.onclick = function (t, e, i) { + $N[i].call(this) + }, KN.remove = function (t, e) { + this._brushController.unmount() + }, KN.dispose = function (t, e) { + this._brushController.dispose() + }; + var $N = { + zoom: function () { + var t = !this._isZoomActive; + this.api.dispatchAction({type: "takeGlobalCursor", key: "dataZoomSelect", dataZoomSelectActive: t}) + }, back: function () { + this._dispatchZoomAction(fx(this.ecModel)) + } + }; + KN._onBrush = function (t, e) { + function i(t, e, i) { + var r = e.getAxis(t), s = r.model, l = n(t, s, a), u = l.findRepresentativeAxisProxy(s).getMinMaxSpan(); + null == u.minValueSpan && null == u.maxValueSpan || (i = PC(0, i.slice(), r.scale.getExtent(), 0, u.minValueSpan, u.maxValueSpan)), l && (o[l.id] = { + dataZoomId: l.id, + startValue: i[0], + endValue: i[1] + }) + } + + function n(t, e, i) { + var n; + return i.eachComponent({mainType: "dataZoom", subType: "select"}, function (i) { + i.getAxisModel(t, e.componentIndex) && (n = i) + }), n + } + + if (e.isEnd && t.length) { + var o = {}, a = this.ecModel; + this._brushController.updateCovers([]), new bv(yx(this.model.option), a, {include: ["grid"]}).matchOutputRanges(t, a, function (t, e, n) { + if ("cartesian2d" === n.type) { + var o = t.brushType; + "rect" === o ? (i("x", n, e[0]), i("y", n, e[1])) : i({lineX: "x", lineY: "y"}[o], n, e) + } + }), dx(a, o), this._dispatchZoomAction(o) + } + }, KN._dispatchZoomAction = function (t) { + var e = []; + YN(t, function (t, n) { + e.push(i(t)) + }), e.length && this.api.dispatchAction({type: "dataZoom", from: this.uid, batch: e}) + }, Bv("dataZoom", vx), us(function (t) { + function e(t, e) { + if (e) { + var o = t + "Index", a = e[o]; + null == a || "all" == a || y(a) || (a = !1 === a || "none" === a ? [] : [a]), i(t, function (e, i) { + if (null == a || "all" == a || -1 !== l(a, i)) { + var r = {type: "select", $fromToolbox: !0, id: qN + t + i}; + r[o] = i, n.push(r) + } + }) + } + } + + function i(e, i) { + var n = t[e]; + y(n) || (n = n ? [n] : []), YN(n, i) + } + + if (t) { + var n = t.dataZoom || (t.dataZoom = []); + y(n) || (t.dataZoom = n = [n]); + var o = t.toolbox; + if (o && (y(o) && (o = o[0]), o && o.feature)) { + var a = o.feature.dataZoom; + e("xAxis", a), e("yAxis", a) + } + } + }); + var JN = lI.toolbox.restore; + bx.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: JN.title + }, bx.prototype.onclick = function (t, e, i) { + px(t), e.dispatchAction({type: "restore", from: this.uid}) + }, Bv("restore", bx), cs({type: "restore", event: "restore", update: "prepareAndUpdate"}, function (t, e) { + e.resetOption("recreate") + }); + var QN, tO = "urn:schemas-microsoft-com:vml", eO = "undefined" == typeof window ? null : window, iO = !1, + nO = eO && eO.document; + if (nO && !a_.canvasSupported) try { + !nO.namespaces.zrvml && nO.namespaces.add("zrvml", tO), QN = function (t) { + return nO.createElement("') + } + } catch (t) { + QN = function (t) { + return nO.createElement("<" + t + ' xmlns="' + tO + '" class="zrvml">') + } + } + var oO = Hb.CMD, aO = Math.round, rO = Math.sqrt, sO = Math.abs, lO = Math.cos, uO = Math.sin, hO = Math.max; + if (!a_.canvasSupported) { + var cO = 21600, dO = cO / 2, fO = function (t) { + t.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;", t.coordsize = cO + "," + cO, t.coordorigin = "0,0" + }, pO = function (t) { + return String(t).replace(/&/g, "&").replace(/"/g, """) + }, gO = function (t, e, i) { + return "rgb(" + [t, e, i].join(",") + ")" + }, mO = function (t, e) { + e && t && e.parentNode !== t && t.appendChild(e) + }, vO = function (t, e) { + e && t && e.parentNode === t && t.removeChild(e) + }, yO = function (t, e, i) { + return 1e5 * (parseFloat(t) || 0) + 1e3 * (parseFloat(e) || 0) + i + }, xO = function (t, e) { + return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t + }, _O = function (t, e, i) { + var n = At(e); + i = +i, isNaN(i) && (i = 1), n && (t.color = gO(n[0], n[1], n[2]), t.opacity = i * n[3]) + }, wO = function (t) { + var e = At(t); + return [gO(e[0], e[1], e[2]), e[3]] + }, bO = function (t, e, i) { + var n = e.fill; + if (null != n) if (n instanceof CS) { + var o, a = 0, r = [0, 0], s = 0, l = 1, u = i.getBoundingRect(), h = u.width, c = u.height; + if ("linear" === n.type) { + o = "gradient"; + var d = i.transform, f = [n.x * h, n.y * c], p = [n.x2 * h, n.y2 * c]; + d && (Q(f, f, d), Q(p, p, d)); + var g = p[0] - f[0], m = p[1] - f[1]; + (a = 180 * Math.atan2(g, m) / Math.PI) < 0 && (a += 360), a < 1e-6 && (a = 0) + } else { + o = "gradientradial"; + var f = [n.x * h, n.y * c], d = i.transform, v = i.scale, y = h, x = c; + r = [(f[0] - u.x) / y, (f[1] - u.y) / x], d && Q(f, f, d), y /= v[0] * cO, x /= v[1] * cO; + var _ = hO(y, x); + s = 0 / _, l = 2 * n.r / _ - s + } + var w = n.colorStops.slice(); + w.sort(function (t, e) { + return t.offset - e.offset + }); + for (var b = w.length, S = [], M = [], I = 0; I < b; I++) { + var T = w[I], D = wO(T.color); + M.push(T.offset * l + s + " " + D[0]), 0 !== I && I !== b - 1 || S.push(D) + } + if (b >= 2) { + var A = S[0][0], C = S[1][0], L = S[0][1] * e.opacity, k = S[1][1] * e.opacity; + t.type = o, t.method = "none", t.focus = "100%", t.angle = a, t.color = A, t.color2 = C, t.colors = M.join(","), t.opacity = k, t.opacity2 = L + } + "radial" === o && (t.focusposition = r.join(",")) + } else _O(t, n, e.opacity) + }, SO = function (t, e) { + null != e.lineDash && (t.dashstyle = e.lineDash.join(" ")), null == e.stroke || e.stroke instanceof CS || _O(t, e.stroke, e.opacity) + }, MO = function (t, e, i, n) { + var o = "fill" == e, a = t.getElementsByTagName(e)[0]; + null != i[e] && "none" !== i[e] && (o || !o && i.lineWidth) ? (t[o ? "filled" : "stroked"] = "true", i[e] instanceof CS && vO(t, a), a || (a = Sx(e)), o ? bO(a, i, n) : SO(a, i), mO(t, a)) : (t[o ? "filled" : "stroked"] = "false", vO(t, a)) + }, IO = [[], [], []], TO = function (t, e) { + var i, n, o, a, r, s, l = oO.M, u = oO.C, h = oO.L, c = oO.A, d = oO.Q, f = [], p = t.data, g = t.len(); + for (a = 0; a < g;) { + switch (o = p[a++], n = "", i = 0, o) { + case l: + n = " m ", i = 1, r = p[a++], s = p[a++], IO[0][0] = r, IO[0][1] = s; + break; + case h: + n = " l ", i = 1, r = p[a++], s = p[a++], IO[0][0] = r, IO[0][1] = s; + break; + case d: + case u: + n = " c ", i = 3; + var m, v, y = p[a++], x = p[a++], _ = p[a++], w = p[a++]; + o === d ? (m = _, v = w, _ = (_ + 2 * y) / 3, w = (w + 2 * x) / 3, y = (r + 2 * y) / 3, x = (s + 2 * x) / 3) : (m = p[a++], v = p[a++]), IO[0][0] = y, IO[0][1] = x, IO[1][0] = _, IO[1][1] = w, IO[2][0] = m, IO[2][1] = v, r = m, s = v; + break; + case c: + var b = 0, S = 0, M = 1, I = 1, T = 0; + e && (b = e[4], S = e[5], M = rO(e[0] * e[0] + e[1] * e[1]), I = rO(e[2] * e[2] + e[3] * e[3]), T = Math.atan2(-e[1] / I, e[0] / M)); + var D = p[a++], A = p[a++], C = p[a++], L = p[a++], k = p[a++] + T, P = p[a++] + k + T; + a++; + var N = p[a++], O = D + lO(k) * C, E = A + uO(k) * L, y = D + lO(P) * C, x = A + uO(P) * L, + R = N ? " wa " : " at "; + Math.abs(O - y) < 1e-4 && (Math.abs(P - k) > .01 ? N && (O += .0125) : Math.abs(E - A) < 1e-4 ? N && O < D || !N && O > D ? x -= .0125 : x += .0125 : N && E < A || !N && E > A ? y += .0125 : y -= .0125), f.push(R, aO(((D - C) * M + b) * cO - dO), ",", aO(((A - L) * I + S) * cO - dO), ",", aO(((D + C) * M + b) * cO - dO), ",", aO(((A + L) * I + S) * cO - dO), ",", aO((O * M + b) * cO - dO), ",", aO((E * I + S) * cO - dO), ",", aO((y * M + b) * cO - dO), ",", aO((x * I + S) * cO - dO)), r = y, s = x; + break; + case oO.R: + var z = IO[0], B = IO[1]; + z[0] = p[a++], z[1] = p[a++], B[0] = z[0] + p[a++], B[1] = z[1] + p[a++], e && (Q(z, z, e), Q(B, B, e)), z[0] = aO(z[0] * cO - dO), B[0] = aO(B[0] * cO - dO), z[1] = aO(z[1] * cO - dO), B[1] = aO(B[1] * cO - dO), f.push(" m ", z[0], ",", z[1], " l ", B[0], ",", z[1], " l ", B[0], ",", B[1], " l ", z[0], ",", B[1]); + break; + case oO.Z: + f.push(" x ") + } + if (i > 0) { + f.push(n); + for (var V = 0; V < i; V++) { + var G = IO[V]; + e && Q(G, G, e), f.push(aO(G[0] * cO - dO), ",", aO(G[1] * cO - dO), V < i - 1 ? "," : "") + } + } + } + return f.join("") + }; + In.prototype.brushVML = function (t) { + var e = this.style, i = this._vmlEl; + i || (i = Sx("shape"), fO(i), this._vmlEl = i), MO(i, "fill", e, this), MO(i, "stroke", e, this); + var n = this.transform, o = null != n, a = i.getElementsByTagName("stroke")[0]; + if (a) { + var r = e.lineWidth; + if (o && !e.strokeNoScale) { + var s = n[0] * n[3] - n[1] * n[2]; + r *= rO(sO(s)) + } + a.weight = r + "px" + } + var l = this.path || (this.path = new Hb); + this.__dirtyPath && (l.beginPath(), this.buildPath(l, this.shape), l.toStatic(), this.__dirtyPath = !1), i.path = TO(l, this.transform), i.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, i), null != e.text ? this.drawRectText(t, this.getBoundingRect()) : this.removeRectText(t) + }, In.prototype.onRemove = function (t) { + vO(t, this._vmlEl), this.removeRectText(t) + }, In.prototype.onAdd = function (t) { + mO(t, this._vmlEl), this.appendRectText(t) + }; + var DO = function (t) { + return "object" == typeof t && t.tagName && "IMG" === t.tagName.toUpperCase() + }; + Je.prototype.brushVML = function (t) { + var e, i, n = this.style, o = n.image; + if (DO(o)) { + var a = o.src; + if (a === this._imageSrc) e = this._imageWidth, i = this._imageHeight; else { + var r = o.runtimeStyle, s = r.width, l = r.height; + r.width = "auto", r.height = "auto", e = o.width, i = o.height, r.width = s, r.height = l, this._imageSrc = a, this._imageWidth = e, this._imageHeight = i + } + o = a + } else o === this._imageSrc && (e = this._imageWidth, i = this._imageHeight); + if (o) { + var u = n.x || 0, h = n.y || 0, c = n.width, d = n.height, f = n.sWidth, p = n.sHeight, g = n.sx || 0, + m = n.sy || 0, v = f && p, y = this._vmlEl; + y || (y = nO.createElement("div"), fO(y), this._vmlEl = y); + var x, _ = y.style, w = !1, b = 1, S = 1; + if (this.transform && (x = this.transform, b = rO(x[0] * x[0] + x[1] * x[1]), S = rO(x[2] * x[2] + x[3] * x[3]), w = x[1] || x[2]), w) { + var M = [u, h], I = [u + c, h], T = [u, h + d], D = [u + c, h + d]; + Q(M, M, x), Q(I, I, x), Q(T, T, x), Q(D, D, x); + var A = hO(M[0], I[0], T[0], D[0]), C = hO(M[1], I[1], T[1], D[1]), L = []; + L.push("M11=", x[0] / b, ",", "M12=", x[2] / S, ",", "M21=", x[1] / b, ",", "M22=", x[3] / S, ",", "Dx=", aO(u * b + x[4]), ",", "Dy=", aO(h * S + x[5])), _.padding = "0 " + aO(A) + "px " + aO(C) + "px 0", _.filter = "progid:DXImageTransform.Microsoft.Matrix(" + L.join("") + ", SizingMethod=clip)" + } else x && (u = u * b + x[4], h = h * S + x[5]), _.filter = "", _.left = aO(u) + "px", _.top = aO(h) + "px"; + var k = this._imageEl, P = this._cropEl; + k || (k = nO.createElement("div"), this._imageEl = k); + var N = k.style; + if (v) { + if (e && i) N.width = aO(b * e * c / f) + "px", N.height = aO(S * i * d / p) + "px"; else { + var O = new Image, E = this; + O.onload = function () { + O.onload = null, e = O.width, i = O.height, N.width = aO(b * e * c / f) + "px", N.height = aO(S * i * d / p) + "px", E._imageWidth = e, E._imageHeight = i, E._imageSrc = o + }, O.src = o + } + P || ((P = nO.createElement("div")).style.overflow = "hidden", this._cropEl = P); + var R = P.style; + R.width = aO((c + g * c / f) * b), R.height = aO((d + m * d / p) * S), R.filter = "progid:DXImageTransform.Microsoft.Matrix(Dx=" + -g * c / f * b + ",Dy=" + -m * d / p * S + ")", P.parentNode || y.appendChild(P), k.parentNode != P && P.appendChild(k) + } else N.width = aO(b * c) + "px", N.height = aO(S * d) + "px", y.appendChild(k), P && P.parentNode && (y.removeChild(P), this._cropEl = null); + var z = "", B = n.opacity; + B < 1 && (z += ".Alpha(opacity=" + aO(100 * B) + ") "), z += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + o + ", SizingMethod=scale)", N.filter = z, y.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, y), null != n.text && this.drawRectText(t, this.getBoundingRect()) + } + }, Je.prototype.onRemove = function (t) { + vO(t, this._vmlEl), this._vmlEl = null, this._cropEl = null, this._imageEl = null, this.removeRectText(t) + }, Je.prototype.onAdd = function (t) { + mO(t, this._vmlEl), this.appendRectText(t) + }; + var AO, CO = {}, LO = 0, kO = document.createElement("div"), PO = function (t) { + var e = CO[t]; + if (!e) { + LO > 100 && (LO = 0, CO = {}); + var i, n = kO.style; + try { + n.font = t, i = n.fontFamily.split(",")[0] + } catch (t) { + } + e = { + style: n.fontStyle || "normal", + variant: n.fontVariant || "normal", + weight: n.fontWeight || "normal", + size: 0 | parseFloat(n.fontSize || 12), + family: i || "Microsoft YaHei" + }, CO[t] = e, LO++ + } + return e + }; + !function (t, e) { + Dw[t] = e + }("measureText", function (t, e) { + var i = nO; + AO || ((AO = i.createElement("div")).style.cssText = "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;", nO.body.appendChild(AO)); + try { + AO.style.font = e + } catch (t) { + } + return AO.innerHTML = "", AO.appendChild(i.createTextNode(t)), {width: AO.offsetWidth} + }); + for (var NO = new $t, OO = [kw, $e, Je, In, fS], EO = 0; EO < OO.length; EO++) { + var RO = OO[EO].prototype; + RO.drawRectText = function (t, e, i, n) { + var o = this.style; + this.__dirty && Ne(o); + var a = o.text; + if (null != a && (a += ""), a) { + if (o.rich) { + var r = Ce(a, o); + a = []; + for (var s = 0; s < r.lines.length; s++) { + for (var l = r.lines[s].tokens, u = [], h = 0; h < l.length; h++) u.push(l[h].text); + a.push(u.join("")) + } + a = a.join("\n") + } + var c, d, f = o.textAlign, p = o.textVerticalAlign, g = PO(o.font), + m = g.style + " " + g.variant + " " + g.weight + " " + g.size + 'px "' + g.family + '"'; + i = i || me(a, m, f, p); + var v = this.transform; + if (v && !n && (NO.copy(e), NO.applyTransform(v), e = NO), n) c = e.x, d = e.y; else { + var y = o.textPosition, x = o.textDistance; + if (y instanceof Array) c = e.x + xO(y[0], e.width), d = e.y + xO(y[1], e.height), f = f || "left"; else { + var _ = we(y, e, x); + c = _.x, d = _.y, f = f || _.textAlign, p = p || _.textVerticalAlign + } + } + c = xe(c, i.width, f), d = _e(d, i.height, p), d += i.height / 2; + var w, b, S, M = Sx, I = this._textVmlEl; + I ? b = (w = (S = I.firstChild).nextSibling).nextSibling : (I = M("line"), w = M("path"), b = M("textpath"), S = M("skew"), b.style["v-text-align"] = "left", fO(I), w.textpathok = !0, b.on = !0, I.from = "0 0", I.to = "1000 0.05", mO(I, S), mO(I, w), mO(I, b), this._textVmlEl = I); + var T = [c, d], D = I.style; + v && n ? (Q(T, T, 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 = (aO(T[0]) || 0) + "," + (aO(T[1]) || 0), S.origin = "0 0", D.left = "0px", D.top = "0px") : (S.on = !1, D.left = aO(c) + "px", D.top = aO(d) + "px"), b.string = pO(a); + try { + b.style.font = m + } catch (t) { + } + MO(I, "fill", {fill: o.textFill, opacity: o.opacity}, this), MO(I, "stroke", { + stroke: o.textStroke, + opacity: o.opacity, + lineDash: o.lineDash + }, this), I.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, I) + } + }, RO.removeRectText = function (t) { + vO(t, this._textVmlEl), this._textVmlEl = null + }, RO.appendRectText = function (t) { + mO(t, this._textVmlEl) + } + } + fS.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) + }, fS.prototype.onRemove = function (t) { + this.removeRectText(t) + }, fS.prototype.onAdd = function (t) { + this.appendRectText(t) + } + } + Tx.prototype = { + constructor: Tx, 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) { + var 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 || Ix(e.width)) - Ix(e.paddingLeft) - Ix(e.paddingRight) | 0 + }, _getHeight: function () { + var t = this.root, e = t.currentStyle; + return (t.clientHeight || Ix(e.height)) - Ix(e.paddingTop) - Ix(e.paddingBottom) | 0 + } + }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) { + Tx.prototype[t] = Dx(t) + }), wi("vml", Tx); + var zO = "http://www.w3.org/2000/svg", BO = Hb.CMD, VO = Array.prototype.join, GO = "none", WO = Math.round, + FO = Math.sin, HO = Math.cos, ZO = Math.PI, UO = 2 * Math.PI, XO = 180 / ZO, jO = 1e-4, YO = {}; + YO.brush = function (t) { + var e = t.style, i = t.__svgEl; + i || (i = Ax("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 o = zx(n); + o.indexOf("NaN") < 0 && Ox(i, "d", o) + } + Rx(i, e), Nx(i, t.transform), null != e.text && JO(t, t.getBoundingRect()) + }; + var qO = {}; + qO.brush = function (t) { + var e = t.style, i = e.image; + if (i instanceof HTMLImageElement && (i = i.src), i) { + var n = e.x || 0, o = e.y || 0, a = e.width, r = e.height, s = t.__svgEl; + s || (s = Ax("image"), t.__svgEl = s), i !== t.__imageSrc && (Ex(s, "href", i), t.__imageSrc = i), Ox(s, "width", a), Ox(s, "height", r), Ox(s, "x", n), Ox(s, "y", o), Nx(s, t.transform), null != e.text && JO(t, t.getBoundingRect()) + } + }; + var KO = {}, $O = new $t, JO = function (t, e, i) { + var n = t.style; + t.__dirty && Ne(n); + var o = n.text; + if (null != o) { + o += ""; + var a = t.__textSvgEl; + a || (a = Ax("text"), t.__textSvgEl = a); + var r, s, l = n.textPosition, u = n.textDistance, h = n.textAlign || "left"; + "number" == typeof n.fontSize && (n.fontSize += "px"); + var c = n.font || [n.fontStyle || "", n.fontWeight || "", n.fontSize || "", n.fontFamily || ""].join(" ") || Tw, + d = Bx(n.textVerticalAlign), f = (i = me(o, c, h, d)).lineHeight; + if (l instanceof Array) r = e.x + l[0], s = e.y + l[1]; else { + var p = we(l, e, u); + r = p.x, s = p.y, d = Bx(p.textVerticalAlign), h = p.textAlign + } + Ox(a, "alignment-baseline", d), c && (a.style.font = c); + var g = n.textPadding; + if (Ox(a, "x", r), Ox(a, "y", s), Rx(a, n, !0), t instanceof fS || t.style.transformText) Nx(a, t.transform); else { + if (t.transform) $O.copy(e), $O.applyTransform(t.transform), e = $O; else { + var m = t.transformCoordToGlobal(e.x, e.y); + e.x = m[0], e.y = m[1] + } + var v = n.textOrigin; + "center" === v ? (r = i.width / 2 + r, s = i.height / 2 + s) : v && (r = v[0] + r, s = v[1] + s); + var y = -n.textRotation || 0, x = st(); + dt(x, t.transform, y), Nx(a, x) + } + var _ = o.split("\n"), w = _.length, b = h; + "left" === b ? (b = "start", g && (r += g[3])) : "right" === b ? (b = "end", g && (r -= g[1])) : "center" === b && (b = "middle", g && (r += (g[3] - g[1]) / 2)); + var S = 0; + if ("baseline" === d ? (S = -i.height + f, g && (S -= g[2])) : "middle" === d ? (S = (-i.height + f) / 2, g && (s += (g[0] - g[2]) / 2)) : g && (S += g[0]), t.__text !== o || t.__textFont !== c) { + var M = t.__tspanList || []; + t.__tspanList = M; + for (T = 0; T < w; T++) (D = M[T]) ? D.innerHTML = "" : (D = M[T] = Ax("tspan"), a.appendChild(D), Ox(D, "alignment-baseline", d), Ox(D, "text-anchor", b)), Ox(D, "x", r), Ox(D, "y", s + T * f + S), D.appendChild(document.createTextNode(_[T])); + for (; T < M.length; T++) a.removeChild(M[T]); + M.length = w, t.__text = o, t.__textFont = c + } else if (t.__tspanList.length) for (var I = t.__tspanList.length, T = 0; T < I; ++T) { + var D = t.__tspanList[T]; + D && (Ox(D, "x", r), Ox(D, "y", s + T * f + S)) + } + } + }; + KO.drawRectText = JO, KO.brush = function (t) { + var e = t.style; + null != e.text && (e.textPosition = [0, 0], JO(t, { + x: e.x || 0, + y: e.y || 0, + width: 0, + height: 0 + }, t.getBoundingRect())) + }, Vx.prototype = { + diff: function (t, e, i) { + i || (i = function (t, e) { + return t === e + }), this.equals = i; + var n = this; + t = t.slice(); + var o = (e = e.slice()).length, a = t.length, r = 1, s = o + a, l = [{newPos: -1, components: []}], + u = this.extractCommon(l[0], e, t, 0); + if (l[0].newPos + 1 >= o && u + 1 >= a) { + for (var h = [], c = 0; c < e.length; c++) h.push(c); + return [{indices: h, count: e.length}] + } + for (; r <= s;) { + var d = function () { + for (var i = -1 * r; i <= r; i += 2) { + var s, u = l[i - 1], h = l[i + 1], c = (h ? h.newPos : 0) - i; + u && (l[i - 1] = void 0); + var d = u && u.newPos + 1 < o, f = h && 0 <= c && c < a; + if (d || f) { + if (!d || f && u.newPos < h.newPos ? (s = Wx(h), n.pushComponent(s.components, void 0, !0)) : ((s = u).newPos++, n.pushComponent(s.components, !0, void 0)), c = n.extractCommon(s, e, t, i), s.newPos + 1 >= o && c + 1 >= a) return Gx(0, s.components); + l[i] = s + } else l[i] = void 0 + } + r++ + }(); + if (d) return d + } + }, 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 o = e.length, a = i.length, r = t.newPos, s = r - n, l = 0; r + 1 < o && s + 1 < a && 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 QO = new Vx, tE = function (t, e, i) { + return QO.diff(t, e, i) + }; + Fx.prototype.createElement = Ax, Fx.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] + }, Fx.prototype.update = function (t, e) { + if (t) { + var i = this.getDefs(!1); + if (t[this._domName] && i.contains(t[this._domName])) "function" == typeof e && e(t); else { + var n = this.add(t); + n && (t[this._domName] = n) + } + } + }, Fx.prototype.addDom = function (t) { + this.getDefs(!0).appendChild(t) + }, Fx.prototype.removeDom = function (t) { + var e = this.getDefs(!1); + e && t[this._domName] && (e.removeChild(t[this._domName]), t[this._domName] = null) + }, Fx.prototype.getDoms = function () { + var t = this.getDefs(!1); + if (!t) return []; + var e = []; + return d(this._tagNames, function (i) { + var n = t.getElementsByTagName(i); + e = e.concat([].slice.call(n)) + }), e + }, Fx.prototype.markAllUnused = function () { + var t = this; + d(this.getDoms(), function (e) { + e[t._markLabel] = "0" + }) + }, Fx.prototype.markUsed = function (t) { + t && (t[this._markLabel] = "1") + }, Fx.prototype.removeUnused = function () { + var t = this.getDefs(!1); + if (t) { + var e = this; + d(this.getDoms(), function (i) { + "1" !== i[e._markLabel] && t.removeChild(i) + }) + } + }, Fx.prototype.getSvgProxy = function (t) { + return t instanceof In ? YO : t instanceof Je ? qO : t instanceof fS ? KO : YO + }, Fx.prototype.getTextSvgElement = function (t) { + return t.__textSvgEl + }, Fx.prototype.getSvgElement = function (t) { + return t.__svgEl + }, u(Hx, Fx), Hx.prototype.addWithoutUpdate = function (t, e) { + if (e && e.style) { + var i = this; + d(["fill", "stroke"], function (n) { + if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) { + var o, a = e.style[n], r = i.getDefs(!0); + a._dom ? (o = a._dom, r.contains(a._dom) || i.addDom(o)) : o = i.add(a), i.markUsed(e); + var s = o.getAttribute("id"); + t.setAttribute(n, "url(#" + s + ")") + } + }) + } + }, Hx.prototype.add = function (t) { + var e; + if ("linear" === t.type) e = this.createElement("linearGradient"); else { + if ("radial" !== t.type) return ew("Illegal gradient type."), null; + e = this.createElement("radialGradient") + } + return t.id = t.id || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-gradient-" + t.id), this.updateDom(t, e), this.addDom(e), e + }, Hx.prototype.update = function (t) { + var e = this; + Fx.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)) + }) + }, Hx.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 ew("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, o = i.length; n < o; ++n) { + var a = this.createElement("stop"); + a.setAttribute("offset", 100 * i[n].offset + "%"), a.setAttribute("stop-color", i[n].color), e.appendChild(a) + } + t._dom = e + }, Hx.prototype.markUsed = function (t) { + if (t.style) { + var e = t.style.fill; + e && e._dom && Fx.prototype.markUsed.call(this, e._dom), (e = t.style.stroke) && e._dom && Fx.prototype.markUsed.call(this, e._dom) + } + }, u(Zx, Fx), Zx.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) + }, Zx.prototype.updateDom = function (t, e, i) { + if (e && e.length > 0) { + var n, o, a = this.getDefs(!0), r = e[0], s = i ? "_textDom" : "_dom"; + r[s] ? (o = r[s].getAttribute("id"), n = r[s], a.contains(n) || a.appendChild(n)) : (o = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, (n = this.createElement("clipPath")).setAttribute("id", o), a.appendChild(n), r[s] = n); + var l = this.getSvgProxy(r); + if (r.transform && r.parent.invTransform && !i) { + var u = Array.prototype.slice.call(r.transform); + ht(r.transform, r.parent.invTransform, r.transform), l.brush(r), r.transform = u + } else l.brush(r); + var h = this.getSvgElement(r); + n.innerHTML = "", n.appendChild(h.cloneNode()), t.setAttribute("clip-path", "url(#" + o + ")"), e.length > 1 && this.updateDom(n, e.slice(1), i) + } else t && t.setAttribute("clip-path", "none") + }, Zx.prototype.markUsed = function (t) { + var e = this; + t.__clipPaths && t.__clipPaths.length > 0 && d(t.__clipPaths, function (t) { + t._dom && Fx.prototype.markUsed.call(e, t._dom), t._textDom && Fx.prototype.markUsed.call(e, t._textDom) + }) + }, u(Ux, Fx), Ux.prototype.addWithoutUpdate = function (t, e) { + if (e && Xx(e.style)) { + var i, n = e.style; + n._shadowDom ? (i = n._shadowDom, this.getDefs(!0).contains(n._shadowDom) || this.addDom(i)) : i = this.add(e), this.markUsed(e); + var o = i.getAttribute("id"); + t.style.filter = "url(#" + o + ")" + } + }, Ux.prototype.add = function (t) { + var e = this.createElement("filter"), i = t.style; + return i._shadowDomId = i._shadowDomId || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-shadow-" + i._shadowDomId), this.updateDom(t, e), this.addDom(e), e + }, Ux.prototype.update = function (t, e) { + var i = e.style; + if (Xx(i)) { + var n = this; + Fx.prototype.update.call(this, e, function (t) { + n.updateDom(e, t._shadowDom) + }) + } else this.remove(t, i) + }, Ux.prototype.remove = function (t, e) { + null != e._shadowDomId && (this.removeDom(e), t.style.filter = "") + }, Ux.prototype.updateDom = function (t, e) { + var i = e.getElementsByTagName("feDropShadow"); + i = 0 === i.length ? this.createElement("feDropShadow") : i[0]; + var n, o, a, r, s = t.style, l = t.scale ? t.scale[0] || 1 : 1, u = t.scale ? t.scale[1] || 1 : 1; + if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, o = s.shadowOffsetY || 0, a = s.shadowBlur, r = s.shadowColor; else { + if (!s.textShadowBlur) return void this.removeDom(e, s); + n = s.textShadowOffsetX || 0, o = s.textShadowOffsetY || 0, a = s.textShadowBlur, r = s.textShadowColor + } + i.setAttribute("dx", n / l), i.setAttribute("dy", o / u), i.setAttribute("flood-color", r); + var h = a / 2 / l + " " + a / 2 / u; + i.setAttribute("stdDeviation", h), e.setAttribute("x", "-100%"), e.setAttribute("y", "-100%"), e.setAttribute("width", Math.ceil(a / 2 * 200) + "%"), e.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), e.appendChild(i), s._shadowDom = e + }, Ux.prototype.markUsed = function (t) { + var e = t.style; + e && e._shadowDom && Fx.prototype.markUsed.call(this, e._shadowDom) + }; + var eE = function (t, e, i, n) { + this.root = t, this.storage = e, this._opts = i = a({}, i || {}); + var o = Ax("svg"); + o.setAttribute("xmlns", "http://www.w3.org/2000/svg"), o.setAttribute("version", "1.1"), o.setAttribute("baseProfile", "full"), o.style.cssText = "user-select:none;position:absolute;left:0;top:0;", this.gradientManager = new Hx(n, o), this.clipPathManager = new Zx(n, o), this.shadowManager = new Ux(n, o); + var r = document.createElement("div"); + r.style.cssText = "overflow:hidden;position:relative", this._svgRoot = o, this._viewport = r, t.appendChild(r), r.appendChild(o), this.resize(i.width, i.height), this._visibleList = [] + }; + eE.prototype = { + constructor: eE, 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) + }, setBackgroundColor: function (t) { + this._viewport.style.background = t + }, _paintList: function (t) { + this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused(); + var e, i = this._svgRoot, n = this._visibleList, o = t.length, a = []; + for (e = 0; e < o; e++) { + var r = Yx(f = t[e]), s = t_(f) || Qx(f); + f.invisible || (f.__dirty && (r && r.brush(f), this.clipPathManager.update(f), f.style && (this.gradientManager.update(f.style.fill), this.gradientManager.update(f.style.stroke), this.shadowManager.update(s, f)), f.__dirty = !1), a.push(f)) + } + var l, u = tE(n, a); + for (e = 0; e < u.length; e++) if ((c = u[e]).removed) for (d = 0; d < c.count; d++) { + var s = t_(f = n[c.indices[d]]), h = Qx(f); + Jx(i, s), Jx(i, h) + } + for (e = 0; e < u.length; e++) { + var c = u[e]; + if (c.added) for (d = 0; d < c.count; d++) { + var s = t_(f = a[c.indices[d]]), h = Qx(f); + l ? Kx(i, s, l) : $x(i, s), s ? Kx(i, h, s) : l ? Kx(i, h, l) : $x(i, h), Kx(i, h, s), l = h || s || l, this.gradientManager.addWithoutUpdate(s, f), this.shadowManager.addWithoutUpdate(l, f), this.clipPathManager.markUsed(f) + } else if (!c.removed) for (var d = 0; d < c.count; d++) { + var f = a[c.indices[d]]; + l = s = Qx(f) || t_(f) || l, this.gradientManager.markUsed(f), this.gradientManager.addWithoutUpdate(s, f), this.shadowManager.markUsed(f), this.shadowManager.addWithoutUpdate(s, f), this.clipPathManager.markUsed(f) + } + } + this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = a + }, _getDefs: function (t) { + var e = this._svgRoot, i = this._svgRoot.getElementsByTagName("defs"); + return 0 === i.length ? t ? ((i = e.insertBefore(Ax("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] + }, 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 o = i.style; + o.width = t + "px", o.height = e + "px"; + var a = this._svgRoot; + a.setAttribute("width", t), a.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], + o = ["paddingLeft", "paddingTop"][t], a = ["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[o]) || 0) - (jx(s[a]) || 0) | 0 + }, dispose: function () { + this.root.innerHTML = "", this._svgRoot = this._viewport = this.storage = null + }, clear: function () { + this._viewport && this.root.removeChild(this._viewport) + }, pathToDataUrl: function () { + return this.refresh(), "data:image/svg+xml;charset=UTF-8," + this._svgRoot.outerHTML + } + }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) { + eE.prototype[t] = e_(t) + }), wi("svg", eE), t.version = "4.1.0", t.dependencies = TI, t.PRIORITY = LI, t.init = function (t, e, i) { + var n = ss(t); + if (n) return n; + var o = new Gr(t, e, i); + return o.id = "ec_" + jI++, UI[o.id] = o, Ri(t, qI, o.id), as(o), o + }, t.connect = function (t) { + if (y(t)) { + var e = t; + t = null, bI(e, function (e) { + null != e.group && (t = e.group) + }), t = t || "g_" + YI++, bI(e, function (e) { + e.group = t + }) + } + return XI[t] = !0, t + }, t.disConnect = rs, t.disconnect = $I, t.dispose = function (t) { + "string" == typeof t ? t = UI[t] : t instanceof Gr || (t = ss(t)), t instanceof Gr && !t.isDisposed() && t.dispose() + }, t.getInstanceByDom = ss, t.getInstanceById = function (t) { + return UI[t] + }, t.registerTheme = ls, t.registerPreprocessor = us, t.registerProcessor = hs, t.registerPostUpdate = function (t) { + WI.push(t) + }, t.registerAction = cs, t.registerCoordinateSystem = ds, t.getCoordinateSystemDimensions = function (t) { + var e = Ca.get(t); + if (e) return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice() + }, t.registerLayout = fs, t.registerVisual = ps, t.registerLoading = ms, t.extendComponentModel = vs, t.extendComponentView = ys, t.extendSeriesModel = xs, t.extendChartView = _s, t.setCanvasCreator = function (t) { + e("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 + ");")()), KI[t] = { + geoJson: e, + specialAreas: i + } + }, t.getMap = ws, t.dataTool = JI, t.zrender = $w, t.graphic = BS, t.number = qS, t.format = nM, t.throttle = _r, t.helper = ZT, t.matrix = P_, t.vector = I_, t.color = q_, t.parseGeoJSON = XT, t.parseGeoJson = KT, t.util = $T, t.List = sT, t.Model = wo, t.Axis = qT, t.env = a_ +}); diff --git a/js/index.js b/js/index.js new file mode 100644 index 0000000..a6dbfca --- /dev/null +++ b/js/index.js @@ -0,0 +1,723 @@ +var ip="http://172.19.50.70:10012" +//仓库 01 三联 02 二联 +var warehouseId="01" +//入出库端 1 入库 2 出库 +var type="1" +function getData() { + $.ajax({ + url: ip+"/api/stock/all", + type: "GET", + dataType: "JSON", + success: function(res) { + shuzi(res.data) + liebiao(res.data) + } + }) +} + +function getData2() { + $.ajax({ + url: ip+"/api/stock/cargoSpace/pie", + type: "GET", + dataType: "JSON", + success: function(res) { + pieCharts(res.data.pie) + $("#total").html(res.data.totalCargoSpace) + } + }) + + $.ajax({ + url: ip+"/api/stock/inout/stat", + type: "GET", + dataType: "JSON", + success: function(res) { + tiaoxintu(res.data.drrk,res.data.drck) + zhuzhuangzhexiantu(res.data.statistic) + zhexiantu('bzrk', 'rgb(5, 243, 255)', 'rgb(3, 148, 153)', 'rgb(1, 77, 80)', res.data.bzrk) + zhexiantu('bzck','rgb(25, 255, 236)', 'rgb(16, 171, 158)', 'rgb(6, 62, 57)' , res.data.bzck) + } + }) +} +function shuzi(res){ + let totalQuantity=res.totalQuantity+"" + let dom='' + for (let i = 0; i < totalQuantity.length; i++) { + dom+='
'+totalQuantity[i]+'
' + } + dom+='
件
' + $("#shuzi").html(dom) +} +// 饼图 +function pieCharts(data) { + var chartDom = document.getElementById('middleDiv'); + var myChart = echarts.init(chartDom); + var option; + + option = { + color: myColor1, + legend: { + bottom: 60, + itemWidth: 30, + itemHeight: 20, + // itemGap:100, + textStyle: { + fontSize: 20, + color: '#fff', + padding: [0, 10] + } + }, + + series: [{ + name: 'Nightingale Chart', + type: 'pie', + radius: [160, 260], + center: ['50%', '43%'], + // roseType: 'area', + itemStyle: { + borderRadius: 8 + }, + label: { + show: true, + textStyle: { + fontSize: 24, + color: "#fff", + }, + formatter: '{b}{c}\n{d}%' + }, + data: data + }] + }; + + option && myChart.setOption(option); +} + +// 条形图 +function tiaoxintu(a,b) { + var chartDom1 = document.getElementById('drcrk'); + var myChart = echarts.init(chartDom1); + var option; + + const builderJson = { + all: Number(a)+Number(b), + charts: { + 出库量: b, + 入库量: a, + } + }; + var myColor = ["#19ffec", "#19ffec"] + const canvas = document.createElement('canvas'); + option = { + backgroundColor: { + type: 'pattern', + image: canvas, + repeat: 'repeat' + }, + tooltip: {}, + title: [{ + subtext: '总计 ' + builderJson.all + ' 件', + left: 'center', + subtextStyle: { + color: '#ffb742', + fontSize: 20 + } + }], + grid: [{ + top: 40, + left: 80, + bottom: 110 + }], + xAxis: [{ + type: 'value', + max: builderJson.all, + axisLabel: { + color: '#00fff9', + fontSize: 20 + }, + splitLine: { + show: false + } + }], + yAxis: [{ + type: 'category', + data: Object.keys(builderJson.charts), + axisLabel: { + interval: 0, + color: '#00fff9', + fontSize: 20, + rotate: 30 + }, + splitLine: { + show: false + } + }], + series: [{ + type: 'bar', + stack: 'chart', + z: 3, + label: { + color: '#fff', + position: 'right', + show: true, + fontSize: 20 + }, + itemStyle: { + barBorderRadius: 5, + // 修改每个柱子的颜色 + color: function(params) { + var num = myColor.length; + return myColor[params.dataIndex % num] + }, + }, + // 修改柱子的距离 + barCategoryGap: 0, + // 柱子的宽度 + barWidth: 10, + data: Object.keys(builderJson.charts).map(function(key) { + return builderJson.charts[key]; + }) + }, + { + type: 'bar', + stack: 'chart', + silent: true, + itemStyle: { + barBorderRadius: 2, + color: '#0b4a54' + }, + data: Object.keys(builderJson.charts).map(function(key) { + return builderJson.all - builderJson.charts[key]; + }) + } + ] + }; + option && myChart.setOption(option); +} + +// 柱状图折现图 +function zhuzhuangzhexiantu(data) { + var chartDom = document.getElementById('dycrk'); + var myChart = echarts.init(chartDom); + var option; + var labelOption + labelOption = { + show: true, + position: "top", + verticalAlign: 'middle', + fontSize: 15, + color: "#ffffff" + }; + option = { + legend: { + left: "65%", + textStyle: { + fontSize: 15, + color: "#19ffec" + }, + }, + tooltip: {}, + dataset: { + dimensions: ['mouth', '入库', '出库'], + source: data + }, + grid: { + top: "20%", + left: '5%', + right: '5%', + bottom: '5%', + show: false, //显示边框 + borderColor: "#012f4a", //边框颜色 + containLabel: true //包含刻度文字在内 + }, + xAxis: { + type: 'category', + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + } + }, + yAxis: { + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + splitLine: { + lineStyle: { + color: "rgba(25,255,255,.3)" + } + } + }, + series: [{ + type: "bar", + showBackground: false, + barWidth: '50%', + label: labelOption, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: '#19ffec' + }, + { + offset: 0.6, + color: '#07554e' + }, + { + offset: 1, + color: '#04252b' + } + ]) + } + }, { + type: "line", + showBackground: true, + label: labelOption, + itemStyle: { + color: '#ffb742' + } + }] + }; + + option && myChart.setOption(option); +} + +// 折线图 +function zhexiantu(a, b, c, d, e) { + var chartDom = document.getElementById(a); + var myChart = echarts.init(chartDom); + var option; + var labelOption = { + show: true, + position: "top", + verticalAlign: 'middle', + fontSize: 15, + color: "#ffb742" + }; + option = { + xAxis: { + type: 'category', + boundaryGap: false, //坐标轴两边不留白 + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + yAxis: { + type: 'value', + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + splitLine: { + lineStyle: { + // 设置背景横线 + color: "#097176", + } + } + }, + grid: { + left: '5%', + top: '10%', + // right: '4%', + bottom: '5%', + containLabel: true + }, + series: [{ + data: e, + type: 'line', + smooth: 0.2, + itemStyle: { + color: b + }, + label: labelOption, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: c + }, + { + offset: 1, + color: d + } + ]) + } + }] + }; + option && myChart.setOption(option); + +} + +var biaoshi = 0 + +function info() { + var tr = $("#aa ul>li:eq(1)").clone(); + var height = $("#kcxx").innerHeight(); + var allheight = $("#box").innerHeight() + if (height > allheight) { + $("#aa ul>li:eq(1)").animate({ + marginTop: "-1.8rem" + }, 500, function() { + $("#aa ul>li:eq(1)").remove(); + }) + biaoshi = 1 + } else { + biaoshi = 2 + } +} + +function liebiao(res) { + let data = res.stockMsg + let dom = ""; + if (biaoshi == 2) { + $(".tt").remove() + for (var i = 0; i < data.length; i++) { + if (i % 2 == 0) { + dom += "
  • " + data[i].productId + + "

    " + data[i].productName + + "

    " + data[i].lotNo + + "

    " + data[i].quantity + "

  • " + } else { + dom += "
  • " + data[i].productId + + "

    " + data[i].productName + + "

    " + data[i].lotNo + + "

    " + data[i].quantity + "

  • " + } + + } + $("#kcxx").append(dom) + } +} + +// 时间 +var t = null; +$(document).ready(function() { + time() + // getData() + // window.setInterval("getData()", 10000); + // getData2() + // window.setInterval("getData2()", 3000); + // info() + // window.setInterval("info()", 3000); + + // mockAlarmData(); + getAlarmData(); + window.setInterval(getAlarmData, 1500); + + getLaneData(); + window.setInterval(getLaneData, 1500); + + window.setInterval(scrollAlarmList, 1000); +}) + +function getAlarmData() { + $.ajax({ + url: ip + "/api/screen/selectFaultRecord?warehouseId="+warehouseId+"&type="+type, + type: "GET", + dataType: "JSON", + success: function(res) { + if (res.code === 200) { + renderAlarmData(res.data); + } + }, + error: function(err) { + console.log("Error fetching alarm data", err); + } + }) +} + +function renderAlarmData(data) { + var dom = ""; + // Ensure we have data + if (!data || data.length === 0) { + $(".alarm-items").html(""); + return; + } + + for (var i = 0; i < data.length; i++) { + var item = data[i]; + var bg = i % 2 == 0 ? "#046566" : "#05383c"; + + // Map fields + // Time: Extract HH:mm:ss from startTime "yyyy-MM-dd HH:mm:ss" + var timeStr = item.startTime ? item.startTime.split(' ')[1] : ""; + + // Type: Default to "故障" + var type = "故障"; + var color = "#ff4d4d"; // Red for fault + + // Detail: deviceName + fault description + var faultDesc = item.fault; + /*if (item.deviceType === "ddj") { + faultDesc = faultDesc; + } else if (item.deviceType === "ssj") { + faultDesc = faultDesc; + }*/ + + var detail = (item.deviceName || "") + " " + (faultDesc || ""); + + // Task No + var taskNo = item.taskNo || ""; + + dom += "
  • " + + "

    " + taskNo + "

    " + + "

    " + timeStr + "

    " + + "

    " + type + "

    " + + "

    " + detail + "

    " + + "
  • "; + } + $(".alarm-items").html(dom); +} + +function getLaneData() { + $.ajax({ + url: ip + "/api/screen/selectJobListByWarehouseIdAndType?warehouseId="+warehouseId+"&type="+type, + type: "GET", + dataType: "JSON", + success: function(res) { + if (res.code === 200) { + renderLaneData(res.data); + } + }, + error: function(err) { + console.log("Error fetching lane data", err); + } + }) +} + +function renderLaneData(data) { + var laneIds = ['1', '2', '3']; // Keys in the data object + + laneIds.forEach(function(key) { + var list = data[key] || []; + var content = ""; + content += "
      "; + + // Header + content += "
    • " + + "

      任务号

      " + + "

      托盘码

      " + + "

      类型

      " + + "

      状态

      " + + "
    • "; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var taskId = item.taskNo; + var palletId = item.trayCode || ""; + var typeName = getTaskTypeName(item.inOrOut); + var statusName = getTaskStatusName(item.status); + + var statusColor = (statusName === "执行中" || statusName === "完成") ? "#00ffc0" : "#ffb742"; + var typeColor = (typeName.indexOf("入") > -1) ? "#0dede4" : "#ff7e00"; + var bg = i % 2 == 0 ? "rgba(4, 101, 102, 0.5)" : "rgba(5, 56, 60, 0.5)"; + + content += "
    • " + + "

      " + taskId + "

      " + + "

      " + palletId + "

      " + + "

      " + typeName + "

      " + + "

      " + statusName + "

      " + + "
    • "; + } + content += "
    "; + $("#lane" + key).html(content); + }); +} + +function getTaskTypeName(code) { + // 空值/假值直接返回空字符串(保留原逻辑) + if (!code) return ""; + // 将编码转为数字(兼容字符串/数字类型入参),判断大小后返回对应名称 + const numCode = Number(code); + return numCode > 20 ? "出库" : "入库"; +} + +function getTaskStatusName(code) { + if (!code) return ""; + if (code === "4") return "完成"; + if (code === "0") return "创建"; + if (code === "1" || code == "2" || code == "3") return "执行中"; + return code; +} + +function getDdjFaultDescription(value) { + if (value === "0") return "待机"; + if (value === "1") return "工作"; + if (value === "1031") return "急停"; + if (value === "1032") return "货叉不在中位"; + if (value === '1033') return "行走变频报警"; + if (value === "1034") return "升降变频报警"; + if (value === "1035") return "货叉变频报警"; + if (value === "1036") return "货叉变频报警"; + if (value === "1037") return "运行限位故障"; + if (value === "1038") return "升降限位故障"; + if (value === "1039") return "运行不能纠偏"; + if (value === "1040") return "升降不能纠偏"; + if (value === "1041") return "水平测距出错"; + if (value === "1042") return "垂直BPS出错"; + if (value === "1043") return "超速保护"; + if (value === "1044") return "前边超宽"; + if (value === "1045") return "后边超宽"; + if (value === "1046") return "左边歪斜"; + if (value === "1047") return "右边歪斜"; + if (value === "1048") return "超高1"; + if (value === "1049") return "超高2"; + if (value === "1050") return "放货完毕货叉有货"; + if (value === "1051") return "取货时货叉有货"; + if (value === "1052") return "放货目标有货"; + if (value === "1053") return "取货完毕无货"; + if (value === "1054") return "放货时货叉无货"; + if (value === "1055") return "货叉动作超时"; + if (value === "1056") return "货叉不能纠偏"; + if (value === "1057") return "微升降超时"; + if (value === "1058") return "松绳过载"; + if (value === "1059") return "设定超限"; + if (value === "1060") return "取双伸时单伸有货"; + if (value === "1061") return "放双伸时单伸有货"; + if (value === "1062") return "入库输送机任务不符"; + if (value === "1063") return "安全门打开"; + if (value === "9999") return "设备未联机"; + return value; +} + +function getSsjFaultDescription(value) { + if (value == 101) return "前超长"; + if (value == 102) return "后超长"; + if (value == 103) return "左超宽"; + if (value == 104) return "右超宽"; + if (value == 105) return "超高"; + if (value == 106) return "称重异常"; + return value; +} + +function time() { + clearTimeout(t); + dt = new Date(); + var y = dt.getFullYear(); + var mt = dt.getMonth() + 1; + var day = dt.getDate(); + var h = dt.getHours(); + var m = dt.getMinutes(); + var s = dt.getSeconds(); + var a = new Date().getDay(); + var b = ""; + switch (a) { + case 0: + b = "日"; + break; + case 1: + b = "一"; + break; + case 2: + b = "二"; + break; + case 3: + b = "三"; + break; + case 4: + b = "四"; + break; + case 5: + b = "五"; + break; + default: + b = "六"; + } + document.querySelector(".riqi").innerHTML = "星期" + b + "
    " + y + "年" + mt + "月" + day + "日"; + document.querySelector(".shijian").innerHTML = jialing(h) + ":" + jialing(m); + t = setTimeout(time, 1000); + +} + +function jialing(m) { + if (m < 10) { + m = "0" + m + return m; + } else { + return m; + } +} + +function mockAlarmData() { + var alarms = [ + { time: "10:00:01", type: "故障", detail: "1号堆垛机通信中断", status: "未处理" }, + { time: "10:05:23", type: "警告", detail: "2号入库口货物堆积", status: "处理中" }, + { time: "10:15:11", type: "故障", detail: "3号出库口光电异常", status: "未处理" }, + { time: "10:20:45", type: "提示", detail: "系统自动备份完成", status: "已完成" }, + { time: "10:30:00", type: "警告", detail: "库位占用率过高", status: "处理中" }, + { time: "10:35:12", type: "故障", detail: "1号巷道急停按下", status: "未处理" }, + { time: "10:40:00", type: "提示", detail: "入库任务下发成功", status: "已完成" }, + { time: "10:45:30", type: "警告", detail: "网络延迟较高", status: "处理中" } + ]; + + var dom = ""; + for (var i = 0; i < alarms.length; i++) { + var bg = i % 2 == 0 ? "#046566" : "#05383c"; + var color = alarms[i].type === "故障" ? "#ff4d4d" : (alarms[i].type === "警告" ? "#ffb742" : "#fff"); + + dom += "
  • " + + "

    " + alarms[i].time + "

    " + + "

    " + alarms[i].type + "

    " + + "

    " + alarms[i].detail + "

    " + + "

    " + alarms[i].status + "

    " + + "
  • "; + } + $(".alarm-items").html(dom); +} + +function scrollAlarmList() { + var list = $(".alarm-items"); + var firstItem = list.find("li:first"); + if (firstItem.length === 0) return; + + var height = firstItem.height(); + // Default to some height if 0 (e.g. if hidden) + if (height === 0) height = 30; + + if (list.children().length > 3) { + firstItem.animate({ + marginTop: -height + "px" + }, 500, function() { + firstItem.css("marginTop", 0).appendTo(list); + }); + } +} + +function mockLaneData() { + // Generate mock data for 3 lanes (merged inbound/outbound) + var laneIds = ['lane1', 'lane2', 'lane3']; + + laneIds.forEach(function(id) { + var content = ""; + // Create a list structure + content += "
      "; + + // Header + content += "
    • " + + "

      任务号

      " + + "

      托盘码

      " + + "

      类型

      " + + "

      状态

      " + + "
    • "; + + // Randomly generate 4-8 rows of data + var rowCount = Math.floor(Math.random() * 5) + 4; + for (var i = 0; i < rowCount; i++) { + var taskId = "T" + Math.floor(Math.random() * 10000); + var palletId = "P" + Math.floor(Math.random() * 1000); + var type = Math.random() > 0.5 ? "入库" : "出库"; + var status = Math.random() > 0.5 ? "执行中" : "等待中"; + var statusColor = status === "执行中" ? "#00ffc0" : "#ffb742"; + var typeColor = type === "入库" ? "#0dede4" : "#ff7e00"; + var bg = i % 2 == 0 ? "rgba(4, 101, 102, 0.5)" : "rgba(5, 56, 60, 0.5)"; + + content += "
    • " + + "

      " + taskId + "

      " + + "

      " + palletId + "

      " + + "

      " + type + "

      " + + "

      " + status + "

      " + + "
    • "; + } + + content += "
    "; + $("#" + id).html(content); + }); +} diff --git a/js/jquery-3.1.1.min.js b/js/jquery-3.1.1.min.js new file mode 100644 index 0000000..4c5be4c --- /dev/null +++ b/js/jquery-3.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), +a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), +void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r(" + + + 大屏监控 + + + +
    +
    +
    数 据 可 视 化 看 板
    + +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    1巷道
    +
    +
    +
    任务监控
    +
    +
    +
    +
    +
    + + +
    +
    2巷道
    +
    +
    +
    任务监控
    +
    +
    +
    +
    +
    + + +
    +
    3巷道
    +
    +
    +
    任务监控
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    报警信息
    +
    +
    +
    +
      +
    • +

      任务号

      +

      时间

      +

      类型

      +

      详情

      +
    • +
    +
    +
      + +
    +
    +
    +
    +
    + + + + + + \ No newline at end of file diff --git a/unpackage/cache/wgt/H5030C5DA/js/echarts.min.js b/unpackage/cache/wgt/H5030C5DA/js/echarts.min.js new file mode 100644 index 0000000..7d450a9 --- /dev/null +++ b/unpackage/cache/wgt/H5030C5DA/js/echarts.min.js @@ -0,0 +1,45 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},e(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},r=new function(){this.browser=new i,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(r.wxa=!0,r.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?r.worker=!0:"undefined"==typeof navigator||0===navigator.userAgent.indexOf("Node.js")?(r.node=!0,r.svgSupported=!0):function(t,e){var n=e.browser,i=t.match(/Firefox\/([\d.]+)/),r=t.match(/MSIE\s([\d.]+)/)||t.match(/Trident\/.+?rv:(([\d.]+))/),o=t.match(/Edge?\/([\d.]+)/),a=/micromessenger/i.test(t);i&&(n.firefox=!0,n.version=i[1]);r&&(n.ie=!0,n.version=r[1]);o&&(n.edge=!0,n.version=o[1],n.newEdge=+o[1].split(".")[0]>18);a&&(n.weChat=!0);e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document;var s=document.documentElement.style;e.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||n.ie&&+n.version>=9}(navigator.userAgent,r);var o="sans-serif",a="12px "+o;var s,l,u=function(t){var e={};if("undefined"==typeof JSON)return e;for(var n=0;n=0)o=r*t.length;else for(var c=0;c>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,a),l=function(t,e,n){for(var i=n?"invTrans":"trans",r=e[i],o=e.srcCoords,a=[],s=[],l=!0,u=0;u<4;u++){var h=t[u].getBoundingClientRect(),c=2*u,p=h.left,d=h.top;a.push(p,d),l=l&&o&&p===o[c]&&d===o[c+1],s.push(t[u].offsetLeft,t[u].offsetTop)}return l&&r?r:(e.srcCoords=a,e[i]=n?$t(s,a):$t(a,s))}(s,a,o);if(l)return l(t,n,i),!0}return!1}function ee(t){return"CANVAS"===t.nodeName.toUpperCase()}var ne=/([&<>"'])/g,ie={"&":"&","<":"<",">":">",'"':""","'":"'"};function re(t){return null==t?"":(t+"").replace(ne,(function(t,e){return ie[e]}))}var oe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ae=[],se=r.browser.firefox&&+r.browser.version.split(".")[0]<39;function le(t,e,n,i){return n=n||{},i?ue(t,e,n):se&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):ue(t,e,n),n}function ue(t,e,n){if(r.domSupported&&t.getBoundingClientRect){var i=e.clientX,o=e.clientY;if(ee(t)){var a=t.getBoundingClientRect();return n.zrX=i-a.left,void(n.zrY=o-a.top)}if(te(ae,t,i,o))return n.zrX=ae[0],void(n.zrY=ae[1])}n.zrX=n.zrY=0}function he(t){return t||window.event}function ce(t,e,n){if(null!=(e=he(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&le(t,r,e,n)}else{le(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&oe.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function pe(t,e,n,i){t.addEventListener(e,n,i)}var de=function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0};function fe(t){return 2===t.which||3===t.which}var ge=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=ye(r)/ye(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}};function me(){return[1,0,0,1,0,0]}function xe(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function _e(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function be(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function we(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function Se(t,e,n,i){void 0===i&&(i=[0,0]);var r=e[0],o=e[2],a=e[4],s=e[1],l=e[3],u=e[5],h=Math.sin(n),c=Math.cos(n);return t[0]=r*c+s*h,t[1]=-r*h+s*c,t[2]=o*c+l*h,t[3]=-o*h+c*l,t[4]=c*(a-i[0])+h*(u-i[1])+i[0],t[5]=c*(u-i[1])-h*(a-i[0])+i[1],t}function Me(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function Ie(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function Te(t){var e=[1,0,0,1,0,0];return _e(e,t),e}var Ce=Object.freeze({__proto__:null,create:me,identity:xe,copy:_e,mul:be,translate:we,rotate:Se,scale:Me,invert:Ie,clone:Te}),De=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Ae=Math.min,ke=Math.max,Le=new De,Pe=new De,Oe=new De,Re=new De,Ne=new De,Ee=new De,ze=function(){function t(t,e,n,i){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Ae(t.x,this.x),n=Ae(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=ke(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=ke(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return we(r,r,[-e.x,-e.y]),Me(r,r,[n,i]),we(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=x,gf&&(f=_,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}Le.x=Oe.x=n.x,Le.y=Re.y=n.y,Pe.x=Re.x=n.x+n.width,Pe.y=Oe.y=n.y+n.height,Le.transform(i),Re.transform(i),Pe.transform(i),Oe.transform(i),e.x=Ae(Le.x,Pe.x,Oe.x,Re.x),e.y=Ae(Le.y,Pe.y,Oe.y,Re.y);var l=ke(Le.x,Pe.x,Oe.x,Re.x),u=ke(Le.y,Pe.y,Oe.y,Re.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Ve="silent";function Be(){de(this.event)}var Fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(jt),Ge=function(t,e){this.x=t,this.y=e},We=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],He=new ze(0,0,0,0),Ye=function(t){function e(e,n,i,r,o){var a=t.call(this)||this;return a._hovered=new Ge(0,0),a.storage=e,a.painter=n,a.painterRoot=r,a._pointerSize=o,i=i||new Fe,a.proxy=null,a.setHandlerProxy(i),a._draggingMgr=new Zt(a),a}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(E(We,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=Ze(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new Ge(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Ge(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Be}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){var i=this.storage.getDisplayList(),r=new Ge(t,e);if(Ue(i,r,t,e,n),this._pointerSize&&!r.target){for(var o=[],a=this._pointerSize,s=a/2,l=new ze(t-s,e-s,a,a),u=i.length-1;u>=0;u--){var h=i[u];h===n||h.ignore||h.ignoreCoarsePointer||h.parent&&h.parent.ignoreCoarsePointer||(He.copy(h.getBoundingRect()),h.transform&&He.applyTransform(h.transform),He.intersect(l)&&o.push(h))}if(o.length)for(var c=Math.PI/12,p=2*Math.PI,d=0;d=0;o--){var a=t[o],s=void 0;if(a!==r&&!a.ignore&&(s=Xe(a,n,i))&&(!e.topTarget&&(e.topTarget=a),s!==Ve)){e.target=a;break}}}function Ze(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}E(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){Ye.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=Ze(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Vt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));function je(t,e,n,i){var r=e+1;if(r===n)return 1;if(i(t[r++],t[e])<0){for(;r=0;)r++;return r-e}function qe(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function Ke(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function $e(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function Je(t,e){var n,i,r=7,o=0,a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=$e(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=Ke(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-Ke(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=je(t,n,i,e))s&&(l=s),qe(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var tn=!1;function en(){tn||(tn=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function nn(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var rn=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=nn}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(en(),u.z=0),isNaN(u.z2)&&(en(),u.z2=0),isNaN(u.zlevel)&&(en(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),on=r.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},an={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.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-an.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*an.bounceIn(2*t):.5*an.bounceOut(2*t-1)+.5}},sn=Math.pow,ln=Math.sqrt,un=1e-8,hn=1e-4,cn=ln(3),pn=1/3,dn=Mt(),fn=Mt(),gn=Mt();function yn(t){return t>-1e-8&&tun||t<-1e-8}function mn(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function xn(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function _n(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(yn(h)&&yn(c)){if(yn(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(yn(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=ln(f),m=h*s+1.5*a*(-c+v),x=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-sn(-m,pn):sn(m,pn))+(x=x<0?-sn(-x,pn):sn(x,pn))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var _=(2*h*s-3*a*c)/(2*ln(h*h*h)),b=Math.acos(_)/3,w=ln(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+cn*Math.sin(b)))/(3*a),(-s+w*(S-cn*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function bn(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(yn(a)){if(vn(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(yn(u))r[0]=-o/(2*a);else if(u>0){var h,c=ln(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function wn(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Sn(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;dn[0]=l,dn[1]=u;for(var m=0;m<1;m+=.05)fn[0]=mn(t,n,r,a,m),fn[1]=mn(e,i,o,s,m),(f=Ft(dn,fn))=0&&f=0&&y=1?1:_n(0,i,o,1,t,s)&&mn(0,r,a,1,s[0])}}}var On=function(){function t(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||bt,this.ondestroy=t.ondestroy||bt,this.onrestart=t.onrestart||bt,t.easing&&this.setEasing(t.easing)}return t.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),!this._paused){var n=this._life,i=t-this._startTime-this._pausedTime,r=i/n;r<0&&(r=0),r=Math.min(r,1);var o=this.easingFunc,a=o?o(r):r;if(this.onframe(a),1===r){if(!this.loop)return!0;var s=i%n;this._startTime=t-s,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=e},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t.prototype.setEasing=function(t){this.easing=t,this.easingFunc=X(t)?t:an[t]||Pn(t)},t}(),Rn=function(t){this.value=t},Nn=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Rn(t);return this.insertEntry(e),e},t.prototype.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++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),En=function(){function t(t){this._list=new Nn,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Rn(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),zn={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 Vn(t){return(t=Math.round(t))<0?0:t>255?255:t}function Bn(t){return t<0?0:t>1?1:t}function Fn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Vn(parseFloat(e)/100*255):Vn(parseInt(e,10))}function Gn(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Bn(parseFloat(e)/100):Bn(parseFloat(e))}function Wn(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function Hn(t,e,n){return t+(e-t)*n}function Yn(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Xn(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Un=new En(20),Zn=null;function jn(t,e){Zn&&Xn(Zn,e),Zn=Un.put(t,Zn||e.slice())}function qn(t,e){if(t){e=e||[];var n=Un.get(t);if(n)return Xn(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in zn)return Xn(e,zn[i]),jn(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Yn(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),jn(t,e),e):void Yn(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Yn(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),jn(t,e),e):void Yn(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Yn(e,+u[0],+u[1],+u[2],1):Yn(e,0,0,0,1);h=Gn(u.pop());case"rgb":return u.length>=3?(Yn(e,Fn(u[0]),Fn(u[1]),Fn(u[2]),3===u.length?h:Gn(u[3])),jn(t,e),e):void Yn(e,0,0,0,1);case"hsla":return 4!==u.length?void Yn(e,0,0,0,1):(u[3]=Gn(u[3]),Kn(u,e),jn(t,e),e);case"hsl":return 3!==u.length?void Yn(e,0,0,0,1):(Kn(u,e),jn(t,e),e);default:return}}Yn(e,0,0,0,1)}}function Kn(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Gn(t[1]),r=Gn(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Yn(e=e||[],Vn(255*Wn(a,o,n+1/3)),Vn(255*Wn(a,o,n)),Vn(255*Wn(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $n(t,e){var n=qn(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return ri(n,4===n.length?"rgba":"rgb")}}function Jn(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Vn(Hn(a[0],s[0],l)),n[1]=Vn(Hn(a[1],s[1],l)),n[2]=Vn(Hn(a[2],s[2],l)),n[3]=Bn(Hn(a[3],s[3],l)),n}}var Qn=Jn;function ti(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=qn(e[r]),s=qn(e[o]),l=i-r,u=ri([Vn(Hn(a[0],s[0],l)),Vn(Hn(a[1],s[1],l)),Vn(Hn(a[2],s[2],l)),Bn(Hn(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var ei=ti;function ni(t,e,n,i){var r=qn(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Gn(n)),null!=i&&(r[2]=Gn(i)),ri(Kn(r),"rgba")}function ii(t,e){var n=qn(t);if(n&&null!=e)return n[3]=Bn(e),ri(n,"rgba")}function ri(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function oi(t,e){var n=qn(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var ai=new En(100);function si(t){if(U(t)){var e=ai.get(t);return e||(e=$n(t,-.1),ai.put(t,e)),e}if(Q(t)){var n=A({},t);return n.colorStops=z(t.colorStops,(function(t){return{offset:t.offset,color:$n(t.color,-.1)}})),n}return t}var li=Object.freeze({__proto__:null,parse:qn,lift:$n,toHex:function(t){var e=qn(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)},fastLerp:Jn,fastMapToColor:Qn,lerp:ti,mapToColor:ei,modifyHSL:ni,modifyAlpha:ii,stringify:ri,lum:oi,random:function(){return ri([Math.round(255*Math.random()),Math.round(255*Math.random()),Math.round(255*Math.random())],"rgb")},liftColor:si}),ui=Math.round;function hi(t){var e;if(t&&"transparent"!==t){if("string"==typeof t&&t.indexOf("rgba")>-1){var n=qn(t);n&&(t="rgb("+n[0]+","+n[1]+","+n[2]+")",e=n[3])}}else t="none";return{color:t,opacity:null==e?1:e}}var ci=1e-4;function pi(t){return t-1e-4}function di(t){return ui(1e3*t)/1e3}function fi(t){return ui(1e4*t)/1e4}var gi={left:"start",right:"end",center:"middle",middle:"middle"};function yi(t){return t&&!!t.image}function vi(t){return yi(t)||function(t){return t&&!!t.svgElement}(t)}function mi(t){return"linear"===t.type}function xi(t){return"radial"===t.type}function _i(t){return t&&("linear"===t.type||"radial"===t.type)}function bi(t){return"url(#"+t+")"}function wi(t){var e=t.getGlobalScale(),n=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Si(t){var e=t.x||0,n=t.y||0,i=(t.rotation||0)*wt,r=rt(t.scaleX,1),o=rt(t.scaleY,1),a=t.skewX||0,s=t.skewY||0,l=[];return(e||n)&&l.push("translate("+e+"px,"+n+"px)"),i&&l.push("rotate("+i+")"),1===r&&1===o||l.push("scale("+r+","+o+")"),(a||s)&&l.push("skew("+ui(a*wt)+"deg, "+ui(s*wt)+"deg)"),l.join(" ")}var Mi=r.hasGlobalWindow&&X(window.btoa)?function(t){return window.btoa(unescape(encodeURIComponent(t)))}:"undefined"!=typeof Buffer?function(t){return Buffer.from(t).toString("base64")}:function(t){return null},Ii=Array.prototype.slice;function Ti(t,e,n){return(e-t)*n+t}function Ci(t,e,n,i){for(var r=e.length,o=0;oi?e:t,o=Math.min(n,i),a=r[o-1]||{color:[0,0,0,0],offset:0},s=o;sa)i.length=a;else for(var s=o;s=1},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,r=i.length,o=!1,a=6,s=e;if(N(e)){var l=function(t){return N(t&&t[0])?2:1}(e);a=l,(1===l&&!j(e[0])||2===l&&!j(e[0][0]))&&(o=!0)}else if(j(e)&&!nt(e))a=0;else if(U(e))if(isNaN(+e)){var u=qn(e);u&&(s=u,a=3)}else a=0;else if(Q(e)){var h=A({},s);h.colorStops=z(e.colorStops,(function(t){return{offset:t.offset,color:qn(t.color)}})),mi(e)?a=4:xi(e)&&(a=5),s=h}0===r?this.valType=a:a===this.valType&&6!==a||(o=!0),this.discrete=this.discrete||o;var c={time:t,value:s,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=X(n)?n:an[n]||Pn(n)),i.push(c),c},t.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort((function(t,e){return t.time-e.time}));for(var i=this.valType,r=n.length,o=n[r-1],a=this.discrete,s=Ni(i),l=Ri(i),u=0;u=0&&!(l[n].percent<=e);n--);n=d(n,u-2)}else{for(n=p;ne);n++);n=d(n-1,u-2)}r=l[n+1],i=l[n]}if(i&&r){this._lastFr=n,this._lastFrP=e;var f=r.percent-i.percent,g=0===f?1:d((e-i.percent)/f,1);r.easingFunc&&(g=r.easingFunc(g));var y=o?this._additiveValue:c?Ei:t[h];if(!Ni(s)&&!c||y||(y=this._additiveValue=[]),this.discrete)t[h]=g<1?i.rawValue:r.rawValue;else if(Ni(s))1===s?Ci(y,i[a],r[a],g):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a0&&s.addKeyframe(0,Pi(l),i),this._trackKeys.push(a)}s.addKeyframe(t,Pi(e[a]),i)}return this._maxTime=Math.max(this._maxTime,t),this},t.prototype.pause=function(){this._clip.pause(),this._paused=!0},t.prototype.resume=function(){this._clip.resume(),this._paused=!1},t.prototype.isPaused=function(){return!!this._paused},t.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},t.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(this._maxTime,r.getAdditiveTrack())}}}},t}();function Bi(){return(new Date).getTime()}var Fi,Gi,Wi=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._head=n,n?n.prev=e:this._tail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=Bi()-this._pausedTime,n=e-this._time,i=this._head;i;){var r=i.next;i.step(e,n)?(i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,on((function e(){t._running&&(on(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=Bi(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Bi(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Bi()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._head=this._tail=null},e.prototype.isFinished=function(){return null==this._head},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Vi(t,e.loop);return this.addAnimator(n),n},e}(jt),Hi=r.domSupported,Yi=(Gi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:Fi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:z(Fi,(function(t){var e=t.replace("mouse","pointer");return Gi.hasOwnProperty(e)?e:t}))}),Xi=["mousemove","mouseup"],Ui=["pointermove","pointerup"],Zi=!1;function ji(t){var e=t.pointerType;return"pen"===e||"touch"===e}function qi(t){t&&(t.zrByTouch=!0)}function Ki(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var $i=function(t,e){this.stopPropagation=bt,this.stopImmediatePropagation=bt,this.preventDefault=bt,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Ji={mousedown:function(t){t=ce(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=ce(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=ce(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ki(this,(t=ce(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Zi=!0,t=ce(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Zi||(t=ce(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){qi(t=ce(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Ji.mousemove.call(this,t),Ji.mousedown.call(this,t)},touchmove:function(t){qi(t=ce(this.dom,t)),this.handler.processGesture(t,"change"),Ji.mousemove.call(this,t)},touchend:function(t){qi(t=ce(this.dom,t)),this.handler.processGesture(t,"end"),Ji.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Ji.click.call(this,t)},pointerdown:function(t){Ji.mousedown.call(this,t)},pointermove:function(t){ji(t)||Ji.mousemove.call(this,t)},pointerup:function(t){Ji.mouseup.call(this,t)},pointerout:function(t){ji(t)||Ji.mouseout.call(this,t)}};E(["click","dblclick","contextmenu"],(function(t){Ji[t]=function(e){e=ce(this.dom,e),this.trigger(t,e)}}));var Qi={pointermove:function(t){ji(t)||Qi.mousemove.call(this,t)},pointerup:function(t){Qi.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function tr(t,e){var n=e.domHandlers;r.pointerEventsSupported?E(Yi.pointer,(function(i){nr(e,i,(function(e){n[i].call(t,e)}))})):(r.touchEventsSupported&&E(Yi.touch,(function(i){nr(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),E(Yi.mouse,(function(i){nr(e,i,(function(r){r=he(r),e.touching||n[i].call(t,r)}))})))}function er(t,e){function n(n){nr(e,n,(function(i){i=he(i),Ki(t,i.target)||(i=function(t,e){return ce(t.dom,new $i(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}r.pointerEventsSupported?E(Ui,n):r.touchEventsSupported||E(Xi,n)}function nr(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,pe(t.domTarget,e,n,i)}function ir(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],e.removeEventListener(n,i,r));t.mounted={}}var rr=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},or=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new rr(e,Ji),Hi&&(i._globalHandlerScope=new rr(document,Qi)),tr(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){ir(this._localHandlerScope),Hi&&ir(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,Hi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?er(this,e):ir(e)}},e}(jt),ar=1;r.hasGlobalWindow&&(ar=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var sr=ar,lr="#333",ur="#ccc",hr=xe,cr=5e-5;function pr(t){return t>cr||t<-5e-5}var dr=[],fr=[],gr=[1,0,0,1,0,0],yr=Math.abs,vr=function(){function t(){}return t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return pr(this.rotation)||pr(this.x)||pr(this.y)||pr(this.scaleX-1)||pr(this.scaleY-1)||pr(this.skewX)||pr(this.skewY)},t.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;e||t?(n=n||[1,0,0,1,0,0],e?this.getLocalTransform(n):hr(n),t&&(e?be(n,t,n):_e(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(hr(n),this.invTransform=null)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(dr);var n=dr[0]<0?-1:1,i=dr[1]<0?-1:1,r=((dr[0]-n)*e+n)/dr[0]||0,o=((dr[1]-i)*e+i)/dr[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],Ie(this.invTransform,t)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),r=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(r),e=Math.sqrt(e),this.skewX=r,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||[1,0,0,1,0,0],be(fr,t.invTransform,e),e=fr);var n=this.originX,i=this.originY;(n||i)&&(gr[4]=n,gr[5]=i,be(fr,e,gr),fr[4]-=n,fr[5]-=i,e=fr),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Wt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Wt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&yr(t[0]-1)>1e-10&&yr(t[3]-1)>1e-10?Math.sqrt(yr(t[0]*t[3]-t[2]*t[1])):1},t.prototype.copyTransform=function(t){xr(this,t)},t.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.anchorX,s=t.anchorY,l=t.rotation||0,u=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,p=t.skewY?Math.tan(-t.skewY):0;if(n||i||a||s){var d=n+a,f=i+s;e[4]=-d*r-c*f*o,e[5]=-f*o-p*d*r}else e[4]=e[5]=0;return e[0]=r,e[3]=o,e[1]=p*r,e[2]=c*o,l&&Se(e,e,l),e[4]+=n+u,e[5]+=i+h,e},t.initDefaultProps=function(){var e=t.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),t}(),mr=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function xr(t,e){for(var n=0;n=0?parseFloat(t)/100*e:parseFloat(t):t}function Dr(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Cr(i[0],n.width),u+=Cr(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Ar="__zr_normal__",kr=mr.concat(["ignore"]),Lr=V(mr,(function(t,e){return t[e]=!0,t}),{ignore:!1}),Pr={},Or=new ze(0,0,0,0),Rr=function(){function t(t){this.id=M(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.innerTransformable,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.copyTransform(e),null!=n.position){var u=Or;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Pr,n,u):Dr(Pr,n,u),r.x=Pr.x,r.y=Pr.y,o=Pr.align,a=Pr.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Cr(h[0],u.width),p=Cr(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),e.__dirty|=1,s&&e.dirtyStyle(!0)}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?ur:lr},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&qn(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,ri(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},A(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(q(t))for(var n=G(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Ar,!1,t)},t.prototype.useState=function(t,e,n,i){var r=t===Ar;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(P(o,t)>=0)||!e&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(t)),s||(s=this.states&&this.states[t]),s||r){r||this.saveCurrentToNormalState(s);var l=!!(s&&s.hoverLayer||i);l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,s,this._normalState,e,!n&&!this.__inHover&&a&&a.duration>0,a);var u=this._textContent,h=this._textGuide;return u&&u.useState(t,e,n,l),h&&h.useState(t,e,n,l),r?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),s}I("State "+t+" not exists.")}}},t.prototype.useStates=function(t,e,n){if(t.length){var i=[],r=this.currentStates,o=t.length,a=o===r.length;if(a)for(var s=0;s0,d);var f=this._textContent,g=this._textGuide;f&&f.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}else this.clearStates()},t.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=P(i,t),o=P(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){var w,S=void 0,M=void 0,I=void 0;if(s){M={},p&&(S={});for(_=0;_=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,e){var n=P(this._children,t);return n>=0&&this.replaceAt(e,n),this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=P(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover())},t.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},t.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},t.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},t.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},t.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},t.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},t.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){if(t<=r)return a;if(t>=o)return s}else{if(t>=r)return a;if(t<=o)return s}else{if(t===r)return a;if(t===o)return s}return(t-r)/l*u+a}function $r(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 U(t)?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function Jr(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function Qr(t){return t.sort((function(t,e){return t-e})),t}function to(t){if(t=+t,isNaN(t))return 0;if(t>1e-14)for(var e=1,n=0;n<15;n++,e*=10)if(Math.round(t*e)/e===t)return n;return eo(t)}function eo(t){var e=t.toString().toLowerCase(),n=e.indexOf("e"),i=n>0?+e.slice(n+1):0,r=n>0?n:e.length,o=e.indexOf("."),a=o<0?0:r-1-o;return Math.max(0,a-i)}function no(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function io(t,e){var n=V(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===n)return[];for(var i=Math.pow(10,e),r=z(t,(function(t){return(isNaN(t)?0:t)/n*i*100})),o=100*i,a=z(r,(function(t){return Math.floor(t)})),s=V(a,(function(t,e){return t+e}),0),l=z(r,(function(t,e){return t-a[e]}));su&&(u=l[c],h=c);++a[h],l[h]=0,++s}return z(a,(function(t){return t/i}))}function ro(t,e){var n=Math.max(to(t),to(e)),i=t+e;return n>20?i:Jr(i,n)}var oo=9007199254740991;function ao(t){var e=2*Math.PI;return(t%e+e)%e}function so(t){return t>-1e-4&&t=10&&e++,e}function po(t,e){var n=co(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function fo(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function go(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&P(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var ra=ia([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),oa=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return ra(this,t,e)},t}(),aa=new En(50);function sa(t){if("string"==typeof t){var e=aa.get(t);return e&&e.image}return t}function la(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=aa.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!ha(e=o.image)&&o.pending.push(a):((e=h.loadImage(t,ua,ua)).__zrImageSrc=t,aa.put(t,e.__cachedImgObj={image:e,pending:[a]})),e}return t}return e}function ua(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=br(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function fa(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=br(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?ga(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=br(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function ga(t,e,n,i){for(var r=0,o=0,a=t.length;o0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=wa(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}(t)||!!_a[t]}function wa(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var Sa="__zr_style_"+Math.round(10*Math.random()),Ma={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ia={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ma[Sa]=!0;var Ta=["z","z2","invisible"],Ca=["invisible"],Da=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=G(e),i=0;i1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Ea[0]=Ra(r)*n+t,Ea[1]=Oa(r)*i+e,za[0]=Ra(o)*n+t,za[1]=Oa(o)*i+e,u(s,Ea,za),h(l,Ea,za),(r%=Na)<0&&(r+=Na),(o%=Na)<0&&(o+=Na),r>o&&!a?o+=Na:rr&&(Va[0]=Ra(d)*n+t,Va[1]=Oa(d)*i+e,u(s,Va,s),h(l,Va,l))}var Ua={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Za=[],ja=[],qa=[],Ka=[],$a=[],Ja=[],Qa=Math.min,ts=Math.max,es=Math.cos,ns=Math.sin,is=Math.abs,rs=Math.PI,os=2*rs,as="undefined"!=typeof Float32Array,ss=[];function ls(t){return Math.round(t/rs*1e8)/1e8%2*rs}function us(t,e){var n=ls(t[0]);n<0&&(n+=os);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=os?r=n+os:e&&n-r>=os?r=n-os:!e&&n>r?r=n+(os-ls(n-r)):e&&n0&&(this._ux=is(n/sr/t)||0,this._uy=is(n/sr/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(Ua.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=is(t-this._xi),i=is(e-this._yi),r=n>this._ux||i>this._uy;if(this.addData(Ua.L,t,e),this._ctx&&r&&this._ctx.lineTo(t,e),r)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this._drawPendingPt(),this.addData(Ua.C,t,e,n,i,r,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,r,o),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(Ua.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){this._drawPendingPt(),ss[0]=i,ss[1]=r,us(ss,o),i=ss[0];var a=(r=ss[1])-i;return this.addData(Ua.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=es(r)*n+t,this._yi=ns(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(Ua.R,t,e,n,i),this},t.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ua.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.len=function(){return this._len},t.prototype.setData=function(t){var e=t.length;this.data&&this.data.length===e||!as||(this.data=new Float32Array(e));for(var n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},t.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){qa[0]=qa[1]=$a[0]=$a[1]=Number.MAX_VALUE,Ka[0]=Ka[1]=Ja[0]=Ja[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||is(y)>i||c===e-1)&&(f=Math.sqrt(A*A+y*y),r=g,o=x);break;case Ua.C:var v=t[c++],m=t[c++],x=(g=t[c++],t[c++]),_=t[c++],b=t[c++];f=Mn(r,o,v,m,g,x,_,b,10),r=_,o=b;break;case Ua.Q:f=kn(r,o,v=t[c++],m=t[c++],g=t[c++],x=t[c++],10),r=g,o=x;break;case Ua.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],D=C+T;c+=1,d&&(a=es(T)*M+w,s=ns(T)*I+S),f=ts(M,I)*Qa(os,Math.abs(C)),r=es(D)*M+w,o=ns(D)*I+S;break;case Ua.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case Ua.Z:var A=a-r;y=s-o;f=Math.sqrt(A*A+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h,c,p=this.data,d=this._ux,f=this._uy,g=this._len,y=e<1,v=0,m=0,x=0;if(!y||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var _=0;_0&&(t.lineTo(h,c),x=0),b){case Ua.M:n=r=p[_++],i=o=p[_++],t.moveTo(r,o);break;case Ua.L:a=p[_++],s=p[_++];var S=is(a-r),M=is(s-o);if(S>d||M>f){if(y){if(v+(j=l[m++])>u){var I=(u-v)/j;t.lineTo(r*(1-I)+a*I,o*(1-I)+s*I);break t}v+=j}t.lineTo(a,s),r=a,o=s,x=0}else{var T=S*S+M*M;T>x&&(h=a,c=s,x=T)}break;case Ua.C:var C=p[_++],D=p[_++],A=p[_++],k=p[_++],L=p[_++],P=p[_++];if(y){if(v+(j=l[m++])>u){wn(r,C,A,L,I=(u-v)/j,Za),wn(o,D,k,P,I,ja),t.bezierCurveTo(Za[1],ja[1],Za[2],ja[2],Za[3],ja[3]);break t}v+=j}t.bezierCurveTo(C,D,A,k,L,P),r=L,o=P;break;case Ua.Q:C=p[_++],D=p[_++],A=p[_++],k=p[_++];if(y){if(v+(j=l[m++])>u){Dn(r,C,A,I=(u-v)/j,Za),Dn(o,D,k,I,ja),t.quadraticCurveTo(Za[1],ja[1],Za[2],ja[2]);break t}v+=j}t.quadraticCurveTo(C,D,A,k),r=A,o=k;break;case Ua.A:var O=p[_++],R=p[_++],N=p[_++],E=p[_++],z=p[_++],V=p[_++],B=p[_++],F=!p[_++],G=N>E?N:E,W=is(N-E)>.001,H=z+V,Y=!1;if(y)v+(j=l[m++])>u&&(H=z+V*(u-v)/j,Y=!0),v+=j;if(W&&t.ellipse?t.ellipse(O,R,N,E,B,z,H,F):t.arc(O,R,G,z,H,F),Y)break t;w&&(n=es(z)*N+O,i=ns(z)*E+R),r=es(H)*N+O,o=ns(H)*E+R;break;case Ua.R:n=r=p[_],i=o=p[_+1],a=p[_++],s=p[_++];var X=p[_++],U=p[_++];if(y){if(v+(j=l[m++])>u){var Z=u-v;t.moveTo(a,s),t.lineTo(a+Qa(Z,X),s),(Z-=X)>0&&t.lineTo(a+X,s+Qa(Z,U)),(Z-=U)>0&&t.lineTo(a+ts(X-Z,0),s+U),(Z-=X)>0&&t.lineTo(a,s+ts(U-Z,0));break t}v+=j}t.rect(a,s,X,U);break;case Ua.Z:if(y){var j;if(v+(j=l[m++])>u){I=(u-v)/j;t.lineTo(r*(1-I)+n*I,o*(1-I)+i*I);break t}v+=j}t.closePath(),r=n,o=i}}},t.prototype.clone=function(){var e=new t,n=this.data;return e.data=n.slice?n.slice():Array.prototype.slice.call(n),e._len=this._len,e},t.CMD=Ua,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),t}();function cs(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=ys);var p=Math.atan2(l,s);return p<0&&(p+=ys),p>=i&&p<=r||p+ys>=i&&p+ys<=r}function ms(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var xs=hs.CMD,_s=2*Math.PI;var bs=[-1,-1,-1],ws=[-1,-1];function Ss(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=ws[0],ws[0]=ws[1],ws[1]=h),f=mn(e,i,o,s,ws[0]),d>1&&(g=mn(e,i,o,s,ws[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(yn(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=ln(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,bs);if(0===l)return 0;var u=Cn(e,i,o);if(u>=0&&u<=1){for(var h=0,c=In(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);bs[0]=-l,bs[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=_s-1e-4){i=0,r=_s;var h=o?1:-1;return a>=bs[0]+t&&a<=bs[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=_s,r+=_s);for(var p=0,d=0;d<2;d++){var f=bs[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=_s+g),(g>=i&&g<=r||g+_s>=i&&g+_s<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Ts(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=ms(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case xs.M:p=f=u[y++],d=g=u[y++];break;case xs.L:if(n){if(cs(p,d,u[y],u[y+1],e,i,r))return!0}else c+=ms(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.C:if(n){if(ps(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ss(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.Q:if(n){if(ds(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ms(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case xs.A:var x=u[y++],_=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+x,a=Math.sin(S)*w+_,m?(f=o,g=a):c+=ms(p,d,o,a,i,r);var T=(i-x)*w/b+x;if(n){if(vs(x,_,w,S,S+M,I,e,T,r))return!0}else c+=Is(x,_,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+x,d=Math.sin(S+M)*w+_;break;case xs.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(cs(f,g,o,g,e,i,r)||cs(o,g,o,a,e,i,r)||cs(o,a,f,a,e,i,r)||cs(f,a,f,g,e,i,r))return!0}else c+=ms(o,g,o,a,i,r),c+=ms(f,a,f,g,i,r);break;case xs.Z:if(n){if(cs(p,d,f,g,e,i,r))return!0}else c+=ms(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=ms(p,d,f,g,i,r)||0),0!==c}var Cs=k({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ma),Ds={style:k({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ia.style)},As=mr.concat(["invisible","culling","z","z2","zlevel","parent"]),ks=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?lr:e>.2?"#eee":ur}if(t)return ur}return lr},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(U(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===oi(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=-5},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new hs(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,e=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var r=this.path;(i||4&this.__dirty)&&(r.beginPath(),this.buildPath(r,this.shape,!1),this.pathUpdated()),t=r.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var o=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){o.copy(t);var a=e.strokeNoScale?this.getLineScale():1,s=e.lineWidth;if(!this.hasFill()){var l=this.strokeContainThreshold;s=Math.max(s,null==l?4:l)}a>1e-10&&(o.width+=s/a,o.height+=s/a,o.x-=s/a/2,o.y-=s/a/2)}return o}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Ts(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Ts(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:A(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(4&this.__dirty)},e.prototype.createStyle=function(t){return mt(Cs,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=A({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=A({},i.shape),A(s,n.shape)):(s=A({},r?this.shape:i.shape),A(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=A({},this.shape);for(var u={},h=G(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return mt(Ls,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=Sr(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(Da);Ps.prototype.type="tspan";var Os=k({x:0,y:0},Ma),Rs={style:k({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},Ia.style)};var Ns=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return mt(Os,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return Rs},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new ze(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(Da);Ns.prototype.type="image";var Es=Math.round;function zs(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Es(2*i)===Es(2*r)&&(t.x1=t.x2=Bs(i,s,!0)),Es(2*o)===Es(2*a)&&(t.y1=t.y2=Bs(o,s,!0)),t):t}}function Vs(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=Bs(i,s,!0),t.y=Bs(r,s,!0),t.width=Math.max(Bs(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(Bs(r+a,s,!1)-t.y,0===a?0:1),t):t}}function Bs(t,e,n){if(!e)return t;var i=Es(2*t);return(i+Es(e))%2==0?i/2:(i+(n?1:-1))/2}var Fs=function(){this.x=0,this.y=0,this.width=0,this.height=0},Gs={},Ws=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Fs},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=Vs(Gs,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(ks);Ws.prototype.type="rect";var Hs={fill:"#000"},Ys={style:k({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},Ia.style)},Xs=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Hs,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){t.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;ed&&h){var f=Math.floor(d/l);n=n.slice(0,f)}if(t&&a&&null!=c)for(var g=da(c,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),y=0;y0,T=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),C=i.calculatedLineHeight,D=0;Dl&&xa(n,t.substring(l,u),e,s),xa(n,i[2],e,s,i[1]),l=ca.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,_,x),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,D=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=br(P.text,I);else{if(D){var A=w.backgroundColor,k=A&&A.image;k&&ha(k=sa(k))&&(P.width=Math.max(P.width,k.width*T/k.height))}var L=f&&null!=r?r-_:null;null!=L&&L=0&&"right"===(C=x[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=x[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,s){var l=e.rich[t.styleName]||{};l.text=t.text;var u=t.verticalAlign,h=i+n/2;"top"===u?h=i+t.height/2:"bottom"===u&&(h=i+n-t.height/2),!t.isLineHolder&&il(l)&&this._renderBackground(l,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,h-t.height/2,t.width,t.height);var c=!!l.backgroundColor,p=t.textPadding;p&&(r=el(r,o,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ps),f=d.createStyle();d.useStyle(f);var g=this._defaultStyle,y=!1,v=0,m=tl("fill"in l?l.fill:"fill"in e?e.fill:(y=!0,g.fill)),x=Qs("stroke"in l?l.stroke:"stroke"in e?e.stroke:c||s||g.autoStroke&&!y?null:(v=2,g.stroke)),_=l.textShadowBlur>0||e.textShadowBlur>0;f.text=t.text,f.x=r,f.y=h,_&&(f.shadowBlur=l.textShadowBlur||e.textShadowBlur||0,f.shadowColor=l.textShadowColor||e.textShadowColor||"transparent",f.shadowOffsetX=l.textShadowOffsetX||e.textShadowOffsetX||0,f.shadowOffsetY=l.textShadowOffsetY||e.textShadowOffsetY||0),f.textAlign=o,f.textBaseline="middle",f.font=t.font||a,f.opacity=ot(l.opacity,e.opacity,1),Ks(f,l),x&&(f.lineWidth=ot(l.lineWidth,e.lineWidth,v),f.lineDash=rt(l.lineDash,e.lineDash),f.lineDashOffset=e.lineDashOffset||0,f.stroke=x),m&&(f.fill=m);var b=t.contentWidth,w=t.contentHeight;d.setBoundingRect(new ze(Mr(f.x,b,f.textAlign),Ir(f.y,w,f.textBaseline),b,w))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=u&&u.image,d=u&&!p,f=t.borderRadius,g=this;if(d||t.lineHeight||h&&c){(a=this._getOrCreateChild(Ws)).useStyle(a.createStyle()),a.style.fill=null;var y=a.shape;y.x=n,y.y=i,y.width=r,y.height=o,y.r=f,a.dirtyShape()}if(d)(l=a.style).fill=u||null,l.fillOpacity=rt(t.fillOpacity,1);else if(p){(s=this._getOrCreateChild(Ns)).onload=function(){g.dirtyStyle()};var v=s.style;v.image=u.image,v.x=n,v.y=i,v.width=r,v.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=rt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var m=(a||s).style;m.shadowBlur=t.shadowBlur||0,m.shadowColor=t.shadowColor||"transparent",m.shadowOffsetX=t.shadowOffsetX||0,m.shadowOffsetY=t.shadowOffsetY||0,m.opacity=ot(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";return $s(t)&&(e=[t.fontStyle,t.fontWeight,qs(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),e&&ut(e)||t.textFont||t.font},e}(Da),Us={left:!0,right:1,center:1},Zs={top:1,bottom:1,middle:1},js=["fontStyle","fontWeight","fontSize","fontFamily"];function qs(t){return"string"!=typeof t||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?"12px":t+"px":t}function Ks(t,e){for(var n=0;n=0,o=!1;if(t instanceof ks){var a=ll(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(ml(s)||ml(l)){var u=(i=i||{}).style||{};"inherit"===u.fill?(o=!0,i=A({},i),(u=A({},u)).fill=s):!ml(u.fill)&&ml(s)?(o=!0,i=A({},i),(u=A({},u)).fill=si(s)):!ml(u.stroke)&&ml(l)&&(o||(i=A({},i),u=A({},u)),u.stroke=si(l)),i.style=u}}if(i&&null==i.z2){o||(i=A({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:pl)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=P(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Ul(t,e,n){Jl(t,!0),Cl(t,kl),jl(t,e,n)}function Zl(t,e,n,i){i?function(t){Jl(t,!1)}(t):Ul(t,e,n)}function jl(t,e,n){var i=rl(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var ql=["emphasis","blur","select"],Kl={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function $l(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=su(f),s*=su(f));var g=(r===o?-1:1)*su((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+uu(c)*y-lu(c)*v,x=(e+i)/2+lu(c)*y+uu(c)*v,_=du([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=du(b,w);if(pu(b,w)<=-1&&(S=hu),pu(b,w)>=1&&(S=0),S<0){var M=Math.round(S/hu*1e6)/1e6;S=2*hu+M%2*hu}h.addData(u,m,x,a,s,_,S,c,o)}var gu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,yu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var vu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(ks);function mu(t){return null!=t.setData}function xu(t,e){var n=function(t){var e=new hs;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=hs.CMD,l=t.match(gu);if(!l)return e;for(var u=0;uk*k+L*L&&(M=T,I=C),{cx:M,cy:I,x0:-h,y0:-c,x1:M*(r/b-1),y1:I*(r/b-1)}}function Vu(t,e){var n,i=Ru(e.r,0),r=Ru(e.r0||0,0),o=i>0;if(o||r>0){if(o||(i=r,r=0),r>i){var a=i;i=r,r=a}var s=e.startAngle,l=e.endAngle;if(!isNaN(s)&&!isNaN(l)){var u=e.cx,h=e.cy,c=!!e.clockwise,p=Pu(l-s),d=p>Cu&&p%Cu;if(d>Eu&&(p=d),i>Eu)if(p>Cu-Eu)t.moveTo(u+i*Au(s),h+i*Du(s)),t.arc(u,h,i,s,l,!c),r>Eu&&(t.moveTo(u+r*Au(l),h+r*Du(l)),t.arc(u,h,r,l,s,c));else{var f=void 0,g=void 0,y=void 0,v=void 0,m=void 0,x=void 0,_=void 0,b=void 0,w=void 0,S=void 0,M=void 0,I=void 0,T=void 0,C=void 0,D=void 0,A=void 0,k=i*Au(s),L=i*Du(s),P=r*Au(l),O=r*Du(l),R=p>Eu;if(R){var N=e.cornerRadius;N&&(n=function(t){var e;if(Y(t)){var n=t.length;if(!n)return t;e=1===n?[t[0],t[0],0,0]:2===n?[t[0],t[0],t[1],t[1]]:3===n?t.concat(t[2]):t}else e=[t,t,t,t];return e}(N),f=n[0],g=n[1],y=n[2],v=n[3]);var E=Pu(i-r)/2;if(m=Nu(E,y),x=Nu(E,v),_=Nu(E,f),b=Nu(E,g),M=w=Ru(m,x),I=S=Ru(_,b),(w>Eu||S>Eu)&&(T=i*Au(l),C=i*Du(l),D=r*Au(s),A=r*Du(s),pEu){var X=Nu(y,M),U=Nu(v,M),Z=zu(D,A,k,L,i,X,c),j=zu(T,C,P,O,i,U,c);t.moveTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),M0&&t.arc(u+Z.cx,h+Z.cy,X,Lu(Z.y0,Z.x0),Lu(Z.y1,Z.x1),!c),t.arc(u,h,i,Lu(Z.cy+Z.y1,Z.cx+Z.x1),Lu(j.cy+j.y1,j.cx+j.x1),!c),U>0&&t.arc(u+j.cx,h+j.cy,U,Lu(j.y1,j.x1),Lu(j.y0,j.x0),!c))}else t.moveTo(u+k,h+L),t.arc(u,h,i,s,l,!c);else t.moveTo(u+k,h+L);if(r>Eu&&R)if(I>Eu){X=Nu(f,I),Z=zu(P,O,T,C,r,-(U=Nu(g,I)),c),j=zu(k,L,D,A,r,-X,c);t.lineTo(u+Z.cx+Z.x0,h+Z.cy+Z.y0),I0&&t.arc(u+Z.cx,h+Z.cy,U,Lu(Z.y0,Z.x0),Lu(Z.y1,Z.x1),!c),t.arc(u,h,r,Lu(Z.cy+Z.y1,Z.cx+Z.x1),Lu(j.cy+j.y1,j.cx+j.x1),c),X>0&&t.arc(u+j.cx,h+j.cy,X,Lu(j.y1,j.x1),Lu(j.y0,j.x0),!c))}else t.lineTo(u+P,h+O),t.arc(u,h,r,l,s,c);else t.lineTo(u+P,h+O)}else t.moveTo(u,h);t.closePath()}}}var Bu=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0},Fu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Bu},e.prototype.buildPath=function(t,e){Vu(t,e)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(ks);Fu.prototype.type="sector";var Gu=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0},Wu=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Gu},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=2*Math.PI;t.moveTo(n+e.r,i),t.arc(n,i,e.r,0,r,!1),t.moveTo(n+e.r0,i),t.arc(n,i,e.r0,0,r,!0)},e}(ks);function Hu(t,e,n){var i=e.smooth,r=e.points;if(r&&r.length>=2){if(i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;plh[1]){if(a=!1,r)return a;var u=Math.abs(lh[0]-sh[1]),h=Math.abs(sh[0]-lh[1]);Math.min(u,h)>i.len()&&(u0){var c={duration:h.duration,delay:h.delay||0,easing:h.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:t,during:a};l?e.animateFrom(n,c):e.animateTo(n,c)}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function vh(t,e,n,i,r,o){yh("update",t,e,n,i,r,o)}function mh(t,e,n,i,r,o){yh("enter",t,e,n,i,r,o)}function xh(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Wh(t){return!t.isGroup}function Hh(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Wh(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Wh(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),vh(t,i,n,rl(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=A({},t.shape)),e}}function Yh(t,e){return z(t,(function(t){var n=t[0];n=Mh(n,e.x),n=Ih(n,e.x+e.width);var i=t[1];return i=Mh(i,e.y),[n,i=Ih(i,e.y+e.height)]}))}function Xh(t,e){var n=Mh(t.x,e.x),i=Ih(t.x+t.width,e.x+e.width),r=Mh(t.y,e.y),o=Ih(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Uh(t,e,n){var i=A({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),k(r,n),new Ns(i)):Ph(t.replace("path://",""),i,n,"center")}function Zh(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=qh(f,g,u,h)/d;if(y<0||y>1)return!1;var v=qh(f,g,c,p)/d;return!(v<0||v>1)}function qh(t,e,n,i){return t*i-n*e}function Kh(t){var e=t.itemTooltipOption,n=t.componentModel,i=t.itemName,r=U(e)?{formatter:e}:e,o=n.mainType,a=n.componentIndex,s={componentType:o,name:i,$vars:["name"]};s[o+"Index"]=a;var l=t.formatterParamsExtra;l&&E(G(l),(function(t){_t(s,t)||(s[t]=l[t],s.$vars.push(t))}));var u=rl(t.el);u.componentMainType=o,u.componentIndex=a,u.tooltipConfig={name:i,option:k({content:i,encodeHTMLContent:!0,formatterParams:s},r)}}function $h(t,e){var n;t.isGroup&&(n=e(t)),n||t.traverse(e)}function Jh(t,e){if(t)if(Y(t))for(var n=0;n-1?Lc:Oc;function zc(t,e){t=t.toUpperCase(),Nc[t]=new Cc(e),Rc[t]=e}function Vc(t){return Nc[t]}zc(Pc,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),zc(Lc,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Bc=1e3,Fc=6e4,Gc=36e5,Wc=864e5,Hc=31536e6,Yc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},Xc="{yyyy}-{MM}-{dd}",Uc={year:"{yyyy}",month:"{yyyy}-{MM}",day:Xc,hour:Xc+" "+Yc.hour,minute:Xc+" "+Yc.minute,second:Xc+" "+Yc.second,millisecond:Yc.none},Zc=["year","month","day","hour","minute","second","millisecond"],jc=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function qc(t,e){return"0000".substr(0,e-(t+="").length)+t}function Kc(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function $c(t){return t===Kc(t)}function Jc(t,e,n,i){var r=uo(t),o=r[ep(n)](),a=r[np(n)]()+1,s=Math.floor((a-1)/3)+1,l=r[ip(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[rp(n)](),c=(h-1)%12+1,p=r[op(n)](),d=r[ap(n)](),f=r[sp(n)](),g=h>=12?"pm":"am",y=g.toUpperCase(),v=(i instanceof Cc?i:Vc(i||Ec)||Nc[Oc]).getModel("time"),m=v.get("month"),x=v.get("monthAbbr"),_=v.get("dayOfWeek"),b=v.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,y+"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,qc(o%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,m[a-1]).replace(/{MMM}/g,x[a-1]).replace(/{MM}/g,qc(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,qc(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,_[u]).replace(/{ee}/g,b[u]).replace(/{e}/g,u+"").replace(/{HH}/g,qc(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,qc(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,qc(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,qc(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,qc(f,3)).replace(/{S}/g,f+"")}function Qc(t,e){var n=uo(t),i=n[np(e)]()+1,r=n[ip(e)](),o=n[rp(e)](),a=n[op(e)](),s=n[ap(e)](),l=0===n[sp(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function tp(t,e,n){var i=j(t)?uo(t):t;switch(e=e||Qc(t,n)){case"year":return i[ep(n)]();case"half-year":return i[np(n)]()>=6?1:0;case"quarter":return Math.floor((i[np(n)]()+1)/4);case"month":return i[np(n)]();case"day":return i[ip(n)]();case"half-day":return i[rp(n)]()/24;case"hour":return i[rp(n)]();case"minute":return i[op(n)]();case"second":return i[ap(n)]();case"millisecond":return i[sp(n)]()}}function ep(t){return t?"getUTCFullYear":"getFullYear"}function np(t){return t?"getUTCMonth":"getMonth"}function ip(t){return t?"getUTCDate":"getDate"}function rp(t){return t?"getUTCHours":"getHours"}function op(t){return t?"getUTCMinutes":"getMinutes"}function ap(t){return t?"getUTCSeconds":"getSeconds"}function sp(t){return t?"getUTCMilliseconds":"getMilliseconds"}function lp(t){return t?"setUTCFullYear":"setFullYear"}function up(t){return t?"setUTCMonth":"setMonth"}function hp(t){return t?"setUTCDate":"setDate"}function cp(t){return t?"setUTCHours":"setHours"}function pp(t){return t?"setUTCMinutes":"setMinutes"}function dp(t){return t?"setUTCSeconds":"setSeconds"}function fp(t){return t?"setUTCMilliseconds":"setMilliseconds"}function gp(t){if(!vo(t))return U(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function yp(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}var vp=st;function mp(t,e,n){function i(t){return t&&ut(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?uo(t):t;if(!isNaN(+s))return Jc(s,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}if("ordinal"===e)return Z(t)?i(t):j(t)&&r(t)?t+"":"-";var l=yo(t);return r(l)?gp(l):Z(t)?i(t):"boolean"==typeof t?t+"":"-"}var xp=["a","b","c","d","e","f","g"],_p=function(t,e){return"{"+t+(null==e?"":e)+"}"};function bp(t,e,n){Y(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function Sp(t,e){return e=e||"transparent",U(t)?t:q(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function Mp(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Ip=E,Tp=["left","right","top","bottom","width","height"],Cp=[["width","left","right"],["height","top","bottom"]];function Dp(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Ap=Dp;H(Dp,"vertical"),H(Dp,"horizontal");function kp(t,e,n){n=vp(n||0);var i=e.width,r=e.height,o=$r(t.left,i),a=$r(t.top,r),s=$r(t.right,i),l=$r(t.bottom,r),u=$r(t.width,i),h=$r(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new ze(o+n[3],a+n[0],u,h);return f.margin=n,f}function Lp(t,e,n,i,r,o){var a,s=!r||!r.hv||r.hv[0],l=!r||!r.hv||r.hv[1],u=r&&r.boundingMode||"all";if((o=o||t).x=t.x,o.y=t.y,!s&&!l)return!1;if("raw"===u)a="group"===t.type?new ze(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(a=t.getBoundingRect(),t.needLocalTransform()){var h=t.getLocalTransform();(a=a.clone()).applyTransform(h)}var c=kp(k({width:a.width,height:a.height},e),n,i),p=s?c.x-a.x:0,d=l?c.y-a.y:0;return"raw"===u?(o.x=p,o.y=d):(o.x+=p,o.y+=d),o===t&&t.markRedraw(),!0}function Pp(t){var e=t.layoutMode||t.constructor.layoutMode;return q(e)?e:e?{type:e}:null}function Op(t,e,n){var i=n&&n.ignoreSize;!Y(i)&&(i=[i,i]);var r=a(Cp[0],0),o=a(Cp[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Ip(n,(function(e){u[e]=t[e]})),Ip(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=C(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Yo(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Cc);Jo(zp,Cc),na(zp),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Ko(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Ko(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(zp),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return E(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return E(t,(function(t){P(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),E(s,(function(t){P(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);P(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(E(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),E(c.successor,p?f:d)}E(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(zp,(function(t){var e=[];E(zp.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=z(e,(function(t){return Ko(t).main})),"dataset"!==t&&P(e,"dataset")<=0&&e.unshift("dataset");return e}));var Vp="";"undefined"!=typeof navigator&&(Vp=navigator.platform||"");var Bp="rgba(0, 0, 0, 0.2)",Fp={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Bp,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Bp,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Bp,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Bp,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Bp,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Bp,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Vp.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Gp=yt(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Wp="original",Hp="arrayRows",Yp="objectRows",Xp="keyedColumns",Up="typedArray",Zp="unknown",jp="column",qp="row",Kp=1,$p=2,Jp=3,Qp=Vo();function td(t,e,n){var i={},r=nd(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=Qp(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;E(t=t.slice(),(function(e,n){var r=q(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var fd="\0_ec_inner";var gd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Cc(i),this._locale=new Cc(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=md(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,md(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);0,this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ld(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&E(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=yt(),s=e&&e.replaceMergeMainTypeMap;Qp(this).datasetMap=yt(),E(t,(function(t,e){null!=t&&(zp.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?T(t):C(n[e],t,!0))})),s&&s.each((function(t,e){zp.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),zp.topologicalTravel(o,zp.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=od.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,To(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Lo(a,o,l);(function(t,e,n){E(t,(function(t){var i=t.newOption;q(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,zp),n[e]=null,i.set(e,null),r.set(e,0);var h,c=[],p=[],d=0;E(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o="series"===e,a=zp.getClass(e,t.keyInfo.subType,!o);if(!a)return;if("tooltip"===e){if(h)return void 0;h=!0}if(i&&i.constructor===a)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var s=A({componentIndex:n},t.keyInfo);A(i=new a(r,this,this,s),s),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(c.push(i.option),p.push(i),d++):(c.push(void 0),p.push(void 0))}),this),n[e]=c,i.set(e,p),r.set(e,d),"series"===e&&ad(this)}),this),this._seriesIndices||ad(this)},e.prototype.getOption=function(){var t=T(this.option);return E(t,(function(e,n){if(zp.hasClass(n)){for(var i=To(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Eo(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t[fd],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Td=E,Cd=q,Dd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ad(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Dd.length;n=0;g--){var y=t[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var v=y.data.getByRawIndex(y.stackResultDimension,p);if("all"===l||"positive"===l&&v>0||"negative"===l&&v<0||"samesign"===l&&d>=0&&v>0||"samesign"===l&&d<=0&&v<0){d=ro(d,v),f=v;break}}}return i[0]=d,i[1]=f,i}))}))}var Zd,jd,qd,Kd,$d,Jd=function(t){this.data=t.data||(t.sourceFormat===Xp?{}:[]),this.sourceFormat=t.sourceFormat||Zp,this.seriesLayoutBy=t.seriesLayoutBy||jp,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=0&&(s=o.interpolatedValue[l])}return null!=s?s+"":""})):void 0},t.prototype.getRawValue=function(t,e){return mf(this.getData(e),t)},t.prototype.formatTooltip=function(t,e,n){},t}();function bf(t){var e,n;return q(t)?t.type&&(n=t):e=t,{text:e,frag:n}}function wf(t){return new Sf(t)}var Sf=function(){function t(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return t.prototype.perform=function(t){var e,n=this._upstream,i=t&&t.skip;if(this._dirty&&n){var r=this.context;r.data=r.outputData=n.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(e=this._plan(this.context));var o,a=h(this._modBy),s=this._modDataCount||0,l=h(t&&t.modBy),u=t&&t.modDataCount||0;function h(t){return!(t>=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Af=function(){function t(t,e){if(!j(e)){var n="";0,wo(n)}this._opFn=Df[t],this._rvalFloat=yo(e)}return t.prototype.evaluate=function(t){return j(t)?this._opFn(t,this._rvalFloat):this._opFn(yo(t),this._rvalFloat)},t}(),kf=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=j(t)?t:yo(t),i=j(e)?e:yo(e),r=isNaN(n),o=isNaN(i);if(r&&(n=this._incomparable),o&&(i=this._incomparable),r&&o){var a=U(t),s=U(e);a&&(n=s?t:0),s&&(i=a?e:0)}return ni?-this._resultLT:0},t}(),Lf=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=yo(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=yo(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Pf(t,e){return"eq"===t||"ne"===t?new Lf("eq"===t,e):_t(Df,t)?new Af(t,e):null}var Of=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return If(t,e)},t}();function Rf(t){var e=t.sourceFormat;if(!Ff(e)){var n="";0,wo(n)}return t.data}function Nf(t){var e=t.sourceFormat,n=t.data;if(!Ff(e)){var i="";0,wo(i)}if(e===Hp){for(var r=[],o=0,a=n.length;o65535?Hf:Yf}function qf(t,e,n,i,r){var o=Zf[n||"float"];if(r){var a=t[e],s=a&&a.length;if(s!==i){for(var l=new o(i),u=0;ug[1]&&(g[1]=f)}return this._rawCount=this._count=s,{start:a,end:s}},t.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,r=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,l=z(o,(function(t){return t.property})),u=0;uy[1]&&(y[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},t.prototype.count=function(){return this._count},t.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=u&&x<=h||isNaN(x))&&(a[s++]=d),d++}p=!0}else if(2===r){f=c[i[0]];var y=c[i[1]],v=t[i[1]][0],m=t[i[1]][1];for(g=0;g=u&&x<=h||isNaN(x))&&(_>=v&&_<=m||isNaN(_))&&(a[s++]=d),d++}p=!0}}if(!p)if(1===r)for(g=0;g=u&&x<=h||isNaN(x))&&(a[s++]=b)}else for(g=0;gt[M][1])&&(w=!1)}w&&(a[s++]=e.getRawIndex(g))}return sy[1]&&(y[1]=g)}}}},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=this.clone([t],!0),a=o._chunks[t],s=this.count(),l=0,u=Math.floor(1/e),h=this.getRawIndex(0),c=new(jf(this._rawCount))(Math.min(2*(Math.ceil(s/u)+2),s));c[l++]=h;for(var p=1;pn&&(n=i,r=I)}M>0&&M<_-x&&(c[l++]=Math.min(S,r),r=Math.max(S,r)),c[l++]=r,h=r}return c[l++]=this.getRawIndex(s-1),o._count=l,o._indices=c,o.getRawIndex=this._getRawIdx,o},t.prototype.downSample=function(t,e,n,i){for(var r=this.clone([t],!0),o=r._chunks,a=[],s=Math.floor(1/e),l=o[t],u=this.count(),h=r._rawExtent[t]=[1/0,-1/0],c=new(jf(this._rawCount))(Math.ceil(u/s)),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r._updateGetRawIdx(),r},t.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,r=0,o=this.count();ra&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,r=0;r=0?this._indices[t]:-1},t.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},t.internalField=function(){function t(t,e,n,i){return If(t[i],this._dimensions[i])}Gf={arrayRows:t,objectRows:function(t,e,n,i){return If(t[e],this._dimensions[i])},keyedColumns:t,original:function(t,e,n,i){var r=t&&(null==t.value?t:t.value);return If(r instanceof Array?r[i]:r,this._dimensions[i])},typedArray:function(t,e,n,i){return t[i]}}}(),t}(),$f=function(){function t(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return t.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},t.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(Qf(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=$(a=o.get("data",!0))?Up:Wp,e=[];var h=this._getSourceMetaRawOption()||{},c=l&&l.metaRawOption||{},p=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=rt(h.sourceHeader,c.sourceHeader),f=rt(h.dimensions,c.dimensions);t=p!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||f?[tf(a,{seriesLayoutBy:p,sourceHeader:d,dimensions:f},s)]:[]}else{var g=n;if(r){var y=this._applyTransform(i);t=y.sourceList,e=y.upstreamSignList}else{t=[tf(g.get("source",!0),this._getSourceMetaRawOption(),null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&tg(o)}var a,s=[],l=[];return E(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||tg(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=To(t),r=i.length,o="";r||wo(o);for(var a=0,s=r;a1||n>0&&!t.noHeader;return E(t.blocks,(function(t){var n=lg(t);n>=e&&(e=n+ +(i&&(!n||ag(t)&&!t.noHeader)))})),e}return 0}function ug(t,e,n,i){var r,o=e.noHeader,a=(r=lg(e),{html:ig[r],richText:rg[r]}),s=[],l=e.blocks||[];lt(!l||Y(l)),l=l||[];var u=t.orderMode;if(e.sortBlocks&&u){l=l.slice();var h={valueAsc:"asc",valueDesc:"desc"};if(_t(h,u)){var c=new kf(h[u],null);l.sort((function(t,e){return c.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===u&&l.reverse()}E(l,(function(n,r){var o=e.valueFormatter,l=sg(n)(o?A(A({},t),{valueFormatter:o}):t,n,r>0?a.html:0,i);null!=l&&s.push(l)}));var p="richText"===t.renderMode?s.join(a.richText):pg(s.join(""),o?n:a.html);if(o)return p;var d=mp(e.header,"ordinal",t.useUTC),f=ng(i,t.renderMode).nameStyle;return"richText"===t.renderMode?dg(t,d,f)+a.richText+p:pg('
    '+re(d)+"
    "+p,n)}function hg(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=t.useUTC,h=e.valueFormatter||t.valueFormatter||function(t){return z(t=Y(t)?t:[t],(function(t,e){return mp(t,Y(d)?d[e]:d,u)}))};if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":mp(l,"ordinal",u),d=e.valueType,f=a?[]:h(e.value,e.dataIndex),g=!s||!o,y=!s&&o,v=ng(i,r),m=v.nameStyle,x=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":dg(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(Y(e)?e.join(" "):e,o)}(t,f,g,y,x)):pg((s?"":c)+(o?"":function(t,e,n){return''+re(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px",o=e?"float:right;margin-left:"+r:"";return t=Y(t)?t:[t],''+z(t,(function(t){return re(t)})).join("  ")+""}(f,g,y,x)),n)}}function cg(t,e,n,i,r,o){if(t)return sg(t)({useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e,valueFormatter:t.valueFormatter},t,0,o)}function pg(t,e){return'
    '+t+'
    '}function dg(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function fg(t,e){return Sp(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function gg(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var yg=function(){function t(){this.richTextStyles={},this._nextStyleNameId=mo()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=wp({color:e,type:t,renderMode:n,markerId:i});return U(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};Y(e)?E(e,(function(t){return A(n,t)})):A(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function vg(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=Y(c),d=fg(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=V(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(og("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?E(i,(function(t){h(mf(o,n,t),t)})):E(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=mf(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=No(o),v=y&&o.name||"",m=l.getName(a),x=s?v:m;return og("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[og("nameValue",{markerType:"item",markerColor:d,name:x,noName:!ut(x),value:e,valueType:n,dataIndex:a})].concat(i||[])})}var mg=Vo();function xg(t,e){return t.getName(e)||t.getId(e)}var _g="__universalTransitionEnabled",bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=wf({count:Sg,reset:Mg}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(mg(this).sourceManager=new $f(this)).prepareSource();var i=this.getInitialData(t,n);Tg(i,this),this.dataTask.context.data=i,mg(this).dataBeforeProcessed=i,wg(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Pp(this),i=n?Rp(t):{},r=this.subType;zp.hasClass(r)&&(r+="Series"),C(t,e.getTheme().get(this.subType)),C(t,this.getDefaultOption()),Co(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&Op(t,i,n)},e.prototype.mergeOption=function(t,e){t=C(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Pp(this);n&&Op(this.option,t,n);var i=mg(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);Tg(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,mg(this).dataBeforeProcessed=r,wg(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!$(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(e=!1),!!e},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=cd.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,r=this.getData(e);if("series"===i||"all"===n)return this.option.selectedMap={},void(this._selectedDataIndicesMap={});for(var o=0;o=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(e);return("all"===n||n[xg(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[_g])return!0;var t=this.option.universalTransition;return!!t&&(!0===t||t&&t.enabled)},e.prototype._innerSelect=function(t,e){var n,i,r=this.option,o=r.selectedMode,a=e.length;if(o&&a)if("series"===o)r.selectedMap="all";else if("multiple"===o){q(r.selectedMap)||(r.selectedMap={});for(var s=r.selectedMap,l=0;l0&&this._innerSelect(t,e)}},e.registerClass=function(t){return zp.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(zp);function wg(t){var e=t.name;No(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return E(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function Sg(t){return t.model.getRawData().count()}function Mg(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),Ig}function Ig(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function Tg(t,e){E(vt(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,H(Cg,e))}))}function Cg(t,e){var n=Dg(t);return n&&n.setOutputEnd((e||this).count()),e}function Dg(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}R(bg,_f),R(bg,cd),Jo(bg,zp);var Ag=function(){function t(){this.group=new Br,this.uid=Ac("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.toggleBlurSeries=function(t,e,n){},t.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},t}();function kg(){var t=Vo();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}$o(Ag),na(Ag);var Lg=Vo(),Pg=kg(),Og=function(){function t(){this.group=new Br,this.uid=Ac("viewChart"),this.renderTask=wf({plan:Eg,reset:zg}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){0},t.prototype.highlight=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Ng(r,i,"emphasis")},t.prototype.downplay=function(t,e,n,i){var r=t.getData(i&&i.dataType);r&&Ng(r,i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.eachRendered=function(t){Jh(this.group,t)},t.markUpdateMethod=function(t,e){Lg(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function Rg(t,e,n){t&&Ql(t)&&("emphasis"===e?Ol:Rl)(t,n)}function Ng(t,e,n){var i=zo(t,e),r=e&&null!=e.highlightKey?function(t){var e=sl[t];return null==e&&al<=32&&(e=sl[t]=al++),e}(e.highlightKey):null;null!=i?E(To(i),(function(e){Rg(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){Rg(t,n,r)}))}function Eg(t){return Pg(t.model)}function zg(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&Lg(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),Vg[l]}$o(Og),na(Og);var Vg={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},Bg="\0__throttleOriginMethod",Fg="\0__throttleRate",Gg="\0__throttleType";function Wg(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function Hg(t,e,n,i){var r=t[e];if(r){var o=r[Bg]||r,a=r[Gg];if(r[Fg]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=Wg(o,n,"debounce"===i))[Bg]=o,r[Gg]=i,r[Fg]=n}return r}}function Yg(t,e){var n=t[e];n&&n[Bg]&&(n.clear&&n.clear(),t[e]=n[Bg])}var Xg=Vo(),Ug={itemStyle:ia(Mc,!0),lineStyle:ia(bc,!0)},Zg={lineStyle:"stroke",itemStyle:"fill"};function jg(t,e){var n=t.visualStyleMapper||Ug[e];return n||(console.warn("Unknown style type '"+e+"'."),Ug.itemStyle)}function qg(t,e){var n=t.visualDrawType||Zg[e];return n||(console.warn("Unknown style type '"+e+"'."),"fill")}var Kg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=jg(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=qg(t,i),l=o[s],u=X(l)?l:null,h="auto"===o.fill||"auto"===o.stroke;if(!o[s]||u||h){var c=t.getColorFromPalette(t.name,null,e.getSeriesCount());o[s]||(o[s]=c,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||X(o.fill)?c:o.fill,o.stroke="auto"===o.stroke||X(o.stroke)?c:o.stroke}if(n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=A({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},$g=new Cc,Jg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=jg(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){$g.option=n[i];var a=r($g);A(t.ensureUniqueItemVisual(e,"style"),a),$g.option.decal&&(t.setItemVisual(e,"decal",$g.option.decal),$g.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Qg={performRawSeries:!0,overallReset:function(t){var e=yt();t.eachSeries((function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,r=e.get(i);r||(r={},e.set(i,r)),Xg(t).scope=r}})),t.eachSeries((function(e){if(!e.isColorBySeries()&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Xg(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=qg(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},ty=Math.PI;var ey=function(){function t(t,e,n,i){this._stageTaskMap=yt(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=yt();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;E(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";lt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}E(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=yt(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||wf({plan:ay,reset:sy,count:hy}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||wf({reset:ny});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=yt(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,wf({reset:iy,onDirty:oy})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}lt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,E(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return X(t)&&(t={overallReset:t,seriesType:cy(t)}),t.uid=Ac("stageHandler"),e&&(t.visualType=e),t},t}();function ny(t){t.overallReset(t.ecModel,t.api,t.payload)}function iy(t){return t.overallProgress&&ry}function ry(){this.agent.dirty(),this.getDownstream().dirty()}function oy(){this.agent&&this.agent.dirty()}function ay(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function sy(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=To(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?z(e,(function(t,e){return uy(e)})):ly}var ly=uy(0);function uy(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),My=["symbol","symbolSize","symbolRotate","symbolOffset"],Iy=My.concat(["symbolKeepAspect"]),Ty={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendIcon&&n.setVisual("legendIcon",t.legendIcon),t.hasSymbolVisual){for(var i={},r={},o=!1,a=0;a=0&&jy(l)?l:.5,t.createRadialGradient(a,s,0,a,s,l)}(t,e,n):function(t,e,n){var i=null==e.x?0:e.x,r=null==e.x2?1:e.x2,o=null==e.y?0:e.y,a=null==e.y2?0:e.y2;return e.global||(i=i*n.width+n.x,r=r*n.width+n.x,o=o*n.height+n.y,a=a*n.height+n.y),i=jy(i)?i:0,r=jy(r)?r:1,o=jy(o)?o:0,a=jy(a)?a:0,t.createLinearGradient(i,o,r,a)}(t,e,n),r=e.colorStops,o=0;o0&&(e=i.lineDash,n=i.lineWidth,e&&"solid"!==e&&n>0?"dashed"===e?[4*n,2*n]:"dotted"===e?[n]:j(e)?[e]:Y(e)?e:null:null),o=i.lineDashOffset;if(r){var a=i.strokeNoScale&&t.getLineScale?t.getLineScale():1;a&&1!==a&&(r=z(r,(function(t){return t/a})),o/=a)}return[r,o]}var Qy=new hs(!0);function tv(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function ev(t){return"string"==typeof t&&"none"!==t}function nv(t){var e=t.fill;return null!=e&&"none"!==e}function iv(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function rv(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function ov(t,e,n){var i=la(e.image,e.__image,n);if(ha(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix&&r&&r.setTransform){var o=new DOMMatrix;o.translateSelf(e.x||0,e.y||0),o.rotateSelf(0,0,(e.rotation||0)*wt),o.scaleSelf(e.scaleX||1,e.scaleY||1),r.setTransform(o)}return r}}var av=["shadowBlur","shadowOffsetX","shadowOffsetY"],sv=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function lv(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;if(i||e.opacity!==n.opacity){cv(t,r),o=!0;var a=Math.max(Math.min(e.opacity,1),0);t.globalAlpha=isNaN(a)?Ma.opacity:a}(i||e.blend!==n.blend)&&(o||(cv(t,r),o=!0),t.globalCompositeOperation=e.blend||Ma.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,e,n){if(!this[Dv])if(this._disposed)om(this.id);else{var i,r,o;if(q(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this[Dv]=!0,!this._model||e){var a=new Md(this._api),s=this._theme,l=this._model=new gd;l.scheduler=this._scheduler,l.ssr=this._ssr,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},um);var u={seriesTransition:o,optionChanged:!0};if(n)this[Av]={silent:i,updateParams:u},this[Dv]=!1,this.getZr().wakeUp();else{try{Ev(this),Bv.update.call(this,null,u)}catch(t){throw this[Av]=null,this[Dv]=!1,t}this._ssr||this._zr.flush(),this[Av]=null,this[Dv]=!1,Hv.call(this,i),Yv.call(this,i)}}},e.prototype.setTheme=function(){bo()},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||r.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var e=this._zr.painter;return e.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var e=this._zr.painter;return e.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(r.svgSupported){var t=this._zr;return E(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;E(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return E(i,(function(t){t.group.ignore=!1})),o}om(this.id)},e.prototype.getConnectedDataURL=function(t){if(!this._disposed){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(fm[n]){var a=o,s=o,l=-1/0,u=-1/0,c=[],p=t&&t.pixelRatio||this.getDevicePixelRatio();E(dm,(function(o,h){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.renderToCanvas(T(t)),d=o.getDom().getBoundingClientRect();a=i(d.left,a),s=i(d.top,s),l=r(d.right,l),u=r(d.bottom,u),c.push({dom:p,left:d.left,top:d.top})}}));var d=(l*=p)-(a*=p),f=(u*=p)-(s*=p),g=h.createCanvas(),y=Yr(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return E(c,(function(t){var e=t.left-a,n=t.top-s;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new Ws({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),E(c,(function(t){var e=new Ns({style:{x:t.left*p-a,y:t.top*p-s,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}om(this.id)},e.prototype.convertToPixel=function(t,e){return Fv(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Fv(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return E(Fo(this._model,t),(function(t,i){i.indexOf("Models")>=0&&E(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;om(this.id)},e.prototype.getVisual=function(t,e){var n=Fo(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?Dy(r,o,e):Ay(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;E(rm,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Oy(o,(function(t){var e=rl(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType,o)||{},!0}if(e.eventData)return n=A({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),E(sm,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),E(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?(Py("map","selectchanged",e,i,t),Py("pie","selectchanged",e,i,t)):"select"===t.fromAction?(Py("map","selected",e,i,t),Py("pie","selected",e,i,t)):"unselect"===t.fromAction&&(Py("map","unselected",e,i,t),Py("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?om(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)om(this.id);else{this._disposed=!0,this.getDom()&&Xo(this.getDom(),vm,"");var t=this,e=t._api,n=t._model;E(t._componentsViews,(function(t){t.dispose(n,e)})),E(t._chartsViews,(function(t){t.dispose(n,e)})),t._zr.dispose(),t._dom=t._model=t._chartsMap=t._componentsMap=t._chartsViews=t._componentsViews=t._scheduler=t._api=t._zr=t._throttledZrFlush=t._theme=t._coordSysMgr=t._messageCenter=null,delete dm[t.id]}},e.prototype.resize=function(t){if(!this[Dv])if(this._disposed)om(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this[Av]&&(null==i&&(i=this[Av].silent),n=!0,this[Av]=null),this[Dv]=!0;try{n&&Ev(this),Bv.update.call(this,{type:"resize",animation:A({duration:0},t&&t.animation)})}catch(t){throw this[Dv]=!1,t}this[Dv]=!1,Hv.call(this,i),Yv.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)om(this.id);else if(q(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),pm[t]){var n=pm[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?om(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=A({},t);return e.type=sm[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)om(this.id);else if(q(e)||(e={silent:!!e}),am[t.type]&&this._model)if(this[Dv])this._pendingActions.push(t);else{var n=e.silent;Wv.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&r.browser.weChat&&this._throttledZrFlush(),Hv.call(this,n),Yv.call(this,n)}},e.prototype.updateLabelLayout=function(){wv.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed)om(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){t.clearColorPalette(),t.eachSeries((function(t){t.clearColorPalette()}))}function e(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.eachRendered((function(t){if(t.states&&t.states.emphasis){if(xh(t))return;if(t instanceof ks&&function(t){var e=ll(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(t),t.__dirty){var n=t.prevStates;n&&t.useStates(n)}if(r){t.stateTransition=a;var i=t.getTextContent(),o=t.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}t.__dirty&&e(t)}}))}Ev=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),zv(t,!0),zv(t,!1),e.plan()},zv=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!r.node&&!r.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.eachRendered((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,e),wv.trigger("series:afterupdate",e,n,l)},Jv=function(t){t[kv]=!0,t.getZr().wakeUp()},Qv=function(t){t[kv]&&(t.getZr().storage.traverse((function(t){xh(t)||e(t)})),t[kv]=!1)},Kv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){Ol(e,n),Jv(t)},i.prototype.leaveEmphasis=function(e,n){Rl(e,n),Jv(t)},i.prototype.enterBlur=function(e){Nl(e),Jv(t)},i.prototype.leaveBlur=function(e){El(e),Jv(t)},i.prototype.enterSelect=function(e){zl(e),Jv(t)},i.prototype.leaveSelect=function(e){Vl(e),Jv(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(_d))(t)},$v=function(t){function e(t,e){for(var n=0;n=0)){Lm.push(n);var o=ey.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Om(t,e){pm[t]=e}function Rm(t,e,n){var i=Mv("registerMap");i&&i(t,e,n)}var Nm=function(t){var e=(t=T(t)).type,n="";e||wo(n);var i=e.split(":");2!==i.length&&wo(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Vf.set(e,t)};km(Iv,Kg),km(Tv,Jg),km(Tv,Qg),km(Iv,Ty),km(Tv,Cy),km(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=mv(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=mv(r,e)}}))})),wm(Xd),Sm(900,(function(t){var e=yt();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Ud)})),Om("default",(function(t,e){k(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Br,i=new Ws({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new Xs({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Ws({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new nh({shape:{startAngle:-ty/2,endAngle:-ty/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*ty/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*ty/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Cm({type:dl,event:dl,update:dl},bt),Cm({type:fl,event:fl,update:fl},bt),Cm({type:gl,event:gl,update:gl},bt),Cm({type:yl,event:yl,update:yl},bt),Cm({type:vl,event:vl,update:vl},bt),bm("light",vy),bm("dark",wy);var Em=[],zm={registerPreprocessor:wm,registerProcessor:Sm,registerPostInit:Mm,registerPostUpdate:Im,registerUpdateLifecycle:Tm,registerAction:Cm,registerCoordinateSystem:Dm,registerLayout:Am,registerVisual:km,registerTransform:Nm,registerLoading:Om,registerMap:Rm,registerImpl:function(t,e){Sv[t]=e},PRIORITY:Cv,ComponentModel:zp,ComponentView:Ag,SeriesModel:bg,ChartView:Og,registerComponentModel:function(t){zp.registerClass(t)},registerComponentView:function(t){Ag.registerClass(t)},registerSeriesModel:function(t){bg.registerClass(t)},registerChartView:function(t){Og.registerClass(t)},registerSubTypeDefaulter:function(t,e){zp.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Xr(t,e)}};function Vm(t){Y(t)?E(t,(function(t){Vm(t)})):P(Em,t)>=0||(Em.push(t),X(t)&&(t={install:t}),t.install(zm))}function Bm(t){return null==t?0:t.length||1}function Fm(t){return t}var Gm=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||Fm,this._newKeyGetter=i||Fm,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;a30}var Qm,tx,ex,nx,ix,rx,ox,ax=q,sx=z,lx="undefined"==typeof Int32Array?Array:Int32Array,ux=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],hx=["_approximateExtent"],cx=function(){function t(t,e){var n;this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var i=!1;qm(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var r={},o=[],a={},s=!1,l={},u=0;u=e)){var n=this._store.getProvider();this._updateOrdinalMeta();var i=this._nameList,r=this._idList;if(n.getSource().sourceFormat===Wp&&!n.pure)for(var o=[],a=t;a0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(Y(r=this.getVisual(e))?r=r.slice():ax(r)&&(r=A({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,ax(e)?A(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){ax(t)?A(this._layout,t):this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?A(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;ol(n,this.dataType,t,e),this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){E(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){return e||(e=new t(this._schema?this._schema:sx(this.dimensions,this._getDimInfo,this),this.hostModel)),ix(e,this),e._store=this._store,e},t.prototype.wrapMethod=function(t,e){var n=this[t];X(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var t=n.apply(this,arguments);return e.apply(this,[t].concat(at(arguments)))})},t.internalField=(Qm=function(t){var e=t._invertedIndicesMap;E(e,(function(n,i){var r=t._dimInfos[i],o=r.ordinalMeta,a=t._store;if(o){n=e[i]=new lx(o.categories.length);for(var s=0;s1&&(s+="__ec__"+u),i[e]=s}})),t}();function px(t,e){Qd(t)||(t=ef(t));var n=(e=e||{}).coordDimensions||[],i=e.dimensionsDefine||t.dimensionsDefine||[],r=yt(),o=[],a=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return E(e,(function(t){var e;q(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(t,n,i,e.dimensionsCount),s=e.canOmitUnusedDimensions&&Jm(a),l=i===t.dimensionsDefine,u=l?$m(t):Km(i),h=e.encodeDefine;!h&&e.encodeDefaulter&&(h=e.encodeDefaulter(t,a));for(var c=yt(h),p=new Xf(a),d=0;d0&&(i.name=r+(o-1)),o++,e.set(r,o)}}(o),new jm({source:t,dimensions:o,fullDimensionCount:a,dimensionOmitted:s})}function dx(t,e,n){if(n||e.hasKey(t)){for(var i=0;e.hasKey(t+i);)i++;t+=i}return e.set(t,!0),t}var fx=function(t){this.coordSysDims=[],this.axisMap=yt(),this.categoryAxisMap=yt(),this.coordSysName=t};var gx={cartesian2d:function(t,e,n,i){var r=t.getReferringComponents("xAxis",Wo).models[0],o=t.getReferringComponents("yAxis",Wo).models[0];e.coordSysDims=["x","y"],n.set("x",r),n.set("y",o),yx(r)&&(i.set("x",r),e.firstCategoryDimIndex=0),yx(o)&&(i.set("y",o),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},singleAxis:function(t,e,n,i){var r=t.getReferringComponents("singleAxis",Wo).models[0];e.coordSysDims=["single"],n.set("single",r),yx(r)&&(i.set("single",r),e.firstCategoryDimIndex=0)},polar:function(t,e,n,i){var r=t.getReferringComponents("polar",Wo).models[0],o=r.findAxisModel("radiusAxis"),a=r.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],n.set("radius",o),n.set("angle",a),yx(o)&&(i.set("radius",o),e.firstCategoryDimIndex=0),yx(a)&&(i.set("angle",a),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=1))},geo:function(t,e,n,i){e.coordSysDims=["lng","lat"]},parallel:function(t,e,n,i){var r=t.ecModel,o=r.getComponent("parallel",t.get("parallelIndex")),a=e.coordSysDims=o.dimensions.slice();E(o.parallelAxisIndex,(function(t,o){var s=r.getComponent("parallelAxis",t),l=a[o];n.set(l,s),yx(s)&&(i.set(l,s),null==e.firstCategoryDimIndex&&(e.firstCategoryDimIndex=o))}))}};function yx(t){return"category"===t.get("type")}function vx(t,e,n){var i,r,o,a=(n=n||{}).byIndex,s=n.stackedCoordDimension;!function(t){return!qm(t.schema)}(e)?(r=e.schema,i=r.dimensions,o=e.store):i=e;var l,u,h,c,p=!(!t||!t.get("stack"));if(E(i,(function(t,e){U(t)&&(i[e]=t={name:t}),p&&!t.isExtraCoord&&(a||l||!t.ordinalMeta||(l=t),u||"ordinal"===t.type||"time"===t.type||s&&s!==t.coordDim||(u=t))})),!u||a||l||(a=!0),u){h="__\0ecstackresult_"+t.id,c="__\0ecstackedover_"+t.id,l&&(l.createInvertedIndices=!0);var d=u.coordDim,f=u.type,g=0;E(i,(function(t){t.coordDim===d&&g++}));var y={name:h,coordDim:d,coordDimIndex:g,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},v={name:c,coordDim:c,coordDimIndex:g+1,type:f,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};r?(o&&(y.storeDimIndex=o.ensureCalculationDimension(c,f),v.storeDimIndex=o.ensureCalculationDimension(h,f)),r.appendCalculationDimension(y),r.appendCalculationDimension(v)):(i.push(y),i.push(v))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:a,stackedOverDimension:c,stackResultDimension:h}}function mx(t,e){return!!e&&e===t.getCalculationInfo("stackedDimension")}function xx(t,e){return mx(t,e)?t.getCalculationInfo("stackResultDimension"):e}function _x(t,e,n){n=n||{};var i,r=e.getSourceManager(),o=!1;t?(o=!0,i=ef(t)):o=(i=r.getSource()).sourceFormat===Wp;var a=function(t){var e=t.get("coordinateSystem"),n=new fx(e),i=gx[e];if(i)return i(t,n,n.axisMap,n.categoryAxisMap),n}(e),s=function(t,e){var n,i=t.get("coordinateSystem"),r=wd.get(i);return e&&e.coordSysDims&&(n=z(e.coordSysDims,(function(t){var n={name:t},i=e.axisMap.get(t);if(i){var r=i.get("type");n.type=Ym(r)}return n}))),n||(n=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||["x","y"]),n}(e,a),l=n.useEncodeDefaulter,u=X(l)?l:l?H(td,s,e):null,h=px(i,{coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!o}),c=function(t,e,n){var i,r;return n&&E(t,(function(t,o){var a=t.coordDim,s=n.categoryAxisMap.get(a);s&&(null==i&&(i=o),t.ordinalMeta=s.getOrdinalMeta(),e&&(t.createInvertedIndices=!0)),null!=t.otherDims.itemName&&(r=!0)})),r||null==i||(t[i].otherDims.itemName=0),i}(h.dimensions,n.createInvertedIndices,a),p=o?null:r.getSharedDataStore(h),d=vx(e,{schema:h,store:p}),f=new cx(h,e);f.setCalculationInfo(d);var g=null!=c&&function(t){if(t.sourceFormat===Wp){var e=function(t){var e=0;for(;ee[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();na(bx);var Sx=0,Mx=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++Sx}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&z(i,Ix);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!U(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=yt(this.categories))},t}();function Ix(t){return q(t)&&null!=t.value?t.value:t+""}function Tx(t){return"interval"===t.type||"log"===t.type}function Cx(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=po(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=Ax(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),kx(t,0,e),kx(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[Jr(Math.ceil(t[0]/a)*a,s),Jr(Math.floor(t[1]/a)*a,s)],t),r}function Dx(t){var e=Math.pow(10,co(t)),n=t/e;return n?2===n?n=3:3===n?n=5:n*=2:n=1,Jr(n*e)}function Ax(t){return to(t)+2}function kx(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Lx(t,e){return t>=e[0]&&t<=e[1]}function Px(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Ox(t,e){return t*(e[1]-e[0])+e[0]}var Rx=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Mx({})),Y(i)&&(i=new Mx({categories:z(i,(function(t){return q(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return null==t?NaN:U(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Lx(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return Px(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Ox(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(bx);bx.registerClass(Rx);var Nx=Jr,Ex=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lx(t,this._extent)},e.prototype.normalize=function(t){return Px(t,this._extent)},e.prototype.scale=function(t){return Ox(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=Ax(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:Nx(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return E(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=$r(t.get("barWidth"),i),d=$r(t.get("barMaxWidth"),i),f=$r(t.get("barMinWidth")||(qx(t)?.5:1),i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:Wx(r),stackId:Gx(t)})})),Xx(n)}function Xx(t){var e={};E(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return E(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=G(i).length;o=Math.max(35-4*a,15)+"%"}var s=$r(o,r),l=$r(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),E(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;E(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;E(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function Ux(t,e){var n=Hx(t,e),i=Yx(n);E(n,(function(t){var e=t.getData(),n=t.coordinateSystem.getBaseAxis(),r=Gx(t),o=i[Wx(n)][r],a=o.offset,s=o.width;e.setLayout({bandWidth:o.bandWidth,offset:a,size:s})}))}function Zx(t){return{seriesType:t,plan:kg(),reset:function(t){if(jx(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),r=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(r.dim)),a=e.getDimensionIndex(e.mapDimension(i.dim)),s=t.get("showBackground",!0),l=e.mapDimension(r.dim),u=e.getCalculationInfo("stackResultDimension"),h=mx(e,l)&&!!e.getCalculationInfo("stackedOnSeries"),c=r.isHorizontal(),p=function(t,e){var n=e.model.get("startValue");n||(n=0);return e.toGlobalCoord(e.dataToCoord("log"===e.type?n>0?n:1:n))}(0,r),d=qx(t),f=t.get("barMinHeight")||0,g=u&&e.getDimensionIndex(u),y=e.getLayout("size"),v=e.getLayout("offset");return{progress:function(t,e){for(var i,r=t.count,l=d&&Bx(3*r),u=d&&s&&Bx(3*r),m=d&&Bx(r),x=n.master.getRect(),_=c?x.width:x.height,b=e.getStore(),w=0;null!=(i=t.next());){var S=b.get(h?g:o,i),M=b.get(a,i),I=p,T=void 0;h&&(T=+S-b.get(o,i));var C=void 0,D=void 0,A=void 0,k=void 0;if(c){var L=n.dataToPoint([S,M]);if(h)I=n.dataToPoint([T,M])[0];C=I,D=L[1]+v,A=L[0]-I,k=y,Math.abs(A)0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(Y(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Jc(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(){var t=this._interval,e=this._extent,n=[];if(!t)return n;n.push({value:e[0],level:0});var i=this.getSetting("useUTC"),r=function(t,e,n,i){var r=1e4,o=jc,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var x=B(z(u,(function(t){return B(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),_=[],b=x.length-1;for(d=0;dn&&(this._approxInterval=n);var o=$x.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function Qx(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function t_(t){return(t/=Gc)>12?12:t>6?6:t>3.5?4:t>2?2:1}function e_(t,e){return(t/=e?Fc:Bc)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function n_(t){return po(t,!0)}function i_(t,e,n){var i=new Date(t);switch(Kc(e)){case"year":case"month":i[up(n)](0);case"day":i[hp(n)](1);case"hour":i[cp(n)](0);case"minute":i[pp(n)](0);case"second":i[dp(n)](0),i[fp(n)](0)}return i.getTime()}bx.registerClass(Kx);var r_=bx.prototype,o_=Ex.prototype,a_=Jr,s_=Math.floor,l_=Math.ceil,u_=Math.pow,h_=Math.log,c_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new Ex,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return z(o_.getTicks.call(this,t),(function(t){var e=t.value,r=Jr(u_(this.base,e));return r=e===n[0]&&this._fixMin?d_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?d_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=h_(this.base);t=h_(Math.max(0,t))/n,e=h_(Math.max(0,e))/n,o_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=r_.getExtent.call(this);e[0]=u_(t,e[0]),e[1]=u_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=d_(e[0],n[0])),this._fixMax&&(e[1]=d_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=h_(t[0])/h_(e),t[1]=h_(t[1])/h_(e),r_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.calcNiceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=ho(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[Jr(l_(e[0]/i)*i),Jr(s_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.calcNiceExtent=function(t){o_.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lx(t=h_(t)/h_(this.base),this._extent)},e.prototype.normalize=function(t){return Px(t=h_(t)/h_(this.base),this._extent)},e.prototype.scale=function(t){return t=Ox(t,this._extent),u_(this.base,t)},e.type="log",e}(bx),p_=c_.prototype;function d_(t,e){return a_(t,to(e))}p_.getMinorTicks=o_.getMinorTicks,p_.getLabel=o_.getLabel,bx.registerClass(c_);var f_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[y_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=g_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),g_={min:"_determinedMin",max:"_determinedMax"},y_={min:"_dataMin",max:"_dataMax"};function v_(t,e,n){var i=t.rawExtentInfo;return i||(i=new f_(t,e,n),t.rawExtentInfo=i,i)}function m_(t,e){return null==e?null:nt(e)?NaN:t.parse(e)}function x_(t,e){var n=t.type,i=v_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=Hx("bar",a),l=!1;if(E(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=Yx(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=function(t,e,n){if(t&&e){var i=t[Wx(e)];return null!=i&&null!=n?i[Gx(n)]:i}}(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;E(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;E(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return e+=c*(l/u),t-=c*(s/u),{min:t,max:e}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function __(t,e){var n=e,i=x_(t,n),r=i.extent,o=n.get("splitNumber");t instanceof c_&&(t.base=n.get("logBase"));var a=t.type,s=n.get("interval"),l="interval"===a||"time"===a;t.setExtent(r[0],r[1]),t.calcNiceExtent({splitNumber:o,fixMin:i.fixMin,fixMax:i.fixMax,minInterval:l?n.get("minInterval"):null,maxInterval:l?n.get("maxInterval"):null}),null!=s&&t.setInterval&&t.setInterval(s)}function b_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Rx({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new Kx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(bx.getClass(e)||Ex)}}function w_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):U(i)?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):X(i)?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(S_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function S_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function M_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new ze(t.x,t.y,o,a)}function I_(t){var e=t.get("interval");return null==e?"auto":e}function T_(t){return"category"===t.type&&0===I_(t.getLabelModel())}function C_(t,e){var n={};return E(t.mapDimensionsAll(e),(function(e){n[xx(t,e)]=!0})),G(n)}var D_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var A_={isDimensionStacked:mx,enableDataStack:vx,getStackedDimension:xx};var k_=Object.freeze({__proto__:null,createList:function(t){return _x(null,t)},getLayoutRect:kp,dataStack:A_,createScale:function(t,e){var n=e;e instanceof Cc||(n=new Cc(e));var i=b_(n);return i.setExtent(t[0],t[1]),__(i,n),i},mixinAxisModelCommonMethods:function(t){R(t,D_)},getECData:rl,createTextStyle:function(t,e){return oc(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:function(t,e){return px(t,e).dimensions},createSymbol:Xy,enableHoverEmphasis:Ul});function L_(t,e){return Math.abs(t-e)<1e-8}function P_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;on&&(t=r,n=a)}if(t)return function(t){for(var e=0,n=0,i=0,r=t.length,o=t[r-1][0],a=t[r-1][1],s=0;s>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function H_(t,e){return z(B((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;return null==n&&(n=1024),E(e.features,(function(t){var e=t.geometry,i=e.encodeOffsets,r=e.coordinates;if(i)switch(e.type){case"LineString":e.coordinates=W_(r,i,n);break;case"Polygon":case"MultiLineString":G_(r,i,n);break;case"MultiPolygon":E(r,(function(t,e){return G_(t,i[e],n)}))}})),e.UTF8Encoding=!1,e}(t)).features,(function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0})),(function(t){var n=t.properties,i=t.geometry,r=[];switch(i.type){case"Polygon":var o=i.coordinates;r.push(new z_(o[0],o.slice(1)));break;case"MultiPolygon":E(i.coordinates,(function(t){t[0]&&r.push(new z_(t[0],t.slice(1)))}));break;case"LineString":r.push(new V_([i.coordinates]));break;case"MultiLineString":r.push(new V_(i.coordinates))}var a=new B_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var Y_=Object.freeze({__proto__:null,linearMap:Kr,round:Jr,asc:Qr,getPrecision:to,getPrecisionSafe:eo,getPixelPrecision:no,getPercentWithPrecision:function(t,e,n){return t[e]&&io(t,n)[e]||0},MAX_SAFE_INTEGER:oo,remRadian:ao,isRadianAroundZero:so,parseDate:uo,quantity:ho,quantityExponent:co,nice:po,quantile:fo,reformIntervals:go,isNumeric:vo,numericToNumber:yo}),X_=Object.freeze({__proto__:null,parse:uo,format:Jc}),U_=Object.freeze({__proto__:null,extendShape:Ch,extendPath:Ah,makePath:Ph,makeImage:Oh,mergePath:Nh,resizePath:Eh,createIcon:Uh,updateProps:vh,initProps:mh,getTransform:Bh,clipPointsByRect:Yh,clipRectByRect:Xh,registerShape:kh,getShapeClass:Lh,Group:Br,Image:Ns,Text:Xs,Circle:Su,Ellipse:Iu,Sector:Fu,Ring:Wu,Polygon:Xu,Polyline:Zu,Rect:Ws,Line:Ku,BezierCurve:th,Arc:nh,IncrementalDisplayable:dh,CompoundPath:ih,LinearGradient:oh,RadialGradient:ah,BoundingRect:ze}),Z_=Object.freeze({__proto__:null,addCommas:gp,toCamelCase:yp,normalizeCssArray:vp,encodeHTML:re,formatTpl:bp,getTooltipMarker:wp,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=uo(e),r=n?"getUTC":"get",o=i[r+"FullYear"](),a=i[r+"Month"]()+1,s=i[r+"Date"](),l=i[r+"Hours"](),u=i[r+"Minutes"](),h=i[r+"Seconds"](),c=i[r+"Milliseconds"]();return t=t.replace("MM",qc(a,2)).replace("M",a).replace("yyyy",o).replace("yy",qc(o%100+"",2)).replace("dd",qc(s,2)).replace("d",s).replace("hh",qc(l,2)).replace("h",l).replace("mm",qc(u,2)).replace("m",u).replace("ss",qc(h,2)).replace("s",h).replace("SSS",qc(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:pa,getTextRect:function(t,e,n,i,r,o,a,s){return new Xs({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),j_=Object.freeze({__proto__:null,map:z,each:E,indexOf:P,inherits:O,reduce:V,filter:B,bind:W,curry:H,isArray:Y,isString:U,isObject:q,isFunction:X,extend:A,defaults:k,clone:T,merge:C}),q_=Vo();function K_(t,e){var n=z(e,(function(e){return t.scale.parse(e)}));return"time"===t.type&&n.length>0&&(n.sort(),n.unshift(n[0]),n.push(n[n.length-1])),n}function $_(t){var e=t.getLabelModel().get("customValues");if(e){var n=w_(t);return{labels:K_(t,e).map((function(e){var i={value:e};return{formattedLabel:n(i),rawLabel:t.scale.getLabel(i),tickValue:e}}))}}return"category"===t.type?function(t){var e=t.getLabelModel(),n=Q_(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=w_(t);return{labels:z(e,(function(e,i){return{level:e.level,formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function J_(t,e){var n=t.getTickModel().get("customValues");return n?{ticks:K_(t,n)}:"category"===t.type?function(t,e){var n,i,r=tb(t,"ticks"),o=I_(e),a=eb(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(X(o))n=rb(t,o,!0);else if("auto"===o){var s=Q_(t,t.getLabelModel());i=s.labelCategoryInterval,n=z(s.labels,(function(t){return t.tickValue}))}else n=ib(t,i=o,!0);return nb(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:z(t.scale.getTicks(),(function(t){return t.value}))}}function Q_(t,e){var n,i,r=tb(t,"labels"),o=I_(e),a=eb(r,o);return a||(X(o)?n=rb(t,o):(i="auto"===o?function(t){var e=q_(t).autoInterval;return null!=e?e:q_(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=ib(t,i)),nb(r,o,{labels:n,labelCategoryInterval:i}))}function tb(t,e){return q_(t)[e]||(q_(t)[e]=[])}function eb(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=T_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function rb(t,e,n){var i=t.scale,r=w_(t),o=[];return E(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var ob=[0,1],ab=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return no(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&sb(n=n.slice(),i.count()),Kr(t,ob,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&sb(n=n.slice(),i.count());var r=Kr(t,n,ob,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=z(J_(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[1]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;E(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=Jr(t),e=Jr(e),h?t>e:t0&&t<100||(t=5),z(this.scale.getMinorTicks(t),(function(t){return z(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return $_(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=w_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=Sr(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var x=Math.max(0,Math.floor(Math.min(v,m))),_=q_(t.model),b=t.getExtent(),w=_.lastAutoInterval,S=_.lastTickCount;return null!=w&&null!=S&&Math.abs(w-x)<=1&&Math.abs(S-a)<=1&&w>x&&_.axisExtent0===b[0]&&_.axisExtent1===b[1]?x=w:(_.lastTickCount=a,_.lastAutoInterval=x,_.axisExtent0=b[0],_.axisExtent1=b[1]),x}(this)},t}();function sb(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}var lb=2*Math.PI,ub=hs.CMD,hb=["top","right","bottom","left"];function cb(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function pb(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%lb<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=gs(r),r=gs(p)}else i=gs(i),r=gs(r);i>r&&(r+=lb);var d=Math.atan2(s,a);if(d<0&&(d+=lb),d>=i&&d<=r||d+lb>=i&&d+lb<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),x=(y-a)*(y-a)+(v-s)*(v-s);return m0){e=e/180*Math.PI,mb.fromArray(t[0]),xb.fromArray(t[1]),_b.fromArray(t[2]),De.sub(bb,mb,xb),De.sub(wb,_b,xb);var n=bb.len(),i=wb.len();if(!(n<.001||i<.001)){bb.scale(1/n),wb.scale(1/i);var r=bb.dot(wb);if(Math.cos(e)1&&De.copy(Ib,_b),Ib.toArray(t[1])}}}}function Cb(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,mb.fromArray(t[0]),xb.fromArray(t[1]),_b.fromArray(t[2]),De.sub(bb,xb,mb),De.sub(wb,_b,xb);var i=bb.len(),r=wb.len();if(!(i<.001||r<.001))if(bb.scale(1/i),wb.scale(1/r),bb.dot(e)=a)De.copy(Ib,_b);else{Ib.scaleAndAdd(wb,o/Math.tan(Math.PI/2-s));var l=_b.x!==xb.x?(Ib.x-xb.x)/(_b.x-xb.x):(Ib.y-xb.y)/(_b.y-xb.y);if(isNaN(l))return;l<0?De.copy(Ib,xb):l>1&&De.copy(Ib,_b)}Ib.toArray(t[1])}}}function Db(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Ab(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Vt(i[0],i[1]),o=Vt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Gt([],i[1],i[0],a/r),l=Gt([],i[1],i[2],a/o),u=Gt([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&_(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),x(f,g,1),x(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function x(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){_(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function _(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){_(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?_(n,0,i+1):_(-n,a-i-1,a),(t-=n)<=0)return}}function Rb(t,e,n,i){return Ob(t,"y","height",e,n,i)}function Nb(t){var e=[];t.sort((function(t,e){return e.priority-t.priority}));var n=new ze(0,0,0,0);function i(t){if(!t.ignore){var e=t.ensureState("emphasis");null==e.ignore&&(e.ignore=!1)}t.ignore=!0}for(var r=0;r=0&&n.attr(d.oldLayoutSelect),P(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),vh(n,s,e,a)}else if(n.attr(s),!pc(n).valueAnimation){var h=rt(n.style.opacity,1);n.style.opacity=0,mh(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Wb(c,s,Hb),Wb(c,n.states.select,Hb)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Wb(p,s,Hb),Wb(p,n.states.emphasis,Hb)}fc(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=Gb(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),vh(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,mh(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}(),Xb=Vo();var Ub=Math.sin,Zb=Math.cos,jb=Math.PI,qb=2*Math.PI,Kb=180/jb,$b=function(){function t(){}return t.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=a-o,u=!s,h=Math.abs(l),c=pi(h-qb)||(u?l>=qb:-l>=qb),p=l>0?l%qb:l%qb+qb,d=!1;d=!!c||!pi(h)&&p>=jb==!!u;var f=t+n*Zb(o),g=e+i*Ub(o);this._start&&this._add("M",f,g);var y=Math.round(r*Kb);if(c){var v=1/this._p,m=(u?1:-1)*(qb-v);this._add("A",n,i,y,1,+u,t+n*Zb(o+m),e+i*Ub(o+m)),v>.01&&this._add("A",n,i,y,0,+u,f,g)}else{var x=t+n*Zb(a),_=e+i*Ub(a);this._add("A",n,i,y,+d,+u,x,_)}},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("l",n,0),this._add("l",0,i),this._add("l",-n,0),this._add("Z")},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){for(var u=[],h=this._p,c=1;c"}(r,o)+("style"!==r?re(a):a||"")+(i?""+n+z(i,(function(e){return t(e)})).join(n)+n:"")+("")}(t)}function uw(t){return{zrId:t,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function hw(t,e,n,i){return sw("svg","root",{width:t,height:e,xmlns:iw,"xmlns:xlink":rw,version:"1.1",baseProfile:"full",viewBox:!!i&&"0 0 "+t+" "+e},n)}var cw=0;function pw(){return cw++}var dw={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},fw="transform-origin";function gw(t,e,n){var i=A({},t.shape);A(i,e),t.buildPath(n,i);var r=new $b;return r.reset(wi(t)),n.rebuildPath(r,1),r.generateStr(),r.getStr()}function yw(t,e){var n=e.originX,i=e.originY;(n||i)&&(t[fw]=n+"px "+i+"px")}var vw={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function mw(t,e){var n=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[n]=t,n}function xw(t){return U(t)?dw[t]?"cubic-bezier("+dw[t]+")":Pn(t)?t:"":""}function _w(t,e,n,i){var r=t.animators,o=r.length,a=[];if(t instanceof ih){var s=function(t,e,n){var i,r,o=t.shape.paths,a={};if(E(o,(function(t){var e=uw(n.zrId);e.animation=!0,_w(t,{},e,!0);var o=e.cssAnims,s=e.cssNodes,l=G(o),u=l.length;if(u){var h=o[r=l[u-1]];for(var c in h){var p=h[c];a[c]=a[c]||{d:""},a[c].d+=p.d||""}for(var d in s){var f=s[d].animation;f.indexOf(r)>=0&&(i=f)}}})),i){e.d=!1;var s=mw(a,n);return i.replace(r,s)}}(t,e,n);if(s)a.push(s);else if(!o)return}else if(!o)return;for(var l={},u=0;u0})).length)return mw(h,n)+" "+r[0]+" both"}for(var y in l){(s=g(l[y]))&&a.push(s)}if(a.length){var v=n.zrId+"-cls-"+pw();n.cssNodes["."+v]={animation:a.join(",")},e.class=v}}function bw(t,e,n,i){var r=JSON.stringify(t),o=n.cssStyleCache[r];o||(o=n.zrId+"-cls-"+pw(),n.cssStyleCache[r]=o,n.cssNodes["."+o+(i?":hover":"")]=t),e.class=e.class?e.class+" "+o:o}var ww=Math.round;function Sw(t){return t&&U(t.src)}function Mw(t){return t&&X(t.toDataURL)}function Iw(t,e,n,i){nw((function(r,o){var a="fill"===r||"stroke"===r;a&&_i(o)?Ew(e,t,r,i):a&&vi(o)?zw(n,t,r,i):t[r]=a&&"none"===o?"transparent":o}),e,n,!1),function(t,e,n){var i=t.style;if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(i)){var r=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(t),o=n.shadowCache,a=o[r];if(!a){var s=t.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var h=i.shadowOffsetX||0,c=i.shadowOffsetY||0,p=i.shadowBlur,d=hi(i.shadowColor),f=d.opacity,g=d.color,y=p/2/l+" "+p/2/u;a=n.zrId+"-s"+n.shadowIdx++,n.defs[a]=sw("filter",a,{id:a,x:"-100%",y:"-100%",width:"300%",height:"300%"},[sw("feDropShadow","",{dx:h/l,dy:c/u,stdDeviation:y,"flood-color":g,"flood-opacity":f})]),o[r]=a}e.filter=bi(a)}}(n,t,i)}function Tw(t,e){var n=Ur(e);n&&(n.each((function(e,n){null!=e&&(t[(ow+n).toLowerCase()]=e+"")})),e.isSilent()&&(t[ow+"silent"]="true"))}function Cw(t){return pi(t[0]-1)&&pi(t[1])&&pi(t[2])&&pi(t[3]-1)}function Dw(t,e,n){if(e&&(!function(t){return pi(t[4])&&pi(t[5])}(e)||!Cw(e))){var i=n?10:1e4;t.transform=Cw(e)?"translate("+ww(e[4]*i)/i+" "+ww(e[5]*i)/i+")":function(t){return"matrix("+di(t[0])+","+di(t[1])+","+di(t[2])+","+di(t[3])+","+fi(t[4])+","+fi(t[5])+")"}(e)}}function Aw(t,e,n){for(var i=t.points,r=[],o=0;o=0&&a||o;s&&(r=si(s))}var l=i.lineWidth;l&&(l/=!i.strokeNoScale&&t.transform?t.transform[0]:1);var u={cursor:"pointer"};r&&(u.fill=r),i.stroke&&(u.stroke=i.stroke),l&&(u["stroke-width"]=l),bw(u,e,n,!0)}}(t,o,e),sw(s,t.id+"",o)}function Nw(t,e){return t instanceof ks?Rw(t,e):t instanceof Ns?function(t,e){var n=t.style,i=n.image;if(i&&!U(i)&&(Sw(i)?i=i.src:Mw(i)&&(i=i.toDataURL())),i){var r=n.x||0,o=n.y||0,a={href:i,width:n.width,height:n.height};return r&&(a.x=r),o&&(a.y=o),Dw(a,t.transform),Iw(a,n,t,e),Tw(a,t),e.animation&&_w(t,a,e),sw("image",t.id+"",a)}}(t,e):t instanceof Ps?function(t,e){var n=t.style,i=n.text;if(null!=i&&(i+=""),i&&!isNaN(n.x)&&!isNaN(n.y)){var r=n.font||a,s=n.x||0,l=function(t,e,n){return"top"===n?t+=e/2:"bottom"===n&&(t-=e/2),t}(n.y||0,Tr(r),n.textBaseline),u={"dominant-baseline":"central","text-anchor":gi[n.textAlign]||n.textAlign};if($s(n)){var h="",c=n.fontStyle,p=qs(n.fontSize);if(!parseFloat(p))return;var d=n.fontFamily||o,f=n.fontWeight;h+="font-size:"+p+";font-family:"+d+";",c&&"normal"!==c&&(h+="font-style:"+c+";"),f&&"normal"!==f&&(h+="font-weight:"+f+";"),u.style=h}else u.style="font: "+r;return i.match(/\s/)&&(u["xml:space"]="preserve"),s&&(u.x=s),l&&(u.y=l),Dw(u,t.transform),Iw(u,n,t,e),Tw(u,t),e.animation&&_w(t,u,e),sw("text",t.id+"",u,void 0,i)}}(t,e):void 0}function Ew(t,e,n,i){var r,o=t[n],a={gradientUnits:o.global?"userSpaceOnUse":"objectBoundingBox"};if(mi(o))r="linearGradient",a.x1=o.x,a.y1=o.y,a.x2=o.x2,a.y2=o.y2;else{if(!xi(o))return void 0;r="radialGradient",a.cx=rt(o.x,.5),a.cy=rt(o.y,.5),a.r=rt(o.r,.5)}for(var s=o.colorStops,l=[],u=0,h=s.length;ul?Jw(t,null==n[c+1]?null:n[c+1].elm,n,s,c):Qw(t,e,a,l))}(n,i,r):jw(r)?(jw(t.text)&&Xw(n,""),Jw(n,null,r,0,r.length-1)):jw(i)?Qw(n,i,0,i.length-1):jw(t.text)&&Xw(n,""):t.text!==e.text&&(jw(i)&&Qw(n,i,0,i.length-1),Xw(n,e.text)))}var nS=0,iS=function(){function t(t,e,n){if(this.type="svg",this.refreshHover=rS("refreshHover"),this.configLayer=rS("configLayer"),this.storage=e,this._opts=n=A({},n),this.root=t,this._id="zr"+nS++,this._oldVNode=hw(n.width,n.height),t&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var r=this._svgDom=this._oldVNode.elm=aw("svg");tS(null,this._oldVNode),i.appendChild(r),t.appendChild(i)}this.resize(n.width,n.height)}return t.prototype.getType=function(){return this.type},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",function(t,e){if(Kw(t,e))eS(t,e);else{var n=t.elm,i=Hw(n);$w(e),null!==i&&(Fw(i,e.elm,Yw(n)),Qw(i,[t],0,0))}}(this._oldVNode,t),this._oldVNode=t}},t.prototype.renderOneToVNode=function(t){return Nw(t,uw(this._id))},t.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),n=this._width,i=this._height,r=uw(this._id);r.animation=t.animation,r.willUpdate=t.willUpdate,r.compress=t.compress,r.emphasis=t.emphasis;var o=[],a=this._bgVNode=function(t,e,n,i){var r;if(n&&"none"!==n)if(r=sw("rect","bg",{width:t,height:e,x:"0",y:"0"}),_i(n))Ew({fill:n},r.attrs,"fill",i);else if(vi(n))zw({style:{fill:n},dirty:bt,getBoundingRect:function(){return{width:t,height:e}}},r.attrs,"fill",i);else{var o=hi(n),a=o.color,s=o.opacity;r.attrs.fill=a,s<1&&(r.attrs["fill-opacity"]=s)}return r}(n,i,this._backgroundColor,r);a&&o.push(a);var s=t.compress?null:this._mainVNode=sw("g","main",{},[]);this._paintList(e,r,s?s.children:o),s&&o.push(s);var l=z(G(r.defs),(function(t){return r.defs[t]}));if(l.length&&o.push(sw("defs","defs",{},l)),t.animation){var u=function(t,e,n){var i=(n=n||{}).newline?"\n":"",r=" {"+i,o=i+"}",a=z(G(t),(function(e){return e+r+z(G(t[e]),(function(n){return n+":"+t[e][n]+";"})).join(i)+o})).join(i),s=z(G(e),(function(t){return"@keyframes "+t+r+z(G(e[t]),(function(n){return n+r+z(G(e[t][n]),(function(i){var r=e[t][n][i];return"d"===i&&(r='path("'+r+'")'),i+":"+r+";"})).join(i)+o})).join(i)+o})).join(i);return a||s?[""].join(i):""}(r.cssNodes,r.cssAnims,{newline:!0});if(u){var h=sw("style","stl",{},[],u);o.push(h)}}return hw(n,i,o,t.useViewBox)},t.prototype.renderToString=function(t){return t=t||{},lw(this.renderToVNode({animation:rt(t.cssAnimation,!0),emphasis:rt(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:rt(t.useViewBox,!0)}),{newline:!0})},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t},t.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},t.prototype._paintList=function(t,e,n){for(var i,r,o=t.length,a=[],s=0,l=0,u=0;u=0&&(!c||!r||c[f]!==r[f]);f--);for(var g=d-1;g>f;g--)i=a[--s-1];for(var y=f+1;y=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&u.restore()};if(p)if(0===p.length)s=l.__endIndex;else for(var _=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?uS:0),this._needsManuallyCompositing),u.__builtin__||I("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),1&s.__dirty&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,E(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?C(n[t],e,!0):n[t]=e;for(var i=0;i-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),e},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(bg);function pS(t,e){var n=t.mapDimensionsAll("defaultedLabel"),i=n.length;if(1===i){var r=mf(t,e,n[0]);return null!=r?r+"":null}if(i){for(var o=[],a=0;a=0&&i.push(e[o])}return i.join(" ")}var fS=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o.updateData(e,n,i,r),o}return n(e,t),e.prototype._createSymbol=function(t,e,n,i,r){this.removeAll();var o=Xy(t,-1,-1,2,2,null,r);o.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),o.drift=gS,this._symbolType=t,this.add(o)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ol(this.childAt(0))},e.prototype.downplay=function(){Rl(this.childAt(0))},e.prototype.setZ=function(t,e){var n=this.childAt(0);n.zlevel=t,n.z=e},e.prototype.setDraggable=function(t,e){var n=this.childAt(0);n.draggable=t,n.cursor=!e&&t?"move":n.cursor},e.prototype.updateData=function(t,n,i,r){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",a=t.hostModel,s=e.getSymbolSize(t,n),l=o!==this._symbolType,u=r&&r.disableAnimation;if(l){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,s,h)}else{(p=this.childAt(0)).silent=!1;var c={scaleX:s[0]/2,scaleY:s[1]/2};u?p.attr(c):vh(p,c,a,n),Sh(p)}if(this._updateCommon(t,n,s,i,r),l){var p=this.childAt(0);if(!u){c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:p.style.opacity}};p.scaleX=p.scaleY=0,p.style.opacity=0,mh(p,c,a,n)}}u&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,e,n,i,r){var o,a,s,l,u,h,c,p,d,f=this.childAt(0),g=t.hostModel;if(i&&(o=i.emphasisItemStyle,a=i.blurItemStyle,s=i.selectItemStyle,l=i.focus,u=i.blurScope,c=i.labelStatesModels,p=i.hoverScale,d=i.cursorStyle,h=i.emphasisDisabled),!i||t.hasItemOption){var y=i&&i.itemModel?i.itemModel:t.getItemModel(e),v=y.getModel("emphasis");o=v.getModel("itemStyle").getItemStyle(),s=y.getModel(["select","itemStyle"]).getItemStyle(),a=y.getModel(["blur","itemStyle"]).getItemStyle(),l=v.get("focus"),u=v.get("blurScope"),h=v.get("disabled"),c=rc(y),p=v.getShallow("scale"),d=y.getShallow("cursor")}var m=t.getItemVisual(e,"symbolRotate");f.attr("rotation",(m||0)*Math.PI/180||0);var x=Zy(t.getItemVisual(e,"symbolOffset"),n);x&&(f.x=x[0],f.y=x[1]),d&&f.attr("cursor",d);var _=t.getItemVisual(e,"style"),b=_.fill;if(f instanceof Ns){var w=f.style;f.useStyle(A({image:w.image,x:w.x,y:w.y,width:w.width,height:w.height},_))}else f.__isEmptyBrush?f.useStyle(A({},_)):f.useStyle(_),f.style.decal=null,f.setColor(b,r&&r.symbolInnerColor),f.style.strokeNoScale=!0;var S=t.getItemVisual(e,"liftZ"),M=this._z2;null!=S?null==M&&(this._z2=f.z2,f.z2+=S):null!=M&&(f.z2=M,this._z2=null);var I=r&&r.useNameLabel;ic(f,c,{labelFetcher:g,labelDataIndex:e,defaultText:function(e){return I?t.getName(e):pS(t,e)},inheritColor:b,defaultOpacity:_.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2;var T=f.ensureState("emphasis");T.style=o,f.ensureState("select").style=s,f.ensureState("blur").style=a;var C=null==p||!0===p?Math.max(1.1,3/this._sizeY):isFinite(p)&&p>0?+p:1;T.scaleX=this._sizeX*C,T.scaleY=this._sizeY*C,this.setSymbolScale(1),Zl(this,l,u,h)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,e,n){var i=this.childAt(0),r=rl(this).dataIndex,o=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var a=i.getTextContent();a&&_h(a,{style:{opacity:0}},e,{dataIndex:r,removeOpt:o,cb:function(){i.removeTextContent()}})}else i.removeTextContent();_h(i,{style:{opacity:0},scaleX:0,scaleY:0},e,{dataIndex:r,cb:t,removeOpt:o})},e.getSymbolSize=function(t,e){return Uy(t.getItemVisual(e,"symbolSize"))},e}(Br);function gS(t,e){this.parent.drift(t,e)}function yS(t,e,n,i){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(i.isIgnore&&i.isIgnore(n))&&!(i.clipShape&&!i.clipShape.contain(e[0],e[1]))&&"none"!==t.getItemVisual(n,"symbol")}function vS(t){return null==t||q(t)||(t={isIgnore:t}),t||{}}function mS(t){var e=t.hostModel,n=e.getModel("emphasis");return{emphasisItemStyle:n.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:n.get("focus"),blurScope:n.get("blurScope"),emphasisDisabled:n.get("disabled"),hoverScale:n.get("scale"),labelStatesModels:rc(e),cursorStyle:e.get("cursor")}}var xS=function(){function t(t){this.group=new Br,this._SymbolCtor=t||fS}return t.prototype.updateData=function(t,e){this._progressiveEls=null,e=vS(e);var n=this.group,i=t.hostModel,r=this._data,o=this._SymbolCtor,a=e.disableAnimation,s=mS(t),l={disableAnimation:a},u=e.getSymbolPoint||function(e){return t.getItemLayout(e)};r||n.removeAll(),t.diff(r).add((function(i){var r=u(i);if(yS(t,r,i,e)){var a=new o(t,i,s,l);a.setPosition(r),t.setItemGraphicEl(i,a),n.add(a)}})).update((function(h,c){var p=r.getItemGraphicEl(c),d=u(h);if(yS(t,d,h,e)){var f=t.getItemVisual(h,"symbol")||"circle",g=p&&p.getSymbolType&&p.getSymbolType();if(!p||g&&g!==f)n.remove(p),(p=new o(t,h,s,l)).setPosition(d);else{p.updateData(t,h,s,l);var y={x:d[0],y:d[1]};a?p.attr(y):vh(p,y,i)}n.add(p),t.setItemGraphicEl(h,p)}else n.remove(p)})).remove((function(t){var e=r.getItemGraphicEl(t);e&&e.fadeOut((function(){n.remove(e)}),i)})).execute(),this._getSymbolPoint=u,this._data=t},t.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl((function(e,n){var i=t._getSymbolPoint(n);e.setPosition(i),e.markRedraw()}))},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=mS(t),this._data=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e,n){function i(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=vS(n);for(var r=t.start;r0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=z(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return mx(e,c[0])&&(p=!0,c[0]=d),mx(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function bS(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var wS=Math.min,SS=Math.max;function MS(t,e){return isNaN(t)||isNaN(e)}function IS(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(MS(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var x=v-u,_=m-h;if(x*x+_*_<.5){g+=o;continue}if(a>0){for(var b=g+o,w=e[2*b],S=e[2*b+1];w===v&&S===m&&y=i||MS(w,S))d=v,f=m;else{T=w-u,C=S-h;var k=v-u,L=w-v,P=m-h,O=S-m,R=void 0,N=void 0;if("x"===s){var E=T>0?1:-1;d=v-E*(R=Math.abs(k))*a,f=m,D=v+E*(N=Math.abs(L))*a,A=m}else if("y"===s){var z=C>0?1:-1;d=v,f=m-z*(R=Math.abs(P))*a,D=v,A=m+z*(N=Math.abs(O))*a}else R=Math.sqrt(k*k+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(L*L+O*O))/(N+R))),f=m-C*a*(1-I),A=m+C*a*I,D=wS(D=v+T*a*I,SS(w,v)),A=wS(A,SS(S,m)),D=SS(D,wS(w,v)),f=m-(C=(A=SS(A,wS(S,m)))-m)*R/N,d=wS(d=v-(T=D-v)*R/N,SS(u,v)),f=wS(f,SS(h,m)),D=v+(T=v-(d=SS(d,wS(u,v))))*N/R,A=m+(C=m-(f=SS(f,wS(h,m))))*N/R}t.bezierCurveTo(c,p,d,f,v,m),c=D,p=A}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var TS=function(){this.smooth=0,this.smoothConstraint=!0},CS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new TS},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&MS(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?_n(n,u,c,d,t,s):_n(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?mn(i,h,p,f,x):mn(n,u,c,d,x);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(ks),DS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(TS),AS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new DS},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&MS(n[2*o-2],n[2*o-1]);o--);for(;r=0;a--){var s=t.getDimensionInfo(i[a].dimension);if("x"===(r=s&&s.coordDim)||"y"===r){o=i[a];break}}if(o){var l=e.getAxis(r),u=z(o.stops,(function(t){return{coord:l.toGlobalCoord(l.dataToCoord(t.value)),color:t.color}})),h=u.length,c=o.outerColors.slice();h&&u[0].coord>u[h-1].coord&&(u.reverse(),c.reverse());var p=function(t,e){var n,i,r=[],o=t.length;function a(t,e,n){var i=t.coord;return{coord:n,color:ti((n-i)/(e.coord-i),[t.color,e.color])}}for(var s=0;se){i?r.push(a(i,l,e)):n&&r.push(a(n,l,0),a(n,l,e));break}n&&(r.push(a(n,l,0)),n=null),r.push(l),i=l}}return r}(u,"x"===r?n.getWidth():n.getHeight()),d=p.length;if(!d&&h)return u[0].coord<0?c[1]?c[1]:u[h-1].color:c[0]?c[0]:u[0].color;var f=p[0].coord-10,g=p[d-1].coord+10,y=g-f;if(y<.001)return"transparent";E(p,(function(t){t.offset=(t.coord-f)/y})),p.push({offset:d?p[d-1].offset:.5,color:c[1]||"transparent"}),p.unshift({offset:d?p[0].offset:.5,color:c[0]||"transparent"});var v=new oh(0,0,0,0,p,!0);return v[r]=f,v[r+"2"]=g,v}}}function FS(t,e,n){var i=t.get("showAllSymbol"),r="auto"===i;if(!i||r){var o=n.getAxesByScale("ordinal")[0];if(o&&(!r||!function(t,e){var n=t.getExtent(),i=Math.abs(n[1]-n[0])/t.scale.count();isNaN(i)&&(i=0);for(var r=e.count(),o=Math.max(1,Math.round(r/5)),a=0;ai)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return E(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function GS(t,e){return[t[2*e],t[2*e+1]]}function WS(t){if(t.get(["endLabel","show"]))return!0;for(var e=0;e0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=+d.style.lineWidth+1);rl(d).seriesIndex=t.seriesIndex,Zl(d,L,P,O);var R=zS(t.get("smooth")),N=t.get("smoothMonotone");if(d.setShape({smooth:R,smoothMonotone:N,connectNulls:w}),f){var E=a.getCalculationInfo("stackedOnSeries"),z=0;f.useStyle(k(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),E&&(z=zS(E.get("smooth"))),f.setShape({smooth:R,stackedOnSmooth:z,smoothMonotone:N,connectNulls:w}),$l(f,t,"areaStyle"),rl(f).seriesIndex=t.seriesIndex,Zl(f,L,P,O)}var V=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=V)})),this._polyline.onHoverStateChange=V,this._data=a,this._coordSys=r,this._stackedOnPoints=_,this._points=u,this._step=T,this._valueOrigin=m,t.get("triggerLineEvent")&&(this.packEventData(t,d),f&&this.packEventData(t,f))},e.prototype.packEventData=function(t,e){rl(e).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=zo(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;var h=t.get("zlevel")||0,c=t.get("z")||0;(s=new fS(r,o)).x=l,s.y=u,s.setZ(h,c);var p=s.getSymbolPath().getTextContent();p&&(p.zlevel=h,p.z=c,p.z2=this._polyline.z2+1),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else Og.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=zo(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else Og.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Dl(this._polyline,t),e&&Dl(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new CS({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new AS({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");X(l)&&(l=l(null));var u=s.get("animationDelay")||0,h=X(u)?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(n)if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var x=X(u)?u(o):l*m+h,_=s.getSymbolPath(),b=_.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:x}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:x}),_.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e,n){var i=t.getModel("endLabel");if(WS(t)){var r=t.getData(),o=this._polyline,a=r.getLayout("points");if(!a)return o.removeTextContent(),void(this._endLabel=null);var s=this._endLabel;s||((s=this._endLabel=new Xs({z2:200})).ignoreClip=!0,o.setTextContent(this._endLabel),o.disableLabelAnimation=!0);var l=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(a);l>=0&&(ic(o,rc(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:l,defaultText:function(t,e,n){return null!=n?dS(r,n):pS(r,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(i,e)),o.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,x=(g?d:0)*(y?-1:1),_=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=GS(u,S[0]);s.attr({x:T[0]+x,y:T[1]+_}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+x,y:T[1]+_});var C=h.getRawValue(S[0]),D=h.getRawValue(S[1]);r&&(I=Zo(n,p,C,D,w.t))}i.lastFrameIndex=S[0]}else{var A=1===t||i.lastFrameIndex>0?S[0]:0;T=GS(u,A);r&&(I=h.getRawValue(A)),s.attr({x:T[0]+x,y:T[1]+_})}if(r){var k=pc(s);"function"==typeof k.setLabelText&&k.setLabelText(I)}}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o,a){var s=this._polyline,l=this._polygon,u=t.hostModel,h=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=_S(r,e,a),v=t.getLayout("points")||[],m=e.getLayout("points")||[],x=0;x3e3||l&&ES(p,f)>3e3)return s.stopAnimation(),s.setShape({points:d}),void(l&&(l.stopAnimation(),l.setShape({points:d,stackedOnPoints:f})));s.shape.__points=h.current,s.shape.points=c;var g={shape:{points:d}};h.current!==c&&(g.shape.__points=h.next),s.stopAnimation(),vh(s,g,u),l&&(l.setShape({points:c,stackedOnPoints:p}),l.stopAnimation(),vh(l,{shape:{stackedOnPoints:f}},u),s.shape.points!==l.shape.points&&(l.shape.points=s.shape.points));for(var y=[],v=h.status,m=0;me&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;ne&&(e=o,n=r)}return isFinite(n)?n:NaN},nearest:function(t){return t[0]}},ZS=function(t){return Math.round(t.length/2)};function jS(t){return{seriesType:t,reset:function(t,e,n){var i=t.getData(),r=t.get("sampling"),o=t.coordinateSystem,a=i.count();if(a>10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(isFinite(p)&&p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;U(r)?d=US[r]:X(r)&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,ZS))}}}}}var qS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return _x(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,e,n){var i=this.coordinateSystem;if(i&&i.clampData){var r=i.clampData(t),o=i.dataToPoint(r);if(n)E(i.getAxes(),(function(t,n){if("category"===t.type&&null!=e){var i=t.getTicksCoords(),a=t.getTickModel().get("alignWithLabel"),s=r[n],l="x1"===e[n]||"y1"===e[n];if(l&&!a&&(s+=1),i.length<2)return;if(2===i.length)return void(o[n]=t.toGlobalCoord(t.getExtent()[l?1:0]));for(var u=void 0,h=void 0,c=1,p=0;ps){h=(d+u)/2;break}1===p&&(c=f-i[0].tickValue)}null==h&&(u?u&&(h=i[i.length-1].coord):h=i[0].coord),o[n]=t.toGlobalCoord(h)}}));else{var a=this.getData(),s=a.getLayout("offset"),l=a.getLayout("size"),u=i.getBaseAxis().isHorizontal()?0:1;o[u]+=s+l/2}return o}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(bg);bg.registerClass(qS);var KS=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return _x(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=kc(qS.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(qS),$S=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},JS=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new $S},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=2*Math.PI,p=h?u-lo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){wh(e,t,rl(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Og),oM={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=nM(e.x,t.x),s=iM(e.x+e.width,r),l=nM(e.y,t.y),u=iM(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=iM(e.r,t.r),o=nM(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},aM={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new Ws({shape:A({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=!r&&l?JS:Fu,h=new u({shape:i,z2:1});h.name="item";var c,p,d=dM(r);if(h.calculateTextPosition=(c=d,p=({isRoundCap:u===JS}||{}).isRoundCap,function(t,e,n){var i=e.position;if(!i||i instanceof Array)return Dr(t,e,n);var r=c(i),o=null!=e.distance?e.distance:5,a=this.shape,s=a.cx,l=a.cy,u=a.r,h=a.r0,d=(u+h)/2,f=a.startAngle,g=a.endAngle,y=(f+g)/2,v=p?Math.abs(u-h)/2:0,m=Math.cos,x=Math.sin,_=s+u*m(f),b=l+u*x(f),w="left",S="top";switch(r){case"startArc":_=s+(h-o)*m(y),b=l+(h-o)*x(y),w="center",S="top";break;case"insideStartArc":_=s+(h+o)*m(y),b=l+(h+o)*x(y),w="center",S="bottom";break;case"startAngle":_=s+d*m(f)+QS(f,o+v,!1),b=l+d*x(f)+tM(f,o+v,!1),w="right",S="middle";break;case"insideStartAngle":_=s+d*m(f)+QS(f,-o+v,!1),b=l+d*x(f)+tM(f,-o+v,!1),w="left",S="middle";break;case"middle":_=s+d*m(y),b=l+d*x(y),w="center",S="middle";break;case"endArc":_=s+(u+o)*m(y),b=l+(u+o)*x(y),w="center",S="bottom";break;case"insideEndArc":_=s+(u-o)*m(y),b=l+(u-o)*x(y),w="center",S="top";break;case"endAngle":_=s+d*m(g)+QS(g,o+v,!0),b=l+d*x(g)+tM(g,o+v,!0),w="left",S="middle";break;case"insideEndAngle":_=s+d*m(g)+QS(g,-o+v,!0),b=l+d*x(g)+tM(g,-o+v,!0),w="right",S="middle";break;default:return Dr(t,e,n)}return(t=t||{}).x=_,t.y=b,t.align=w,t.verticalAlign=S,t}),o){var f=r?"r":"endAngle",g={};h.shape[f]=r?i.r0:i.startAngle,g[f]=i[f],(s?vh:mh)(h,{shape:g},o)}return h}};function sM(t,e,n,i,r,o,a,s){var l,u;o?(u={x:i.x,width:i.width},l={y:i.y,height:i.height}):(u={y:i.y,height:i.height},l={x:i.x,width:i.width}),s||(a?vh:mh)(n,{shape:l},e,r,null),(a?vh:mh)(n,{shape:u},e?t.baseAxis.model:null,r)}function lM(t,e){for(var n=0;n0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle,clockwise:i.clockwise}}};function dM(t){return function(t){var e=t?"Arc":"Angle";return function(t){switch(t){case"start":case"insideStart":case"end":case"insideEnd":return t+e;default:return t}}}(t)}function fM(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");if(s){if(!o.get("roundCap")){var u=t.shape;A(u,eM(i.getModel("itemStyle"),u,!0)),t.setShape(u)}}else{var h=i.get(["itemStyle","borderRadius"])||0;t.setShape("r",h)}t.useStyle(l);var c=i.getShallow("cursor");c&&t.attr("cursor",c);var p=s?a?r.r>=r.r0?"endArc":"startArc":r.endAngle>=r.startAngle?"endAngle":"startAngle":a?r.height>=0?"bottom":"top":r.width>=0?"right":"left",d=rc(i);ic(t,d,{labelFetcher:o,labelDataIndex:n,defaultText:pS(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:p});var f=t.getTextContent();if(s&&f){var g=i.get(["label","position"]);t.textConfig.inside="middle"===g||null,function(t,e,n,i){if(j(i))t.setTextConfig({rotation:i});else if(Y(e))t.setTextConfig({rotation:0});else{var r,o=t.shape,a=o.clockwise?o.startAngle:o.endAngle,s=o.clockwise?o.endAngle:o.startAngle,l=(a+s)/2,u=n(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":r=l;break;case"startAngle":case"insideStartAngle":r=a;break;case"endAngle":case"insideEndAngle":r=s;break;default:return void t.setTextConfig({rotation:0})}var h=1.5*Math.PI-r;"middle"===u&&h>Math.PI/2&&h<1.5*Math.PI&&(h-=Math.PI),t.setTextConfig({rotation:h})}}(t,"outside"===g?p:g,dM(a),i.get(["label","rotate"]))}dc(f,d,o.getRawValue(n),(function(t){return dS(e,t)}));var y=i.getModel(["emphasis"]);Zl(t,y.get("focus"),y.get("blurScope"),y.get("disabled")),$l(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",E(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var gM=function(){},yM=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new gM},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.baseDimIdx,r=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,l=0;l=s[0]&&e<=s[0]+l[0]&&n>=s[1]&&n<=s[1]+l[1])return a[h]}return-1}(this,t.offsetX,t.offsetY);rl(this).dataIndex=e>=0?e:null}),30,!1);function xM(t,e,n){if(OS(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var _M=2*Math.PI,bM=Math.PI/180;function wM(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SM(t,e){var n=wM(t,e),i=t.get("center"),r=t.get("radius");Y(r)||(r=[0,r]);var o,a,s=$r(n.width,e.getWidth()),l=$r(n.height,e.getHeight()),u=Math.min(s,l),h=$r(r[0],u/2),c=$r(r[1],u/2),p=t.coordinateSystem;if(p){var d=p.dataToPoint(i);o=d[0]||0,a=d[1]||0}else Y(i)||(i=[i,i]),o=$r(i[0],s)+n.x,a=$r(i[1],l)+n.y;return{cx:o,cy:a,r0:h,r:c}}function MM(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=wM(t,n),o=SM(t,n),a=o.cx,s=o.cy,l=o.r,u=o.r0,h=-t.get("startAngle")*bM,c=t.get("endAngle"),p=t.get("padAngle")*bM;c="auto"===c?h-_M:-c*bM;var d=t.get("minAngle")*bM+p,f=0;e.each(i,(function(t){!isNaN(t)&&f++}));var g=e.getSum(i),y=Math.PI/(g||f)*2,v=t.get("clockwise"),m=t.get("roseType"),x=t.get("stillShowZeroSum"),_=e.getDataExtent(i);_[0]=0;var b=v?1:-1,w=[h,c],S=b*p/2;us(w,!v),h=w[0],c=w[1];var M=IM(t);M.startAngle=h,M.endAngle=c,M.clockwise=v;var I=Math.abs(c-h),T=I,C=0,D=h;if(e.setLayout({viewRect:r,r:l}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:v,cx:a,cy:s,r0:u,r:m?NaN:l});else{(i="area"!==m?0===g&&x?y:t*y:I/f)i?h=o=D+b*i/2:(o=D+S,h=r-S),e.setItemLayout(n,{angle:i,startAngle:o,endAngle:h,clockwise:v,cx:a,cy:s,r0:u,r:m?Kr(t,_,[u,l]):l}),D=r}})),T<_M&&f)if(T<=.001){var A=I/f;e.each(i,(function(t,n){if(!isNaN(t)){var i=e.getItemLayout(n);i.angle=A;var r=0,o=0;An?a:o,h=Math.abs(l.label.y-n);if(h>=u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=Math.abs(c)t.unconstrainedWidth?null:d:null;i.setStyle("width",f)}var g=i.getBoundingRect();o.width=g.width;var y=(i.style.margin||0)+2.1;o.height=g.height+y,o.y-=(o.height-c)/2}}}function kM(t){return"center"===t.position}function LM(t){var e,n,i=t.getData(),r=[],o=!1,a=(t.get("minShowLabelAngle")||0)*CM,s=i.getLayout("viewRect"),l=i.getLayout("r"),u=s.width,h=s.x,c=s.y,p=s.height;function d(t){t.ignore=!0}i.each((function(t){var s=i.getItemGraphicEl(t),c=s.shape,p=s.getTextContent(),f=s.getTextGuideLine(),g=i.getItemModel(t),y=g.getModel("label"),v=y.get("position")||g.get(["emphasis","label","position"]),m=y.get("distanceToLabelLine"),x=y.get("alignTo"),_=$r(y.get("edgeDistance"),u),b=y.get("bleedMargin"),w=g.getModel("labelLine"),S=w.get("length");S=$r(S,u);var M=w.get("length2");if(M=$r(M,u),Math.abs(c.endAngle-c.startAngle)0?"right":"left":k>0?"left":"right"}var B=Math.PI,F=0,G=y.get("rotate");if(j(G))F=G*(B/180);else if("center"===v)F=0;else if("radial"===G||!0===G){F=k<0?-A+B:-A}else if("tangential"===G&&"outside"!==v&&"outer"!==v){var W=Math.atan2(k,L);W<0&&(W=2*B+W),L>0&&(W=B+W),F=W-B}if(o=!!F,p.x=I,p.y=T,p.rotation=F,p.setStyle({verticalAlign:"middle"}),P){p.setStyle({align:D});var H=p.states.select;H&&(H.x+=p.x,H.y+=p.y)}else{var Y=p.getBoundingRect().clone();Y.applyTransform(p.getComputedTransform());var X=(p.style.margin||0)+2.1;Y.y-=X/2,Y.height+=X,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new De(k,L),linePoints:C,textAlign:D,labelDistance:m,labelAlignTo:x,edgeDistance:_,bleedMargin:b,rect:Y,unconstrainedWidth:Y.width,labelStyleWidth:p.style.width})}s.setTextConfig({inside:P})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(Og);function RM(t,e,n){e=Y(e)&&{coordDimensions:e}||A({encodeDefine:t.getEncode()},e);var i=t.getSource(),r=px(i,e).dimensions,o=new cx(r,t);return o.initData(i,n),o}var NM=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),EM=Vo(),zM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new NM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return RM(this,{coordDimensions:["value"],encodeDefaulter:H(ed,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=EM(n),r=i.seats;if(!r){var o=[];n.each(n.mapDimension("value"),(function(t){o.push(t)})),r=i.seats=io(o,n.hostModel.get("percentPrecision"))}var a=t.prototype.getDataParams.call(this,e);return a.percent=r[e]||0,a.$vars.push("percent"),a},e.prototype._defaultLabelLine=function(t){Co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(bg);var VM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return _x(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(bg),BM=function(){},FM=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.getDefaultShape=function(){return new BM},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,e){var n,i=e.points,r=e.size,o=this.symbolProxy,a=o.shape,s=t.getContext?t.getContext():t,l=s&&r[0]<4,u=this.softClipShape;if(l)this._ctx=s;else{for(this._ctx=null,n=this._off;n=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape,n=e.points,i=e.size,r=i[0],o=i[1],a=1/0,s=1/0,l=-1/0,u=-1/0,h=0;h=0&&(l.dataIndex=n+(t.startIndex||0))}))},t.prototype.remove=function(){this._clear()},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),WM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var r=XS("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var e=t.coordinateSystem;return e&&e.getArea&&e.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new GM:new xS,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Og),HM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(zp),YM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Wo).models[0]},e.type="cartesian2dAxis",e}(zp);R(YM,D_);var XM={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},UM=C({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},XM),ZM=C({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},XM),jM={category:UM,value:ZM,time:C({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},ZM),log:k({logBase:10},ZM)},qM={value:1,category:1,time:1,log:1};function KM(t,e,i,r){E(qM,(function(o,a){var s=C(C({},jM[a],!0),r,!0),l=function(t){function i(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e+"Axis."+a,n}return n(i,t),i.prototype.mergeDefaultAndTheme=function(t,e){var n=Pp(this),i=n?Rp(t):{};C(t,e.getTheme().get(a+"Axis")),C(t,this.getDefaultOption()),t.type=$M(t),n&&Op(t,i,n)},i.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=Mx.createByAxisModel(this))},i.prototype.getCategories=function(t){var e=this.option;if("category"===e.type)return t?e.data:this.__ordinalMeta.categories},i.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},i.type=e+"Axis."+a,i.defaultOption=s,i}(i);t.registerComponentModel(l)})),t.registerSubTypeDefaulter(e+"Axis",$M)}function $M(t){return t.type||(t.data?"category":"value")}var JM=function(){function t(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return t.prototype.getAxis=function(t){return this._axes[t]},t.prototype.getAxes=function(){return z(this._dimList,(function(t){return this._axes[t]}),this)},t.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),B(this.getAxes(),(function(e){return e.scale.type===t}))},t.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},t}(),QM=["x","y"];function tI(t){return"interval"===t.type||"time"===t.type}var eI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=QM,e}return n(e,t),e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,e=this.getAxis("y").scale;if(tI(t)&&tI(e)){var n=t.getExtent(),i=e.getExtent(),r=this.dataToPoint([n[0],i[0]]),o=this.dataToPoint([n[1],i[1]]),a=n[1]-n[0],s=i[1]-i[0];if(a&&s){var l=(o[0]-r[0])/a,u=(o[1]-r[1])/s,h=r[0]-n[0]*l,c=r[1]-i[0]*u,p=this._transform=[l,0,0,u,h,c];this._invTransform=Ie([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var e=this.getAxis("x"),n=this.getAxis("y");return e.contain(e.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,e){var n=this.dataToPoint(t),i=this.dataToPoint(e),r=this.getArea(),o=new ze(n[0],n[1],i[0]-n[0],i[1]-n[1]);return r.intersect(o)},e.prototype.dataToPoint=function(t,e,n){n=n||[];var i=t[0],r=t[1];if(this._transform&&null!=i&&isFinite(i)&&null!=r&&isFinite(r))return Wt(n,t,this._transform);var o=this.getAxis("x"),a=this.getAxis("y");return n[0]=o.toGlobalCoord(o.dataToCoord(i,e)),n[1]=a.toGlobalCoord(a.dataToCoord(r,e)),n},e.prototype.clampData=function(t,e){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,r=n.getExtent(),o=i.getExtent(),a=n.parse(t[0]),s=i.parse(t[1]);return(e=e||[])[0]=Math.min(Math.max(Math.min(r[0],r[1]),a),Math.max(r[0],r[1])),e[1]=Math.min(Math.max(Math.min(o[0],o[1]),s),Math.max(o[0],o[1])),e},e.prototype.pointToData=function(t,e){var n=[];if(this._invTransform)return Wt(n,t,this._invTransform);var i=this.getAxis("x"),r=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),e),n[1]=r.coordToData(r.toLocalCoord(t[1]),e),n},e.prototype.getOtherAxis=function(t){return this.getAxis("x"===t.dim?"y":"x")},e.prototype.getArea=function(t){t=t||0;var e=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(e[0],e[1])-t,r=Math.min(n[0],n[1])-t,o=Math.max(e[0],e[1])-i+t,a=Math.max(n[0],n[1])-r+t;return new ze(i,r,o,a)},e}(JM),nI=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.index=0,a.type=r||"value",a.position=o||"bottom",a}return n(e,t),e.prototype.isHorizontal=function(){var t=this.position;return"top"===t||"bottom"===t},e.prototype.getGlobalExtent=function(t){var e=this.getExtent();return e[0]=this.toGlobalCoord(e[0]),e[1]=this.toGlobalCoord(e[1]),t&&e[0]>e[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(ab);function iI(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),it(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function rI(t){return"cartesian2d"===t.get("coordinateSystem")}function oI(t){var e={xAxisModel:null,yAxisModel:null};return E(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Wo).models[0];e[i]=o})),e}var aI=Math.log;function sI(t,e,n){var i=Ex.prototype,r=i.getTicks.call(n),o=i.getTicks.call(n,!0),a=r.length-1,s=i.getInterval.call(n),l=x_(t,e),u=l.extent,h=l.fixMin,c=l.fixMax;if("log"===t.type){var p=aI(t.base);u=[aI(u[0])/p,aI(u[1])/p]}t.setExtent(u[0],u[1]),t.calcNiceExtent({splitNumber:a,fixMin:h,fixMax:c});var d=i.getExtent.call(t);h&&(u[0]=d[0]),c&&(u[1]=d[1]);var f=i.getInterval.call(t),g=u[0],y=u[1];if(h&&c)f=(y-g)/a;else if(h)for(y=u[0]+f*a;yu[0]&&isFinite(g)&&isFinite(u[0]);)f=Dx(f),g=u[1]-f*a;else{t.getTicks().length-1>a&&(f=Dx(f));var v=f*a;(g=Jr((y=Math.ceil(u[1]/f)*f)-v))<0&&u[0]>=0?(g=0,y=Jr(v)):y>0&&u[1]<=0&&(y=0,g=-Jr(v))}var m=(r[0].value-o[0].value)/s,x=(r[a].value-o[a].value)/s;i.setExtent.call(t,g+f*m,y+f*x),i.setInterval.call(t,f),(m||x)&&i.setNiceExtent.call(t,g+f,y-f)}var lI=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=QM,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;function i(t){var e,n=G(t),i=n.length;if(i){for(var r=[],o=i-1;o>=0;o--){var a=t[+n[o]],s=a.model,l=a.scale;Tx(l)&&s.get("alignTicks")&&null==s.get("interval")?r.push(a):(__(l,s),Tx(l)&&(e=a))}r.length&&(e||__((e=r.pop()).scale,e.model),E(r,(function(t){sI(t.scale,t.model,e.scale)})))}}this._updateScale(t,this.model),i(n.x),i(n.y);var r={};E(n.x,(function(t){hI(n,"y",t,r)})),E(n.y,(function(t){hI(n,"x",t,r)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=kp(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){E(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(E(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Rx?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=w_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var pI=Math.PI,dI=function(){function t(t,e){this.group=new Br,this.opt=e,this.axisModel=t,k(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new Br({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!fI[t]},t.prototype.add=function(t){fI[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=ao(e-t);return so(o)?(r=n>0?"top":"bottom",i="center"):so(o-pI)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),fI={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0],u=s[0]>l[0];a&&(Wt(s,s,a),Wt(l,l,a));var h=A({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),c=new Ku({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:h,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});zh(c.shape,c.style.lineWidth),c.anid="line",n.add(c);var p=e.get(["axisLine","symbol"]);if(null!=p){var d=e.get(["axisLine","symbolSize"]);U(p)&&(p=[p,p]),(U(d)||j(d))&&(d=[d,d]);var f=Zy(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],y=d[1];E([{rotate:t.rotation+Math.PI/2,offset:f[0],r:0},{rotate:t.rotation-Math.PI/2,offset:f[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==p[i]&&null!=p[i]){var r=Xy(p[i],-g/2,-y/2,g,y,h.stroke,!0),o=e.r+e.offset,a=u?l:s;r.attr({rotation:e.rotate,x:a[0]+o*Math.cos(t.rotation),y:a[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=mI(r.getTicksCoords(),e.transform,l,k(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,vI(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*pI/180),vI(s)?o=dI.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=ao(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;so(a-pI/2)?(o=l?"bottom":"top",r="center"):so(a-1.5*pI)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*pI&&a>pI/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=it(t.nameTruncateMaxWidth,y.maxWidth,a),x=new Xs({x:d[0],y:d[1],rotation:o.rotation,silent:dI.isLabelSilent(e),style:oc(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(Kh({el:x,componentModel:e,itemName:r}),x.__fullText=r,x.anid="name",e.get("triggerEvent")){var _=dI.makeAxisEventDataBase(e);_.targetType="axisName",_.name=r,rl(x).eventData=_}i.add(x),x.updateTransform(),n.add(x),x.decomposeTransform()}}};function gI(t){t&&(t.ignore=!0)}function yI(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=xe([]);return Se(r,r,-t.rotation),n.applyTransform(be([],r,t.getLocalTransform())),i.applyTransform(be([],r,e.getLocalTransform())),n.intersect(i)}}function vI(t){return"middle"===t||"center"===t}function mI(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function bI(t){var e=wI(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=SI(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=k({color:c.color},a));var d=C(T(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,showName:s,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(U(l)){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else X(l)&&(d.name=l(d.name,d));var g=new Cc(d,null,this.ecModel);return R(g,D_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:C({lineStyle:{color:"#bbb"}},XI.axisLine),axisLabel:UI(XI.axisLabel,!1),axisTick:UI(XI.axisTick,!1),splitLine:UI(XI.splitLine,!0),splitArea:UI(XI.splitArea,!0),indicator:[]},e}(zp),jI=["axisLine","axisTickLabel","axisName"],qI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;E(z(e.getIndicatorAxes(),(function(t){var n=t.model.get("showName")?t.name:"";return new dI(t.model,{axisName:n,position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){E(jI,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=Y(h)?h:[h],d=Y(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,x=0;x3?1.4:r>1?1.2:1.1;iT(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);iT(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){tT(this._zr,"globalPan")||iT(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(jt);function iT(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(de(i.event),rT(t,e,n,i,r))}function rT(t,e,n,i,r){r.isAvailableBehavior=W(oT,null,n,i),t.trigger(e,r)}function oT(t,e,n){var i=n[t];return!t||i&&(!U(i)||e.event[i+"Key"])}function aT(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function sT(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var lT,uT={axisPointer:1,tooltip:1,brush:1};function hT(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!uT.hasOwnProperty(i.mainType)&&r&&r.model!==n}function cT(t){U(t)&&(t=(new DOMParser).parseFromString(t,"text/xml"));var e=t;for(9===e.nodeType&&(e=e.firstChild);"svg"!==e.nodeName.toLowerCase()||1!==e.nodeType;)e=e.nextSibling;return e}var pT={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},dT=G(pT),fT={"alignment-baseline":"textBaseline","stop-color":"stopColor"},gT=G(fT),yT=function(){function t(){this._defs={},this._root=null}return t.prototype.parse=function(t,e){e=e||{};var n=cT(t);this._defsUsePending=[];var i=new Br;this._root=i;var r=[],o=n.getAttribute("viewBox")||"",a=parseFloat(n.getAttribute("width")||e.width),s=parseFloat(n.getAttribute("height")||e.height);isNaN(a)&&(a=null),isNaN(s)&&(s=null),wT(n,i,null,!0,!1);for(var l,u,h=n.firstChild;h;)this._parseNode(h,i,r,null,!1,!1),h=h.nextSibling;if(function(t,e){for(var n=0;n=4&&(l={x:parseFloat(c[0]||0),y:parseFloat(c[1]||0),width:parseFloat(c[2]),height:parseFloat(c[3])})}if(l&&null!=a&&null!=s&&(u=LT(l,{x:0,y:0,width:a,height:s}),!e.ignoreViewBox)){var p=i;(i=new Br).add(p),p.scaleX=p.scaleY=u.scale,p.x=u.x,p.y=u.y}return e.ignoreRootClip||null==a||null==s||i.setClipPath(new Ws({shape:{x:0,y:0,width:a,height:s}})),{root:i,width:a,height:s,viewBoxRect:l,viewBoxTransform:u,named:r}},t.prototype._parseNode=function(t,e,n,i,r,o){var a,s=t.nodeName.toLowerCase(),l=i;if("defs"===s&&(r=!0),"text"===s&&(o=!0),"defs"===s||"switch"===s)a=e;else{if(!r){var u=lT[s];if(u&&_t(lT,s)){a=u.call(this,t,e);var h=t.getAttribute("name");if(h){var c={name:h,namedFrom:null,svgNodeTagLower:s,el:a};n.push(c),"g"===s&&(l=c)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:a});e.add(a)}}var p=vT[s];if(p&&_t(vT,s)){var d=p.call(this,t),f=t.getAttribute("id");f&&(this._defs[f]=d)}}if(a&&a.isGroup)for(var g=t.firstChild;g;)1===g.nodeType?this._parseNode(g,a,n,l,r,o):3===g.nodeType&&o&&this._parseText(g,a),g=g.nextSibling},t.prototype._parseText=function(t,e){var n=new Ps({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});_T(e,n),wT(t,n,this._defsUsePending,!1,!1),function(t,e){var n=e.__selfStyle;if(n){var i=n.textBaseline,r=i;i&&"auto"!==i?"baseline"===i?r="alphabetic":"before-edge"===i||"text-before-edge"===i?r="top":"after-edge"===i||"text-after-edge"===i?r="bottom":"central"!==i&&"mathematical"!==i||(r="middle"):r="alphabetic",t.style.textBaseline=r}var o=e.__inheritedStyle;if(o){var a=o.textAlign,s=a;a&&("middle"===a&&(s="center"),t.style.textAlign=s)}}(n,e);var i=n.style,r=i.fontSize;r&&r<9&&(i.fontSize=9,n.scaleX*=r/9,n.scaleY*=r/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var a=n.getBoundingRect();return this._textX+=a.width,e.add(n),n},t.internalField=void(lT={g:function(t,e){var n=new Br;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n},rect:function(t,e){var n=new Ws;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(t,e){var n=new Su;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n.silent=!0,n},line:function(t,e){var n=new Ku;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(t,e){var n=new Iu;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=bT(i));var r=new Xu({shape:{points:n||[]},silent:!0});return _T(e,r),wT(t,r,this._defsUsePending,!1,!1),r},polyline:function(t,e){var n,i=t.getAttribute("points");i&&(n=bT(i));var r=new Zu({shape:{points:n||[]},silent:!0});return _T(e,r),wT(t,r,this._defsUsePending,!1,!1),r},image:function(t,e){var n=new Ns;return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n.silent=!0,n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new Br;return _T(e,a),wT(t,a,this._defsUsePending,!1,!0),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",a=new Br;return _T(e,a),wT(t,a,this._defsUsePending,!1,!0),this._textX+=parseFloat(r),this._textY+=parseFloat(o),a},path:function(t,e){var n=_u(t.getAttribute("d")||"");return _T(e,n),wT(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}),t}(),vT={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new oh(e,n,i,r);return mT(t,o),xT(t,o),o},radialgradient:function(t){var e=parseInt(t.getAttribute("cx")||"0",10),n=parseInt(t.getAttribute("cy")||"0",10),i=parseInt(t.getAttribute("r")||"0",10),r=new ah(e,n,i);return mT(t,r),xT(t,r),r}};function mT(t,e){"userSpaceOnUse"===t.getAttribute("gradientUnits")&&(e.global=!0)}function xT(t,e){for(var n=t.firstChild;n;){if(1===n.nodeType&&"stop"===n.nodeName.toLocaleLowerCase()){var i=n.getAttribute("offset"),r=void 0;r=i&&i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o={};kT(n,o,o);var a=o.stopColor||n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:a})}n=n.nextSibling}}function _T(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),k(e.__inheritedStyle,t.__inheritedStyle))}function bT(t){for(var e=TT(t),n=[],i=0;i0;o-=2){var a=i[o],s=i[o-1],l=TT(a);switch(r=r||[1,0,0,1,0,0],s){case"translate":we(r,r,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":Me(r,r,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Se(r,r,-parseFloat(l[0])*DT,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":be(r,[1,0,Math.tan(parseFloat(l[0])*DT),1,0,0],r);break;case"skewY":be(r,[1,Math.tan(parseFloat(l[0])*DT),0,1,0,0],r);break;case"matrix":r[0]=parseFloat(l[0]),r[1]=parseFloat(l[1]),r[2]=parseFloat(l[2]),r[3]=parseFloat(l[3]),r[4]=parseFloat(l[4]),r[5]=parseFloat(l[5])}}e.setLocalTransform(r)}}(t,e),kT(t,a,s),i||function(t,e,n){for(var i=0;i0,f={api:n,geo:s,mapOrGeoModel:t,data:a,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:c};"geoJSON"===s.resourceType?this._buildGeoJSON(f):"geoSVG"===s.resourceType&&this._buildSVG(f),this._updateController(t,e,n),this._updateMapSelectHandler(t,l,n,i)},t.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=yt(),n=yt(),i=this._regionsGroup,r=t.transformInfoRaw,o=t.mapOrGeoModel,a=t.data,s=t.geo.projection,l=s&&s.stream;function u(t,e){return e&&(t=e(t)),t&&[t[0]*r.scaleX+r.x,t[1]*r.scaleY+r.y]}function h(t){for(var e=[],n=!l&&s&&s.project,i=0;i=0)&&(p=r);var d=a?{normal:{align:"center",verticalAlign:"middle"}}:null;ic(e,rc(i),{labelFetcher:p,labelDataIndex:c,defaultText:n},d);var f=e.getTextContent();if(f&&(JT(f).ignore=f.ignore,e.textConfig&&a)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(a[0]-g.x)/g.width*100+"%",(a[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function rC(t,e,n,i,r,o){t.data?t.data.setItemGraphicEl(o,e):rl(e).eventData={componentType:"geo",componentIndex:r.componentIndex,geoIndex:r.componentIndex,name:n,region:i&&i.option||{}}}function oC(t,e,n,i,r){t.data||Kh({el:e,componentModel:r,itemName:n,itemTooltipOption:i.get("tooltip")})}function aC(t,e,n,i,r){e.highDownSilentOnTouch=!!r.get("selectedMode");var o=i.getModel("emphasis"),a=o.get("focus");return Zl(e,a,o.get("blurScope"),o.get("disabled")),t.isGeo&&function(t,e,n){var i=rl(t);i.componentMainType=e.mainType,i.componentIndex=e.componentIndex,i.componentHighDownName=n}(e,r,n),a}function sC(t,e,n){var i,r=[];function o(){i=[]}function a(){i.length&&(r.push(i),i=[])}var s=e({polygonStart:o,polygonEnd:a,lineStart:o,lineEnd:a,point:function(t,e){isFinite(t)&&isFinite(e)&&i.push([t,e])},sphere:function(){}});return!n&&s.polygonStart(),E(t,(function(t){s.lineStart();for(var e=0;e-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(bg);function hC(t){var e={};t.eachSeriesByType("map",(function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)})),E(e,(function(t,e){for(var n,i,r,o=(n=z(t,(function(t){return t.getData()})),i=t[0].get("mapValueCalculation"),r={},E(n,(function(t){t.each(t.mapDimension("value"),(function(e,n){var i="ec-"+t.getName(n);r[i]=r[i]||[],isNaN(e)||r[i].push(e)}))})),n[0].map(n[0].mapDimension("value"),(function(t,e){for(var o="ec-"+n[0].getName(e),a=0,s=1/0,l=-1/0,u=r[o].length,h=0;h1?(d.width=p,d.height=p/x):(d.height=p,d.width=p*x),d.y=c[1]-d.height/2,d.x=c[0]-d.width/2;else{var b=t.getBoxLayoutParams();b.aspect=x,d=kp(b,{width:v,height:m})}this.setViewRect(d.x,d.y,d.width,d.height),this.setCenter(t.get("center"),e),this.setZoom(t.get("zoom"))}R(vC,dC);var _C=function(){function t(){this.dimensions=yC}return t.prototype.create=function(t,e){var n=[];function i(t){return{nameProperty:t.get("nameProperty"),aspectScale:t.get("aspectScale"),projection:t.get("projection")}}t.eachComponent("geo",(function(t,r){var o=t.get("map"),a=new vC(o+r,o,A({nameMap:t.get("nameMap")},i(t)));a.zoomLimit=t.get("scaleLimit"),n.push(a),t.coordinateSystem=a,a.model=t,a.resize=xC,a.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var r={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();r[e]=r[e]||[],r[e].push(t)}})),E(r,(function(t,r){var o=z(t,(function(t){return t.get("nameMap")})),a=new vC(r,r,A({nameMap:D(o)},i(t[0])));a.zoomLimit=it.apply(null,z(t,(function(t){return t.get("scaleLimit")}))),n.push(a),a.resize=xC,a.resize(t[0],e),E(t,(function(t){t.coordinateSystem=a,function(t,e){E(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(a,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n,i){for(var r=(t||[]).slice(),o=yt(),a=0;a=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=PC(s),o=OC(o),s&&o;){r=PC(r),a=OC(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(NC(RC(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!PC(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!OC(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function AC(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function kC(t){return arguments.length?t:EC}function LC(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function PC(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function OC(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function RC(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function NC(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function EC(t,e){return t.parentNode===e.parentNode?1:2}var zC=function(){this.parentPoint=[],this.childPoints=[]},VC=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new zC},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=$r(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(_-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),T=I*(Math.PI/180),C=y.getTextContent();C&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-_:T,origin:"center"}),C.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),A="relative"===D?vt(a.getAncestorsIndices(),a.getDescendantIndices()):"ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;A&&(rl(n).focus=A),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new th({shape:XC(h,c,p,r,r)})),vh(g,{shape:XC(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.getChildIndex=function(){if(this.parentNode){for(var t=this.parentNode.children,e=0;e=0){var i=n.getData().tree.root,r=t.targetNode;if(U(r)&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function rD(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function oD(t,e){return P(rD(t),e)>=0}function aD(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var sD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return n(e,t),e.prototype.getInitialData=function(t){var e={name:t.name,children:t.data},n=t.leaves||{},i=new Cc(n,this,this.ecModel),r=nD.createTree(e,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e);return n&&n.children.length&&n.isExpand||(t.parentModel=i),t}))}));var o=0;r.eachNode("preorder",(function(t){t.depth>o&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return og("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=aD(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(bg);function lD(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function uD(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=kC((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=kC());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),lD(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=LC(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),lD(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),lD(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function hD(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();A(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}var cD=["treemapZoomToNode","treemapRender","treemapMove"];function pD(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=pd(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var dD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};fD(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Cc({itemStyle:r},this,e);i=t.levels=function(t,e){var n,i,r=To(e.get("color")),o=To(e.get(["aria","decal","decals"]));if(!r)return;t=t||[],E(t,(function(t){var e=new Cc(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e);var a=z(i||[],(function(t){return new Cc(t,o,e)}),this),s=nD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=n?a[n.depth]:null;return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return og("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treeAncestors=aD(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},A(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=yt(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){pD(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(bg);function fD(t){var e=0;E(t.children,(function(t){fD(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var gD=function(){function t(t){this.group=new Br,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=r.getModel("emphasis"),l=a.getModel("textStyle"),u=s.getModel(["itemStyle","textStyle"]),h={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,l),this._renderContent(t,h,a,s,l,u,i),Lp(o,h.pos,h.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Ro(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r,o,a){for(var s,l,u,h,c,p,d,f,g,y=0,v=e.emptyItemWidth,m=t.get(["breadcrumb","height"]),x=(s=e.pos,l=e.box,h=l.width,c=l.height,p=$r(s.left,h),d=$r(s.top,c),f=$r(s.right,h),g=$r(s.bottom,c),(isNaN(p)||isNaN(parseFloat(s.left)))&&(p=0),(isNaN(f)||isNaN(parseFloat(s.right)))&&(f=h),(isNaN(d)||isNaN(parseFloat(s.top)))&&(d=0),(isNaN(g)||isNaN(parseFloat(s.bottom)))&&(g=c),u=vp(u||0),{width:Math.max(f-p-u[1]-u[3],0),height:Math.max(g-d-u[0]-u[2],0)}),_=e.totalWidth,b=e.renderList,w=i.getModel("itemStyle").getItemStyle(),S=b.length-1;S>=0;S--){var M=b[S],I=M.node,T=M.width,C=M.text;_>x.width&&(_-=T-v,T=v,C=null);var D=new Xu({shape:{points:yD(y,0,T,m,S===b.length-1,0===S)},style:k(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Xs({style:oc(r,{text:C})}),textConfig:{position:"inside"},z2:1e5,onclick:H(a,I)});D.disableLabelAnimation=!0,D.getTextContent().ensureState("emphasis").style=oc(o,{text:C}),D.ensureState("emphasis").style=w,Zl(D,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(D),vD(D,t,I),y+=T+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function yD(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function vD(t,e,n){rl(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&aD(n,e)}}var mD=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY,i=t.scale;if("animating"!==this._state){var r=this.seriesModel.getData().tree.root;if(!r)return;var o=r.getLayout();if(!o)return;var a,s=new ze(o.x,o.y,o.width,o.height),l=this._controllerHost;a=l.zoomLimit;var u=l.zoom=l.zoom||1;if(u*=i,a){var h=a.min||0,c=a.max||1/0;u=Math.max(Math.min(c,u),h)}var p=u/l.zoom;l.zoom=u;var d=this.seriesModel.layoutInfo,f=[1,0,0,1,0,0];we(f,f,[-(e-=d.x),-(n-=d.y)]),Me(f,f,[p,p]),we(f,f,[e,n]),s.applyTransform(f),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x,y:s.y,width:s.width,height:s.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&Mp(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new gD(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(oD(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(Og);var CD=E,DD=q,AD=-1,kD=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=T(e);this.type=i,this.mappingMethod=n,this._normalizeData=FD[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(LD(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,E(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(CD(e,(function(t,e){n[t]=e})),!Y(i)){var r=[];q(i)?CD(i,(function(t,e){var i=n[e];r[null!=i?i:AD]=t})):r[-1]=i,i=BD(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):LD(r,!0):(lt("linear"!==n||r.dataExtent),LD(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return W(this._normalizeData,this)},t.listVisualTypes=function(){return G(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){q(t)?E(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=Y(e)?[]:q(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&CD(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(Y(t))t=t.slice();else{if(!DD(t))return[];var e=[];CD(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new kD(c);return WD(p).drColorMappingBy=h,p}(0,r,o,0,u,d);E(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=A({},e);if(r){var s=r.type,l="color"===s&&WD(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);YD(t,o,n,i)}}))}else s=XD(u),h.fill=s}}function XD(t){var e=UD(t,"color");if(e){var n=UD(t,"colorAlpha"),i=UD(t,"colorSaturation");return i&&(e=ni(e,null,null,i)),n&&(e=ii(e,n)),e}}function UD(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function ZD(t,e){var n=t.get(e);return Y(n)&&n.length?{name:e,range:n}:null}var jD=Math.max,qD=Math.min,KD=it,$D=E,JD=["itemStyle","borderWidth"],QD=["itemStyle","gapWidth"],tA=["upperLabel","show"],eA=["upperLabel","height"],nA={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=kp(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=$r(KD(s.width,l[0]),r),h=$r(KD(s.height,l[1]),o),c=i&&i.type,p=iD(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=rD(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;poo&&(u=oo),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?jD(u*i/l,l/(u*r)):1/0}function oA(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var _=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*_+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*_,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*_+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*_,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(Br),YA=function(){function t(t){this.group=new Br,this._LineCtor=t||HA}return t.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=XA(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=XA(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[];for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function ek(t,e){var n=[],i=Dn,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[Tt(l[0]),Tt(l[1])],l[2]&&l.__original.push(Tt(l[2])));var c=l.__original;if(null!=l[2]){if(It(r[0],c[0]),It(r[1],c[2]),It(r[2],c[1]),u&&"none"!==u){var p=SA(t.node1),d=tk(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=SA(t.node2),d=tk(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}It(l[0],r[0]),It(l[1],r[2]),It(l[2],r[1])}else{if(It(o[0],c[0]),It(o[1],c[1]),kt(a,o[1],o[0]),Et(a,a),u&&"none"!==u){p=SA(t.node1);At(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=SA(t.node2);At(o[1],o[1],a,-p*e)}It(l[0],o[0]),It(l[1],o[1])}}))}function nk(t){return"view"===t.type}var ik=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new xS,i=new YA,r=this.group;this._controller=new nT(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(nk(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):vh(s,l,t)}ek(t.getGraph(),wA(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");u.graph.eachNode((function(e){var n=e.dataIndex,r=e.getGraphicEl(),o=e.getModel();if(r){r.off("drag").off("dragend");var a=o.get("draggable");a&&r.on("drag",(function(o){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(n),u.setItemLayout(n,[r.x,r.y]);break;case"circular":u.setItemLayout(n,[r.x,r.y]),e.setLayout({fixed:!0},!0),TA(t,"symbolSize",e,[o.offsetX,o.offsetY]),i.updateLayout(t);break;default:u.setItemLayout(n,[r.x,r.y]),_A(t.getGraph(),t),i.updateLayout(t)}})).on("dragend",(function(){c&&c.setUnfixed(n)})),r.setDraggable(a,!!o.get("cursor")),"adjacency"===o.get(["emphasis","focus"])&&(rl(r).focus=e.getAdjacentDataIndices())}})),u.graph.eachEdge((function(t){var e=t.getGraphicEl(),n=t.getModel().get(["emphasis","focus"]);e&&"adjacency"===n&&(rl(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var f="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),g=u.getLayout("cx"),y=u.getLayout("cy");u.graph.eachNode((function(t){DA(t,f,g,y)})),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,e){var n=this;!function i(){t.step((function(t){n.updateLayout(n._model),(n._layouting=!t)&&(e?n._layoutTimeout=setTimeout(i,16):i())}))}()},e.prototype._updateController=function(t,e,n){var i=this,r=this._controller,o=this._controllerHost,a=this.group;r.setPointerChecker((function(e,i,r){var o=a.getBoundingRect();return o.applyTransform(a.transform),o.contain(i,r)&&!hT(e,n,t)})),nk(t.coordinateSystem)?(r.enable(t.get("roam")),o.zoomLimit=t.get("scaleLimit"),o.zoom=t.coordinateSystem.getZoom(),r.off("pan").off("zoom").on("pan",(function(e){aT(o,e.dx,e.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:e.dx,dy:e.dy})})).on("zoom",(function(e){sT(o,e.scale,e.originX,e.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:e.scale,originX:e.originX,originY:e.originY}),i._updateNodeAndLinkScale(),ek(t.getGraph(),wA(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()}))):r.disable()},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,e=t.getData(),n=wA(t);e.eachItemGraphicEl((function(t,e){t&&t.setSymbolScale(n)}))},e.prototype.updateLayout=function(t){ek(t.getGraph(),wA(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Og);function rk(t){return"_EC_"+t}var ok=function(){function t(t){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=t||!1}return t.prototype.isDirected=function(){return this._directed},t.prototype.addNode=function(t,e){t=null==t?""+e:""+t;var n=this._nodesMap;if(!n[rk(t)]){var i=new ak(t,e);return i.hostGraph=this,this.nodes.push(i),n[rk(t)]=i,i}},t.prototype.getNodeByIndex=function(t){var e=this.data.getRawIndex(t);return this.nodes[e]},t.prototype.getNodeById=function(t){return this._nodesMap[rk(t)]},t.prototype.addEdge=function(t,e,n){var i=this._nodesMap,r=this._edgesMap;if(j(t)&&(t=this.nodes[t]),j(e)&&(e=this.nodes[e]),t instanceof ak||(t=i[rk(t)]),e instanceof ak||(e=i[rk(e)]),t&&e){var o=t.id+"-"+e.id,a=new sk(t,e,n);return a.hostGraph=this,this._directed&&(t.outEdges.push(a),e.inEdges.push(a)),t.edges.push(a),t!==e&&e.edges.push(a),this.edges.push(a),r[o]=a,a}},t.prototype.getEdgeByIndex=function(t){var e=this.edgeData.getRawIndex(t);return this.edges[e]},t.prototype.getEdge=function(t,e){t instanceof ak&&(t=t.id),e instanceof ak&&(e=e.id);var n=this._edgesMap;return this._directed?n[t+"-"+e]:n[t+"-"+e]||n[e+"-"+t]},t.prototype.eachNode=function(t,e){for(var n=this.nodes,i=n.length,r=0;r=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof ak||(e=this._nodesMap[rk(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},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)}}}function uk(t,e,n,i,r){for(var o=new ok(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=_x(t,n);else{var g=wd.get(f),y=g&&g.dimensions||[];P(y,"value")<0&&y.concat(["value"]);var v=px(t,{coordDimensions:y,encodeDefine:n.getEncode()}).dimensions;(d=new cx(v,n)).initData(t)}var m=new cx(["value"],n);return m.initData(l,s),r&&r(d,m),ZC({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}R(ak,lk("hostGraph","data")),R(sk,lk("hostGraph","edgeData"));var hk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new NM(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),Co(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){dA(n=this)&&(n.__curvenessList=[],n.__edgeMap={},fA(n));var a=uk(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Cc.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return E(a.edges,(function(t){!function(t,e,n,i){if(dA(n)){var r=gA(t,e,n),o=n.__edgeMap,a=o[yA(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),og("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return vg({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=z(this.option.categories||[],(function(t){return null!=t.value?t:A({value:0},t)})),e=new cx(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bg),ck={type:"graphRoam",event:"graphRoam",update:"none"};var pk=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},dk=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new pk},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(ks);function fk(t,e){var n=null==t?"":t+"";return e&&(U(e)?n=e.replace("{value}",n):X(e)&&(n=e(t))),n}var gk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:$r(n[0],e.getWidth()),cy:$r(n[1],e.getHeight()),r:$r(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?JS:Fu,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=[s,l];us(f,!a);for(var g=(l=f[1])-(s=f[0]),y=s,v=[],m=0;c&&m=t&&(0===e?0:i[e-1][0])Math.PI/2&&(V+=Math.PI):"tangential"===z?V=-M-Math.PI/2:j(z)&&(V=z*Math.PI/180),0===V?c.add(new Xs({style:oc(x,{text:O,x:N,y:E,verticalAlign:h<-.8?"top":h>.8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0})):c.add(new Xs({style:oc(x,{text:O,x:N,y:E,verticalAlign:"middle",align:"center"},{inheritColor:R}),silent:!0,originX:N,originY:E,rotation:V}))}if(m.get("show")&&k!==_){P=(P=m.get("distance"))?P+l:l;for(var B=0;B<=b;B++){u=Math.cos(M),h=Math.sin(M);var F=new Ku({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:D});"auto"===D.stroke&&F.setStyle({stroke:i((k+B/b)/_)}),c.add(F),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),x=+t.get("max"),_=[m,x],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=$r(o.get("width"),r.r),s=$r(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=$r(u[0],r.r),c=$r(u[1],r.r),p=o.get("keepAspect");return(i=l?Xy(l,h-a/2,c-s,a,s,null,p):new dk({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?JS:Fu,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=x-y.get(v,t)%x),c}(g||d)&&(y.diff(h).add((function(e){var n=y.get(v,e);if(d){var i=w(e,o);mh(i,{rotation:-((isNaN(+n)?b[0]:Kr(n,_,b,!0))+Math.PI/2)},t),u.add(i),y.setItemGraphicEl(e,i)}if(g){var r=S(e,o),a=f.get("clip");mh(r,{shape:{endAngle:Kr(n,_,b,a)}},t),u.add(r),ol(t.seriesIndex,y.dataType,e,r),p[e]=r}})).update((function(e,n){var i=y.get(v,e);if(d){var r=h.getItemGraphicEl(n),a=r?r.rotation:o,s=w(e,a);s.rotation=a,vh(s,{rotation:-((isNaN(+i)?b[0]:Kr(i,_,b,!0))+Math.PI/2)},t),u.add(s),y.setItemGraphicEl(e,s)}if(g){var l=c[n],m=S(e,l?l.shape.endAngle:o),x=f.get("clip");vh(m,{shape:{endAngle:Kr(i,_,b,x)}},t),u.add(m),ol(t.seriesIndex,y.dataType,e,m),p[e]=m}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis"),r=n.get("focus"),o=n.get("blurScope"),a=n.get("disabled");if(d){var s=y.getItemGraphicEl(t),l=y.getItemVisual(t,"style"),u=l.fill;if(s instanceof Ns){var h=s.style;s.useStyle(A({image:h.image,x:h.x,y:h.y,width:h.width,height:h.height},l))}else s.useStyle(l),"pointer"!==s.type&&s.setColor(u);s.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===s.style.fill&&s.setStyle("fill",i(Kr(y.get(v,t),_,[0,1],!0))),s.z2EmphasisLift=0,$l(s,e),Zl(s,r,o,a)}if(g){var c=p[t];c.useStyle(y.getItemVisual(t,"style")),c.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),c.z2EmphasisLift=0,$l(c,e),Zl(c,r,o,a)}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=Xy(r,e.cx-i/2+$r(o[0],e.r),e.cy-i/2+$r(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new Br,c=[],p=[],d=t.isAnimationEnabled(),f=t.get(["pointer","showAbove"]);a.diff(this._data).add((function(t){c[t]=new Xs({silent:!0}),p[t]=new Xs({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),g=new Br,y=i(Kr(o,[l,u],[0,1],!0)),v=n.getModel("title");if(v.get("show")){var m=v.get("offsetCenter"),x=r.cx+$r(m[0],r.r),_=r.cy+$r(m[1],r.r);(D=c[e]).attr({z2:f?0:2,style:oc(v,{x:x,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:y})}),g.add(D)}var b=n.getModel("detail");if(b.get("show")){var w=b.get("offsetCenter"),S=r.cx+$r(w[0],r.r),M=r.cy+$r(w[1],r.r),I=$r(b.get("width"),r.r),T=$r(b.get("height"),r.r),C=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:y,D=p[e],A=b.get("formatter");D.attr({z2:f?0:2,style:oc(b,{x:S,y:M,text:fk(o,A),width:isNaN(I)?null:I,height:isNaN(T)?null:T,align:"center",verticalAlign:"middle"},{inheritColor:C})}),dc(D,{normal:b},o,(function(t){return fk(t,A)})),d&&fc(D,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return fk(a?a.interpolatedValue:o,A)}}),g.add(D)}h.add(g)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Og),yk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n}return n(e,t),e.prototype.getInitialData=function(t,e){return RM(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(bg);var vk=["itemStyle","opacity"],mk=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new Zu,a=new Xs;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(vk);l=null==l?1:l,n||Sh(i),i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,mh(i,{style:{opacity:l}},r,e)):vh(i,{style:{opacity:l},shape:{points:a.points}},r,e),$l(i,o),this._updateLabel(t,e),Zl(this,s.get("focus"),s.get("blurScope"),s.get("disabled"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;ic(r,rc(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new De(h[0][0],h[0][1]):null},vh(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),kb(n,Lb(a),{stroke:u})},e}(Xu),xk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new mk(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){wh(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Og),_k=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new NM(W(this.getData,this),W(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return RM(this,{coordDimensions:["value"],encodeDefaulter:H(ed,this)})},e.prototype._defaultLabelLine=function(t){Co(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(bg);function bk(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&Rk(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function Rk(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var Nk=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&C(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){E(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];E(B(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={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},e}(zp),Ek=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(ab);function zk(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=Bk(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=Bk(s,[0,a]),r=o=Bk(s,[r,o]),i=0}e[0]=Bk(e[0],n),e[1]=Bk(e[1],n);var l=Vk(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=Bk(e[i],c),u=Vk(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function Vk(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function Bk(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var Fk=E,Gk=Math.min,Wk=Math.max,Hk=Math.floor,Yk=Math.ceil,Xk=Jr,Uk=Math.PI,Zk=function(){function t(t,e,n){this.type="parallel",this._axesMap=yt(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;Fk(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new Ek(t,b_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();Fk(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),__(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=jk(e.get("axisExpandWidth"),l),c=jk(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=jk(d[1]-d[0],l),d[1]=d[0]+t):(t=jk(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||Hk(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[Hk(Xk(d[0]/h,1))+1,Yk(Xk(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),Fk(n,(function(e,n){var o=(i.axisExpandable?Kk:qk)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:Uk/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];Se(h,h,u),we(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];E(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?zk(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[Wk(0,o[1]*s/p-p/2)])[1]=Gk(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function jk(t,e){return Gk(Wk(t,e[0]),e[1])}function qk(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function Kk(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)Qr(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&vL(t);var l=T(s);l.brushType=RL(l.brushType,a),l.panelId=a===Qk?null:a.panelId,o=t._creatingCover=uL(t,l),t._covers.push(o)}if(o){var u=zL[RL(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(kL(t,o,t._track)),i&&(hL(t,o),u.updateCommon(t,o)),cL(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&gL(t,e,n)&&vL(t)&&(r={isEnd:i,removeOnClick:!0});return r}function RL(t,e){return"auto"===t?e.defaultBrushType:t}var NL={mousedown:function(t){if(this._dragging)EL(this,t);else if(!t.target||!t.target.draggable){LL(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=gL(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=gL(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new Cc(r[a],this,e));if(i&&n){var s=uk(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))}));return s.data}},e.prototype.setNodePosition=function(t,e){var n=(this.option.data||this.option.nodes)[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return og("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return og("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(bg);function QL(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){E(t,(function(t){var e=uP(t.outEdges,lP),n=uP(t.inEdges,lP),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)nP(s,l*=.99,a),eP(s,r,n,i,a),hP(s,l,a),eP(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";E(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),E(t,(function(t){var e=0,n=0;E(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),E(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==B(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function tP(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function eP(t,e,n,i,r){var o="vertical"===r?"x":"y";E(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function nP(t,e,n){E(t.slice().reverse(),(function(t){E(t,(function(t){if(t.outEdges.length){var i=uP(t.outEdges,iP,n)/uP(t.outEdges,lP);if(isNaN(i)){var r=t.outEdges.length;i=r?uP(t.outEdges,rP,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-sP(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-sP(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function iP(t,e){return sP(t.node2,e)*t.getValue()}function rP(t,e){return sP(t.node2,e)}function oP(t,e){return sP(t.node1,e)*t.getValue()}function aP(t,e){return sP(t.node1,e)}function sP(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function lP(t){return t.getValue()}function uP(t,e,n){for(var i=0,r=t.length,o=-1;++oo&&(o=e)})),E(n,(function(e){var n=new kD({type:"color",mappingMethod:"linear",dataExtent:[r,o],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),i=e.getModel().get(["itemStyle","color"]);null!=i?(e.setVisual("color",i),e.setVisual("style",{fill:i})):(e.setVisual("color",n),e.setVisual("style",{fill:n}))}))}i.length&&E(i,(function(t){var e=t.getModel().get("lineStyle");t.setVisual("style",e)}))}))}var pP=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];E(g,(function(t,e){var n;Y(t)?(n=t.slice(),t.unshift(e)):Y(t.value)?((n=A({},t)).value=n.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:Ym(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:Ym(f),dimsDef:v.slice()}];return RM(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:H(td,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),dP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(bg);R(dP,pP,!0);var fP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=vP(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?(Sh(n),mP(s,n,i,t)):n=vP(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(Og),gP=function(){},yP=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new gP},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var _=[v,x];i.push(_)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var SP=["color","borderColor"],MP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype.eachRendered=function(t){Jh(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&DP(s,a))return;var l=CP(a,n,!0);mh(l,{shape:{points:a.ends}},t,n),AP(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&DP(s,h)?i.remove(u):(u?(vh(u,{shape:{points:h.ends}},t,a),Sh(u)):u=CP(h),AP(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),OP(t,this.group);var e=t.get("clip",!0)?PS(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=CP(i.getItemLayout(n));AP(o,i,n,r),o.incremental=!0,this.group.add(o),this._progressiveEls.push(o)}},e.prototype._incrementalRenderLarge=function(t,e){OP(e,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Og),IP=function(){},TP=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new IP},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(ks);function CP(t,e,n){var i=t.ends;return new TP({shape:{points:n?kP(i,t):i},z2:100})}function DP(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]);0===t&&(r=n.get(["itemStyle","borderColorDoji"]));var o=n.getModel("itemStyle").getItemStyle(SP);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var NP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(bg);function EP(t){t&&Y(t.series)&&E(t.series,(function(t){q(t)&&"k"===t.type&&(t.type="candlestick")}))}R(NP,pP,!0);var zP=["itemStyle","borderColor"],VP=["itemStyle","borderColor0"],BP=["itemStyle","borderColorDoji"],FP=["itemStyle","color"],GP=["itemStyle","color0"],WP={seriesType:"candlestick",plan:kg(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?FP:GP)}function i(t,e){return e.get(0===t?BP:t>0?zP:VP)}if(!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,A(e.ensureUniqueItemVisual(r,"style"),s)}}}}},HP={seriesType:"candlestick",plan:kg(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=$r(rt(t.get("barMaxWidth"),r),r),a=$r(rt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?$r(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.getDimensionIndex(n.mapDimension(r[0])),a=z(n.mapDimensionsAll(r[1]),n.getDimensionIndex,n),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(o<0||a.length<4))return{progress:t.pipelineContext.large?function(n,i){var r,a,c=Bx(4*n.count),p=0,d=[],f=[],g=i.getStore(),y=!!t.get(["itemStyle","borderColorDoji"]);for(;null!=(a=n.next());){var v=g.get(o,a),m=g.get(s,a),x=g.get(l,a),_=g.get(u,a),b=g.get(h,a);isNaN(v)||isNaN(_)||isNaN(b)?(c[p++]=NaN,p+=3):(c[p++]=YP(g,a,m,x,l,y),d[0]=v,d[1]=_,r=e.dataToPoint(d,null,f),c[p++]=r?r[0]:NaN,c[p++]=r?r[1]:NaN,d[1]=b,r=e.dataToPoint(d,null,f),c[p++]=r?r[1]:NaN)}i.setLayout("largePoints",c)}:function(t,n){var r,a=n.getStore();for(;null!=(r=t.next());){var c=a.get(o,r),p=a.get(s,r),d=a.get(l,r),f=a.get(u,r),g=a.get(h,r),y=Math.min(p,d),v=Math.max(p,d),m=M(y,c),x=M(v,c),_=M(f,c),b=M(g,c),w=[];I(w,x,0),I(w,m,1),w.push(C(b),C(x),C(_),C(m));var S=!!n.getItemModel(r).get(["itemStyle","borderColorDoji"]);n.setItemLayout(r,{sign:YP(a,r,p,d,l,S),initBaseline:p>d?x[1]:m[1],ends:w,brushRect:T(f,g,c)})}function M(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function I(t,e,n){var r=e.slice(),o=e.slice();r[0]=Vh(r[0]+i/2,1,!1),o[0]=Vh(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function T(t,e,n){var r=M(t,n),o=M(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function C(t){return t[0]=Vh(t[0],1),t}}}}};function YP(t,e,n,i,r,o){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function XP(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var UP=function(t){function e(e,n){var i=t.call(this)||this,r=new fS(e,n),o=new Br;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=t.rippleNumber,r=this.childAt(1),o=0;o0&&(o=this._getLineLength(i)/l*1e3),o!==this._period||a!==this._loop||s!==this._roundTrip){i.stopAnimation();var h=void 0;h=X(u)?u(n):u,i.__t>0&&(h=-o*i.__t),this._animateSymbol(i,o,h,a,s)}this._period=o,this._loop=a,this._roundTrip=s}},e.prototype._animateSymbol=function(t,e,n,i,r){if(e>0){t.__t=0;var o=this,a=t.animate("",i).when(r?2*e:e,{__t:r?2:1}).delay(n).during((function(){o._updateSymbolPosition(t)}));i||a.done((function(){o.remove(t)})),a.start()}},e.prototype._getLineLength=function(t){return Vt(t.__p1,t.__cp1)+Vt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t<1?t.__t:2-t.__t,o=[t.x,t.y],a=o.slice(),s=In,l=Tn;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=t.__t<1?l(e[0],i[0],n[0],r):l(n[0],i[0],e[0],1-r),h=t.__t<1?l(e[1],i[1],n[1],r):l(n[1],i[1],e[1],1-r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=t.__t<1?u[0]-l[0]:l[0]-u[0],c=t.__t<1?u[1]-l[1]:l[1]-u[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(qP),JP=function(){this.polyline=!1,this.curveness=0,this.segs=[]},QP=function(t){function e(e){var n=t.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return n(e,t),e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new JP},e.prototype.buildPath=function(t,e){var n,i=e.segs,r=e.curveness;if(e.polyline)for(n=this._off;n0){t.moveTo(i[n++],i[n++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*r,p=(l+h)/2-(u-s)*r;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}this.incremental&&(this._off=n,this.notClear=!0)},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(ds(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(cs(u,h,p,d,o,t,e))return a;a++}return-1},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect();return t=n[0],e=n[1],i.contain(t,e)?(this.hoverDataIdx=this.findDataIndex(t,e))>=0:(this.hoverDataIdx=-1,!1)},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var e=this.shape.segs,n=1/0,i=1/0,r=-1/0,o=-1/0,a=0;a0&&(o.dataIndex=n+t.__startIndex)}))},t.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},t}(),eO={seriesType:"lines",plan:kg(),reset:function(t){var e=t.coordinateSystem;if(e){var n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h0&&(l||s.configLayer(o,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(a/10+.9,1),0)})),r.updateData(i);var u=t.get("clip",!0)&&PS(t.coordinateSystem,!1,t);u?this.group.setClipPath(u):this.group.removeClipPath(),this._lastZlevel=o,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateLineDraw(i,t).incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._lineDraw.incrementalUpdate(t,e.getData()),this._finished=t.end===e.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,e,n){var i=t.getData(),r=t.pipelineContext;if(!this._finished||r.large||r.progressiveRender)return{update:!0};var o=eO.reset(t,e,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,e){var n=this._lineDraw,i=this._showEffect(e),r=!!e.get("polyline"),o=e.pipelineContext.large;return n&&i===this._hasEffet&&r===this._isPolyline&&o===this._isLargeDraw||(n&&n.remove(),n=this._lineDraw=o?new tO:new YA(r?i?$P:KP:i?qP:HA),this._hasEffet=i,this._isPolyline=r,this._isLargeDraw=o),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var e=t.getZr();"svg"===e.painter.getType()||null==this._lastZlevel||e.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,e){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(e)},e.prototype.dispose=function(t,e){this.remove(t,e)},e.type="lines",e}(Og),iO="undefined"==typeof Uint32Array?Array:Uint32Array,rO="undefined"==typeof Float64Array?Array:Float64Array;function oO(t){var e=t.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(t.data=z(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),D([e,t[0],t[1]])})))}var aO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="lineStyle",n.visualDrawType="stroke",n}return n(e,t),e.prototype.init=function(e){e.data=e.data||[],oO(e);var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count)),t.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(e){if(oO(e),e.data){var n=this._processFlatCoordsArray(e.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(e.data=new Float32Array(n.count))}t.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var e=this._processFlatCoordsArray(t.data);e.flatCoords&&(this._flatCoords?(this._flatCoords=vt(this._flatCoords,e.flatCoords),this._flatCoordsOffset=vt(this._flatCoordsOffset,e.flatCoordsOffset)):(this._flatCoords=e.flatCoords,this._flatCoordsOffset=e.flatCoordsOffset),t.data=new Float32Array(e.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var e=this.getData().getItemModel(t),n=e.option instanceof Array?e.option:e.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[2*t+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,e){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[2*t],i=this._flatCoordsOffset[2*t+1],r=0;r ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),e=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&e>0?e+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(bg);function sO(t){return t instanceof Array||(t=[t,t]),t}var lO={seriesType:"lines",reset:function(t){var e=sO(t.get("symbol")),n=sO(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=sO(n.getShallow("symbol",!0)),r=sO(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var uO=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=h.createCanvas();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){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(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=h.createCanvas()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function hO(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var cO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this._progressiveEls=null,this.group.removeAll();var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):hO(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(hO(r)?this.render(e,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Jh(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem,h=OS(u,"cartesian2d");if(h){var c=u.getAxis("x"),p=u.getAxis("y");0,o=c.getBandWidth()+.5,a=p.getBandWidth()+.5,s=c.scale.getExtent(),l=p.scale.getExtent()}for(var d=this.group,f=t.getData(),g=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),v=t.getModel(["select","itemStyle"]).getItemStyle(),m=t.get(["itemStyle","borderRadius"]),x=rc(t),_=t.getModel("emphasis"),b=_.get("focus"),w=_.get("blurScope"),S=_.get("disabled"),M=h?[f.mapDimension("x"),f.mapDimension("y"),f.mapDimension("value")]:[f.mapDimension("time"),f.mapDimension("value")],I=n;Is[1]||Al[1])continue;var k=u.dataToPoint([D,A]);T=new Ws({shape:{x:k[0]-o/2,y:k[1]-a/2,width:o,height:a},style:C})}else{if(isNaN(f.get(M[1],I)))continue;T=new Ws({z2:1,shape:u.dataToRect([f.get(M[0],I)]).contentShape,style:C})}if(f.hasItemOption){var L=f.getItemModel(I),P=L.getModel("emphasis");g=P.getModel("itemStyle").getItemStyle(),y=L.getModel(["blur","itemStyle"]).getItemStyle(),v=L.getModel(["select","itemStyle"]).getItemStyle(),m=L.get(["itemStyle","borderRadius"]),b=P.get("focus"),w=P.get("blurScope"),S=P.get("disabled"),x=rc(L)}T.shape.r=m;var O=t.getRawValue(I),R="-";O&&null!=O[2]&&(R=O[2]+""),ic(T,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:C.opacity,defaultText:R}),T.ensureState("emphasis").style=g,T.ensureState("blur").style=y,T.ensureState("select").style=v,Zl(T,b,w,S),T.incremental=r,r&&(T.states.emphasis.hoverLayer=!0),d.add(T),f.setItemGraphicEl(I,T),this._progressiveEls&&this._progressiveEls.push(T)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new uO;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(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),x="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=z(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:-1}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=Y(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=$r(h[p.index],d),h[c.index]=$r(h[c.index],i?d:Math.abs(o)),u.symbolSize=h;var g=u.symbolScale=[h[0]/s,h[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(dO)||0;o&&(gO.attr({scaleX:e[0],scaleY:e[1],rotation:n}),gO.updateTransform(),o/=gO.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o||0}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=Zy(n.get("symbolOffset"),p);return function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=it(t.get("symbolMargin"),"15%")+"",x=!1;m.lastIndexOf("!")===m.length-1&&(x=!0,m=m.slice(0,m.length-1));var _=$r(m,e[d.index]),b=Math.max(g+2*_,0),w=x?0:2*_,S=vo(i),M=S?i:OO((v+w)/b);b=g+2*(_=(v-M*g)/2/(x?M:Math.max(M-1,1))),w=x?0:2*_,S||"fixed"===i||(M=u?OO((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=_}var I=f*(y/2),T=c.pathPosition=[];T[p.index]=n[p.wh]/2,T[d.index]="start"===a?I:"end"===a?l-I:l/2,o&&(T[0]+=o[0],T[1]+=o[1]);var C=c.bundlePosition=[];C[p.index]=n[p.xy],C[d.index]=n[d.xy];var D=c.barRectShape=A({},n);D[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(T[d.index]+I)),D[p.wh]=n[p.wh];var k=c.clipShape={};k[p.xy]=-n[p.xy],k[p.wh]=h.ecSize[p.wh],k[d.xy]=0,k[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function mO(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function xO(t){var e=t.symbolPatternSize,n=Xy(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function _O(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(kO(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function bO(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?LO(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=xO(n),r.add(o),LO(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function wO(t,e,n){var i=A({},e.barRectShape),r=t.__pictorialBarRect;r?LO(r,null,{shape:i},e,n):((r=t.__pictorialBarRect=new Ws({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}})).disableMorphing=!0,t.add(r))}function SO(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=A({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)vh(r,{shape:o},s,l);else{o[a.wh]=0,r=new Ws({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],Qh[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function MO(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=IO,n.isAnimationEnabled=TO,n}function IO(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function TO(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function CO(t,e,n,i){var r=new Br,o=new Br;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?_O(r,e,n):bO(r,0,n),wO(r,n,i),SO(r,e,n,i),r.__pictorialShapeStr=AO(t,n),r.__pictorialSymbolMeta=n,r}function DO(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];kO(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),E(o,(function(t){_h(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function AO(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function kO(t,e,n){E(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function LO(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&Qh[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function PO(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");kO(t,(function(t){if(t instanceof Ns){var e=t.style;t.useStyle(A({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)],f=t.__pictorialBarRect;f.ignoreClip=!0,ic(f,rc(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:pS(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),Zl(t,h,c,o.get("disabled"))}function OO(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var RO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=kc(qS.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%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(qS);var NO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new Gm(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fI&&!so(C-I)&&C0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new BO(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)Mp(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:FO,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(Og),HO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};YO(n);var i=this._levelModels=z(t.levels||[],(function(t){return new Cc(t,this,e)}),this),r=nD.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=aD(i,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){pD(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(bg);function YO(t){var e=0;E(t.children,(function(t){YO(t);var n=t.value;Y(n)&&(n=n[0]),e+=n}));var n=t.value;Y(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),Y(t.value)?t.value[0]=n:t.value=n}var XO=Math.PI/180;function UO(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");Y(i)||(i=[0,i]),Y(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=$r(e[0],r),l=$r(e[1],o),u=$r(i[0],a/2),h=$r(i[1],a/2),c=-t.get("startAngle")*XO,p=t.get("minAngle")*XO,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&ZO(f,y);var v=0;E(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),x=Math.PI/(m||v)*2,_=f.depth>0,b=f.height-(_?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(e,n){if(e){var i=n;if(e!==d){var r=e.getValue(),o=0===m&&M?x:r*x;o1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&U(o)&&(o=$n(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),A(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}var qO={color:"fill",borderColor:"stroke"},KO={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},$O=Vo(),JO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return _x(null,this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=$O(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(bg);function QO(t,e){return e=e||[0,0],z(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function tR(t,e){return e=e||[0,0],z([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function eR(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function nR(t,e){return e=e||[0,0],z(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function iR(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||_t(t,"text")))}function rR(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},_t(a,"text")&&(o.text=a.text),_t(a,"rich")&&(o.rich=a.rich),_t(a,"textFill")&&(o.fill=a.textFill),_t(a,"textStroke")&&(o.stroke=a.textStroke),_t(a,"fontFamily")&&(o.fontFamily=a.fontFamily),_t(a,"fontSize")&&(o.fontSize=a.fontSize),_t(a,"fontStyle")&&(o.fontStyle=a.fontStyle),_t(a,"fontWeight")&&(o.fontWeight=a.fontWeight),r={type:"text",style:o,silent:!0},i={};var s=_t(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),_t(a,"textPosition")&&(i.position=a.textPosition),_t(a,"textOffset")&&(i.offset=a.textOffset),_t(a,"textRotation")&&(i.rotation=a.textRotation),_t(a,"textDistance")&&(i.distance=a.textDistance)}return oR(o,t),E(o.rich,(function(t){oR(t,t)})),{textConfig:i,textContent:r}}function oR(t,e){e&&(e.font=e.textFont||e.font,_t(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),_t(e,"textAlign")&&(t.align=e.textAlign),_t(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),_t(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),_t(e,"textWidth")&&(t.width=e.textWidth),_t(e,"textHeight")&&(t.height=e.textHeight),_t(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),_t(e,"textPadding")&&(t.padding=e.textPadding),_t(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),_t(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),_t(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),_t(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),_t(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),_t(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),_t(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function aR(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";sR(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=t.fill||n.outsideFill||"#000"),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,E(e.rich,(function(t){sR(t,t)})),i}function sR(t,e){e&&(_t(e,"fill")&&(t.textFill=e.fill),_t(e,"stroke")&&(t.textStroke=e.fill),_t(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),_t(e,"font")&&(t.font=e.font),_t(e,"fontStyle")&&(t.fontStyle=e.fontStyle),_t(e,"fontWeight")&&(t.fontWeight=e.fontWeight),_t(e,"fontSize")&&(t.fontSize=e.fontSize),_t(e,"fontFamily")&&(t.fontFamily=e.fontFamily),_t(e,"align")&&(t.textAlign=e.align),_t(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),_t(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),_t(e,"width")&&(t.textWidth=e.width),_t(e,"height")&&(t.textHeight=e.height),_t(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),_t(e,"padding")&&(t.textPadding=e.padding),_t(e,"borderColor")&&(t.textBorderColor=e.borderColor),_t(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),_t(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),_t(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),_t(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),_t(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),_t(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),_t(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),_t(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),_t(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),_t(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var lR={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},uR=G(lR),hR=(V(mr,(function(t,e){return t[e]=1,t}),{}),mr.join(", "),["","style","shape","extra"]),cR=Vo();function pR(t,e,n,i,r){var o=t+"Animation",a=gh(t,i,r)||{},s=cR(e).userDuring;return a.duration>0&&(a.during=s?W(xR,{el:e,userDuring:s}):null,a.setToFinal=!0,a.scope=t),A(a,n[o]),a}function dR(t,e,n,i){var r=(i=i||{}).dataIndex,o=i.isInit,a=i.clearStyle,s=n.isAnimationEnabled(),l=cR(t),u=e.style;l.userDuring=e.during;var h={},c={};if(function(t,e,n){for(var i=0;i=0)){var c=t.getAnimationStyleProps(),p=c?c.style:null;if(p){!r&&(r=i.style={});var d=G(n);for(u=0;u0&&t.animateFrom(p,d)}else!function(t,e,n,i,r){if(r){var o=pR("update",t,e,i,n);o.duration>0&&t.animateFrom(r,o)}}(t,e,r||0,n,h);fR(t,e),u?t.dirty():t.markRedraw()}function fR(t,e){for(var n=cR(t).leaveToProps,i=0;i=0){!o&&(o=i[t]={});var p=G(a);for(h=0;hi[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:W(nR,t)}}},calendar:function(t){var e=t.getRect(),n=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:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}};function zR(t){return t instanceof ks}function VR(t){return t instanceof Da}var BR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._progressiveEls=null;var r=this._data,o=t.getData(),a=this.group,s=YR(t,o,e,n);r||a.removeAll(),o.diff(r).add((function(e){UR(n,null,e,s(e,i),t,a,o)})).remove((function(e){var n=r.getItemGraphicEl(e);n&&gR(n,$O(n).option,t)})).update((function(e,l){var u=r.getItemGraphicEl(l);UR(n,u,e,s(e,i),t,a,o)})).execute();var l=t.get("clip",!0)?PS(t.coordinateSystem,!1,t):null;l?a.setClipPath(l):a.removeClipPath(),this._data=o},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,e,n,i,r){var o=e.getData(),a=YR(e,o,n,i),s=this._progressiveEls=[];function l(t){t.isGroup||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var u=t.start;u=0?e.getStore().get(r,n):void 0}var o=e.get(i.name,n),a=i&&i.ordinalMeta;return a?a.categories[o]:o},styleEmphasis:function(n,i){0;null==i&&(i=s);var r=m(i,CR).getItemStyle(),o=x(i,CR),a=oc(o,null,null,!0,!0);a.text=o.getShallow("show")?ot(t.getFormattedLabel(i,CR),t.getFormattedLabel(i,DR),pS(e,i)):null;var l=ac(o,null,!0);return b(n,r),r=aR(r,a,l),n&&_(r,n),r.legacy=!0,r},visual:function(t,n){if(null==n&&(n=s),_t(qO,t)){var i=e.getItemVisual(n,"style");return i?i[qO[t]]:null}if(_t(KO,t))return e.getItemVisual(n,t)},barLayout:function(t){if("cartesian2d"===o.type){return function(t){var e=[],n=t.axis,i="axis0";if("category"===n.type){for(var r=n.getBandWidth(),o=0;o=c;f--){var g=e.childAt(f);JR(e,g,r)}}(t,c,n,i,r),a>=0?o.replaceAt(c,a):o.add(c),c}function jR(t,e,n){var i,r=$O(t),o=e.type,a=e.shape,s=e.style;return n.isUniversalTransitionEnabled()||null!=o&&o!==r.customGraphicType||"path"===o&&((i=a)&&(_t(i,"pathData")||_t(i,"d")))&&nN(a)!==r.customPathData||"image"===o&&_t(s,"image")&&s.image!==r.customImagePath}function qR(t,e,n){var i=e?KR(t,e):t,r=e?$R(t,i,CR):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?KR(s,e):s:null;if(r&&(n.isLegacy||iR(r,o,!!a,!!l))){n.isLegacy=!0;var u=rR(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function KR(t,e){return e?t?t[e]:null:t}function $R(t,e,n){var i=e&&e.style;return null==i&&n===CR&&t&&(i=t.styleEmphasis),i}function JR(t,e,n){e&&gR(e,$O(t).option,n)}function QR(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function tN(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;ZR(n.api,r,n.dataIndex,i,n.seriesModel,n.group)}function eN(t){var e=this.context,n=e.oldChildren[t];n&&gR(n,$O(n).option,e.seriesModel)}function nN(t){return t&&(t.pathData||t.d)}var iN=Vo(),rN=T,oN=W,aN=function(){function t(){this._dragging=!1,this.animationThreshold=15}return t.prototype.render=function(t,e,n,i){var r=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,i||this._lastValue!==r||this._lastStatus!==o){this._lastValue=r,this._lastStatus=o;var a=this._group,s=this._handle;if(!o||"hide"===o)return a&&a.hide(),void(s&&s.hide());a&&a.show(),s&&s.show();var l={};this.makeElOption(l,r,t,e,n);var u=l.graphicKey;u!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=u;var h=this._moveAnimation=this.determineAnimation(t,e);if(a){var c=H(sN,e,h);this.updatePointerEl(a,l,c),this.updateLabelEl(a,l,c,e)}else a=this._group=new Br,this.createPointerEl(a,l,t,e),this.createLabelEl(a,l,t,e),n.getZr().add(a);cN(a,e,!0),this._renderHandle(r)}},t.prototype.remove=function(t){this.clear(t)},t.prototype.dispose=function(t){this.clear(t)},t.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,r="category"===i.type,o=e.get("snap");if(!o&&!r)return!1;if("auto"===n||null==n){var a=this.animationThreshold;if(r&&i.getBandWidth()>a)return!0;if(o){var s=wI(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=iN(t).pointerEl=new Qh[r.type](rN(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=iN(t).labelEl=new Xs(rN(e.label));t.add(r),uN(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=iN(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=iN(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),uN(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Uh(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){de(t.event)},onmousedown:oN(this._onHandleDragMove,this,0,0),drift:oN(this._onHandleDragMove,this),ondragend:oN(this._onHandleDragEnd,this)}),i.add(r)),cN(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");Y(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Hg(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){sN(this._axisPointerModel,!e&&this._moveAnimation,this._handle,hN(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(hN(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(hN(i)),iN(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._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}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Yg(this,"_doDispatchAxisPointer")},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function sN(t,e,n,i){lN(iN(n).lastProp,i)||(iN(n).lastProp=i,e?vh(n,i,t):(n.stopAnimation(),n.attr(i)))}function lN(t,e){if(q(t)&&q(e)){var n=!0;return E(e,(function(e,i){n=n&&lN(t[i],e)})),!!n}return t===e}function uN(t,e){t[e.get(["label","show"])?"show":"hide"]()}function hN(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function cN(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function pN(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function dN(t,e,n,i,r){var o=fN(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=vp(a.get("padding")||0),l=a.getFont(),u=Sr(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:oc(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function fN(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:S_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};E(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),U(a)?o=a.replace("{value}",o):X(a)&&(o=a(s))}return o}function gN(t,e,n){var i=[1,0,0,1,0,0];return Se(i,i,n.rotation),we(i,i,n.position),Fh([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function yN(t,e,n,i,r,o){var a=dI.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),dN(e,i,r,o,{position:gN(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function vN(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function mN(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function xN(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var _N=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=bN(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=pN(i),c=wN[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}yN(e,t,iI(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=iI(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=gN(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=bN(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(aN);function bN(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var wN={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vN([e,n[0]],[e,n[1]],SN(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:mN([e-i/2,n[0]],[i,r],SN(t))}}};function SN(t){return"x"===t.dim?0:1}var MN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(zp),IN=Vo(),TN=E;function CN(t,e,n){if(!r.node){var i=e.getZr();IN(i).records||(IN(i).records={}),function(t,e){if(IN(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);TN(IN(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}IN(t).initialized=!0,n("click",H(AN,"click")),n("mousemove",H(AN,"mousemove")),n("globalout",DN)}(i,e),(IN(i).records[t]||(IN(i).records[t]={})).handler=n}}function DN(t,e,n){t.handler("leave",null,n)}function AN(t,e,n,i){e.handler(t,n,i)}function kN(t,e){if(!r.node){var n=e.getZr();(IN(n).records||{})[t]&&(IN(n).records[t]=null)}}var LN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";CN("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){kN("axisPointer",e)},e.prototype.dispose=function(t,e){kN("axisPointer",e)},e.type="axisPointer",e}(Ag);function PN(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=zo(o,t);if(null==a||a<0||Y(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(z(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var ON=Vo();function RN(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||W(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){BN(r)&&(r=PN({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=BN(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||BN(r),p={},d={},f={list:[],map:{}},g={showPointer:H(EN,d),showTooltip:H(zN,f)};E(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);E(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&NN(t,a,g,!1,p)}}))}));var y={};return E(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&E(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,VN(e),VN(t)))),y[t.key]=o}}))})),E(y,(function(t,e){NN(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];E(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(BN(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=ON(i)[r]||{},a=ON(i)[r]={};E(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&t.triggerEmphasis&&E(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];E(o,(function(t,e){!a[e]&&l.push(t)})),E(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function NN(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return E(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),E(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&A(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function EN(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function zN(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=MI(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function VN(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function BN(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function FN(t){TI.registerAxisPointerClass("CartesianAxisPointer",_N),t.registerComponentModel(MN),t.registerComponentView(LN),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Y(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=xI(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},RN)}var GN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=pN(i),c=WN[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];Se(p,p,s),we(p,p,[i.cx,i.cy]),l=Fh([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=dI.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));dN(t,n,i,r,p)},e}(aN);var WN={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:vN(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:xN(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:xN(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},HN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(zp),YN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Wo).models[0]},e.type="polarAxis",e}(zp);R(YN,D_);var XN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(YN),UN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(YN),ZN=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(ab);ZN.prototype.dataToRadius=ab.prototype.dataToCoord,ZN.prototype.radiusToData=ab.prototype.coordToData;var jN=Vo(),qN=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Sr(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=jN(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(ab);qN.prototype.dataToAngle=ab.prototype.dataToCoord,qN.prototype.angleToData=ab.prototype.coordToData;var KN=["radius","angle"],$N=function(){function t(t){this.dimensions=KN,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new ZN,this._angleAxis=new qN,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i-1e-4,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return JN(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return JN(e)===this?this.pointToData(n):null},t}();function JN(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function QN(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();E(C_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),E(C_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),__(i.scale,i.model),__(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function tE(t,e){var n;if(t.type=e.get("type"),t.scale=b_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var i=e.get("startAngle"),r=null!==(n=e.get("endAngle"))&&void 0!==n?n:i+(t.inverse?-360:360);t.setExtent(i,r)}e.axis=t,t.model=e}var eE={dimensions:KN,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new $N(i+"");r.update=QN;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");tE(o,s),tE(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=$r(i[0],r),t.cy=$r(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:Y(l)||(l=[0,l]);var u=[$r(l[0],s),$r(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Wo).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},nE=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function iE(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function rE(t){return t.getRadiusAxis().inverse?0:1}function oE(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var aE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=z(n.getViewLabels(),(function(t){t=T(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));oE(s),oE(o),E(nE,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||sE[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(TI),sE={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=n.getAngleAxis(),u=Math.PI/180,h=l.getExtent(),c=rE(n),p=c?0:1,d=360===Math.abs(h[1]-h[0])?"Circle":"Arc";(a=0===o[p]?new Qh[d]({shape:{cx:n.cx,cy:n.cy,r:o[c],startAngle:-h[0]*u,endAngle:-h[1]*u,clockwise:l.inverse},style:s.getLineStyle(),z2:1,silent:!0}):new Wu({shape:{cx:n.cx,cy:n.cy,r:o[c],r0:o[p]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[rE(n)],u=z(i,(function(t){return new Ku({shape:iE(n,[l,l+s],t.coord)})}));t.add(Nh(u,{style:k(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[rE(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];q(m)&&m.textStyle&&(a=new Cc(m.textStyle,l,l.ecModel))}var x=new Xs({silent:dI.isLabelSilent(e),style:oc(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(x),h){var _=dI.makeAxisEventDataBase(e);_.targetType="axisLabel",_.value=i.rawLabel,rl(x).eventData=_}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",C=b;m&&(i[s][I]||(i[s][I]={p:b,n:b}),C=i[s][I][T]);var D=void 0,A=void 0,k=void 0,L=void 0;if("radius"===c.dim){var P=c.dataToCoord(M)-b,O=o.dataToCoord(I);Math.abs(P)=L})}}}))}var gE={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},yE={splitNumber:5},vE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="polar",e}(Ag);function mE(t,e){e=e||{};var n=t.coordinateSystem,i=t.axis,r={},o=i.position,a=i.orient,s=n.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};r.position=["vertical"===a?u.vertical[o]:l[0],"horizontal"===a?u.horizontal[o]:l[3]];r.rotation=Math.PI/2*{horizontal:0,vertical:1}[a];r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,right:1,left:-1}[o],t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),it(e.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection);var h=e.rotate;return null==h&&(h=t.get(["axisLabel","rotate"])),r.labelRotation="top"===o?-h:h,r.z2=1,r}var xE=["axisLine","axisTickLabel","axisName"],_E=["splitArea","splitLine"],bE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="SingleAxisPointer",n}return n(e,t),e.prototype.render=function(e,n,i,r){var o=this.group;o.removeAll();var a=this._axisGroup;this._axisGroup=new Br;var s=mE(e),l=new dI(e,s);E(xE,l.add,l),o.add(this._axisGroup),o.add(l.getGroup()),E(_E,(function(t){e.get([t,"show"])&&wE[t](this,this.group,this._axisGroup,e)}),this),Hh(a,this._axisGroup,e),t.prototype.render.call(this,e,n,i,r)},e.prototype.remove=function(){AI(this)},e.type="singleAxis",e}(TI),wE={splitLine:function(t,e,n,i){var r=i.axis;if(!r.scale.isBlank()){var o=i.getModel("splitLine"),a=o.getModel("lineStyle"),s=a.get("color");s=s instanceof Array?s:[s];for(var l=a.get("width"),u=i.coordinateSystem.getRect(),h=r.isHorizontal(),c=[],p=0,d=r.getTicksCoords({tickModel:o}),f=[],g=[],y=0;y=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return CE(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return CE(e)===this?this.pointToData(n):null},t}();function CE(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var DE={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new TE(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Wo).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:IE},AE=["x","y"],kE=["width","height"],LE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=RE(a,1-OE(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=pN(i),c=PE[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}yN(e,t,mE(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=mE(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=gN(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=OE(r),s=RE(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=RE(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(aN),PE={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:vN([e,n[0]],[e,n[1]],OE(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:mN([e-i/2,n[0]],[i,r],OE(t))}}};function OE(t){return t.isHorizontal()?0:1}function RE(t,e){var n=t.getRect();return[n[AE[e]],n[AE[e]]+n[kE[e]]]}var NE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(Ag);var EE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Rp(e);t.prototype.init.apply(this,arguments),zE(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),zE(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(zp);function zE(t,e){var n,i=t.cellSize;1===(n=Y(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=z([0,1],(function(t){return function(t,e){return null!=t[Cp[e][0]]||null!=t[Cp[e][1]]&&null!=t[Cp[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));Op(t,e,{type:"box",ignoreSize:r})}var VE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient(),s=e.getLocaleModel();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,s,a,i),this._renderWeekText(t,s,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new Ws({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new Zu({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return U(t)&&t?(n=t,E(e,(function(t,e){n=n.replace("{"+e+"}",i?re(t):t)})),n):X(t)?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new Xs({z2:30,style:oc(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n,i){var r=t.getModel("monthLabel");if(r.get("show")){var o=r.get("nameMap"),a=r.get("margin"),s=r.get("position"),l=r.get("align"),u=[this._tlpoints,this._blpoints];o&&!U(o)||(o&&(e=Vc(o)||e),o=e.get(["time","monthAbbr"])||[]);var h="start"===s?0:1,c="horizontal"===n?0:1;a="start"===s?-a:a;for(var p="center"===l,d=0;d=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/BE)-Math.floor(n[0].time/BE)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function GE(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}function WE(t,e){var n;return E(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var HE=["transition","enterFrom","leaveTo"],YE=HE.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function XE(t,e,n){if(n&&(!t[n]&&e[n]&&(t[n]={}),t=t[n],e=e[n]),t&&e)for(var i=n?HE:YE,r=0;r=0;l--){var p,d,f;if(f=null!=(d=Ro((p=n[l]).id,null))?r.get(d):null){var g=f.parent,y=(c=jE(g),{}),v=Lp(f,p,g===i?{width:o,height:a}:{width:c.width,height:c.height},null,{hv:p.hv,boundingMode:p.bounding},y);if(!jE(f).isNew&&v){for(var m=p.transition,x={},_=0;_=0)?x[b]=w:f[b]=w}vh(f,x,t,0)}else f.attr(y)}}},e.prototype._clear=function(){var t=this,e=this._elMap;e.each((function(n){JE(n,jE(n).option,e,t._lastGraphicModel)})),this._elMap=yt()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Ag);function KE(t){var e=_t(ZE,t)?ZE[t]:Lh(t);var n=new e({});return jE(n).type=t,n}function $E(t,e,n,i){var r=KE(n);return e.add(r),i.set(t,r),jE(r).id=t,jE(r).isNew=!0,r}function JE(t,e,n,i){t&&t.parent&&("group"===t.type&&t.traverse((function(t){JE(t,e,n,i)})),gR(t,e,i),n.removeKey(jE(t).id))}function QE(t,e,n,i){t.isGroup||E([["cursor",Da.prototype.cursor],["zlevel",i||0],["z",n||0],["z2",0]],(function(n){var i=n[0];_t(e,i)?t[i]=rt(e[i],n[1]):null==t[i]&&(t[i]=n[1])})),E(G(e),(function(n){if(0===n.indexOf("on")){var i=e[n];t[n]=X(i)?i:null}})),_t(e,"draggable")&&(t.draggable=e.draggable),null!=e.name&&(t.name=e.name),null!=e.id&&(t.id=e.id)}var tz=["x","y","radius","angle","single"],ez=["cartesian2d","polar","singleAxis"];function nz(t){return t+"Axis"}function iz(t,e){var n,i=yt(),r=[],o=yt();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function rz(t){var e=t.ecModel,n={infoList:[],infoMap:yt()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(nz(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var oz=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),az=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=sz(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=sz(t);C(this.option,t,!0),C(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=yt();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return E(tz,(function(n){var i=this.getReferringComponents(nz(n),Ho);if(i.specified){e=!0;var r=new oz;E(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new oz;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Wo).models[0];a&&E(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Wo).models[0]&&o.add(t.componentIndex)}))}}}i&&E(tz,(function(e){if(i){var r=n.findComponents({mainType:nz(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new oz;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._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}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");E([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(nz(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){E(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(nz(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;E([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;E(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=nz(this._dimName),i=e.getReferringComponents(n,Wo).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return T(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];cz(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Kr(h,o,n))):(e=!0,h=Kr(c=null==c?n[u]:i.parse(c),n,o)),s[u]=null==c||isNaN(c)?n[u]:c,a[u]=null==h||isNaN(h)?o[u]:h})),pz(s),pz(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";zk(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Kr(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];cz(n,(function(t){!function(t,e,n){e&&E(C_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=v_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&cz(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);if(i.length){if("weakFilter"===r){var a=e.getStore(),s=z(i,(function(t){return e.getDimensionIndex(t)}),e);e.filterSelf((function(t){for(var e,n,r,l=0;lo[1];if(h&&!c&&!p)return!0;h&&(r=!0),c&&(e=!0),p&&(n=!0)}return r&&e&&n}))}else cz(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}}));cz(i,(function(t){e.setApproximateExtent(o,t)}))}}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;cz(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Kr(n[0]+o,n,[0,100],!0):null!=r&&(o=Kr(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=no(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var fz={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(nz(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new dz(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=yt();return E(n,(function(t){E(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var gz=!1;function yz(t){gz||(gz=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,fz),function(t){t.registerAction("dataZoom",(function(t,e){E(iz(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function vz(t){t.registerComponentModel(lz),t.registerComponentView(hz),yz(t)}var mz=function(){},xz={};function _z(t,e){xz[t]=e}function bz(t){return xz[t]}var wz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;E(this.option.feature,(function(t,n){var i=bz(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),C(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(zp);function Sz(t,e){var n=vp(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new Ws({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var Mz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a="vertical"===t.get("orient"),s=t.get("feature")||{},l=this._features||(this._features={}),u=[];E(s,(function(t,e){u.push(e)})),new Gm(this._featureNames||[],u).add(h).update(h).remove(H(h,null)).execute(),this._featureNames=u,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=kp(i,o,r);Ap(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Lp(t,i,o,r)}(r,t,n),r.add(Sz(r.getBoundingRect(),t)),a||r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.ensureState("emphasis");if(l&&!X(l)&&e){var u=l.style||(l.style={}),h=Sr(e,Xs.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+10;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function h(h,c){var p,d=u[h],f=u[c],g=s[d],y=new Cc(g,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===d&&(g.title=i.newTitle),d&&!f){if(function(t){return 0===t.indexOf("my")}(d))p={onclick:y.option.onclick,featureName:d};else{var v=bz(d);if(!v)return;p=new v}l[d]=p}else if(!(p=l[f]))return;p.uid=Ac("toolbox-feature"),p.model=y,p.ecModel=e,p.api=n;var m=p instanceof mz;d||!f?!y.get("show")||m&&p.unusable?m&&p.remove&&p.remove(e,n):(!function(i,s,l){var u,h,c=i.getModel("iconStyle"),p=i.getModel(["emphasis","iconStyle"]),d=s instanceof mz&&s.getIcons?s.getIcons():i.get("icon"),f=i.get("title")||{};U(d)?(u={})[l]=d:u=d;U(f)?(h={})[l]=f:h=f;var g=i.iconPaths={};E(u,(function(l,u){var d=Uh(l,{},{x:-o/2,y:-o/2,width:o,height:o});d.setStyle(c.getItemStyle()),d.ensureState("emphasis").style=p.getItemStyle();var f=new Xs({style:{text:h[u],align:p.get("textAlign"),borderRadius:p.get("textBorderRadius"),padding:p.get("textPadding"),fill:null,font:cc({fontStyle:p.get("textFontStyle"),fontFamily:p.get("textFontFamily"),fontSize:p.get("textFontSize"),fontWeight:p.get("textFontWeight")},e)},ignore:!0});d.setTextContent(f),Kh({el:d,componentModel:t,itemName:u,formatterParamsExtra:{title:h[u]}}),d.__title=h[u],d.on("mouseover",(function(){var e=p.getItemStyle(),i=a?null==t.get("right")&&"right"!==t.get("left")?"right":"left":null==t.get("bottom")&&"bottom"!==t.get("top")?"bottom":"top";f.setStyle({fill:p.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:p.get("textBackgroundColor")}),d.setTextConfig({position:p.get("textPosition")||i}),f.ignore=!t.get("showTitle"),n.enterEmphasis(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",u])&&n.leaveEmphasis(this),f.hide()})),("emphasis"===i.get(["iconStatus",u])?Ol:Rl)(d),r.add(d),d.on("click",W(s.onclick,s,e,n,u)),g[u]=d}))}(y,p,d),y.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Ol:Rl)(i[t])},p instanceof mz&&p.render&&p.render(y,e,n,i)):m&&p.dispose&&p.dispose(e,n)}},e.prototype.updateView=function(t,e,n,i){E(this._features,(function(t){t instanceof mz&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){E(this._features,(function(n){n instanceof mz&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){E(this._features,(function(n){n instanceof mz&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(Ag);var Iz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o="svg"===e.getZr().painter.getType(),a=o?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:a,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),l=r.browser;if("function"!=typeof MouseEvent||!l.newEdge&&(l.ie||l.edge))if(window.navigator.msSaveOrOpenBlob||o){var u=s.split(","),h=u[0].indexOf("base64")>-1,c=o?decodeURIComponent(u[1]):u[1];h&&(c=window.atob(c));var p=i+"."+a;if(window.navigator.msSaveOrOpenBlob){for(var d=c.length,f=new Uint8Array(d);d--;)f[d]=c.charCodeAt(d);var g=new Blob([f]);window.navigator.msSaveOrOpenBlob(g,p)}else{var y=document.createElement("iframe");document.body.appendChild(y);var v=y.contentWindow,m=v.document;m.open("image/svg+xml","replace"),m.write(c),m.close(),v.focus(),m.execCommand("SaveAs",!0,p),document.body.removeChild(y)}}else{var x=n.get("lang"),_='',b=window.open();b.document.write(_),b.document.title=i}else{var w=document.createElement("a");w.download=i+"."+a,w.target="_blank",w.href=s;var S=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});w.dispatchEvent(S)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])}},e}(mz),Tz="__ec_magicType_stack__",Cz=[["line","bar"],["stack"]],Dz=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return E(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(Az[n]){var o,a={series:[]};E(Cz,(function(t){P(t,n)>=0&&E(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=Az[n](e,r,t,i);o&&(k(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Wo).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}}));var s=n;"stack"===n&&(o=C({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),"emphasis"!==i.get(["iconStatus",n])&&(s="tiled")),e.dispatchAction({type:"changeMagicType",currentType:s,newOption:a,newTitle:o,featureName:"magicType"})}},e}(mz),Az={line:function(t,e,n,i){if("bar"===t)return C({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return C({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===Tz;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),C({id:e,stack:r?"":Tz},i.get(["option","stack"])||{},!0)}};Cm({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var kz=new Array(60).join("-"),Lz="\t";function Pz(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var Oz=new RegExp("[\t]+","g");function Rz(t,e){var n=t.split(new RegExp("\n*"+kz+"\n*","g")),i={series:[]};return E(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(Lz)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=z(Pz(e.shift()).split(Oz),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=jz[t.brushType](0,n,e);t.__rangeOffset={offset:Kz[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){E(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&E(i.coordSyses,(function(i){var r=jz[t.brushType](1,i,t.range,!0);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){E(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=jz[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?Kz[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=Jz(n),o=Jz(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return z(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:BL(i),isTargetByCursor:GL(i,t,n.coordSysModel),getLinearBrushOtherExtent:FL(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&P(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=Yz(e,t),r=0;rt[1]&&t.reverse(),t}function Yz(t,e){return Fo(t,e,{includeMainTypes:Gz})}var Xz={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=yt(),a={},s={};(n||i||r)&&(E(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),E(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),E(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];E(r.getCartesians(),(function(t,e){(P(n,t.getAxis("x").model)>=0||P(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:Zz.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){E(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:Zz.geo})}))}},Uz=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],Zz={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Bh(t)),e}},jz={lineX:H(qz,0),lineY:H(qz,1),rect:function(t,e,n,i){var r=t?e.pointToData([n[0][0],n[1][0]],i):e.dataToPoint([n[0][0],n[1][0]],i),o=t?e.pointToData([n[0][1],n[1][1]],i):e.dataToPoint([n[0][1],n[1][1]],i),a=[Hz([r[0],o[0]]),Hz([r[1],o[1]])];return{values:a,xyMinMax:a}},polygon:function(t,e,n,i){var r=[[1/0,-1/0],[1/0,-1/0]];return{values:z(n,(function(n){var o=t?e.pointToData(n,i):e.dataToPoint(n,i);return r[0][0]=Math.min(r[0][0],o[0]),r[1][0]=Math.min(r[1][0],o[1]),r[0][1]=Math.max(r[0][1],o[0]),r[1][1]=Math.max(r[1][1],o[1]),o})),xyMinMax:r}}};function qz(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=Hz(z([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t]),!0):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var Kz={lineX:H($z,0),lineY:H($z,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return z(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function $z(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function Jz(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var Qz,tV,eV=E,nV=Io+"toolbox-dataZoom_",iV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this._brushController||(this._brushController=new lL(n.getZr()),this._brushController.on("brush",W(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n._isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n._isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new Wz(oV(t),e,{include:["grid"]}),s=a.makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n._brushController.setPanels(s).enableBrush(!(!o||!s.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return Bz(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){rV[n].call(this)},e.prototype.remove=function(t,e){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,e){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this._brushController.updateCovers([]),new Wz(oV(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=Bz(t);zz(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=zk(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];eV(t,(function(t,n){e.push(T(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(mz),rV={zoom:function(){var t=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=Bz(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return zz(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function oV(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}Qz="dataZoom",tV=function(t){var e=t.getComponent("toolbox",0),n=["feature","dataZoom"];if(e&&null!=e.get(n)){var i=e.getModel(n),r=[],o=Fo(t,oV(i));return eV(o.xAxisModels,(function(t){return a(t,"xAxis","xAxisIndex")})),eV(o.yAxisModels,(function(t){return a(t,"yAxis","yAxisIndex")})),r}function a(t,e,n){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:i.get("filterMode",!0)||"filter",id:nV+e+o};a[n]=o,r.push(a)}},lt(null==od.get(Qz)&&tV),od.set(Qz,tV);var aV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(zp);function sV(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}function lV(t){if(r.domSupported)for(var e=document.documentElement.style,n=0,i=t.length;n-1?(u+="top:50%",h+="translateY(-50%) rotate("+(a="left"===s?-225:-45)+"deg)"):(u+="left:50%",h+="translateX(-50%) rotate("+(a="top"===s?225:45)+"deg)");var c=a*Math.PI/180,p=l+r,d=p*Math.abs(Math.cos(c))+p*Math.abs(Math.sin(c)),f=e+" solid "+r+"px;";return'
    '}(n,i,r)),U(t))o.innerHTML=t+a;else if(t){o.innerHTML="",Y(t)||(t=[t]);for(var s=0;s=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api,i=t.get("triggerOn");if(null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i){var r=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&r.manuallyShowTip(t,e,n,{x:r._lastX,y:r._lastY,dataByCoordSys:r._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!r.node&&n.getDom()){var o=IV(i,n);this._ticket="";var a=i.dataByCoordSys,s=function(t,e,n){var i=Go(t).queryOptionMap,r=i.keys()[0];if(!r||"series"===r)return;var o=Yo(e,r,i.get(r),{useDefault:!1,enableAll:!1,enableNone:!1}),a=o.models[0];if(!a)return;var s,l=n.getViewOfComponentModel(a);if(l.group.traverse((function(e){var n=rl(e).tooltipConfig;if(n&&n.name===t.name)return s=e,!0})),s)return{componentMainType:r,componentIndex:a.componentIndex,el:s}}(i,e,n);if(s){var l=s.el.getBoundingRect().clone();l.applyTransform(s.el.transform),this._tryShow({offsetX:l.x+l.width/2,offsetY:l.y+l.height/2,target:s.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&null!=i.x&&null!=i.y){var u=wV;u.x=i.x,u.y=i.y,u.update(),rl(u).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:u},o)}else if(a)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:a,tooltipOption:i.tooltipOption},o);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var h=PN(i,e),c=h.point[0],p=h.point[1];null!=c&&null!=p&&this._tryShow({offsetX:c,offsetY:p,target:h.el,position:i.position,positionDefault:"bottom"},o)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(IV(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===MV([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model],this._tooltipModel).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;if(i&&i.length)this._showAxisTooltip(i,t);else if(n){var r,o;if("legend"===rl(n).ssrType)return;this._lastDataByCoordSys=null,Oy(n,(function(t){return null!=rl(t).dataIndex?(r=t,!0):null!=rl(t).tooltipConfig?(o=t,!0):void 0}),!0),r?this._showSeriesItemTooltip(t,r,e):o?this._showComponentItemTooltip(t,o,e):this._hide(e)}else this._lastDataByCoordSys=null,this._hide(e)}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=W(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=MV([e.tooltipOption],i),a=this._renderMode,s=[],l=og("section",{blocks:[],noHeader:!0}),u=[],h=new yg;E(t,(function(t){E(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),r=t.value;if(e&&null!=r){var o=fN(r,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),c=og("section",{header:o,noHeader:!ut(o),sortBlocks:!0,blocks:[]});l.blocks.push(c),E(t.seriesDataIndices,(function(l){var p=n.getSeriesByIndex(l.seriesIndex),d=l.dataIndexInside,f=p.getDataParams(d);if(!(f.dataIndex<0)){f.axisDim=t.axisDim,f.axisIndex=t.axisIndex,f.axisType=t.axisType,f.axisId=t.axisId,f.axisValue=S_(e.axis,{value:r}),f.axisValueLabel=o,f.marker=h.makeTooltipMarker("item",Sp(f.color),a);var g=bf(p.formatTooltip(d,!0,null)),y=g.frag;if(y){var v=MV([p],i).get("valueFormatter");c.blocks.push(v?A({valueFormatter:v},y):y)}g.text&&u.push(g.text),s.push(f)}}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=cg(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
    ",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t,s)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=this._ecModel,r=rl(e),o=r.seriesIndex,a=i.getSeriesByIndex(o),s=r.dataModel||a,l=r.dataIndex,u=r.dataType,h=s.getData(u),c=this._renderMode,p=t.positionDefault,d=MV([h.getItemModel(l),s,a&&(a.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),f=d.get("trigger");if(null==f||"item"===f){var g=s.getDataParams(l,u),y=new yg;g.marker=y.makeTooltipMarker("item",Sp(g.color),c);var v=bf(s.formatTooltip(l,!1,u)),m=d.get("order"),x=d.get("valueFormatter"),_=v.frag,b=_?cg(x?A({valueFormatter:x},_):_,y,c,m,i.get("useUTC"),d.get("textStyle")):v.text,w="item_"+s.name+"_"+l;this._showOrMove(d,(function(){this._showTooltipContent(d,b,g,w,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:l,dataIndex:h.getRawIndex(l),seriesIndex:o,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i="html"===this._renderMode,r=rl(e),o=r.tooltipConfig.option||{},a=o.encodeHTMLContent;if(U(o)){o={content:o,formatter:o},a=!0}a&&i&&o.content&&((o=T(o)).content=re(o.content));var s=[o],l=this._ecModel.getComponent(r.componentMainType,r.componentIndex);l&&s.push(l),s.push({formatter:o.content});var u=t.positionDefault,h=MV(s,this._tooltipModel,u?{position:u}:null),c=h.get("content"),p=Math.random()+"",d=new yg;this._showOrMove(h,(function(){var n=T(h.get("formatterParams")||{});this._showTooltipContent(h,c,n,p,t.offsetX,t.offsetY,t.position,e,d)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent;u.setEnterable(t.get("enterable"));var h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor")).color;if(h)if(U(h)){var d=t.ecModel.get("useUTC"),f=Y(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Jc(f.axisValue,c,d)),c=bp(c,n,!0)}else if(X(h)){var g=W((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}else c=h;u.setContent(c,l,t,p,a),u.show(t,p),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||Y(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:Y(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),X(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),Y(e))n=$r(e[0],s),i=$r(e[1],l);else if(q(e)){var d=e;d.width=u[0],d.height=u[1];var f=kp(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(U(e)&&a){var g=function(t,e,n,i){var r=n[0],o=n[1],a=Math.ceil(Math.SQRT2*i)+8,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-r/2,l=e.y+h/2-o/2;break;case"top":s=e.x+u/2-r/2,l=e.y-o-a;break;case"bottom":s=e.x+u/2-r/2,l=e.y+h+a;break;case"left":s=e.x-r-a,l=e.y+h/2-o/2;break;case"right":s=e.x+u+a,l=e.y+h/2-o/2}return[s,l]}(e,p,u,t.get("borderWidth"));n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getSize(),l=s[0],u=s[1];null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=TV(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=TV(c)?u[1]/2:"bottom"===c?u[1]:0),sV(t)){g=function(t,e,n,i,r){var o=n.getSize(),a=o[0],s=o[1];return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,e){var n=this._lastDataByCoordSys,i=this._cbParamsList,r=!!n&&n.length===t.length;return r&&E(n,(function(n,o){var a=n.dataByAxis||[],s=(t[o]||{}).dataByAxis||[];(r=r&&a.length===s.length)&&E(a,(function(t,n){var o=s[n]||{},a=t.seriesDataIndices||[],l=o.seriesDataIndices||[];(r=r&&t.value===o.value&&t.axisType===o.axisType&&t.axisId===o.axisId&&a.length===l.length)&&E(a,(function(t,e){var n=l[e];r=r&&t.seriesIndex===n.seriesIndex&&t.dataIndex===n.dataIndex})),i&&E(t.seriesDataIndices,(function(t){var n=t.seriesIndex,o=e[n],a=i[n];o&&a&&a.data!==o.data&&(r=!1)}))}))})),this._lastDataByCoordSys=t,this._cbParamsList=e,!!r},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){!r.node&&e.getDom()&&(Yg(this,"_updatePosition"),this._tooltipContent.dispose(),kN("itemTooltip",e))},e.type="tooltip",e}(Ag);function MV(t,e,n){var i,r=e.ecModel;n?(i=new Cc(n,r,r),i=new Cc(e.option,i,r)):i=e;for(var o=t.length-1;o>=0;o--){var a=t[o];a&&(a instanceof Cc&&(a=a.get("tooltip",!0)),U(a)&&(a={formatter:a}),a&&(i=new Cc(a,i,r)))}return i}function IV(t,e){return t.dispatchAction||W(e.dispatchAction,e)}function TV(t){return"center"===t||"middle"===t}var CV=["rect","polygon","keep","clear"];function DV(t,e){var n=To(t?t.brush:[]);if(n.length){var i=[];E(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;Y(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};E(t,(function(t){e[t]=1})),t.length=0,E(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,CV)}}var AV=E;function kV(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function LV(t,e,n){var i={};return AV(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);AV(t[e],(function(t,i){if(kD.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new kD(r),"opacity"===i&&((r=T(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new kD(r))}}))})),i}function PV(t,e,n){var i;E(n,(function(t){e.hasOwnProperty(t)&&kV(e[t])&&(i=!0)})),i&&E(n,(function(n){e.hasOwnProperty(n)&&kV(e[n])?t[n]=T(e[n]):delete t[n]}))}var OV={lineX:RV(0),lineY:RV(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&P_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(P_(i,r,o)||P_(i,r+a,o)||P_(i,r,o+s)||P_(i,r+a,o+s)||ze.create(t).contain(l[0],l[1])||Zh(r,o,r+a,o,i)||Zh(r,o,r,o+s,i)||Zh(r+a,o,r+a,o+s,i)||Zh(r,o+s,r+a,o+s,i))||void 0}}};function RV(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return NV(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&YV(e)}};function YV(t){return new ze(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var XV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new lL(e.getZr())).on("brush",W(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){BV(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:T(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:T(n),$from:e})},e.type="brush",e}(Ag),UV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&PV(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=z(t,(function(t){return ZV(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=ZV(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(zp);function ZV(t,e){return C({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Cc(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var jV=["rect","polygon","lineX","lineY","keep","clear"],qV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,E(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return E(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:jV.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])}},e}(mz);var KV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(zp),$V=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=rt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new Xs({style:oc(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new Xs({style:oc(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){Mp(p,"_"+t.get("target"))})),d&&c.on("click",(function(){Mp(d,"_"+t.get("subtarget"))})),rl(l).eventData=rl(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=kp(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var x=v.margin,_=t.getItemStyle(["color","opacity"]);_.fill=t.get("backgroundColor");var b=new Ws({shape:{x:g.x-x[3],y:g.y-x[0],width:g.width+x[1]+x[3],height:g.height+x[0]+x[2],r:t.get("borderRadius")},style:_,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(Ag);var JV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],E(n,(function(e,n){var i,o=Ro(Ao(e),"");q(e)?(i=T(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new cx([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(zp),QV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=kc(JV.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(JV);R(QV,_f.prototype);var tB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(Ag),eB=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(ab),nB=Math.PI,iB=Vo(),rB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return og("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},E(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return kp(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:nB/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*nB/180;var x=d.get("position",!0),_=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===x||"bottom"===x?(_&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(_&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;we(o,o,[-a,-s]),Se(o,o,-nB/2),we(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||U(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"),e)switch(e){case"category":return new Rx({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new Kx({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new Ex}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.calcNiceTicks();var a=new eB("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new Br;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new Ku({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:A({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new Ku({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:k({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],E(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:W(r._changeTimeline,r,t.value)},p=oB(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),Ul(p);var d=rl(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],E(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new Xs({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:W(r._changeTimeline,r,a),silent:!1,style:oc(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=oc(u),p.ensureState("progress").style=oc(h),e.add(p),Ul(p),iB(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=Cr(rt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Uh(t.get(["controlStyle",e]),i||{},new ze(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{x:t[0],y:t[1],originX:r/2,originY:0,rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Ul(c)}}h(t.nextBtnPosition,"next",W(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",W(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",W(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=W(s._handlePointerDrag,s),t.ondragend=W(s._handlePointerDragend,s),aB(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){aB(t,s._progressLine,o,n,i)}};this._currentPointer=oB(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=Qr(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var vB={min:H(yB,"min"),max:H(yB,"max"),average:H(yB,"average"),median:H(yB,"median")};function mB(t,e){if(e){var n=t.getData(),i=t.coordinateSystem,r=i&&i.dimensions;if(!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!Y(e.coord)&&Y(r)){var o=xB(e,n,i,t);if((e=T(e)).type&&vB[e.type]&&o.baseAxis&&o.valueAxis){var a=P(r,o.baseAxis.dim),s=P(r,o.valueAxis.dim),l=vB[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else e.coord=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis]}if(null!=e.coord&&Y(r))for(var u=e.coord,h=0;h<2;h++)vB[u[h]]&&(u[h]=wB(n,n.mapDimension(r[h]),u[h]));else e.coord=[];return e}}function xB(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData().getDimensionInfo(e);return n&&n.coordDim}(i,r.valueDataDim)),r.baseAxis=n.getOtherAxis(r.valueAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim)):(r.baseAxis=i.getBaseAxis(),r.valueAxis=n.getOtherAxis(r.baseAxis),r.baseDataDim=e.mapDimension(r.baseAxis.dim),r.valueDataDim=e.mapDimension(r.valueAxis.dim)),r}function _B(t,e){return!(t&&t.containData&&e.coord&&!gB(e))||t.containData(e.coord)}function bB(t,e){return t?function(t,n,i,r){return If(r<2?t.coord&&t.coord[r]:t.value,e[r])}:function(t,n,i,r){return If(t.value,e[r])}}function wB(t,e,n){if("average"===n){var i=0,r=0;return t.each(e,(function(t,e){isNaN(t)||(i+=t,r++)})),i/r}return"median"===n?t.getMedian(e):t.getDataExtent(e)["max"===n?1:0]}var SB=Vo(),MB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this.markerGroupMap=yt()},e.prototype.render=function(t,e,n){var i=this,r=this.markerGroupMap;r.each((function(t){SB(t).keep=!1})),e.eachSeries((function(t){var r=dB.getMarkerModelFromSeries(t,i.type);r&&i.renderSeries(t,r,e,n)})),r.each((function(t){!SB(t).keep&&i.group.remove(t.group)}))},e.prototype.markKeep=function(t){SB(t).keep=!0},e.prototype.toggleBlurSeries=function(t,e){var n=this;E(t,(function(t){var i=dB.getMarkerModelFromSeries(t,n.type);i&&i.getData().eachItemGraphicEl((function(t){t&&(e?Nl(t):El(t))}))}))},e.type="marker",e}(Ag);function IB(t,e,n){var i=e.coordinateSystem;t.each((function(r){var o,a=t.getItemModel(r),s=$r(a.get("x"),n.getWidth()),l=$r(a.get("y"),n.getHeight());if(isNaN(s)||isNaN(l)){if(e.getMarkerPosition)o=e.getMarkerPosition(t.getValues(t.dimensions,r));else if(i){var u=t.get(i.dimensions[0],r),h=t.get(i.dimensions[1],r);o=i.dataToPoint([u,h])}}else o=[s,l];isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),t.setItemLayout(r,o)}))}var TB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markPoint");e&&(IB(e.getData(),t,n),this.markerGroupMap.get(t.id).updateLayout())}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new xS),u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new cx(i,n),o=z(n.get("data"),H(mB,e));t&&(o=B(o,H(_B,t)));var a=bB(!!t,i);return r.initData(o,null,a),r}(r,t,e);e.setData(u),IB(e.getData(),t,i),u.each((function(t){var n=u.getItemModel(t),i=n.getShallow("symbol"),r=n.getShallow("symbolSize"),o=n.getShallow("symbolRotate"),s=n.getShallow("symbolOffset"),l=n.getShallow("symbolKeepAspect");if(X(i)||X(r)||X(o)||X(s)){var h=e.getRawValue(t),c=e.getDataParams(t);X(i)&&(i=i(h,c)),X(r)&&(r=r(h,c)),X(o)&&(o=o(h,c)),X(s)&&(s=s(h,c))}var p=n.getModel("itemStyle").getItemStyle(),d=Ay(a,"color");p.fill||(p.fill=d),u.setItemVisual(t,{symbol:i,symbolSize:r,symbolRotate:o,symbolOffset:s,symbolKeepAspect:l,style:p})})),l.updateData(u),this.group.add(l.group),u.eachItemGraphicEl((function(t){t.traverse((function(t){rl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markPoint",e}(MB);var CB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(dB),DB=Vo(),AB=function(t,e,n,i){var r,o=t.getData();if(Y(i))r=i;else{var a=i.type;if("min"===a||"max"===a||"average"===a||"median"===a||null!=i.xAxis||null!=i.yAxis){var s=void 0,l=void 0;if(null!=i.yAxis||null!=i.xAxis)s=e.getAxis(null!=i.yAxis?"y":"x"),l=it(i.yAxis,i.xAxis);else{var u=xB(i,o,e,t);s=u.valueAxis,l=wB(o,xx(o,u.valueDataDim),a)}var h="x"===s.dim?0:1,c=1-h,p=T(i),d={coord:[]};p.type=null,p.coord=[],p.coord[c]=-1/0,d.coord[c]=1/0;var f=n.get("precision");f>=0&&j(l)&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[mB(t,r[0]),mB(t,r[1]),A({},r[2])];return g[2].type=g[2].type||null,C(g[2],g[0]),C(g[2],g[1]),g};function kB(t){return!isNaN(t)&&!isFinite(t)}function LB(t,e,n,i){var r=1-t,o=i.dimensions[t];return kB(e[r])&&kB(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function PB(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(LB(1,n,i,t)||LB(0,n,i,t)))return!0}return _B(t,e[0])&&_B(t,e[1])}function OB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=$r(s.get("x"),r.getWidth()),u=$r(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(OS(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;kB(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):kB(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var RB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=DB(e).from,o=DB(e).to;r.each((function(e){OB(r,e,!0,t,n),OB(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new YA);this.group.add(l.group);var u=function(t,e,n){var i;i=t?z(t&&t.dimensions,(function(t){return A(A({},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{}),{name:t,ordinalMeta:null})})):[{name:"value",type:"float"}];var r=new cx(i,n),o=new cx(i,n),a=new cx([],n),s=z(n.get("data"),H(AB,e,t,n));t&&(s=B(s,H(PB,t)));var l=bB(!!t,i);return r.initData(z(s,(function(t){return t[0]})),null,l),o.initData(z(s,(function(t){return t[1]})),null,l),a.initData(z(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;DB(e).from=h,DB(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize"),g=e.get("symbolRotate"),y=e.get("symbolOffset");function v(e,n,r){var o=e.getItemModel(n);OB(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=Ay(a,"color")),e.setItemVisual(n,{symbolKeepAspect:o.get("symbolKeepAspect"),symbolOffset:rt(o.get("symbolOffset",!0),y[r?0:1]),symbolRotate:rt(o.get("symbolRotate",!0),g[r?0:1]),symbolSize:rt(o.get("symbolSize"),f[r?0:1]),symbol:rt(o.get("symbol",!0),d[r?0:1]),style:s})}Y(d)||(d=[d,d]),Y(f)||(f=[f,f]),Y(g)||(g=[g,g]),Y(y)||(y=[y,y]),u.from.each((function(t){v(h,t,!0),v(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolKeepAspect:h.getItemVisual(t,"symbolKeepAspect"),fromSymbolOffset:h.getItemVisual(t,"symbolOffset"),fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolKeepAspect:c.getItemVisual(t,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(t,"symbolOffset"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t){rl(t).dataModel=e,t.traverse((function(t){rl(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(MB);var NB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(dB),EB=Vo(),zB=function(t,e,n,i){var r=i[0],o=i[1];if(r&&o){var a=mB(t,r),s=mB(t,o),l=a.coord,u=s.coord;l[0]=it(l[0],-1/0),l[1]=it(l[1],-1/0),u[0]=it(u[0],1/0),u[1]=it(u[1],1/0);var h=D([{},a,s]);return h.coord=[a.coord,s.coord],h.x0=a.x,h.y0=a.y,h.x1=s.x,h.y1=s.y,h}};function VB(t){return!isNaN(t)&&!isFinite(t)}function BB(t,e,n,i){var r=1-t;return VB(e[r])&&VB(n[r])}function FB(t,e){var n=e.coord[0],i=e.coord[1],r={coord:n,x:e.x0,y:e.y0},o={coord:i,x:e.x1,y:e.y1};return OS(t,"cartesian2d")?!(!n||!i||!BB(1,n,i)&&!BB(0,n,i))||function(t,e,n){return!(t&&t.containZone&&e.coord&&n.coord&&!gB(e)&&!gB(n))||t.containZone(e.coord,n.coord)}(t,r,o):_B(t,r)||_B(t,o)}function GB(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=$r(s.get(n[0]),r.getWidth()),u=$r(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition){var h=t.getValues(["x0","y0"],e),c=t.getValues(["x1","y1"],e),p=a.clampData(h),d=a.clampData(c),f=[];"x0"===n[0]?f[0]=p[0]>d[0]?c[0]:h[0]:f[0]=p[0]>d[0]?h[0]:c[0],"y0"===n[1]?f[1]=p[1]>d[1]?c[1]:h[1]:f[1]=p[1]>d[1]?h[1]:c[1],o=i.getMarkerPosition(f,n,!0)}else{var g=[m=t.get(n[0],e),x=t.get(n[1],e)];a.clampData&&a.clampData(g,g),o=a.dataToPoint(g,!0)}if(OS(a,"cartesian2d")){var y=a.getAxis("x"),v=a.getAxis("y"),m=t.get(n[0],e),x=t.get(n[1],e);VB(m)?o[0]=y.toGlobalCoord(y.getExtent()["x0"===n[0]?0:1]):VB(x)&&(o[1]=v.toGlobalCoord(v.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var WB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],HB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=dB.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=z(WB,(function(r){return GB(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new Br});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];if(t){var a=z(t&&t.dimensions,(function(t){var n=e.getData();return A(A({},n.getDimensionInfo(n.mapDimension(t))||{}),{name:t,ordinalMeta:null})}));r=z(o,(function(t,e){return{name:t,type:a[e%2].type}})),i=new cx(r,n)}else i=new cx(r=[{name:"value",type:"float"}],n);var s=z(n.get("data"),H(zB,e,t,n));t&&(s=B(s,H(FB,t)));var l=t?function(t,e,n,i){return If(t.coord[Math.floor(i/2)][i%2],r[i])}:function(t,e,n,i){return If(t.value,r[i])};return i.initData(s,null,l),i.hasItemOption=!0,i}(r,t,e);e.setData(u),u.each((function(e){var n=z(WB,(function(n){return GB(u,e,n,t,i)})),o=r.getAxis("x").scale,s=r.getAxis("y").scale,l=o.getExtent(),h=s.getExtent(),c=[o.parse(u.get("x0",e)),o.parse(u.get("x1",e))],p=[s.parse(u.get("y0",e)),s.parse(u.get("y1",e))];Qr(c),Qr(p);var d=!!(l[0]>c[1]||l[1]p[1]||h[1]=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(zp),XB=H,UB=E,ZB=Br,jB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new ZB),this.group.add(this._selectorGroup=new ZB),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=kp(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=kp(k({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Sz(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=yt(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),UB(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new ZB;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("legendLineStyle")||{},g=d.getVisual("legendIcon"),y=d.getVisual("style"),v=this._createItem(p,a,o,r,e,t,f,y,g,u,i);v.on("click",XB(qB,a,null,i,h)).on("mouseover",XB($B,p.name,null,i,h)).on("mouseout",XB(JB,p.name,null,i,h)),n.ssr&&v.eachChild((function(t){var e=rl(t);e.seriesIndex=p.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}else n.eachRawSeries((function(s){if(!l.get(a)&&s.legendVisualProvider){var c=s.legendVisualProvider;if(!c.containName(a))return;var p=c.indexOfName(a),d=c.getItemVisual(p,"style"),f=c.getItemVisual(p,"legendIcon"),g=qn(d.fill);g&&0===g[3]&&(g[3]=.2,d=A(A({},d),{fill:ri(g,"rgba")}));var y=this._createItem(s,a,o,r,e,t,{},d,f,u,i);y.on("click",XB(qB,null,a,i,h)).on("mouseover",XB($B,null,a,i,h)).on("mouseout",XB(JB,null,a,i,h)),n.ssr&&y.eachChild((function(t){var e=rl(t);e.seriesIndex=s.seriesIndex,e.dataIndex=o,e.ssrType="legend"})),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();UB(t,(function(t){var i=t.type,r=new Xs({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),ic(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Ul(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=t.visualDrawType,p=r.get("itemWidth"),d=r.get("itemHeight"),f=r.isSelected(e),g=i.get("symbolRotate"),y=i.get("symbolKeepAspect"),v=i.get("icon"),m=function(t,e,n,i,r,o,a){function s(t,e){"auto"===t.lineWidth&&(t.lineWidth=e.lineWidth>0?2:0),UB(t,(function(n,i){"inherit"===t[i]&&(t[i]=e[i])}))}var l=e.getModel("itemStyle"),u=l.getItemStyle(),h=0===t.lastIndexOf("empty",0)?"fill":"stroke",c=l.getShallow("decal");u.decal=c&&"inherit"!==c?mv(c,a):i.decal,"inherit"===u.fill&&(u.fill=i[r]);"inherit"===u.stroke&&(u.stroke=i[h]);"inherit"===u.opacity&&(u.opacity=("fill"===r?i:n).opacity);s(u,i);var p=e.getModel("lineStyle"),d=p.getLineStyle();if(s(d,n),"auto"===u.fill&&(u.fill=i.fill),"auto"===u.stroke&&(u.stroke=i.fill),"auto"===d.stroke&&(d.stroke=i.fill),!o){var f=e.get("inactiveBorderWidth"),g=u[h];u.lineWidth="auto"===f?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=p.get("inactiveColor"),d.lineWidth=p.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}(l=v||l||"roundRect",i,a,s,c,f,h),x=new ZB,_=i.getModel("textStyle");if(!X(t.getLegendIcon)||v&&"inherit"!==v){var b="inherit"===v&&t.getData().getVisual("symbol")?"inherit"===g?t.getData().getVisual("symbolRotate"):g:0;x.add(function(t){var e=t.icon||"roundRect",n=Xy(e,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill,t.symbolKeepAspect);n.setStyle(t.itemStyle),n.rotation=(t.iconRotate||0)*Math.PI/180,n.setOrigin([t.itemWidth/2,t.itemHeight/2]),e.indexOf("empty")>-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2);return n}({itemWidth:p,itemHeight:d,icon:l,iconRotate:b,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}))}else x.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:l,iconRotate:g,itemStyle:m.itemStyle,lineStyle:m.lineStyle,symbolKeepAspect:y}));var w="left"===o?p+5:-5,S=o,M=r.get("formatter"),I=e;U(M)&&M?I=M.replace("{name}",null!=e?e:""):X(M)&&(I=M(e));var T=f?_.getTextColor():i.get("inactiveColor");x.add(new Xs({style:oc(_,{text:I,x:w,y:d/2,fill:T,align:S,verticalAlign:"middle"},{inheritColor:T})}));var C=new Ws({shape:x.getBoundingRect(),style:{fill:"transparent"}}),D=i.getModel("tooltip");return D.get("show")&&Kh({el:C,componentModel:r,itemName:e,itemTooltipOption:D.option}),x.add(C),x.eachChild((function(t){t.silent=!0})),C.silent=!u,this.getContentGroup().add(x),Ul(x),x.__legendDataIndex=n,x},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Ap(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Ap("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Ag);function qB(t,e,n,i){JB(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),$B(t,e,n,i)}function KB(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=rt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var x={x:0,y:0};x[r]=Math.max(n[r]-p[r]-v,0),x[o]=m[o],u.setClipPath(new Ws({shape:x})),u.__rectSize=x[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var _=this._getPageInfo(t);return null!=_.pageIndex&&vh(l,{x:_.contentPosition[0],y:_.contentPosition[1]},d?t:null),this._updatePageInfoView(t,_),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;E(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",U(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=oF[r],a=aF[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!x(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&x(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(jB);function lF(t){Vm(eF),t.registerComponentModel(nF),t.registerComponentView(sF),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var uF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=kc(az.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(az),hF=Vo();function cF(t,e,n){hF(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function pF(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function dF(t,e){t.isDisposed()||t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function fF(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function gF(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=hF(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=yt());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){E(rz(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:H(fF,e),dispatchAction:H(dF,t),dataZoomInfoMap:null,controller:null},i=n.controller=new nT(t.getZr());return E(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=yt())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Hg(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else pF(i,t)}))}))}var yF=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),cF(i,e,{pan:W(vF.pan,this),zoom:W(vF.zoom,this),scrollMove:W(vF.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=hF(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return zk(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:mF((function(t,e,n,i,r,o){var a=xF[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:mF((function(t,e,n,i,r,o){return xF[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function mF(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return zk(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var xF={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function _F(t){yz(t),t.registerComponentModel(uF),t.registerComponentView(yF),gF(t)}var bF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=kc(az.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(az),wF=Ws,SF="horizontal",MF="vertical",IF=["line","bar","candlestick","scatter"],TF={easing:"cubicOut",duration:100,delay:0},CF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=W(this._onBrush,this),this._onBrushEnd=W(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Hg(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Yg(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new Br;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===SF?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Rp(t.option);E(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=kp(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===MF&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==SF||r?n===SF&&r?{scaleY:a?1:-1,scaleX:-1}:n!==MF||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new wF({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new wF({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:W(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=this._shadowSize||[],i=t.series,r=i.getRawData(),o=i.getShadowDim&&i.getShadowDim(),a=o&&r.getDimensionInfo(o)?i.getShadowDim():t.otherDim;if(null!=a){var s=this._shadowPolygonPts,l=this._shadowPolylinePts;if(r!==this._shadowData||a!==this._shadowDim||e[0]!==n[0]||e[1]!==n[1]){var u=r.getDataExtent(a),h=.3*(u[1]-u[0]);u=[u[0]-h,u[1]+h];var c,p=[0,e[1]],d=[0,e[0]],f=[[e[0],0],[0,0]],g=[],y=d[1]/(r.count()-1),v=0,m=Math.round(r.count()/e[0]);r.each([a],(function(t,e){if(m>0&&e%m)v+=y;else{var n=null==t||isNaN(t)||""===t,i=n?0:Kr(t,u,p,!0);n&&!c&&e?(f.push([f[f.length-1][0],0]),g.push([g[g.length-1][0],0])):!n&&c&&(f.push([v,0]),g.push([v,0])),f.push([v,i]),g.push([v,i]),v+=y,c=n}})),s=this._shadowPolygonPts=f,l=this._shadowPolylinePts=g}this._shadowData=r,this._shadowDim=a,this._shadowSize=[e[0],e[1]];for(var x=this.dataZoomModel,_=0;_<3;_++){var b=w(1===_);this._displayables.sliderGroup.add(b),this._displayables.dataShadowSegs.push(b)}}}function w(t){var e=x.getModel(t?"selectedDataBackground":"dataBackground"),n=new Br,i=new Xu({shape:{points:s},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new Zu({shape:{points:l},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){E(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&P(IF,t.get("type"))<0)){var a,s=i.getComponent(nz(r),o).axis,l=function(t){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[t]}(r),u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new wF({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new wF({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),E([0,1],(function(e){var o=a.get("handleIcon");!Wy[o]&&o.indexOf("path://")<0&&o.indexOf("image://")<0&&(o="path://"+o);var s=Xy(o,-1,0,2,2,null,!0);s.attr({cursor:DF(this._orient),draggable:!0,drift:W(this._onDragMove,this,e),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=$r(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Ul(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new Xs({silent:!0,invisible:!0,style:oc(c,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()}),z2:10}))}),this);var c=h;if(u){var p=$r(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new Ws({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=Xy(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new Ws({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:DF(this._orient),drift:W(this._onDragMove,this,"all"),ondragstart:W(this._showDataInfo,this,!0),ondragend:W(this._onDragEnd,this),onmouseover:W(this._showDataInfo,this,!0),onmouseout:W(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Kr(t[0],[0,100],e,!0),Kr(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];zk(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Kr(o.minSpan,a,r,!0):null,null!=o.maxSpan?Kr(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=Qr([Kr(i[0],r,a,!0),Kr(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=Qr(n.slice()),r=this._size;E([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new De(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=Qr([Kr(n.x,i,r,!0),Kr(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(de(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new wF({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?TF:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=rz(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(uz);function DF(t){return"vertical"===t?"ns-resize":"ew-resize"}function AF(t){t.registerComponentModel(bF),t.registerComponentView(CF),yz(t)}var kF=function(t,e,n){var i=T((LF[t]||{})[e]);return n&&Y(i)?i[i.length-1]:i},LF={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]}},PF=kD.mapVisual,OF=kD.eachVisual,RF=Y,NF=E,EF=Qr,zF=Kr,VF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&PV(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=W(t,this),this.controllerVisuals=LV(this.option.controller,e,t),this.targetVisuals=LV(this.option.target,e,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=To(t),e},e.prototype.eachTargetSeries=function(t,e){E(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],Y(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return U(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):X(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=EF([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimensionIndex=function(t){var e=this.option.dimension;if(null!=e)return t.getDimensionIndex(e);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var r=n[i],o=t.getDimensionInfo(r);if(!o.isCalculationCoord)return o.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});C(i,n),C(r,n);var o=this.isCategory();function a(n){RF(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},NF(i,(function(t,e){if(kD.isValidType(e)){var n=kF(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor"),r=this.getItemSymbol()||"roundRect";NF(this.stateList,(function(a){var s=this.itemSize,l=t[a];l||(l=t[a]={color:o?i:[i]}),null==l.symbol&&(l.symbol=e&&T(e)||(o?r:[r])),null==l.symbolSize&&(l.symbolSize=n&&T(n)||(o?s[0]:[s[0],s[0]])),l.symbol=PF(l.symbol,(function(t){return"none"===t?r:t}));var u=l.symbolSize;if(null!=u){var h=-1/0;OF(u,(function(t){t>h&&(h=t)})),l.symbolSize=PF(u,(function(t){return zF(t,[0,h],[0,s[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(zp),BF=[20,140],FF=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=BF[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=BF[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):Y(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),E(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=Qr((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimensionIndex(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=GF(this,"outOfRange",this.getExtent()),n=GF(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new Br("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();ZF([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=UF(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=Fh(n.handleLabelPoints[l],Bh(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=UF(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=Fh(l.indicatorLabelPoint,Bh(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var x={x:d,y:p,style:{fill:h}},_={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(x,b),y.animateTo(_,b)}else u.attr(x),y.attr(_);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||JF(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i=0&&(r.dimension=o,i.push(r))}})),t.getData().setVisual("visualMeta",i)}}];function iG(t,e,n,i){for(var r=e.targetVisuals[i],o=kD.prepareVisualTypes(r),a={color:Ay(t.getData(),"color")},s=0,l=o.length;s0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(tG,eG),E(nG,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(oG))}function uG(t){t.registerComponentModel(FF),t.registerComponentView(KF),lG(t)}var hG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],cG[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=T(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=z(this._pieceList,(function(t){return t=T(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=kD.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}E(e.pieces,(function(t){E(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),E(n,(function(t,n){var i=!1;E(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&E(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=kF(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,E(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;E(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=T(t)},e.prototype.getValueState=function(t){var e=kD.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimensionIndex(o),(function(e,i){kD.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return E(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=kc(VF.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(VF),cG={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function pG(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var dG=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=it(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),E(l.viewPieceList,(function(i){var l=i.piece,u=new Br;u.onclick=W(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new Xs({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Ap(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:XF(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return YF(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new Br,a=this.visualMapModel.textStyleModel;o.add(new Xs({style:oc(a,{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e})})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=z(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(Xy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=n.selectedMode;if(i){var r=T(n.selected),o=e.getSelectedMapKey(t);"single"===i||!0===i?(r[o]=!0,E(r,(function(t,e){r[e]=e===o}))):r[o]=!r[o],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:r})}},e.type="visualMap.piecewise",e}(WF);function fG(t){t.registerComponentModel(hG),t.registerComponentView(dG),lG(t)}var gG={label:{enabled:!0},decal:{show:!1}},yG=Vo(),vG={};function mG(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=T(gG);C(i.label,t.getLocaleModel().get("aria"),!1),C(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=yt();t.eachSeries((function(t){if(!t.isColorBySeries()){var n=e.get(t.type);n||(n={},e.set(t.type,n)),yG(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if(X(e.enableAriaDecal))e.enableAriaDecal();else{var n=e.getData();if(e.isColorBySeries()){var i=pd(e.ecModel,e.name,vG,t.getSeriesCount()),r=n.getVisual("decal");n.setVisual("decal",u(r,i))}else{var o=e.getRawData(),a={},s=yG(e).scope;n.each((function(t){var e=n.getRawIndex(t);a[e]=t}));var l=o.count();o.each((function(t){var i=a[t],r=o.getName(t)||t+"",h=pd(e.ecModel,r,s,l),c=n.getItemVisual(i,"decal");n.setItemVisual(i,"decal",u(c,h))}))}}function u(t,e){var n=t?A(A({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=e.getZr().dom;if(!i)return;var o=t.getLocaleModel().get("aria"),a=n.getModel("label");if(a.option=k(a.option,o),!a.get("enabled"))return;if(a.get("description"))return void i.setAttribute("aria-label",a.get("description"));var s,l=t.getSeriesCount(),u=a.get(["data","maxCount"])||10,h=a.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();s=p?r(a.get(["general","withTitle"]),{title:p}):a.get(["general","withoutTitle"]);var d=[];s+=r(l>1?a.get(["series","multiple","prefix"]):a.get(["series","single","prefix"]),{seriesCount:l}),t.eachSeries((function(e,n){if(n1?a.get(["series","multiple",o]):a.get(["series","single",o]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(x=e.subType,_=t.getLocaleModel().get(["series","typeNames"]),_[x]||_.chart)});var s=e.getData();if(s.count()>u)i+=r(a.get(["data","partialData"]),{displayCnt:u});else i+=a.get(["data","allData"]);for(var h=a.get(["data","separator","middle"]),p=a.get(["data","separator","end"]),f=[],g=0;g":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},bG=function(){function t(t){if(null==(this._condVal=U(t)?new RegExp(t):et(t)?t:null)){var e="";0,wo(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return U(e)?this._condVal.test(t):!!j(e)&&this._condVal.test(t+"")},t}(),wG=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),SG=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&l.push(e),e=[t,n]}function f(t,n,i,r){EG(t,i)&&EG(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function VG(t,e,n,i,r,o,a,s,l,u){if(EG(t,n)&&EG(e,i)&&EG(r,a)&&EG(o,s))l.push(a,s);else{var h=2/u,c=h*h,p=a-t,d=s-e,f=Math.sqrt(p*p+d*d);p/=f,d/=f;var g=n-t,y=i-e,v=r-a,m=o-s,x=g*g+y*y,_=v*v+m*m;if(x=0&&_-w*w=0)l.push(a,s);else{var S=[],M=[];wn(t,n,r,a,.5,S),wn(e,i,o,s,.5,M),VG(S[0],M[0],S[1],M[1],S[2],M[2],S[3],M[3],l,u),VG(S[4],M[4],S[5],M[5],S[6],M[6],S[7],M[7],l,u)}}}}function BG(t,e,n){var i=t[e],r=t[1-e],o=Math.abs(i/r),a=Math.ceil(Math.sqrt(o*n)),s=Math.floor(n/a);0===s&&(s=1,a=n);for(var l=[],u=0;u0)for(u=0;uMath.abs(u),c=BG([l,u],h?0:1,e),p=(h?s:u)/c.length,d=0;d1?null:new De(d*l+t,d*u+e)}function HG(t,e,n){var i=new De;De.sub(i,n,e),i.normalize();var r=new De;return De.sub(r,t,e),r.dot(i)}function YG(t,e){var n=t[t.length-1];n&&n[0]===e[0]&&n[1]===e[1]||t.push(e)}function XG(t){var e=t.points,n=[],i=[];Ba(e,n,i);var r=new ze(n[0],n[1],i[0]-n[0],i[1]-n[1]),o=r.width,a=r.height,s=r.x,l=r.y,u=new De,h=new De;return o>a?(u.x=h.x=s+o/2,u.y=l,h.y=l+a):(u.y=h.y=l+a/2,u.x=s,h.x=s+o),function(t,e,n){for(var i=t.length,r=[],o=0;or,a=BG([i,r],o?0:1,e),s=o?"width":"height",l=o?"height":"width",u=o?"x":"y",h=o?"y":"x",c=t[s]/a.length,p=0;p0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(x=0;x0;l/=2){var u=0,h=0;(t&l)>0&&(u=1),(e&l)>0&&(h=1),s+=l*l*(3*u^h),0===h&&(1===u&&(t=l-1-t,e=l-1-e),a=t,t=e,e=a)}return s}function lW(t){var e=1/0,n=1/0,i=-1/0,r=-1/0,o=z(t,(function(t){var o=t.getBoundingRect(),a=t.getComputedTransform(),s=o.x+o.width/2+(a?a[4]:0),l=o.y+o.height/2+(a?a[5]:0);return e=Math.min(s,e),n=Math.min(l,n),i=Math.max(s,i),r=Math.max(l,r),[s,l]}));return z(o,(function(o,a){return{cp:o,z:sW(o[0],o[1],e,n,i,r),path:t[a]}})).sort((function(t,e){return t.z-e.z})).map((function(t){return t.path}))}function uW(t){return jG(t.path,t.count)}function hW(t){return Y(t[0])}function cW(t,e){for(var n=[],i=t.length,r=0;r=0;r--)if(!n[r].many.length){var l=n[s].many;if(l.length<=1){if(!s)return n;s=0}o=l.length;var u=Math.ceil(o/2);n[r].many=l.slice(u,o),n[s].many=l.slice(0,u),s++}return n}var pW={clone:function(t){for(var e=[],n=1-Math.pow(1-t.path.style.opacity,1/t.count),i=0;i0){var s,l,u=i.getModel("universalTransition").get("delay"),h=Object.assign({setToFinal:!0},a);hW(t)&&(s=t,l=e),hW(e)&&(s=e,l=t);for(var c=s?s===t:t.length>e.length,p=s?cW(l,s):cW(c?e:t,[c?t:e]),d=0,f=0;f1e4))for(var r=n.getIndices(),o=0;o0&&i.group.traverse((function(t){t instanceof ks&&!t.animators.length&&t.animateFrom({style:{opacity:0}},r)}))}))}function SW(t){var e=t.getModel("universalTransition").get("seriesKey");return e||t.id}function MW(t){return Y(t)?t.sort().join(","):t}function IW(t){if(t.hostModel)return t.hostModel.getModel("universalTransition").get("divideShape")}function TW(t,e){for(var n=0;n=0&&r.push({dataGroupId:e.oldDataGroupIds[n],data:e.oldData[n],divide:IW(e.oldData[n]),groupIdDim:t.dimension})})),E(To(t.to),(function(t){var i=TW(n.updatedSeries,t);if(i>=0){var r=n.updatedSeries[i].getData();o.push({dataGroupId:e.oldDataGroupIds[i],data:r,divide:IW(r),groupIdDim:t.dimension})}})),r.length>0&&o.length>0&&wW(r,o,i)}(t,i,n,e)}));else{var o=function(t,e){var n=yt(),i=yt(),r=yt();return E(t.oldSeries,(function(e,n){var o=t.oldDataGroupIds[n],a=t.oldData[n],s=SW(e),l=MW(s);i.set(l,{dataGroupId:o,data:a}),Y(s)&&E(s,(function(t){r.set(t,{key:l,dataGroupId:o,data:a})}))})),E(e.updatedSeries,(function(t){if(t.isUniversalTransitionEnabled()&&t.isAnimationEnabled()){var e=t.get("dataGroupId"),o=t.getData(),a=SW(t),s=MW(a),l=i.get(s);if(l)n.set(s,{oldSeries:[{dataGroupId:l.dataGroupId,divide:IW(l.data),data:l.data}],newSeries:[{dataGroupId:e,divide:IW(o),data:o}]});else if(Y(a)){var u=[];E(a,(function(t){var e=i.get(t);e.data&&u.push({dataGroupId:e.dataGroupId,divide:IW(e.data),data:e.data})})),u.length&&n.set(s,{oldSeries:u,newSeries:[{dataGroupId:e,data:o,divide:IW(o)}]})}else{var h=r.get(a);if(h){var c=n.get(h.key);c||(c={oldSeries:[{dataGroupId:h.dataGroupId,data:h.data,divide:IW(h.data)}],newSeries:[]},n.set(h.key,c)),c.newSeries.push({dataGroupId:e,data:o,divide:IW(o)})}}}})),n}(i,n);E(o.keys(),(function(t){var n=o.get(t);wW(n.oldSeries,n.newSeries,e)}))}E(n.updatedSeries,(function(t){t[_g]&&(t[_g]=!1)}))}for(var a=t.getSeries(),s=i.oldSeries=[],l=i.oldDataGroupIds=[],u=i.oldData=[],h=0;h O_ || t < -O_ + } + + function vt(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 + } + + function yt(t) { + return (t = Math.round(t)) < 0 ? 0 : t > 255 ? 255 : t + } + + function xt(t) { + return (t = Math.round(t)) < 0 ? 0 : t > 360 ? 360 : t + } + + function _t(t) { + return t < 0 ? 0 : t > 1 ? 1 : t + } + + function wt(t) { + return yt(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 * 255 : parseInt(t, 10)) + } + + function bt(t) { + return _t(t.length && "%" === t.charAt(t.length - 1) ? parseFloat(t) / 100 : parseFloat(t)) + } + + function St(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 Mt(t, e, i) { + return t + (e - t) * i + } + + function It(t, e, i, n, o) { + return t[0] = e, t[1] = i, t[2] = n, t[3] = o, t + } + + function Tt(t, e) { + return t[0] = e[0], t[1] = e[1], t[2] = e[2], t[3] = e[3], t + } + + function Dt(t, e) { + X_ && Tt(X_, e), X_ = U_.put(t, X_ || e.slice()) + } + + function At(t, e) { + if (t) { + e = e || []; + var i = U_.get(t); + if (i) return Tt(e, i); + var n = (t += "").replace(/ /g, "").toLowerCase(); + if (n in Z_) return Tt(e, Z_[n]), Dt(t, e), e; + if ("#" !== n.charAt(0)) { + var o = n.indexOf("("), a = n.indexOf(")"); + if (-1 !== o && a + 1 === n.length) { + var r = n.substr(0, o), s = n.substr(o + 1, a - (o + 1)).split(","), l = 1; + switch (r) { + case"rgba": + if (4 !== s.length) return void It(e, 0, 0, 0, 1); + l = bt(s.pop()); + case"rgb": + return 3 !== s.length ? void It(e, 0, 0, 0, 1) : (It(e, wt(s[0]), wt(s[1]), wt(s[2]), l), Dt(t, e), e); + case"hsla": + return 4 !== s.length ? void It(e, 0, 0, 0, 1) : (s[3] = bt(s[3]), Ct(s, e), Dt(t, e), e); + case"hsl": + return 3 !== s.length ? void It(e, 0, 0, 0, 1) : (Ct(s, e), Dt(t, e), e); + default: + return + } + } + It(e, 0, 0, 0, 1) + } else { + if (4 === n.length) return (u = parseInt(n.substr(1), 16)) >= 0 && u <= 4095 ? (It(e, (3840 & u) >> 4 | (3840 & u) >> 8, 240 & u | (240 & u) >> 4, 15 & u | (15 & u) << 4, 1), Dt(t, e), e) : void It(e, 0, 0, 0, 1); + if (7 === n.length) { + var u = parseInt(n.substr(1), 16); + return u >= 0 && u <= 16777215 ? (It(e, (16711680 & u) >> 16, (65280 & u) >> 8, 255 & u, 1), Dt(t, e), e) : void It(e, 0, 0, 0, 1) + } + } + } + } + + function Ct(t, e) { + var i = (parseFloat(t[0]) % 360 + 360) % 360 / 360, n = bt(t[1]), o = bt(t[2]), + a = o <= .5 ? o * (n + 1) : o + n - o * n, r = 2 * o - a; + return e = e || [], It(e, yt(255 * St(r, a, i + 1 / 3)), yt(255 * St(r, a, i)), yt(255 * St(r, a, i - 1 / 3)), 1), 4 === t.length && (e[3] = t[3]), e + } + + function Lt(t) { + if (t) { + var e, i, n = t[0] / 255, o = t[1] / 255, a = t[2] / 255, r = Math.min(n, o, a), s = Math.max(n, o, a), + l = s - r, u = (s + r) / 2; + if (0 === l) e = 0, i = 0; else { + i = u < .5 ? l / (s + r) : l / (2 - s - r); + var h = ((s - n) / 6 + l / 2) / l, c = ((s - o) / 6 + l / 2) / l, d = ((s - a) / 6 + l / 2) / l; + n === s ? e = d - c : o === s ? e = 1 / 3 + h - d : a === s && (e = 2 / 3 + c - h), e < 0 && (e += 1), e > 1 && (e -= 1) + } + var f = [360 * e, i, u]; + return null != t[3] && f.push(t[3]), f + } + } + + function kt(t, e) { + var i = At(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, i[n] > 255 ? i[n] = 255 : t[n] < 0 && (i[n] = 0); + return zt(i, 4 === i.length ? "rgba" : "rgb") + } + } + + function Pt(t) { + var e = At(t); + if (e) return ((1 << 24) + (e[0] << 16) + (e[1] << 8) + +e[2]).toString(16).slice(1) + } + + function Nt(t, e, i) { + if (e && e.length && t >= 0 && t <= 1) { + i = i || []; + var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = e[o], s = e[a], l = n - o; + return i[0] = yt(Mt(r[0], s[0], l)), i[1] = yt(Mt(r[1], s[1], l)), i[2] = yt(Mt(r[2], s[2], l)), i[3] = _t(Mt(r[3], s[3], l)), i + } + } + + function Ot(t, e, i) { + if (e && e.length && t >= 0 && t <= 1) { + var n = t * (e.length - 1), o = Math.floor(n), a = Math.ceil(n), r = At(e[o]), s = At(e[a]), l = n - o, + u = zt([yt(Mt(r[0], s[0], l)), yt(Mt(r[1], s[1], l)), yt(Mt(r[2], s[2], l)), _t(Mt(r[3], s[3], l))], "rgba"); + return i ? {color: u, leftIndex: o, rightIndex: a, value: n} : u + } + } + + function Et(t, e, i, n) { + if (t = At(t)) return t = Lt(t), null != e && (t[0] = xt(e)), null != i && (t[1] = bt(i)), null != n && (t[2] = bt(n)), zt(Ct(t), "rgba") + } + + function Rt(t, e) { + if ((t = At(t)) && null != e) return t[3] = _t(e), zt(t, "rgba") + } + + function zt(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 + ")" + } + } + + function Bt(t, e) { + return t[e] + } + + function Vt(t, e, i) { + t[e] = i + } + + function Gt(t, e, i) { + return (e - t) * i + t + } + + function Wt(t, e, i) { + return i > .5 ? e : t + } + + function Ft(t, e, i, n, o) { + var a = t.length; + if (1 == o) for (s = 0; s < a; s++) n[s] = Gt(t[s], e[s], i); else for (var r = a && t[0].length, s = 0; s < a; s++) for (var l = 0; l < r; l++) n[s][l] = Gt(t[s][l], e[s][l], i) + } + + function Ht(t, e, i) { + var n = t.length, o = e.length; + if (n !== o) if (n > o) t.length = o; else for (r = n; r < o; r++) t.push(1 === i ? e[r] : K_.call(e[r])); + for (var a = t[0] && t[0].length, r = 0; r < t.length; r++) if (1 === i) isNaN(t[r]) && (t[r] = e[r]); else for (var s = 0; s < a; s++) isNaN(t[r][s]) && (t[r][s] = e[r][s]) + } + + function Zt(t, e, i) { + if (t === e) return !0; + var n = t.length; + if (n !== e.length) return !1; + if (1 === i) { + for (a = 0; a < n; a++) if (t[a] !== e[a]) return !1 + } else for (var o = t[0].length, a = 0; a < n; a++) for (var r = 0; r < o; r++) if (t[a][r] !== e[a][r]) return !1; + return !0 + } + + function Ut(t, e, i, n, o, a, r, s, l) { + var u = t.length; + if (1 == l) for (c = 0; c < u; c++) s[c] = Xt(t[c], e[c], i[c], n[c], o, a, r); else for (var h = t[0].length, c = 0; c < u; c++) for (var d = 0; d < h; d++) s[c][d] = Xt(t[c][d], e[c][d], i[c][d], n[c][d], o, a, r) + } + + function Xt(t, e, i, n, o, a, r) { + var s = .5 * (i - t), l = .5 * (n - e); + return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e + } + + function jt(t) { + if (c(t)) { + var e = t.length; + if (c(t[0])) { + for (var i = [], n = 0; n < e; n++) i.push(K_.call(t[n])); + return i + } + return K_.call(t) + } + return t + } + + function Yt(t) { + return t[0] = Math.floor(t[0]), t[1] = Math.floor(t[1]), t[2] = Math.floor(t[2]), "rgba(" + t.join(",") + ")" + } + + function qt(t) { + var e = t[t.length - 1].value; + return c(e && e[0]) ? 2 : 1 + } + + function Kt(t, e, i, n, o, a) { + var r = t._getter, s = t._setter, l = "spline" === e, u = n.length; + if (u) { + var h, d = c(n[0].value), f = !1, p = !1, g = d ? qt(n) : 0; + n.sort(function (t, e) { + return t.time - e.time + }), h = n[u - 1].time; + for (var m = [], v = [], y = n[0].value, x = !0, _ = 0; _ < u; _++) { + m.push(n[_].time / h); + var w = n[_].value; + if (d && Zt(w, y, g) || !d && w === y || (x = !1), y = w, "string" == typeof w) { + var b = At(w); + b ? (w = b, f = !0) : p = !0 + } + v.push(w) + } + if (a || !x) { + for (var S = v[u - 1], _ = 0; _ < u - 1; _++) d ? Ht(v[_], S, g) : !isNaN(v[_]) || isNaN(S) || p || f || (v[_] = S); + d && Ht(r(t._target, o), S, g); + var M, I, T, D, A, C, L = 0, k = 0; + if (f) var P = [0, 0, 0, 0]; + var N = new vt({ + target: t._target, life: h, loop: t._loop, delay: t._delay, onframe: function (t, e) { + var i; + if (e < 0) i = 0; else if (e < k) { + for (i = M = Math.min(L + 1, u - 1); i >= 0 && !(m[i] <= e); i--) ; + i = Math.min(i, u - 2) + } else { + for (i = L; i < u && !(m[i] > e); i++) ; + i = Math.min(i - 1, u - 2) + } + L = i, k = e; + var n = m[i + 1] - m[i]; + if (0 !== n) if (I = (e - m[i]) / n, l) if (D = v[i], T = v[0 === i ? i : i - 1], A = v[i > u - 2 ? u - 1 : i + 1], C = v[i > u - 3 ? u - 1 : i + 2], d) Ut(T, D, A, C, I, I * I, I * I * I, r(t, o), g); else { + if (f) a = Ut(T, D, A, C, I, I * I, I * I * I, P, 1), a = Yt(P); else { + if (p) return Wt(D, A, I); + a = Xt(T, D, A, C, I, I * I, I * I * I) + } + s(t, o, a) + } else if (d) Ft(v[i], v[i + 1], I, r(t, o), g); else { + var a; + if (f) Ft(v[i], v[i + 1], I, P, 1), a = Yt(P); else { + if (p) return Wt(v[i], v[i + 1], I); + a = Gt(v[i], v[i + 1], I) + } + s(t, o, a) + } + }, ondestroy: i + }); + return e && "spline" !== e && (N.easing = e), N + } + } + } + + function $t(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 + } + + function Jt(t) { + for (var e = 0; t >= lw;) e |= 1 & t, t >>= 1; + return t + e + } + + function Qt(t, e, i, n) { + var o = e + 1; + if (o === i) return 1; + if (n(t[o++], t[e]) < 0) { + for (; o < i && n(t[o], t[o - 1]) < 0;) o++; + te(t, e, o) + } else for (; o < i && n(t[o], t[o - 1]) >= 0;) o++; + return o - e + } + + function te(t, e, i) { + for (i--; e < i;) { + var n = t[e]; + t[e++] = t[i], t[i--] = n + } + } + + function ee(t, e, i, n, o) { + for (n === e && n++; n < i; n++) { + for (var a, r = t[n], s = e, l = n; s < l;) o(r, t[a = s + l >>> 1]) < 0 ? l = a : s = a + 1; + var u = n - s; + switch (u) { + case 3: + t[s + 3] = t[s + 2]; + case 2: + t[s + 2] = t[s + 1]; + case 1: + t[s + 1] = t[s]; + break; + default: + for (; u > 0;) t[s + u] = t[s + u - 1], u-- + } + t[s] = r + } + } + + function ie(t, e, i, n, o, a) { + var r = 0, s = 0, l = 1; + if (a(t, e[i + o]) > 0) { + for (s = n - o; l < s && a(t, e[i + o + l]) > 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s), r += o, l += o + } else { + for (s = o + 1; l < s && a(t, e[i + o - l]) <= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s); + var u = r; + r = o - l, l = o - u + } + for (r++; r < l;) { + var h = r + (l - r >>> 1); + a(t, e[i + h]) > 0 ? r = h + 1 : l = h + } + return l + } + + function ne(t, e, i, n, o, a) { + var r = 0, s = 0, l = 1; + if (a(t, e[i + o]) < 0) { + for (s = o + 1; l < s && a(t, e[i + o - l]) < 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s); + var u = r; + r = o - l, l = o - u + } else { + for (s = n - o; l < s && a(t, e[i + o + l]) >= 0;) r = l, (l = 1 + (l << 1)) <= 0 && (l = s); + l > s && (l = s), r += o, l += o + } + for (r++; r < l;) { + var h = r + (l - r >>> 1); + a(t, e[i + h]) < 0 ? l = h : r = h + 1 + } + return l + } + + function oe(t, e) { + function i(i) { + var s = a[i], u = r[i], h = a[i + 1], c = r[i + 1]; + r[i] = u + c, i === l - 3 && (a[i + 1] = a[i + 2], r[i + 1] = r[i + 2]), l--; + var d = ne(t[h], t, s, u, 0, e); + s += d, 0 !== (u -= d) && 0 !== (c = ie(t[s + u - 1], t, h, c, c - 1, e)) && (u <= c ? n(s, u, h, c) : o(s, u, h, c)) + } + + function n(i, n, o, a) { + var r = 0; + for (r = 0; r < n; r++) u[r] = t[i + r]; + var l = 0, h = o, c = i; + if (t[c++] = t[h++], 0 != --a) if (1 !== n) { + for (var d, f, p, g = s; ;) { + d = 0, f = 0, p = !1; + do { + if (e(t[h], u[l]) < 0) { + if (t[c++] = t[h++], f++, d = 0, 0 == --a) { + p = !0; + break + } + } else if (t[c++] = u[l++], d++, f = 0, 1 == --n) { + p = !0; + break + } + } while ((d | f) < g); + if (p) break; + do { + if (0 !== (d = ne(t[h], u, l, n, 0, e))) { + for (r = 0; r < d; r++) t[c + r] = u[l + r]; + if (c += d, l += d, (n -= d) <= 1) { + p = !0; + break + } + } + if (t[c++] = t[h++], 0 == --a) { + p = !0; + break + } + if (0 !== (f = ie(u[l], t, h, a, 0, e))) { + for (r = 0; r < f; r++) t[c + r] = t[h + r]; + if (c += f, h += f, 0 === (a -= f)) { + p = !0; + break + } + } + if (t[c++] = u[l++], 1 == --n) { + p = !0; + break + } + g-- + } while (d >= uw || f >= uw); + if (p) break; + g < 0 && (g = 0), g += 2 + } + if ((s = g) < 1 && (s = 1), 1 === n) { + for (r = 0; r < a; r++) t[c + r] = t[h + r]; + t[c + a] = u[l] + } else { + if (0 === n) throw new Error; + for (r = 0; r < n; r++) t[c + r] = u[l + r] + } + } else { + for (r = 0; r < a; r++) t[c + r] = t[h + r]; + t[c + a] = u[l] + } else for (r = 0; r < n; r++) t[c + r] = u[l + r] + } + + function o(i, n, o, a) { + var r = 0; + for (r = 0; r < a; r++) u[r] = t[o + r]; + var l = i + n - 1, h = a - 1, c = o + a - 1, d = 0, f = 0; + if (t[c--] = t[l--], 0 != --n) if (1 !== a) { + for (var p = s; ;) { + var g = 0, m = 0, v = !1; + do { + if (e(u[h], t[l]) < 0) { + if (t[c--] = t[l--], g++, m = 0, 0 == --n) { + v = !0; + break + } + } else if (t[c--] = u[h--], m++, g = 0, 1 == --a) { + v = !0; + break + } + } while ((g | m) < p); + if (v) break; + do { + if (0 != (g = n - ne(u[h], t, i, n, n - 1, e))) { + for (n -= g, f = (c -= g) + 1, d = (l -= g) + 1, r = g - 1; r >= 0; r--) t[f + r] = t[d + r]; + if (0 === n) { + v = !0; + break + } + } + if (t[c--] = u[h--], 1 == --a) { + v = !0; + break + } + if (0 != (m = a - ie(t[l], u, 0, a, a - 1, e))) { + for (a -= m, f = (c -= m) + 1, d = (h -= m) + 1, r = 0; r < m; r++) t[f + r] = u[d + r]; + if (a <= 1) { + v = !0; + break + } + } + if (t[c--] = t[l--], 0 == --n) { + v = !0; + break + } + p-- + } while (g >= uw || m >= uw); + if (v) break; + p < 0 && (p = 0), p += 2 + } + if ((s = p) < 1 && (s = 1), 1 === a) { + for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r]; + t[c] = u[h] + } else { + if (0 === a) throw new Error; + for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r] + } + } else { + for (f = (c -= n) + 1, d = (l -= n) + 1, r = n - 1; r >= 0; r--) t[f + r] = t[d + r]; + t[c] = u[h] + } else for (d = c - (a - 1), r = 0; r < a; r++) t[d + r] = u[r] + } + + var a, r, s = uw, l = 0, u = []; + a = [], r = [], this.mergeRuns = function () { + for (; l > 1;) { + var t = l - 2; + if (t >= 1 && r[t - 1] <= r[t] + r[t + 1] || t >= 2 && r[t - 2] <= r[t] + r[t - 1]) r[t - 1] < r[t + 1] && t--; else if (r[t] > r[t + 1]) break; + i(t) + } + }, this.forceMergeRuns = function () { + for (; l > 1;) { + var t = l - 2; + t > 0 && r[t - 1] < r[t + 1] && t--, i(t) + } + }, this.pushRun = function (t, e) { + a[l] = t, r[l] = e, l += 1 + } + } + + function ae(t, e, i, n) { + i || (i = 0), n || (n = t.length); + var o = n - i; + if (!(o < 2)) { + var a = 0; + if (o < lw) return a = Qt(t, i, n, e), void ee(t, i, n, i + a, e); + var r = new oe(t, e), s = Jt(o); + do { + if ((a = Qt(t, i, n, e)) < s) { + var l = o; + l > s && (l = s), ee(t, i, i + l, i + a, e), a = l + } + r.pushRun(i, a), r.mergeRuns(), o -= a, i += a + } while (0 !== o); + r.forceMergeRuns() + } + } + + function re(t, e) { + return t.zlevel === e.zlevel ? t.z === e.z ? t.z2 - e.z2 : t.z - e.z : t.zlevel - e.zlevel + } + + function se(t, e, i) { + var n = null == e.x ? 0 : e.x, o = null == e.x2 ? 1 : e.x2, a = null == e.y ? 0 : e.y, + r = null == e.y2 ? 0 : e.y2; + return e.global || (n = n * i.width + i.x, o = o * i.width + i.x, a = a * i.height + i.y, r = r * i.height + i.y), n = isNaN(n) ? 0 : n, o = isNaN(o) ? 1 : o, a = isNaN(a) ? 0 : a, r = isNaN(r) ? 0 : r, t.createLinearGradient(n, a, o, r) + } + + function le(t, e, i) { + var n = i.width, o = i.height, a = Math.min(n, o), 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 * o + i.y, l *= a), t.createRadialGradient(r, s, 0, r, s, l) + } + + function ue() { + return !1 + } + + function he(t, e, i) { + var n = m_(), o = e.getWidth(), a = e.getHeight(), r = n.style; + return r && (r.position = "absolute", r.left = 0, r.top = 0, r.width = o + "px", r.height = a + "px", n.setAttribute("data-zr-dom-id", t)), n.width = o * i, n.height = a * i, n + } + + function ce(t) { + if ("string" == typeof t) { + var e = ww.get(t); + return e && e.image + } + return t + } + + function de(t, e, i, n, o) { + if (t) { + if ("string" == typeof t) { + if (e && e.__zrImageSrc === t || !i) return e; + var a = ww.get(t), r = {hostEl: i, cb: n, cbPayload: o}; + return a ? !pe(e = a.image) && a.pending.push(r) : (!e && (e = new Image), e.onload = fe, ww.put(t, e.__cachedImgObj = { + image: e, + pending: [r] + }), e.src = e.__zrImageSrc = t), e + } + return t + } + return e + } + + function fe() { + 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 pe(t) { + return t && t.width && t.height + } + + function ge(t, e) { + var i = t + ":" + (e = e || Tw); + if (bw[i]) return bw[i]; + for (var n = (t + "").split("\n"), o = 0, a = 0, r = n.length; a < r; a++) o = Math.max(De(n[a], e).width, o); + return Sw > Mw && (Sw = 0, bw = {}), Sw++, bw[i] = o, o + } + + function me(t, e, i, n, o, a, r) { + return a ? ye(t, e, i, n, o, a, r) : ve(t, e, i, n, o, r) + } + + function ve(t, e, i, n, o, a) { + var r = Ae(t, e, o, a), s = ge(t, e); + o && (s += o[1] + o[3]); + var l = r.outerHeight, u = new $t(xe(0, s, i), _e(0, l, n), s, l); + return u.lineHeight = r.lineHeight, u + } + + function ye(t, e, i, n, o, a, r) { + var s = Ce(t, {rich: a, truncate: r, font: e, textAlign: i, textPadding: o}), l = s.outerWidth, + u = s.outerHeight; + return new $t(xe(0, l, i), _e(0, u, n), l, u) + } + + function xe(t, e, i) { + return "right" === i ? t -= e : "center" === i && (t -= e / 2), t + } + + function _e(t, e, i) { + return "middle" === i ? t -= e / 2 : "bottom" === i && (t -= e), t + } + + function we(t, e, i) { + var n = e.x, o = e.y, a = e.height, r = e.width, s = a / 2, l = "left", u = "top"; + switch (t) { + case"left": + n -= i, o += s, l = "right", u = "middle"; + break; + case"right": + n += i + r, o += s, u = "middle"; + break; + case"top": + n += r / 2, o -= i, l = "center", u = "bottom"; + break; + case"bottom": + n += r / 2, o += a + i, l = "center"; + break; + case"inside": + n += r / 2, o += s, l = "center", u = "middle"; + break; + case"insideLeft": + n += i, o += s, u = "middle"; + break; + case"insideRight": + n += r - i, o += s, l = "right", u = "middle"; + break; + case"insideTop": + n += r / 2, o += i, l = "center"; + break; + case"insideBottom": + n += r / 2, o += a - i, l = "center", u = "bottom"; + break; + case"insideTopLeft": + n += i, o += i; + break; + case"insideTopRight": + n += r - i, o += i, l = "right"; + break; + case"insideBottomLeft": + n += i, o += a - i, u = "bottom"; + break; + case"insideBottomRight": + n += r - i, o += a - i, l = "right", u = "bottom" + } + return {x: n, y: o, textAlign: l, textVerticalAlign: u} + } + + function be(t, e, i, n, o) { + if (!e) return ""; + var a = (t + "").split("\n"); + o = Se(e, i, n, o); + for (var r = 0, s = a.length; r < s; r++) a[r] = Me(a[r], o); + return a.join("\n") + } + + function Se(t, e, i, n) { + (n = a({}, n)).font = e; + var i = D(i, "..."); + n.maxIterations = D(n.maxIterations, 2); + var o = n.minChar = D(n.minChar, 0); + n.cnCharWidth = ge("国", e); + var r = n.ascCharWidth = ge("a", e); + n.placeholder = D(n.placeholder, ""); + for (var s = t = Math.max(0, t - 1), l = 0; l < o && s >= r; l++) s -= r; + var u = ge(i); + return u > s && (i = "", u = 0), s = t - u, n.ellipsis = i, n.ellipsisWidth = u, n.contentWidth = s, n.containerWidth = t, n + } + + function Me(t, e) { + var i = e.containerWidth, n = e.font, o = e.contentWidth; + if (!i) return ""; + var a = ge(t, n); + if (a <= i) return t; + for (var r = 0; ; r++) { + if (a <= o || r >= e.maxIterations) { + t += e.ellipsis; + break + } + var s = 0 === r ? Ie(t, o, e.ascCharWidth, e.cnCharWidth) : a > 0 ? Math.floor(t.length * o / a) : 0; + a = ge(t = t.substr(0, s), n) + } + return "" === t && (t = e.placeholder), t + } + + function Ie(t, e, i, n) { + for (var o = 0, a = 0, r = t.length; a < r && o < e; a++) { + var s = t.charCodeAt(a); + o += 0 <= s && s <= 127 ? i : n + } + return a + } + + function Te(t) { + return ge("国", t) + } + + function De(t, e) { + return Dw.measureText(t, e) + } + + function Ae(t, e, i, n) { + null != t && (t += ""); + var o = Te(e), a = t ? t.split("\n") : [], r = a.length * o, s = r; + if (i && (s += i[0] + i[2]), t && n) { + var l = n.outerHeight, u = n.outerWidth; + if (null != l && s > l) t = "", a = []; else if (null != u) for (var h = Se(u - (i ? i[1] + i[3] : 0), e, n.ellipsis, { + minChar: n.minChar, + placeholder: n.placeholder + }), c = 0, d = a.length; c < d; c++) a[c] = Me(a[c], h) + } + return {lines: a, height: r, outerHeight: s, lineHeight: o} + } + + function Ce(t, e) { + var i = {lines: [], width: 0, height: 0}; + if (null != t && (t += ""), !t) return i; + for (var n, o = Iw.lastIndex = 0; null != (n = Iw.exec(t));) { + var a = n.index; + a > o && Le(i, t.substring(o, a)), Le(i, n[2], n[1]), o = Iw.lastIndex + } + o < t.length && Le(i, t.substring(o, t.length)); + var r = i.lines, s = 0, l = 0, u = [], h = e.textPadding, c = e.truncate, d = c && c.outerWidth, + f = c && c.outerHeight; + h && (null != d && (d -= h[1] + h[3]), null != f && (f -= h[0] + h[2])); + for (L = 0; L < r.length; L++) { + for (var p = r[L], g = 0, m = 0, v = 0; v < p.tokens.length; v++) { + var y = (k = p.tokens[v]).styleName && e.rich[k.styleName] || {}, x = k.textPadding = y.textPadding, + _ = k.font = y.font || e.font, w = k.textHeight = D(y.textHeight, Te(_)); + if (x && (w += x[0] + x[2]), k.height = w, k.lineHeight = A(y.textLineHeight, e.textLineHeight, w), k.textAlign = y && y.textAlign || e.textAlign, k.textVerticalAlign = y && y.textVerticalAlign || "middle", null != f && s + k.lineHeight > f) return { + lines: [], + width: 0, + height: 0 + }; + k.textWidth = ge(k.text, _); + var b = y.textWidth, S = null == b || "auto" === b; + if ("string" == typeof b && "%" === b.charAt(b.length - 1)) k.percentWidth = b, u.push(k), b = 0; else { + if (S) { + b = k.textWidth; + var M = y.textBackgroundColor, I = M && M.image; + I && pe(I = ce(I)) && (b = Math.max(b, I.width * w / I.height)) + } + var T = x ? x[1] + x[3] : 0; + b += T; + var C = null != d ? d - m : null; + null != C && C < b && (!S || C < T ? (k.text = "", k.textWidth = b = 0) : (k.text = be(k.text, C - T, _, c.ellipsis, {minChar: c.minChar}), k.textWidth = ge(k.text, _), b = k.textWidth + T)) + } + m += k.width = b, y && (g = Math.max(g, k.lineHeight)) + } + p.width = m, p.lineHeight = g, s += g, l = Math.max(l, m) + } + i.outerWidth = i.width = D(e.textWidth, l), i.outerHeight = i.height = D(e.textHeight, s), h && (i.outerWidth += h[1] + h[3], i.outerHeight += h[0] + h[2]); + for (var L = 0; L < u.length; L++) { + var k = u[L], P = k.percentWidth; + k.width = parseInt(P, 10) / 100 * l + } + return i + } + + function Le(t, e, i) { + for (var n = "" === e, o = e.split("\n"), a = t.lines, r = 0; r < o.length; r++) { + var s = o[r], l = {styleName: i, text: s, isLineHolder: !s && !n}; + if (r) a.push({tokens: [l]}); else { + var u = (a[a.length - 1] || (a[0] = {tokens: []})).tokens, h = u.length; + 1 === h && u[0].isLineHolder ? u[0] = l : (s || !h || n) && u.push(l) + } + } + } + + function ke(t) { + var e = (t.fontSize || t.fontFamily) && [t.fontStyle, t.fontWeight, (t.fontSize || 12) + "px", t.fontFamily || "sans-serif"].join(" "); + return e && P(e) || t.textFont || t.font + } + + function Pe(t, e) { + var i, n, o, a, r = e.x, s = e.y, l = e.width, u = e.height, h = e.r; + l < 0 && (r += l, l = -l), u < 0 && (s += u, u = -u), "number" == typeof h ? i = n = o = a = h : h instanceof Array ? 1 === h.length ? i = n = o = a = h[0] : 2 === h.length ? (i = o = h[0], n = a = h[1]) : 3 === h.length ? (i = h[0], n = a = h[1], o = h[2]) : (i = h[0], n = h[1], o = h[2], a = h[3]) : i = n = o = a = 0; + var c; + i + n > l && (i *= l / (c = i + n), n *= l / c), o + a > l && (o *= l / (c = o + a), a *= l / c), n + o > u && (n *= u / (c = n + o), o *= u / c), i + a > u && (i *= u / (c = i + a), a *= u / c), t.moveTo(r + i, s), t.lineTo(r + l - n, s), 0 !== n && t.arc(r + l - n, s + n, n, -Math.PI / 2, 0), t.lineTo(r + l, s + u - o), 0 !== o && t.arc(r + l - o, s + u - o, o, 0, Math.PI / 2), t.lineTo(r + a, s + u), 0 !== a && t.arc(r + a, s + u - a, a, Math.PI / 2, Math.PI), t.lineTo(r, s + i), 0 !== i && t.arc(r + i, s + i, i, Math.PI, 1.5 * Math.PI) + } + + function Ne(t) { + return Oe(t), d(t.rich, Oe), t + } + + function Oe(t) { + if (t) { + t.font = ke(t); + var e = t.textAlign; + "middle" === e && (e = "center"), t.textAlign = null == e || Aw[e] ? e : "left"; + var i = t.textVerticalAlign || t.textBaseline; + "center" === i && (i = "middle"), t.textVerticalAlign = null == i || Cw[i] ? i : "top", t.textPadding && (t.textPadding = L(t.textPadding)) + } + } + + function Ee(t, e, i, n, o) { + n.rich ? ze(t, e, i, n, o) : Re(t, e, i, n, o) + } + + function Re(t, e, i, n, o) { + var a = Ue(e, "font", n.font || Tw), r = n.textPadding, s = t.__textCotentBlock; + s && !t.__dirty || (s = t.__textCotentBlock = Ae(i, a, r, n.truncate)); + var l = s.outerHeight, u = s.lines, h = s.lineHeight, c = Ze(l, n, o), d = c.baseX, f = c.baseY, + p = c.textAlign, g = c.textVerticalAlign; + Ve(e, n, o, d, f); + var m = _e(f, l, g), v = d, y = m, x = We(n); + if (x || r) { + var _ = ge(i, a); + r && (_ += r[1] + r[3]); + var w = xe(d, _, p); + x && Fe(t, e, n, w, m, _, l), r && (v = qe(d, p, r), y += r[0]) + } + Ue(e, "textAlign", p || "left"), Ue(e, "textBaseline", "middle"), Ue(e, "shadowBlur", n.textShadowBlur || 0), Ue(e, "shadowColor", n.textShadowColor || "transparent"), Ue(e, "shadowOffsetX", n.textShadowOffsetX || 0), Ue(e, "shadowOffsetY", n.textShadowOffsetY || 0), y += h / 2; + var b = n.textStrokeWidth, S = Xe(n.textStroke, b), M = je(n.textFill); + S && (Ue(e, "lineWidth", b), Ue(e, "strokeStyle", S)), M && Ue(e, "fillStyle", M); + for (var I = 0; I < u.length; I++) S && e.strokeText(u[I], v, y), M && e.fillText(u[I], v, y), y += h + } + + function ze(t, e, i, n, o) { + var a = t.__textCotentBlock; + a && !t.__dirty || (a = t.__textCotentBlock = Ce(i, n)), Be(t, e, a, n, o) + } + + function Be(t, e, i, n, o) { + var a = i.width, r = i.outerWidth, s = i.outerHeight, l = n.textPadding, u = Ze(s, n, o), h = u.baseX, + c = u.baseY, d = u.textAlign, f = u.textVerticalAlign; + Ve(e, n, o, h, c); + var p = xe(h, r, d), g = _e(c, s, f), m = p, v = g; + l && (m += l[3], v += l[0]); + var y = m + a; + We(n) && Fe(t, e, n, p, g, r, s); + for (var x = 0; x < i.lines.length; x++) { + for (var _, w = i.lines[x], b = w.tokens, S = b.length, M = w.lineHeight, I = w.width, T = 0, D = m, A = y, C = S - 1; T < S && (!(_ = b[T]).textAlign || "left" === _.textAlign);) Ge(t, e, _, n, M, v, D, "left"), I -= _.width, D += _.width, T++; + for (; C >= 0 && "right" === (_ = b[C]).textAlign;) Ge(t, e, _, n, M, v, A, "right"), I -= _.width, A -= _.width, C--; + for (D += (a - (D - m) - (y - A) - I) / 2; T <= C;) Ge(t, e, _ = b[T], n, M, v, D + _.width / 2, "center"), D += _.width, T++; + v += M + } + } + + function Ve(t, e, i, n, o) { + if (i && e.textRotation) { + var a = e.textOrigin; + "center" === a ? (n = i.width / 2 + i.x, o = i.height / 2 + i.y) : a && (n = a[0] + i.x, o = a[1] + i.y), t.translate(n, o), t.rotate(-e.textRotation), t.translate(-n, -o) + } + } + + function Ge(t, e, i, n, o, a, r, s) { + var l = n.rich[i.styleName] || {}, u = i.textVerticalAlign, h = a + o / 2; + "top" === u ? h = a + i.height / 2 : "bottom" === u && (h = a + o - i.height / 2), !i.isLineHolder && We(l) && Fe(t, e, l, "right" === s ? r - i.width : "center" === s ? r - i.width / 2 : r, h - i.height / 2, i.width, i.height); + var c = i.textPadding; + c && (r = qe(r, s, c), h -= i.height / 2 - c[2] - i.textHeight / 2), Ue(e, "shadowBlur", A(l.textShadowBlur, n.textShadowBlur, 0)), Ue(e, "shadowColor", l.textShadowColor || n.textShadowColor || "transparent"), Ue(e, "shadowOffsetX", A(l.textShadowOffsetX, n.textShadowOffsetX, 0)), Ue(e, "shadowOffsetY", A(l.textShadowOffsetY, n.textShadowOffsetY, 0)), Ue(e, "textAlign", s), Ue(e, "textBaseline", "middle"), Ue(e, "font", i.font || Tw); + var d = Xe(l.textStroke || n.textStroke, p), f = je(l.textFill || n.textFill), + p = D(l.textStrokeWidth, n.textStrokeWidth); + d && (Ue(e, "lineWidth", p), Ue(e, "strokeStyle", d), e.strokeText(i.text, r, h)), f && (Ue(e, "fillStyle", f), e.fillText(i.text, r, h)) + } + + function We(t) { + return t.textBackgroundColor || t.textBorderWidth && t.textBorderColor + } + + function Fe(t, e, i, n, o, a, r) { + var s = i.textBackgroundColor, l = i.textBorderWidth, u = i.textBorderColor, h = _(s); + if (Ue(e, "shadowBlur", i.textBoxShadowBlur || 0), Ue(e, "shadowColor", i.textBoxShadowColor || "transparent"), Ue(e, "shadowOffsetX", i.textBoxShadowOffsetX || 0), Ue(e, "shadowOffsetY", i.textBoxShadowOffsetY || 0), h || l && u) { + e.beginPath(); + var c = i.textBorderRadius; + c ? Pe(e, {x: n, y: o, width: a, height: r, r: c}) : e.rect(n, o, a, r), e.closePath() + } + if (h) Ue(e, "fillStyle", s), e.fill(); else if (w(s)) { + var d = s.image; + (d = de(d, null, t, He, s)) && pe(d) && e.drawImage(d, n, o, a, r) + } + l && u && (Ue(e, "lineWidth", l), Ue(e, "strokeStyle", u), e.stroke()) + } + + function He(t, e) { + e.image = t + } + + function Ze(t, e, i) { + var n = e.x || 0, o = e.y || 0, a = e.textAlign, r = e.textVerticalAlign; + if (i) { + var s = e.textPosition; + if (s instanceof Array) n = i.x + Ye(s[0], i.width), o = i.y + Ye(s[1], i.height); else { + var l = we(s, i, e.textDistance); + n = l.x, o = l.y, a = a || l.textAlign, r = r || l.textVerticalAlign + } + var u = e.textOffset; + u && (n += u[0], o += u[1]) + } + return {baseX: n, baseY: o, textAlign: a, textVerticalAlign: r} + } + + function Ue(t, e, i) { + return t[e] = dw(t, e, i), t[e] + } + + function Xe(t, e) { + return null == t || e <= 0 || "transparent" === t || "none" === t ? null : t.image || t.colorStops ? "#000" : t + } + + function je(t) { + return null == t || "none" === t ? null : t.image || t.colorStops ? "#000" : t + } + + function Ye(t, e) { + return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t + } + + function qe(t, e, i) { + return "right" === e ? t - i[1] : "center" === e ? t + i[3] / 2 - i[1] / 2 : t + i[3] + } + + function Ke(t, e) { + return null != t && (t || e.textBackgroundColor || e.textBorderWidth && e.textBorderColor || e.textPadding) + } + + function $e(t) { + t = t || {}, nw.call(this, t); + for (var e in t) t.hasOwnProperty(e) && "style" !== e && (this[e] = t[e]); + this.style = new pw(t.style, this), this._rect = null, this.__clipPaths = [] + } + + function Je(t) { + $e.call(this, t) + } + + function Qe(t) { + return parseInt(t, 10) + } + + function ti(t) { + return !!t && (!!t.__builtin__ || "function" == typeof t.resize && "function" == typeof t.refresh) + } + + function ei(t, e, i) { + return Pw.copy(t.getBoundingRect()), t.transform && Pw.applyTransform(t.transform), Nw.width = e, Nw.height = i, !Pw.intersect(Nw) + } + + function ii(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 + } + + function ni(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) + } + } + + function oi(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 + } + + function ai(t) { + return t.getBoundingClientRect ? t.getBoundingClientRect() : {left: 0, top: 0} + } + + function ri(t, e, i, n) { + return i = i || {}, n || !a_.canvasSupported ? si(t, e, i) : a_.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) : si(t, e, i), i + } + + function si(t, e, i) { + var n = ai(t); + i.zrX = e.clientX - n.left, i.zrY = e.clientY - n.top + } + + function li(t, e, i) { + if (null != (e = e || window.event).zrX) return e; + var n = e.type; + if (n && n.indexOf("touch") >= 0) { + var o = "touchend" != n ? e.targetTouches[0] : e.changedTouches[0]; + o && ri(t, o, e, i) + } else ri(t, e, e, i), e.zrDelta = e.wheelDelta ? e.wheelDelta / 120 : -(e.detail || 0) / 3; + var a = e.button; + return null == e.which && void 0 !== a && Rw.test(e.type) && (e.which = 1 & a ? 1 : 2 & a ? 3 : 4 & a ? 2 : 0), e + } + + function ui(t, e, i) { + Ew ? t.addEventListener(e, i) : t.attachEvent("on" + e, i) + } + + function hi(t, e, i) { + Ew ? t.removeEventListener(e, i) : t.detachEvent("on" + e, i) + } + + function ci(t) { + return t.which > 1 + } + + function di(t) { + var e = t[1][0] - t[0][0], i = t[1][1] - t[0][1]; + return Math.sqrt(e * e + i * i) + } + + function fi(t) { + return [(t[0][0] + t[1][0]) / 2, (t[0][1] + t[1][1]) / 2] + } + + function pi(t) { + return "mousewheel" === t && a_.browser.firefox ? "DOMMouseScroll" : t + } + + function gi(t, e, i) { + var n = t._gestureMgr; + "start" === i && n.clear(); + var o = n.recognize(e, t.handler.findHover(e.zrX, e.zrY, null).target, t.dom); + if ("end" === i && n.clear(), o) { + var a = o.type; + e.gestureEvent = a, t.handler.dispatchToElement({target: o.target}, a, o.event) + } + } + + function mi(t) { + t._touching = !0, clearTimeout(t._touchTimer), t._touchTimer = setTimeout(function () { + t._touching = !1 + }, 700) + } + + function vi(t) { + var e = t.pointerType; + return "pen" === e || "touch" === e + } + + function yi(t) { + function e(t, e) { + return function () { + if (!e._touching) return t.apply(e, arguments) + } + } + + d(Fw, function (e) { + t._handlers[e] = m(Uw[e], t) + }), d(Zw, function (e) { + t._handlers[e] = m(Uw[e], t) + }), d(Ww, function (i) { + t._handlers[i] = e(Uw[i], t) + }) + } + + function xi(t) { + function e(e, i) { + d(e, function (e) { + ui(t, pi(e), i._handlers[e]) + }, i) + } + + D_.call(this), this.dom = t, this._touching = !1, this._touchTimer, this._gestureMgr = new Vw, this._handlers = {}, yi(this), a_.pointerEventsSupported ? e(Zw, this) : (a_.touchEventsSupported && e(Fw, this), e(Ww, this)) + } + + function _i(t, e) { + var i = new Kw(n_(), t, e); + return qw[i.id] = i, i + } + + function wi(t, e) { + Yw[t] = e + } + + function bi(t) { + delete qw[t] + } + + function Si(t) { + return t instanceof Array ? t : null == t ? [] : [t] + } + + function Mi(t, e, i) { + if (t) { + t[e] = t[e] || {}, t.emphasis = t.emphasis || {}, t.emphasis[e] = t.emphasis[e] || {}; + for (var n = 0, o = i.length; n < o; n++) { + var a = i[n]; + !t.emphasis[e].hasOwnProperty(a) && t[e].hasOwnProperty(a) && (t.emphasis[e][a] = t[e][a]) + } + } + } + + function Ii(t) { + return !Qw(t) || tb(t) || t instanceof Date ? t : t.value + } + + function Ti(t) { + return Qw(t) && !(t instanceof Array) + } + + function Di(t, e) { + e = (e || []).slice(); + var i = f(t || [], function (t, e) { + return {exist: t} + }); + return Jw(e, function (t, n) { + if (Qw(t)) { + for (o = 0; o < i.length; o++) if (!i[o].option && null != t.id && i[o].exist.id === t.id + "") return i[o].option = t, void (e[n] = null); + for (var o = 0; o < i.length; o++) { + var a = i[o].exist; + if (!(i[o].option || null != a.id && null != t.id || null == t.name || Li(t) || Li(a) || a.name !== t.name + "")) return i[o].option = t, void (e[n] = null) + } + } + }), Jw(e, function (t, e) { + if (Qw(t)) { + for (var n = 0; n < i.length; n++) { + var o = i[n].exist; + if (!i[n].option && !Li(o) && null == t.id) { + i[n].option = t; + break + } + } + n >= i.length && i.push({option: t}) + } + }), i + } + + function Ai(t) { + var e = R(); + Jw(t, function (t, i) { + var n = t.exist; + n && e.set(n.id, t) + }), Jw(t, function (t, i) { + var n = t.option; + k(!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 = {}) + }), Jw(t, function (t, i) { + var n = t.exist, o = t.option, a = t.keyInfo; + if (Qw(o)) { + if (a.name = null != o.name ? o.name + "" : n ? n.name : eb + i, n) a.id = n.id; else if (null != o.id) a.id = o.id + ""; else { + var r = 0; + do { + a.id = "\0" + a.name + "\0" + r++ + } while (e.get(a.id)) + } + e.set(a.id, t) + } + }) + } + + function Ci(t) { + var e = t.name; + return !(!e || !e.indexOf(eb)) + } + + function Li(t) { + return Qw(t) && t.id && 0 === (t.id + "").indexOf("\0_ec_\0") + } + + function ki(t, e) { + function i(t, e, i) { + for (var n = 0, o = t.length; n < o; n++) for (var a = t[n].seriesId, r = Si(t[n].dataIndex), s = i && i[a], l = 0, u = r.length; l < u; l++) { + var h = r[l]; + s && s[h] ? s[h] = null : (e[a] || (e[a] = {}))[h] = 1 + } + } + + function n(t, e) { + var i = []; + for (var o in t) if (t.hasOwnProperty(o) && null != t[o]) if (e) i.push(+o); else { + var a = n(t[o], !0); + a.length && i.push({seriesId: o, dataIndex: a}) + } + return i + } + + var o = {}, a = {}; + return i(t || [], o), i(e || [], a, o), [n(o), n(a)] + } + + function Pi(t, e) { + return null != e.dataIndexInside ? e.dataIndexInside : null != e.dataIndex ? y(e.dataIndex) ? f(e.dataIndex, function (e) { + return t.indexOfRawIndex(e) + }) : t.indexOfRawIndex(e.dataIndex) : null != e.name ? y(e.name) ? f(e.name, function (e) { + return t.indexOfName(e) + }) : t.indexOfName(e.name) : void 0 + } + + function Ni() { + var t = "__\0ec_inner_" + nb++ + "_" + Math.random().toFixed(5); + return function (e) { + return e[t] || (e[t] = {}) + } + } + + function Oi(t, e, i) { + if (_(e)) { + var n = {}; + n[e + "Index"] = 0, e = n + } + var o = i && i.defaultMainType; + !o || Ei(e, o + "Index") || Ei(e, o + "Id") || Ei(e, o + "Name") || (e[o + "Index"] = 0); + var a = {}; + return Jw(e, function (n, o) { + var n = e[o]; + if ("dataIndex" !== o && "dataIndexInside" !== o) { + var r = o.match(/^(\w+)(Index|Id|Name)$/) || [], s = r[1], u = (r[2] || "").toLowerCase(); + if (!(!s || !u || null == n || "index" === u && "none" === n || i && i.includeMainTypes && l(i.includeMainTypes, s) < 0)) { + var h = {mainType: s}; + "index" === u && "all" === n || (h[u] = n); + var c = t.queryComponents(h); + a[s + "Models"] = c, a[s + "Model"] = c[0] + } + } else a[o] = n + }), a + } + + function Ei(t, e) { + return t && t.hasOwnProperty(e) + } + + function Ri(t, e, i) { + t.setAttribute ? t.setAttribute(e, i) : t[e] = i + } + + function zi(t, e) { + return t.getAttribute ? t.getAttribute(e) : t[e] + } + + function Bi(t) { + var e = {main: "", sub: ""}; + return t && (t = t.split(ob), e.main = t[0] || "", e.sub = t[1] || ""), e + } + + function Vi(t) { + k(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(t), 'componentType "' + t + '" illegal') + } + + function Gi(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 a(i.prototype, t), i.extend = this.extend, i.superCall = Fi, i.superApply = Hi, u(i, this), i.superClass = e, i + } + } + + function Wi(t) { + var e = ["__\0is_clz", rb++, Math.random().toFixed(3)].join("_"); + t.prototype[e] = !0, t.isInstance = function (t) { + return !(!t || !t[e]) + } + } + + function Fi(t, e) { + var i = C(arguments, 2); + return this.superClass.prototype[e].apply(t, i) + } + + function Hi(t, e, i) { + return this.superClass.prototype[e].apply(t, i) + } + + function Zi(t, e) { + function i(t) { + var e = n[t.main]; + return e && e[ab] || ((e = n[t.main] = {})[ab] = !0), e + } + + e = e || {}; + var n = {}; + if (t.registerClass = function (t, e) { + return e && (Vi(e), (e = Bi(e)).sub ? e.sub !== ab && (i(e)[e.sub] = t) : n[e.main] = t), t + }, t.getClass = function (t, e, i) { + var o = n[t]; + if (o && o[ab] && (o = e ? o[e] : null), i && !o) throw new Error(e ? "Component " + t + "." + (e || "") + " not exists. Load it first." : t + ".type should be specified."); + return o + }, t.getClassesByMainType = function (t) { + t = Bi(t); + var e = [], i = n[t.main]; + return i && i[ab] ? d(i, function (t, i) { + i !== ab && e.push(t) + }) : e.push(i), e + }, t.hasClass = function (t) { + return t = Bi(t), !!n[t.main] + }, t.getAllClassMainTypes = function () { + var t = []; + return d(n, function (e, i) { + t.push(i) + }), t + }, t.hasSubTypes = function (t) { + t = Bi(t); + var e = n[t.main]; + return e && e[ab] + }, t.parseClassType = Bi, e.registerWhenExtend) { + var o = t.extend; + o && (t.extend = function (e) { + var i = o.call(this, e); + return t.registerClass(i, e.type) + }) + } + return t + } + + function Ui(t) { + return t > -pb && t < pb + } + + function Xi(t) { + return t > pb || t < -pb + } + + function ji(t, e, i, n, o) { + var a = 1 - o; + return a * a * (a * t + 3 * o * e) + o * o * (o * n + 3 * a * i) + } + + function Yi(t, e, i, n, o) { + var a = 1 - o; + return 3 * (((e - t) * a + 2 * (i - e) * o) * a + (n - i) * o * o) + } + + function qi(t, e, i, n, o, a) { + var r = n + 3 * (e - i) - t, s = 3 * (i - 2 * e + t), l = 3 * (e - t), u = t - o, h = s * s - 3 * r * l, + c = s * l - 9 * r * u, d = l * l - 3 * s * u, f = 0; + if (Ui(h) && Ui(c)) Ui(s) ? a[0] = 0 : (M = -l / s) >= 0 && M <= 1 && (a[f++] = M); else { + var p = c * c - 4 * h * d; + if (Ui(p)) { + var g = c / h, m = -g / 2; + (M = -s / r + g) >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m) + } else if (p > 0) { + var v = fb(p), y = h * s + 1.5 * r * (-c + v), x = h * s + 1.5 * r * (-c - v); + (M = (-s - ((y = y < 0 ? -db(-y, vb) : db(y, vb)) + (x = x < 0 ? -db(-x, vb) : db(x, vb)))) / (3 * r)) >= 0 && M <= 1 && (a[f++] = M) + } else { + var _ = (2 * h * s - 3 * r * c) / (2 * fb(h * h * h)), w = Math.acos(_) / 3, b = fb(h), S = Math.cos(w), + M = (-s - 2 * b * S) / (3 * r), m = (-s + b * (S + mb * Math.sin(w))) / (3 * r), + I = (-s + b * (S - mb * Math.sin(w))) / (3 * r); + M >= 0 && M <= 1 && (a[f++] = M), m >= 0 && m <= 1 && (a[f++] = m), I >= 0 && I <= 1 && (a[f++] = I) + } + } + return f + } + + function Ki(t, e, i, n, o) { + var a = 6 * i - 12 * e + 6 * t, r = 9 * e + 3 * n - 3 * t - 9 * i, s = 3 * e - 3 * t, l = 0; + if (Ui(r)) Xi(a) && (c = -s / a) >= 0 && c <= 1 && (o[l++] = c); else { + var u = a * a - 4 * r * s; + if (Ui(u)) o[0] = -a / (2 * r); else if (u > 0) { + var h = fb(u), c = (-a + h) / (2 * r), d = (-a - h) / (2 * r); + c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) + } + } + return l + } + + function $i(t, e, i, n, o, a) { + var r = (e - t) * o + t, s = (i - e) * o + e, l = (n - i) * o + i, u = (s - r) * o + r, h = (l - s) * o + s, + c = (h - u) * o + u; + a[0] = t, a[1] = r, a[2] = u, a[3] = c, a[4] = c, a[5] = h, a[6] = l, a[7] = n + } + + function Ji(t, e, i, n, o, a, r, s, l, u, h) { + var c, d, f, p, g, m = .005, v = 1 / 0; + yb[0] = l, yb[1] = u; + for (var y = 0; y < 1; y += .05) xb[0] = ji(t, i, o, r, y), xb[1] = ji(e, n, a, s, y), (p = M_(yb, xb)) < v && (c = y, v = p); + v = 1 / 0; + for (var x = 0; x < 32 && !(m < gb); x++) d = c - m, f = c + m, xb[0] = ji(t, i, o, r, d), xb[1] = ji(e, n, a, s, d), p = M_(xb, yb), d >= 0 && p < v ? (c = d, v = p) : (_b[0] = ji(t, i, o, r, f), _b[1] = ji(e, n, a, s, f), g = M_(_b, yb), f <= 1 && g < v ? (c = f, v = g) : m *= .5); + return h && (h[0] = ji(t, i, o, r, c), h[1] = ji(e, n, a, s, c)), fb(v) + } + + function Qi(t, e, i, n) { + var o = 1 - n; + return o * (o * t + 2 * n * e) + n * n * i + } + + function tn(t, e, i, n) { + return 2 * ((1 - n) * (e - t) + n * (i - e)) + } + + function en(t, e, i, n, o) { + var a = t - 2 * e + i, r = 2 * (e - t), s = t - n, l = 0; + if (Ui(a)) Xi(r) && (c = -s / r) >= 0 && c <= 1 && (o[l++] = c); else { + var u = r * r - 4 * a * s; + if (Ui(u)) (c = -r / (2 * a)) >= 0 && c <= 1 && (o[l++] = c); else if (u > 0) { + var h = fb(u), c = (-r + h) / (2 * a), d = (-r - h) / (2 * a); + c >= 0 && c <= 1 && (o[l++] = c), d >= 0 && d <= 1 && (o[l++] = d) + } + } + return l + } + + function nn(t, e, i) { + var n = t + i - 2 * e; + return 0 === n ? .5 : (t - e) / n + } + + function on(t, e, i, n, o) { + var a = (e - t) * n + t, r = (i - e) * n + e, s = (r - a) * n + a; + o[0] = t, o[1] = a, o[2] = s, o[3] = s, o[4] = r, o[5] = i + } + + function an(t, e, i, n, o, a, r, s, l) { + var u, h = .005, c = 1 / 0; + yb[0] = r, yb[1] = s; + for (var d = 0; d < 1; d += .05) xb[0] = Qi(t, i, o, d), xb[1] = Qi(e, n, a, d), (m = M_(yb, xb)) < c && (u = d, c = m); + c = 1 / 0; + for (var f = 0; f < 32 && !(h < gb); f++) { + var p = u - h, g = u + h; + xb[0] = Qi(t, i, o, p), xb[1] = Qi(e, n, a, p); + var m = M_(xb, yb); + if (p >= 0 && m < c) u = p, c = m; else { + _b[0] = Qi(t, i, o, g), _b[1] = Qi(e, n, a, g); + var v = M_(_b, yb); + g <= 1 && v < c ? (u = g, c = v) : h *= .5 + } + } + return l && (l[0] = Qi(t, i, o, u), l[1] = Qi(e, n, a, u)), fb(c) + } + + function rn(t, e, i) { + if (0 !== t.length) { + var n, o = t[0], a = o[0], r = o[0], s = o[1], l = o[1]; + for (n = 1; n < t.length; n++) o = t[n], a = wb(a, o[0]), r = bb(r, o[0]), s = wb(s, o[1]), l = bb(l, o[1]); + e[0] = a, e[1] = s, i[0] = r, i[1] = l + } + } + + function sn(t, e, i, n, o, a) { + o[0] = wb(t, i), o[1] = wb(e, n), a[0] = bb(t, i), a[1] = bb(e, n) + } + + function ln(t, e, i, n, o, a, r, s, l, u) { + var h, c = Ki, d = ji, f = c(t, i, o, r, Cb); + for (l[0] = 1 / 0, l[1] = 1 / 0, u[0] = -1 / 0, u[1] = -1 / 0, h = 0; h < f; h++) { + var p = d(t, i, o, r, Cb[h]); + l[0] = wb(p, l[0]), u[0] = bb(p, u[0]) + } + for (f = c(e, n, a, s, Lb), h = 0; h < f; h++) { + var g = d(e, n, a, s, Lb[h]); + l[1] = wb(g, l[1]), u[1] = bb(g, u[1]) + } + l[0] = wb(t, l[0]), u[0] = bb(t, u[0]), l[0] = wb(r, l[0]), u[0] = bb(r, u[0]), l[1] = wb(e, l[1]), u[1] = bb(e, u[1]), l[1] = wb(s, l[1]), u[1] = bb(s, u[1]) + } + + function un(t, e, i, n, o, a, r, s) { + var l = nn, u = Qi, h = bb(wb(l(t, i, o), 1), 0), c = bb(wb(l(e, n, a), 1), 0), d = u(t, i, o, h), + f = u(e, n, a, c); + r[0] = wb(t, o, d), r[1] = wb(e, a, f), s[0] = bb(t, o, d), s[1] = bb(e, a, f) + } + + function hn(t, e, i, n, o, a, r, s, l) { + var u = tt, h = et, c = Math.abs(o - a); + if (c % Ib < 1e-4 && c > 1e-4) return s[0] = t - i, s[1] = e - n, l[0] = t + i, void (l[1] = e + n); + if (Tb[0] = Mb(o) * i + t, Tb[1] = Sb(o) * n + e, Db[0] = Mb(a) * i + t, Db[1] = Sb(a) * n + e, u(s, Tb, Db), h(l, Tb, Db), (o %= Ib) < 0 && (o += Ib), (a %= Ib) < 0 && (a += Ib), o > a && !r ? a += Ib : o < a && r && (o += Ib), r) { + var d = a; + a = o, o = d + } + for (var f = 0; f < a; f += Math.PI / 2) f > o && (Ab[0] = Mb(f) * i + t, Ab[1] = Sb(f) * n + e, u(s, Ab, s), h(l, Ab, l)) + } + + function cn(t, e, i, n, o, a, r) { + if (0 === o) return !1; + var s = o, l = 0, u = t; + if (r > e + s && r > n + s || r < e - s && r < n - s || a > t + s && a > i + s || a < t - s && a < i - s) return !1; + if (t === i) return Math.abs(a - t) <= s / 2; + var h = (l = (e - n) / (t - i)) * a - r + (u = (t * n - i * e) / (t - i)); + return h * h / (l * l + 1) <= s / 2 * s / 2 + } + + function dn(t, e, i, n, o, a, r, s, l, u, h) { + if (0 === l) return !1; + var c = l; + return !(h > e + c && h > n + c && h > a + c && h > s + c || h < e - c && h < n - c && h < a - c && h < s - c || u > t + c && u > i + c && u > o + c && u > r + c || u < t - c && u < i - c && u < o - c && u < r - c) && Ji(t, e, i, n, o, a, r, s, u, h, null) <= c / 2 + } + + function fn(t, e, i, n, o, a, r, s, l) { + if (0 === r) return !1; + var u = r; + return !(l > e + u && l > n + u && l > a + u || l < e - u && l < n - u && l < a - u || s > t + u && s > i + u && s > o + u || s < t - u && s < i - u && s < o - u) && an(t, e, i, n, o, a, s, l, null) <= u / 2 + } + + function pn(t) { + return (t %= Zb) < 0 && (t += Zb), t + } + + function gn(t, e, i, n, o, a, r, s, l) { + if (0 === r) return !1; + var u = r; + s -= t, l -= e; + var h = Math.sqrt(s * s + l * l); + if (h - u > i || h + u < i) return !1; + if (Math.abs(n - o) % Ub < 1e-4) return !0; + if (a) { + var c = n; + n = pn(o), o = pn(c) + } else n = pn(n), o = pn(o); + n > o && (o += Ub); + var d = Math.atan2(l, s); + return d < 0 && (d += Ub), d >= n && d <= o || d + Ub >= n && d + Ub <= o + } + + function mn(t, e, i, n, o, a) { + if (a > e && a > n || a < e && a < n) return 0; + if (n === e) return 0; + var r = n < e ? 1 : -1, s = (a - e) / (n - e); + 1 !== s && 0 !== s || (r = n < e ? .5 : -.5); + var l = s * (i - t) + t; + return l === o ? 1 / 0 : l > o ? r : 0 + } + + function vn(t, e) { + return Math.abs(t - e) < Yb + } + + function yn() { + var t = Kb[0]; + Kb[0] = Kb[1], Kb[1] = t + } + + function xn(t, e, i, n, o, a, r, s, l, u) { + if (u > e && u > n && u > a && u > s || u < e && u < n && u < a && u < s) return 0; + var h = qi(e, n, a, s, u, qb); + if (0 === h) return 0; + for (var c, d, f = 0, p = -1, g = 0; g < h; g++) { + var m = qb[g], v = 0 === m || 1 === m ? .5 : 1; + ji(t, i, o, r, m) < l || (p < 0 && (p = Ki(e, n, a, s, Kb), Kb[1] < Kb[0] && p > 1 && yn(), c = ji(e, n, a, s, Kb[0]), p > 1 && (d = ji(e, n, a, s, Kb[1]))), 2 == p ? m < Kb[0] ? f += c < e ? v : -v : m < Kb[1] ? f += d < c ? v : -v : f += s < d ? v : -v : m < Kb[0] ? f += c < e ? v : -v : f += s < c ? v : -v) + } + return f + } + + function _n(t, e, i, n, o, a, r, s) { + if (s > e && s > n && s > a || s < e && s < n && s < a) return 0; + var l = en(e, n, a, s, qb); + if (0 === l) return 0; + var u = nn(e, n, a); + if (u >= 0 && u <= 1) { + for (var h = 0, c = Qi(e, n, a, u), d = 0; d < l; d++) { + f = 0 === qb[d] || 1 === qb[d] ? .5 : 1; + (p = Qi(t, i, o, qb[d])) < r || (qb[d] < u ? h += c < e ? f : -f : h += a < c ? f : -f) + } + return h + } + var f = 0 === qb[0] || 1 === qb[0] ? .5 : 1, p = Qi(t, i, o, qb[0]); + return p < r ? 0 : a < e ? f : -f + } + + function wn(t, e, i, n, o, a, r, s) { + if ((s -= e) > i || s < -i) return 0; + u = Math.sqrt(i * i - s * s); + qb[0] = -u, qb[1] = u; + var l = Math.abs(n - o); + if (l < 1e-4) return 0; + if (l % jb < 1e-4) { + n = 0, o = jb; + p = a ? 1 : -1; + return r >= qb[0] + t && r <= qb[1] + t ? p : 0 + } + if (a) { + var u = n; + n = pn(o), o = pn(u) + } else n = pn(n), o = pn(o); + n > o && (o += jb); + for (var h = 0, c = 0; c < 2; c++) { + var d = qb[c]; + if (d + t > r) { + var f = Math.atan2(s, d), p = a ? 1 : -1; + f < 0 && (f = jb + f), (f >= n && f <= o || f + jb >= n && f + jb <= o) && (f > Math.PI / 2 && f < 1.5 * Math.PI && (p = -p), h += p) + } + } + return h + } + + function bn(t, e, i, n, o) { + for (var a = 0, r = 0, s = 0, l = 0, u = 0, h = 0; h < t.length;) { + var c = t[h++]; + switch (c === Xb.M && h > 1 && (i || (a += mn(r, s, l, u, n, o))), 1 == h && (l = r = t[h], u = s = t[h + 1]), c) { + case Xb.M: + r = l = t[h++], s = u = t[h++]; + break; + case Xb.L: + if (i) { + if (cn(r, s, t[h], t[h + 1], e, n, o)) return !0 + } else a += mn(r, s, t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.C: + if (i) { + if (dn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 + } else a += xn(r, s, t[h++], t[h++], t[h++], t[h++], t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.Q: + if (i) { + if (fn(r, s, t[h++], t[h++], t[h], t[h + 1], e, n, o)) return !0 + } else a += _n(r, s, t[h++], t[h++], t[h], t[h + 1], n, o) || 0; + r = t[h++], s = t[h++]; + break; + case Xb.A: + var d = t[h++], f = t[h++], p = t[h++], g = t[h++], m = t[h++], v = t[h++], + y = (t[h++], 1 - t[h++]), x = Math.cos(m) * p + d, _ = Math.sin(m) * g + f; + h > 1 ? a += mn(r, s, x, _, n, o) : (l = x, u = _); + var w = (n - d) * g / p + d; + if (i) { + if (gn(d, f, g, m, m + v, y, e, w, o)) return !0 + } else a += wn(d, f, g, m, m + v, y, w, o); + r = Math.cos(m + v) * p + d, s = Math.sin(m + v) * g + f; + break; + case Xb.R: + l = r = t[h++], u = s = t[h++]; + var x = l + t[h++], _ = u + t[h++]; + if (i) { + if (cn(l, u, x, u, e, n, o) || cn(x, u, x, _, e, n, o) || cn(x, _, l, _, e, n, o) || cn(l, _, l, u, e, n, o)) return !0 + } else a += mn(x, u, x, _, n, o), a += mn(l, _, l, u, n, o); + break; + case Xb.Z: + if (i) { + if (cn(r, s, l, u, e, n, o)) return !0 + } else a += mn(r, s, l, u, n, o); + r = l, s = u + } + } + return i || vn(s, u) || (a += mn(r, s, l, u, n, o) || 0), 0 !== a + } + + function Sn(t, e, i) { + return bn(t, 0, !1, e, i) + } + + function Mn(t, e, i, n) { + return bn(t, e, !0, i, n) + } + + function In(t) { + $e.call(this, t), this.path = null + } + + function Tn(t, e, i, n, o, a, r, s, l, u, h) { + var c = l * (uS / 180), d = lS(c) * (t - i) / 2 + sS(c) * (e - n) / 2, + f = -1 * sS(c) * (t - i) / 2 + lS(c) * (e - n) / 2, p = d * d / (r * r) + f * f / (s * s); + p > 1 && (r *= rS(p), s *= rS(p)); + var g = (o === a ? -1 : 1) * rS((r * r * (s * s) - r * r * (f * f) - s * s * (d * d)) / (r * r * (f * f) + s * s * (d * d))) || 0, + m = g * r * f / s, v = g * -s * d / r, y = (t + i) / 2 + lS(c) * m - sS(c) * v, + x = (e + n) / 2 + sS(c) * m + lS(c) * v, _ = dS([1, 0], [(d - m) / r, (f - v) / s]), + w = [(d - m) / r, (f - v) / s], b = [(-1 * d - m) / r, (-1 * f - v) / s], S = dS(w, b); + cS(w, b) <= -1 && (S = uS), cS(w, b) >= 1 && (S = 0), 0 === a && S > 0 && (S -= 2 * uS), 1 === a && S < 0 && (S += 2 * uS), h.addData(u, y, x, r, s, _, S, c, a) + } + + function Dn(t) { + if (!t) return []; + var e, i = t.replace(/-/g, " -").replace(/ /g, " ").replace(/ /g, ",").replace(/,,/g, ","); + for (e = 0; e < aS.length; e++) i = i.replace(new RegExp(aS[e], "g"), "|" + aS[e]); + var n, o = i.split("|"), a = 0, r = 0, s = new Hb, l = Hb.CMD; + for (e = 1; e < o.length; e++) { + var u, h = o[e], c = h.charAt(0), d = 0, f = h.slice(1).replace(/e,-/g, "e-").split(","); + f.length > 0 && "" === f[0] && f.shift(); + for (var p = 0; p < f.length; p++) f[p] = parseFloat(f[p]); + for (; d < f.length && !isNaN(f[d]) && !isNaN(f[0]);) { + var g, m, v, y, x, _, w, b = a, S = r; + switch (c) { + case"l": + a += f[d++], r += f[d++], u = l.L, s.addData(u, a, r); + break; + case"L": + a = f[d++], r = f[d++], u = l.L, s.addData(u, a, r); + break; + case"m": + a += f[d++], r += f[d++], u = l.M, s.addData(u, a, r), c = "l"; + break; + case"M": + a = f[d++], r = f[d++], u = l.M, s.addData(u, a, r), c = "L"; + break; + case"h": + a += f[d++], u = l.L, s.addData(u, a, r); + break; + case"H": + a = f[d++], u = l.L, s.addData(u, a, r); + break; + case"v": + r += f[d++], u = l.L, s.addData(u, a, r); + break; + case"V": + r = f[d++], u = l.L, s.addData(u, a, r); + break; + case"C": + u = l.C, s.addData(u, f[d++], f[d++], f[d++], f[d++], f[d++], f[d++]), a = f[d - 2], r = f[d - 1]; + break; + case"c": + u = l.C, s.addData(u, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r, f[d++] + a, f[d++] + r), a += f[d - 2], r += f[d - 1]; + break; + case"S": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.C && (g += a - I[M - 4], m += r - I[M - 3]), u = l.C, b = f[d++], S = f[d++], a = f[d++], r = f[d++], s.addData(u, g, m, b, S, a, r); + break; + case"s": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.C && (g += a - I[M - 4], m += r - I[M - 3]), u = l.C, b = a + f[d++], S = r + f[d++], a += f[d++], r += f[d++], s.addData(u, g, m, b, S, a, r); + break; + case"Q": + b = f[d++], S = f[d++], a = f[d++], r = f[d++], u = l.Q, s.addData(u, b, S, a, r); + break; + case"q": + b = f[d++] + a, S = f[d++] + r, a += f[d++], r += f[d++], u = l.Q, s.addData(u, b, S, a, r); + break; + case"T": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.Q && (g += a - I[M - 4], m += r - I[M - 3]), a = f[d++], r = f[d++], u = l.Q, s.addData(u, g, m, a, r); + break; + case"t": + g = a, m = r; + var M = s.len(), I = s.data; + n === l.Q && (g += a - I[M - 4], m += r - I[M - 3]), a += f[d++], r += f[d++], u = l.Q, s.addData(u, g, m, a, r); + break; + case"A": + v = f[d++], y = f[d++], x = f[d++], _ = f[d++], w = f[d++], Tn(b = a, S = r, a = f[d++], r = f[d++], _, w, v, y, x, u = l.A, s); + break; + case"a": + v = f[d++], y = f[d++], x = f[d++], _ = f[d++], w = f[d++], Tn(b = a, S = r, a += f[d++], r += f[d++], _, w, v, y, x, u = l.A, s) + } + } + "z" !== c && "Z" !== c || (u = l.Z, s.addData(u)), n = u + } + return s.toStatic(), s + } + + function An(t, e) { + var i = Dn(t); + return e = 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) { + oS(i, t), this.dirty(!0) + }, e + } + + function Cn(t, e) { + return new In(An(t, e)) + } + + function Ln(t, e) { + return In.extend(An(t, e)) + } + + function kn(t, e, i, n, o, a, r) { + var s = .5 * (i - t), l = .5 * (n - e); + return (2 * (e - i) + s + l) * r + (-3 * (e - i) - 2 * s - l) * a + s * o + e + } + + function Pn(t, e, i) { + var n = e.points, o = e.smooth; + if (n && n.length >= 2) { + if (o && "spline" !== o) { + var a = _S(n, o, 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 = a[2 * s], u = a[2 * s + 1], h = n[(s + 1) % r]; + t.bezierCurveTo(l[0], l[1], u[0], u[1], h[0], h[1]) + } + } else { + "spline" === o && (n = xS(n, i)), t.moveTo(n[0][0], n[0][1]); + for (var s = 1, c = n.length; s < c; s++) t.lineTo(n[s][0], n[s][1]) + } + i && t.closePath() + } + } + + function Nn(t, e, i) { + var n = t.cpx2, o = t.cpy2; + return null === n || null === o ? [(i ? Yi : ji)(t.x1, t.cpx1, t.cpx2, t.x2, e), (i ? Yi : ji)(t.y1, t.cpy1, t.cpy2, t.y2, e)] : [(i ? tn : Qi)(t.x1, t.cpx1, t.x2, e), (i ? tn : Qi)(t.y1, t.cpy1, t.y2, e)] + } + + function On(t) { + $e.call(this, t), this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.notClear = !0 + } + + function En(t) { + return In.extend(t) + } + + function Rn(t, e, i, n) { + var o = Cn(t, e), a = o.getBoundingRect(); + return i && ("center" === n && (i = Bn(i, a)), Vn(o, i)), o + } + + function zn(t, e, i) { + var n = new Je({ + style: {image: t, x: e.x, y: e.y, width: e.width, height: e.height}, onload: function (t) { + if ("center" === i) { + var o = {width: t.width, height: t.height}; + n.setStyle(Bn(e, o)) + } + } + }); + return n + } + + function Bn(t, e) { + var i, n = e.width / e.height, o = t.height * n; + return i = o <= t.width ? t.height : (o = t.width) / n, { + x: t.x + t.width / 2 - o / 2, + y: t.y + t.height / 2 - i / 2, + width: o, + height: i + } + } + + function Vn(t, e) { + if (t.applyTransform) { + var i = t.getBoundingRect().calculateTransform(e); + t.applyTransform(i) + } + } + + function Gn(t) { + var e = t.shape, i = t.style.lineWidth; + return NS(2 * e.x1) === NS(2 * e.x2) && (e.x1 = e.x2 = Fn(e.x1, i, !0)), NS(2 * e.y1) === NS(2 * e.y2) && (e.y1 = e.y2 = Fn(e.y1, i, !0)), t + } + + function Wn(t) { + var e = t.shape, i = t.style.lineWidth, n = e.x, o = e.y, a = e.width, r = e.height; + return e.x = Fn(e.x, i, !0), e.y = Fn(e.y, i, !0), e.width = Math.max(Fn(n + a, i, !1) - e.x, 0 === a ? 0 : 1), e.height = Math.max(Fn(o + r, i, !1) - e.y, 0 === r ? 0 : 1), t + } + + function Fn(t, e, i) { + var n = NS(2 * t); + return (n + NS(e)) % 2 == 0 ? n / 2 : (n + (i ? 1 : -1)) / 2 + } + + function Hn(t) { + return null != t && "none" != t + } + + function Zn(t) { + return "string" == typeof t ? kt(t, -.1) : t + } + + function Un(t) { + if (t.__hoverStlDirty) { + var e = t.style.stroke, i = t.style.fill, n = t.__hoverStl; + n.fill = n.fill || (Hn(i) ? Zn(i) : null), n.stroke = n.stroke || (Hn(e) ? Zn(e) : null); + var o = {}; + for (var a in n) null != n[a] && (o[a] = t.style[a]); + t.__normalStl = o, t.__hoverStlDirty = !1 + } + } + + function Xn(t) { + if (!t.__isHover) { + if (Un(t), t.useHoverLayer) t.__zr && t.__zr.addHover(t, t.__hoverStl); else { + var e = t.style, i = e.insideRollbackOpt; + i && uo(e), e.extendFrom(t.__hoverStl), i && (lo(e, e.insideOriginalTextPosition, i), null == e.textFill && (e.textFill = i.autoColor)), t.dirty(!1), t.z2 += 1 + } + t.__isHover = !0 + } + } + + function jn(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 Yn(t) { + "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && Xn(t) + }) : Xn(t) + } + + function qn(t) { + "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && jn(t) + }) : jn(t) + } + + function Kn(t, e) { + t.__hoverStl = t.hoverStyle || e || {}, t.__hoverStlDirty = !0, t.__isHover && Un(t) + } + + function $n(t) { + this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && Yn(this) + } + + function Jn(t) { + this.__hoverSilentOnTouch && t.zrByTouch || !this.__isEmphasis && qn(this) + } + + function Qn() { + this.__isEmphasis = !0, Yn(this) + } + + function to() { + this.__isEmphasis = !1, qn(this) + } + + function eo(t, e, i) { + t.__hoverSilentOnTouch = i && i.hoverSilentOnTouch, "group" === t.type ? t.traverse(function (t) { + "group" !== t.type && Kn(t, e) + }) : Kn(t, e), t.on("mouseover", $n).on("mouseout", Jn), t.on("emphasis", Qn).on("normal", to) + } + + function io(t, e, i, n, o, a, r) { + var s, l = (o = o || RS).labelFetcher, u = o.labelDataIndex, h = o.labelDimIndex, c = i.getShallow("show"), + d = n.getShallow("show"); + (c || d) && (l && (s = l.getFormattedLabel(u, "normal", null, h)), null == s && (s = x(o.defaultText) ? o.defaultText(u, o) : o.defaultText)); + var f = c ? s : null, p = d ? D(l ? l.getFormattedLabel(u, "emphasis", null, h) : null, s) : null; + null == f && null == p || (no(t, i, a, o), no(e, n, r, o, !0)), t.text = f, e.text = p + } + + function no(t, e, i, n, o) { + return oo(t, e, n, o), i && a(t, i), t.host && t.host.dirty && t.host.dirty(!1), t + } + + function oo(t, e, i, n) { + if ((i = i || RS).isRectText) { + var o = e.getShallow("position") || (n ? null : "inside"); + "outside" === o && (o = "top"), t.textPosition = o, t.textOffset = e.getShallow("offset"); + var a = e.getShallow("rotate"); + null != a && (a *= Math.PI / 180), t.textRotation = a, t.textDistance = D(e.getShallow("distance"), n ? null : 5) + } + var r, s = e.ecModel, l = s && s.option.textStyle, u = ao(e); + if (u) { + r = {}; + for (var h in u) if (u.hasOwnProperty(h)) { + var c = e.getModel(["rich", h]); + ro(r[h] = {}, c, l, i, n) + } + } + return t.rich = r, ro(t, e, l, i, n, !0), i.forceRich && !i.textStyle && (i.textStyle = {}), t + } + + function ao(t) { + for (var e; t && t !== t.ecModel;) { + var i = (t.option || RS).rich; + if (i) { + e = e || {}; + for (var n in i) i.hasOwnProperty(n) && (e[n] = 1) + } + t = t.parentModel + } + return e + } + + function ro(t, e, i, n, o, a) { + if (i = !o && i || RS, t.textFill = so(e.getShallow("color"), n) || i.color, t.textStroke = so(e.getShallow("textBorderColor"), n) || i.textBorderColor, t.textStrokeWidth = D(e.getShallow("textBorderWidth"), i.textBorderWidth), !o) { + if (a) { + var r = t.textPosition; + t.insideRollback = lo(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"), a && n.disableBox || (t.textBackgroundColor = so(e.getShallow("backgroundColor"), n), t.textPadding = e.getShallow("padding"), t.textBorderColor = so(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 so(t, e) { + return "auto" !== t ? t : e && e.autoColor ? e.autoColor : null + } + + function lo(t, e, i) { + var n, o = i.useInsideStyle; + return null == t.textFill && !1 !== o && (!0 === o || 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 uo(t) { + var e = t.insideRollback; + e && (t.textFill = e.textFill, t.textStroke = e.textStroke, t.textStrokeWidth = e.textStrokeWidth) + } + + function ho(t, e) { + var i = e || e.getModel("textStyle"); + return P([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(" ")) + } + + function co(t, e, i, n, o, a) { + if ("function" == typeof o && (a = o, o = null), n && n.isAnimationEnabled()) { + var r = t ? "Update" : "", s = n.getShallow("animationDuration" + r), + l = n.getShallow("animationEasing" + r), u = n.getShallow("animationDelay" + r); + "function" == typeof u && (u = u(o, n.getAnimationDelayParams ? n.getAnimationDelayParams(e, o) : null)), "function" == typeof s && (s = s(o)), s > 0 ? e.animateTo(i, s, u || 0, l, a, !!a) : (e.stopAnimation(), e.attr(i), a && a()) + } else e.stopAnimation(), e.attr(i), a && a() + } + + function fo(t, e, i, n, o) { + co(!0, t, e, i, n, o) + } + + function po(t, e, i, n, o) { + co(!1, t, e, i, n, o) + } + + function go(t, e) { + for (var i = lt([]); t && t !== e;) ht(i, t.getLocalTransform(), i), t = t.parent; + return i + } + + function mo(t, e, i) { + return e && !c(e) && (e = E_.getLocalTransform(e)), i && (e = pt([], e)), Q([], t, e) + } + + function vo(t, e, i) { + var n = 0 === e[4] || 0 === e[5] || 0 === e[0] ? 1 : Math.abs(2 * e[4] / e[0]), + o = 0 === e[4] || 0 === e[5] || 0 === e[2] ? 1 : Math.abs(2 * e[4] / e[2]), + a = ["left" === t ? -n : "right" === t ? n : 0, "top" === t ? -o : "bottom" === t ? o : 0]; + return a = mo(a, e, i), Math.abs(a[0]) > Math.abs(a[1]) ? a[0] > 0 ? "right" : "left" : a[1] > 0 ? "bottom" : "top" + } + + function yo(t, e, i, n) { + function o(t) { + var e = {position: W(t.position), rotation: t.rotation}; + return t.shape && (e.shape = a({}, t.shape)), e + } + + if (t && e) { + var r = function (t) { + var e = {}; + return t.traverse(function (t) { + !t.isGroup && t.anid && (e[t.anid] = t) + }), e + }(t); + e.traverse(function (t) { + if (!t.isGroup && t.anid) { + var e = r[t.anid]; + if (e) { + var n = o(t); + t.attr(o(e)), fo(t, n, i, t.dataIndex) + } + } + }) + } + } + + function xo(t, e) { + return f(t, function (t) { + var i = t[0]; + i = OS(i, e.x), i = ES(i, e.x + e.width); + var n = t[1]; + return n = OS(n, e.y), n = ES(n, e.y + e.height), [i, n] + }) + } + + function _o(t, e, i) { + var n = (e = a({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), r(n, i), new Je(e)) : Rn(t.replace("path://", ""), e, i, "center") + } + + function wo(t, e, i) { + this.parentModel = e, this.ecModel = i, this.option = t + } + + function bo(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 So(t, e) { + var i = ZS(t).getParent; + return i ? i.call(t, e) : t.parentModel + } + + function Mo(t) { + return [t || "", US++, Math.random().toFixed(5)].join("_") + } + + function Io(t) { + return t.replace(/^\s+/, "").replace(/\s+$/, "") + } + + function To(t, e, i, n) { + var o = e[1] - e[0], a = i[1] - i[0]; + if (0 === o) return 0 === a ? i[0] : (i[0] + i[1]) / 2; + if (n) if (o > 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]) / o * a + i[0] + } + + function Do(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 ? Io(t).match(/%$/) ? parseFloat(t) / 100 * e : parseFloat(t) : null == t ? NaN : +t + } + + function Ao(t, e, i) { + return null == e && (e = 10), e = Math.min(Math.max(0, e), 20), t = (+t).toFixed(e), i ? t : +t + } + + function Co(t) { + return t.sort(function (t, e) { + return t - e + }), t + } + + function Lo(t) { + if (t = +t, isNaN(t)) return 0; + for (var e = 1, i = 0; Math.round(t * e) / e !== t;) e *= 10, i++; + return i + } + + function ko(t) { + var e = t.toString(), i = e.indexOf("e"); + if (i > 0) { + var n = +e.slice(i + 1); + return n < 0 ? -n : 0 + } + var o = e.indexOf("."); + return o < 0 ? 0 : e.length - 1 - o + } + + function Po(t, e) { + var i = Math.log, n = Math.LN10, o = Math.floor(i(t[1] - t[0]) / n), + a = Math.round(i(Math.abs(e[1] - e[0])) / n), r = Math.min(Math.max(-o + a, 0), 20); + return isFinite(r) ? r : 20 + } + + function No(t, e, i) { + if (!t[e]) return 0; + var n = p(t, function (t, e) { + return t + (isNaN(e) ? 0 : e) + }, 0); + if (0 === n) return 0; + for (var o = Math.pow(10, i), a = f(t, function (t) { + return (isNaN(t) ? 0 : t) / n * o * 100 + }), r = 100 * o, s = f(a, function (t) { + return Math.floor(t) + }), l = p(s, function (t, e) { + return t + e + }, 0), u = f(a, function (t, e) { + return t - s[e] + }); l < r;) { + for (var h = Number.NEGATIVE_INFINITY, c = null, d = 0, g = u.length; d < g; ++d) u[d] > h && (h = u[d], c = d); + ++s[c], u[c] = 0, ++l + } + return s[e] / o + } + + function Oo(t) { + var e = 2 * Math.PI; + return (t % e + e) % e + } + + function Eo(t) { + return t > -XS && t < XS + } + + function Ro(t) { + if (t instanceof Date) return t; + if ("string" == typeof t) { + var e = YS.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)) + } + + function zo(t) { + return Math.pow(10, Bo(t)) + } + + function Bo(t) { + return Math.floor(Math.log(t) / Math.LN10) + } + + function Vo(t, e) { + var i, n = Bo(t), o = Math.pow(10, n), a = t / o; + return i = 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, t = i * o, n >= -20 ? +t.toFixed(n < 0 ? -n : 0) : t + } + + function Go(t) { + function e(t, i, n) { + return t.interval[n] < i.interval[n] || t.interval[n] === i.interval[n] && (t.close[n] - i.close[n] == (n ? -1 : 1) || !n && e(t, i, 1)) + } + + t.sort(function (t, i) { + return e(t, i, 0) ? -1 : 1 + }); + for (var i = -1 / 0, n = 1, o = 0; o < t.length;) { + for (var a = t[o].interval, r = t[o].close, s = 0; s < 2; s++) a[s] <= i && (a[s] = i, r[s] = s ? 1 : 1 - n), i = a[s], n = r[s]; + a[0] === a[1] && r[0] * r[1] != 1 ? t.splice(o, 1) : o++ + } + return t + } + + function Wo(t) { + return t - parseFloat(t) >= 0 + } + + function Fo(t) { + return isNaN(t) ? "-" : (t = (t + "").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g, "$1,") + (t.length > 1 ? "." + t[1] : "") + } + + function Ho(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 + } + + function Zo(t) { + return null == t ? "" : (t + "").replace($S, function (t, e) { + return JS[e] + }) + } + + function Uo(t, e, i) { + y(e) || (e = [e]); + var n = e.length; + if (!n) return ""; + for (var o = e[0].$vars || [], a = 0; a < o.length; a++) { + var r = QS[a]; + t = t.replace(tM(r), tM(r, 0)) + } + for (var s = 0; s < n; s++) for (var l = 0; l < o.length; l++) { + var u = e[s][o[l]]; + t = t.replace(tM(QS[l], s), i ? Zo(u) : u) + } + return t + } + + function Xo(t, e, i) { + return d(e, function (e, n) { + t = t.replace("{" + n + "}", i ? Zo(e) : e) + }), t + } + + function jo(t, e) { + var i = (t = _(t) ? {color: t, extraCssText: e} : t || {}).color, n = t.type, e = t.extraCssText; + return i ? "subItem" === n ? '' : '' : "" + } + + function Yo(t, e) { + return t += "", "0000".substr(0, e - t.length) + t + } + + function qo(t, e, i) { + "week" !== t && "month" !== t && "quarter" !== t && "half-year" !== t && "year" !== t || (t = "MM-dd\nyyyy"); + var n = Ro(e), o = i ? "UTC" : "", a = n["get" + o + "FullYear"](), r = n["get" + o + "Month"]() + 1, + s = n["get" + o + "Date"](), l = n["get" + o + "Hours"](), u = n["get" + o + "Minutes"](), + h = n["get" + o + "Seconds"](), c = n["get" + o + "Milliseconds"](); + return t = t.replace("MM", Yo(r, 2)).replace("M", r).replace("yyyy", a).replace("yy", a % 100).replace("dd", Yo(s, 2)).replace("d", s).replace("hh", Yo(l, 2)).replace("h", l).replace("mm", Yo(u, 2)).replace("m", u).replace("ss", Yo(h, 2)).replace("s", h).replace("SSS", Yo(c, 3)) + } + + function Ko(t) { + return t ? t.charAt(0).toUpperCase() + t.substr(1) : t + } + + function $o(t, e, i, n, o) { + var a = 0, r = 0; + null == n && (n = 1 / 0), null == o && (o = 1 / 0); + var s = 0; + e.eachChild(function (l, u) { + var h, c, d = l.position, f = l.getBoundingRect(), p = e.childAt(u + 1), g = p && p.getBoundingRect(); + if ("horizontal" === t) { + var m = f.width + (g ? -g.x + f.x : 0); + (h = a + m) > n || l.newline ? (a = 0, h = m, r += s + i, s = f.height) : s = Math.max(s, f.height) + } else { + var v = f.height + (g ? -g.y + f.y : 0); + (c = r + v) > o || l.newline ? (a += s + i, r = 0, c = v, s = f.width) : s = Math.max(s, f.width) + } + l.newline || (d[0] = a, d[1] = r, "horizontal" === t ? a = h + i : r = c + i) + }) + } + + function Jo(t, e, i) { + var n = e.width, o = e.height, a = Do(t.x, n), r = Do(t.y, o), s = Do(t.x2, n), l = Do(t.y2, o); + return (isNaN(a) || isNaN(parseFloat(t.x))) && (a = 0), (isNaN(s) || isNaN(parseFloat(t.x2))) && (s = n), (isNaN(r) || isNaN(parseFloat(t.y))) && (r = 0), (isNaN(l) || isNaN(parseFloat(t.y2))) && (l = o), i = KS(i || 0), { + width: Math.max(s - a - i[1] - i[3], 0), + height: Math.max(l - r - i[0] - i[2], 0) + } + } + + function Qo(t, e, i) { + i = KS(i || 0); + var n = e.width, o = e.height, a = Do(t.left, n), r = Do(t.top, o), s = Do(t.right, n), l = Do(t.bottom, o), + u = Do(t.width, n), h = Do(t.height, o), c = i[2] + i[0], d = i[1] + i[3], f = t.aspect; + switch (isNaN(u) && (u = n - s - d - a), isNaN(h) && (h = o - l - c - r), null != f && (isNaN(u) && isNaN(h) && (f > n / o ? u = .8 * n : h = .8 * o), isNaN(u) && (u = f * h), isNaN(h) && (h = u / f)), isNaN(a) && (a = n - s - u - d), isNaN(r) && (r = o - l - h - c), t.left || t.right) { + case"center": + a = n / 2 - u / 2 - i[3]; + break; + case"right": + a = n - u - d + } + switch (t.top || t.bottom) { + case"middle": + case"center": + r = o / 2 - h / 2 - i[0]; + break; + case"bottom": + r = o - h - c + } + a = a || 0, r = r || 0, isNaN(u) && (u = n - d - a - (s || 0)), isNaN(h) && (h = o - c - r - (l || 0)); + var p = new $t(a + i[3], r + i[0], u, h); + return p.margin = i, p + } + + function ta(t, e, i, n, o) { + var a = !o || !o.hv || o.hv[0], s = !o || !o.hv || o.hv[1], l = o && o.boundingMode || "all"; + if (a || s) { + var u; + if ("raw" === l) u = "group" === t.type ? new $t(0, 0, +e.width || 0, +e.height || 0) : t.getBoundingRect(); else if (u = t.getBoundingRect(), t.needLocalTransform()) { + var h = t.getLocalTransform(); + (u = u.clone()).applyTransform(h) + } + e = Qo(r({width: u.width, height: u.height}, e), i, n); + var c = t.position, d = a ? e.x - u.x : 0, f = s ? e.y - u.y : 0; + t.attr("position", "raw" === l ? [d, f] : [c[0] + d, c[1] + f]) + } + } + + function ea(t, e) { + return null != t[rM[e][0]] || null != t[rM[e][1]] && null != t[rM[e][2]] + } + + function ia(t, e, i) { + function n(i, n) { + var r = {}, l = 0, u = {}, h = 0; + if (oM(i, function (e) { + u[e] = t[e] + }), oM(i, function (t) { + o(e, t) && (r[t] = u[t] = e[t]), a(r, t) && l++, a(u, t) && h++ + }), s[n]) return a(e, i[1]) ? u[i[2]] = null : a(e, i[2]) && (u[i[1]] = null), u; + if (2 !== h && l) { + if (l >= 2) return r; + for (var c = 0; c < i.length; c++) { + var d = i[c]; + if (!o(r, d) && o(t, d)) { + r[d] = t[d]; + break + } + } + return r + } + return u + } + + function o(t, e) { + return t.hasOwnProperty(e) + } + + function a(t, e) { + return null != t[e] && "auto" !== t[e] + } + + function r(t, e, i) { + oM(t, function (t) { + e[t] = i[t] + }) + } + + !w(i) && (i = {}); + var s = i.ignoreSize; + !y(s) && (s = [s, s]); + var l = n(rM[0], 0), u = n(rM[1], 1); + r(rM[0], t, l), r(rM[1], t, u) + } + + function na(t) { + return oa({}, t) + } + + function oa(t, e) { + return e && t && oM(aM, function (i) { + e.hasOwnProperty(i) && (t[i] = e[i]) + }), t + } + + function aa(t, e) { + for (var i = t.length, n = 0; n < i; n++) if (t[n].length > e) return t[n]; + return t[i - 1] + } + + function ra(t) { + var e = t.get("coordinateSystem"), i = {coordSysName: e, coordSysDims: [], axisMap: R(), categoryAxisMap: R()}, + n = gM[e]; + if (n) return n(t, i, i.axisMap, i.categoryAxisMap), i + } + + function sa(t) { + return "category" === t.get("type") + } + + function la(t) { + this.fromDataset = t.fromDataset, this.data = t.data || (t.sourceFormat === xM ? {} : []), this.sourceFormat = t.sourceFormat || _M, this.seriesLayoutBy = t.seriesLayoutBy || bM, this.dimensionsDefine = t.dimensionsDefine, this.encodeDefine = t.encodeDefine && R(t.encodeDefine), this.startIndex = t.startIndex || 0, this.dimensionsDetectCount = t.dimensionsDetectCount + } + + function ua(t) { + var e = t.option.source, i = _M; + if (S(e)) i = wM; else if (y(e)) for (var n = 0, o = e.length; n < o; n++) { + var a = e[n]; + if (null != a) { + if (y(a)) { + i = vM; + break + } + if (w(a)) { + i = yM; + break + } + } + } else if (w(e)) { + for (var r in e) if (e.hasOwnProperty(r) && c(e[r])) { + i = xM; + break + } + } else if (null != e) throw new Error("Invalid data"); + MM(t).sourceFormat = i + } + + function ha(t) { + return MM(t).source + } + + function ca(t) { + MM(t).datasetMap = R() + } + + function da(t) { + var e = t.option, i = e.data, n = S(i) ? wM : mM, o = !1, a = e.seriesLayoutBy, r = e.sourceHeader, + s = e.dimensions, l = ya(t); + if (l) { + var u = l.option; + i = u.source, n = MM(l).sourceFormat, o = !0, a = a || u.seriesLayoutBy, null == r && (r = u.sourceHeader), s = s || u.dimensions + } + var h = fa(i, n, a, r, s), c = e.encode; + !c && l && (c = va(t, l, i, n, a, h)), MM(t).source = new la({ + data: i, + fromDataset: o, + seriesLayoutBy: a, + sourceFormat: n, + dimensionsDefine: h.dimensionsDefine, + startIndex: h.startIndex, + dimensionsDetectCount: h.dimensionsDetectCount, + encodeDefine: c + }) + } + + function fa(t, e, i, n, o) { + if (!t) return {dimensionsDefine: pa(o)}; + var a, r, s; + if (e === vM) "auto" === n || null == n ? ga(function (t) { + null != t && "-" !== t && (_(t) ? null == r && (r = 1) : r = 0) + }, i, t, 10) : r = n ? 1 : 0, o || 1 !== r || (o = [], ga(function (t, e) { + o[e] = null != t ? t : "" + }, i, t)), a = o ? o.length : i === SM ? t.length : t[0] ? t[0].length : null; else if (e === yM) o || (o = ma(t), s = !0); else if (e === xM) o || (o = [], s = !0, d(t, function (t, e) { + o.push(e) + })); else if (e === mM) { + var l = Ii(t[0]); + a = y(l) && l.length || 1 + } + var u; + return s && d(o, function (t, e) { + "name" === (w(t) ? t.name : t) && (u = e) + }), {startIndex: r, dimensionsDefine: pa(o), dimensionsDetectCount: a, potentialNameDimIndex: u} + } + + function pa(t) { + if (t) { + var e = R(); + return f(t, function (t, i) { + if (null == (t = a({}, w(t) ? t : {name: t})).name) return t; + t.name += "", null == t.displayName && (t.displayName = t.name); + var n = e.get(t.name); + return n ? t.name += "-" + n.count++ : e.set(t.name, {count: 1}), t + }) + } + } + + function ga(t, e, i, n) { + if (null == n && (n = 1 / 0), e === SM) for (a = 0; a < i.length && a < n; a++) t(i[a] ? i[a][0] : null, a); else for (var o = i[0] || [], a = 0; a < o.length && a < n; a++) t(o[a], a) + } + + function ma(t) { + for (var e, i = 0; i < t.length && !(e = t[i++]);) ; + if (e) { + var n = []; + return d(e, function (t, e) { + n.push(e) + }), n + } + } + + function va(t, e, i, n, o, a) { + var r = ra(t), s = {}, l = [], u = [], h = t.subType, c = R(["pie", "map", "funnel"]), + f = R(["line", "bar", "pictorialBar", "scatter", "effectScatter", "candlestick", "boxplot"]); + if (r && null != f.get(h)) { + var p = t.ecModel, g = MM(p).datasetMap, m = e.uid + "_" + o, + v = g.get(m) || g.set(m, {categoryWayDim: 1, valueWayDim: 0}); + d(r.coordSysDims, function (t) { + if (null == r.firstCategoryDimIndex) { + e = v.valueWayDim++; + s[t] = e, u.push(e) + } else if (r.categoryAxisMap.get(t)) s[t] = 0, l.push(0); else { + var e = v.categoryWayDim++; + s[t] = e, u.push(e) + } + }) + } else if (null != c.get(h)) { + for (var y, x = 0; x < 5 && null == y; x++) _a(i, n, o, a.dimensionsDefine, a.startIndex, x) || (y = x); + if (null != y) { + s.value = y; + var _ = a.potentialNameDimIndex || Math.max(y - 1, 0); + u.push(_), l.push(_) + } + } + return l.length && (s.itemName = l), u.length && (s.seriesName = u), s + } + + function ya(t) { + var e = t.option; + if (!e.data) return t.ecModel.getComponent("dataset", e.datasetIndex || 0) + } + + function xa(t, e) { + return _a(t.data, t.sourceFormat, t.seriesLayoutBy, t.dimensionsDefine, t.startIndex, e) + } + + function _a(t, e, i, n, o, a) { + function r(t) { + return (null == t || !isFinite(t) || "" === t) && (!(!_(t) || "-" === t) || void 0) + } + + var s; + if (S(t)) return !1; + var l; + if (n && (l = w(l = n[a]) ? l.name : l), e === vM) if (i === SM) { + for (var u = t[a], h = 0; h < (u || []).length && h < 5; h++) if (null != (s = r(u[o + h]))) return s + } else for (h = 0; h < t.length && h < 5; h++) { + var c = t[o + h]; + if (c && null != (s = r(c[a]))) return s + } else if (e === yM) { + if (!l) return; + for (h = 0; h < t.length && h < 5; h++) if ((d = t[h]) && null != (s = r(d[l]))) return s + } else if (e === xM) { + if (!l) return; + if (!(u = t[l]) || S(u)) return !1; + for (h = 0; h < u.length && h < 5; h++) if (null != (s = r(u[h]))) return s + } else if (e === mM) for (h = 0; h < t.length && h < 5; h++) { + var d = t[h], f = Ii(d); + if (!y(f)) return !1; + if (null != (s = r(f[a]))) return s + } + return !1 + } + + function wa(t, e) { + if (e) { + var i = e.seiresIndex, n = e.seriesId, o = e.seriesName; + return null != i && t.componentIndex !== i || null != n && t.id !== n || null != o && t.name !== o + } + } + + function ba(t, e) { + var o = t.color && !t.colorLayer; + d(e, function (e, a) { + "colorLayer" === a && o || hM.hasClass(a) || ("object" == typeof e ? t[a] = t[a] ? n(t[a], e, !1) : i(e) : null == t[a] && (t[a] = e)) + }) + } + + function Sa(t) { + t = t, this.option = {}, this.option[IM] = 1, this._componentsMap = R({series: []}), this._seriesIndices, this._seriesIndicesMap, ba(t, this._theme.option), n(t, dM, !1), this.mergeOption(t) + } + + function Ma(t, e) { + y(e) || (e = e ? [e] : []); + var i = {}; + return d(e, function (e) { + i[e] = (t.get(e) || []).slice() + }), i + } + + function Ia(t, e, i) { + return e.type ? e.type : i ? i.subType : hM.determineSubType(t, e) + } + + function Ta(t, e) { + t._seriesIndicesMap = R(t._seriesIndices = f(e, function (t) { + return t.componentIndex + }) || []) + } + + function Da(t, e) { + return e.hasOwnProperty("subType") ? g(t, function (t) { + return t.subType === e.subType + }) : t + } + + function Aa(t) { + d(DM, function (e) { + this[e] = m(t[e], t) + }, this) + } + + function Ca() { + this._coordinateSystems = [] + } + + function La(t) { + this._api = t, this._timelineOptions = [], this._mediaList = [], this._mediaDefault, this._currentMediaIndices = [], this._optionBackup, this._newBaseOption + } + + function ka(t, e, i) { + var n, o, a = [], r = [], s = t.timeline; + if (t.baseOption && (o = t.baseOption), (s || t.options) && (o = o || {}, a = (t.options || []).slice()), t.media) { + o = o || {}; + var l = t.media; + CM(l, function (t) { + t && t.option && (t.query ? r.push(t) : n || (n = t)) + }) + } + return o || (o = t), o.timeline || (o.timeline = s), CM([o].concat(a).concat(f(r, function (t) { + return t.option + })), function (t) { + CM(e, function (e) { + e(t, i) + }) + }), {baseOption: o, timelineOptions: a, mediaDefault: n, mediaList: r} + } + + function Pa(t, e, i) { + var n = {width: e, height: i, aspectratio: e / i}, o = !0; + return d(t, function (t, e) { + var i = e.match(NM); + if (i && i[1] && i[2]) { + var a = i[1], r = i[2].toLowerCase(); + Na(n[r], t, a) || (o = !1) + } + }), o + } + + function Na(t, e, i) { + return "min" === i ? t >= e : "max" === i ? t <= e : t === e + } + + function Oa(t, e) { + return t.join(",") === e.join(",") + } + + function Ea(t, e) { + CM(e = e || {}, function (e, i) { + if (null != e) { + var n = t[i]; + if (hM.hasClass(i)) { + e = Si(e); + var o = Di(n = Si(n), e); + t[i] = kM(o, function (t) { + return t.option && t.exist ? PM(t.exist, t.option, !0) : t.exist || t.option + }) + } else t[i] = PM(n, e, !0) + } + }) + } + + function Ra(t) { + var e = t && t.itemStyle; + if (e) for (var i = 0, o = RM.length; i < o; i++) { + var a = RM[i], r = e.normal, s = e.emphasis; + r && r[a] && (t[a] = t[a] || {}, t[a].normal ? n(t[a].normal, r[a]) : t[a].normal = r[a], r[a] = null), s && s[a] && (t[a] = t[a] || {}, t[a].emphasis ? n(t[a].emphasis, s[a]) : t[a].emphasis = s[a], s[a] = null) + } + } + + function za(t, e, i) { + if (t && t[e] && (t[e].normal || t[e].emphasis)) { + var n = t[e].normal, o = t[e].emphasis; + n && (i ? (t[e].normal = t[e].emphasis = null, r(t[e], n)) : t[e] = n), o && (t.emphasis = t.emphasis || {}, t.emphasis[e] = o) + } + } + + function Ba(t) { + za(t, "itemStyle"), za(t, "lineStyle"), za(t, "areaStyle"), za(t, "label"), za(t, "labelLine"), za(t, "upperLabel"), za(t, "edgeLabel") + } + + function Va(t, e) { + var i = EM(t) && t[e], n = EM(i) && i.textStyle; + if (n) for (var o = 0, a = ib.length; o < a; o++) { + var e = ib[o]; + n.hasOwnProperty(e) && (i[e] = n[e]) + } + } + + function Ga(t) { + t && (Ba(t), Va(t, "label"), t.emphasis && Va(t.emphasis, "label")) + } + + function Wa(t) { + if (EM(t)) { + Ra(t), Ba(t), Va(t, "label"), Va(t, "upperLabel"), Va(t, "edgeLabel"), t.emphasis && (Va(t.emphasis, "label"), Va(t.emphasis, "upperLabel"), Va(t.emphasis, "edgeLabel")); + var e = t.markPoint; + e && (Ra(e), Ga(e)); + var i = t.markLine; + i && (Ra(i), Ga(i)); + var n = t.markArea; + n && Ga(n); + var o = t.data; + if ("graph" === t.type) { + o = o || t.nodes; + var a = t.links || t.edges; + if (a && !S(a)) for (s = 0; s < a.length; s++) Ga(a[s]); + d(t.categories, function (t) { + Ba(t) + }) + } + if (o && !S(o)) for (s = 0; s < o.length; s++) Ga(o[s]); + if ((e = t.markPoint) && e.data) for (var r = e.data, s = 0; s < r.length; s++) Ga(r[s]); + if ((i = t.markLine) && i.data) for (var l = i.data, s = 0; s < l.length; s++) y(l[s]) ? (Ga(l[s][0]), Ga(l[s][1])) : Ga(l[s]); + "gauge" === t.type ? (Va(t, "axisLabel"), Va(t, "title"), Va(t, "detail")) : "treemap" === t.type ? (za(t.breadcrumb, "itemStyle"), d(t.levels, function (t) { + Ba(t) + })) : "tree" === t.type && Ba(t.leaves) + } + } + + function Fa(t) { + return y(t) ? t : t ? [t] : [] + } + + function Ha(t) { + return (y(t) ? t[0] : t) || {} + } + + function Za(t, e) { + e = e.split(","); + for (var i = t, n = 0; n < e.length && null != (i = i && i[e[n]]); n++) ; + return i + } + + function Ua(t, e, i, n) { + e = e.split(","); + for (var o, a = t, r = 0; r < e.length - 1; r++) null == a[o = e[r]] && (a[o] = {}), a = a[o]; + (n || null == a[e[r]]) && (a[e[r]] = i) + } + + function Xa(t) { + d(BM, function (e) { + e[0] in t && !(e[1] in t) && (t[e[1]] = t[e[0]]) + }) + } + + function ja(t) { + d(t, function (e, i) { + var n = [], o = [NaN, NaN], a = [e.stackResultDimension, e.stackedOverDimension], r = e.data, + s = e.isStackedByIndex, l = r.map(a, function (a, l, u) { + var h = r.get(e.stackedDimension, u); + if (isNaN(h)) return o; + var c, d; + s ? d = r.getRawIndex(u) : c = r.get(e.stackedByDimension, u); + for (var f = NaN, p = i - 1; p >= 0; p--) { + var g = t[p]; + if (s || (d = g.data.rawIndexOf(g.stackedByDimension, c)), d >= 0) { + var m = g.data.getByRawIndex(g.stackResultDimension, d); + if (h >= 0 && m > 0 || h <= 0 && m < 0) { + h += m, f = m; + break + } + } + } + return n[0] = h, n[1] = f, n + }); + r.hostModel.setData(l), e.data = l + }) + } + + function Ya(t, e) { + la.isInstance(t) || (t = la.seriesDataToSource(t)), this._source = t; + var i = this._data = t.data, n = t.sourceFormat; + n === wM && (this._offset = 0, this._dimSize = e, this._data = i), a(this, FM[n === vM ? n + "_" + t.seriesLayoutBy : n]) + } + + function qa() { + return this._data.length + } + + function Ka(t) { + return this._data[t] + } + + function $a(t) { + for (var e = 0; e < t.length; e++) this._data.push(t[e]) + } + + function Ja(t, e, i, n) { + return null != i ? t[i] : t + } + + function Qa(t, e, i, n) { + return tr(t[n], this._dimensionInfos[e]) + } + + function tr(t, e) { + var i = e && e.type; + if ("ordinal" === i) { + var n = e && e.ordinalMeta; + return n ? n.parseAndCollect(t) : t + } + return "time" === i && "number" != typeof t && null != t && "-" !== t && (t = +Ro(t)), null == t || "" === t ? NaN : +t + } + + function er(t, e, i) { + if (t) { + var n = t.getRawDataItem(e); + if (null != n) { + var o, a, r = t.getProvider().getSource().sourceFormat, s = t.getDimensionInfo(i); + return s && (o = s.name, a = s.index), HM[r](n, e, a, o) + } + } + } + + function ir(t, e, i) { + if (t) { + var n = t.getProvider().getSource().sourceFormat; + if (n === mM || n === yM) { + var o = t.getRawDataItem(e); + return n !== mM || w(o) || (o = null), o ? o[i] : void 0 + } + } + } + + function nr(t) { + return new or(t) + } + + function or(t) { + t = t || {}, this._reset = t.reset, this._plan = t.plan, this._count = t.count, this._onDirty = t.onDirty, this._dirty = !0, this.context + } + + function ar(t, e, i, n, o, a) { + YM.reset(i, n, o, a), t._callingProgress = e, t._callingProgress({ + start: i, + end: n, + count: n - i, + next: YM.next + }, t.context) + } + + function rr(t, e) { + t._dueIndex = t._outputDueEnd = t._dueEnd = 0, t._settedOutputEnd = null; + var i, n; + !e && t._reset && ((i = t._reset(t.context)) && i.progress && (n = i.forceFirstProgress, i = i.progress), y(i) && !i.length && (i = null)), t._progress = i, t._modBy = t._modDataCount = null; + var o = t._downstream; + return o && o.dirty(), n + } + + function sr(t) { + var e = t.name; + Ci(t) || (t.name = lr(t) || e) + } + + function lr(t) { + var e = t.getRawData(), i = []; + return d(e.mapDimension("seriesName", !0), function (t) { + var n = e.getDimensionInfo(t); + n.displayName && i.push(n.displayName) + }), i.join(" ") + } + + function ur(t) { + return t.model.getRawData().count() + } + + function hr(t) { + var e = t.model; + return e.setData(e.getRawData().cloneShallow()), cr + } + + function cr(t, e) { + t.end > e.outputData.count() && e.model.getRawData().cloneShallow(e.outputData) + } + + function dr(t, e) { + d(t.CHANGABLE_METHODS, function (i) { + t.wrapMethod(i, v(fr, e)) + }) + } + + function fr(t) { + var e = pr(t); + e && e.setOutputEnd(this.count()) + } + + function pr(t) { + var e = (t.ecModel || {}).scheduler, i = e && e.getPipeline(t.uid); + if (i) { + var n = i.currentTask; + if (n) { + var o = n.agentStubMap; + o && (n = o.get(t.uid)) + } + return n + } + } + + function gr() { + this.group = new sw, this.uid = Mo("viewChart"), this.renderTask = nr({ + plan: yr, + reset: xr + }), this.renderTask.context = {view: this} + } + + function mr(t, e) { + if (t && (t.trigger(e), "group" === t.type)) for (var i = 0; i < t.childCount(); i++) mr(t.childAt(i), e) + } + + function vr(t, e, i) { + var n = Pi(t, e); + null != n ? d(Si(n), function (e) { + mr(t.getItemGraphicEl(e), i) + }) : t.eachItemGraphicEl(function (t) { + mr(t, i) + }) + } + + function yr(t) { + return eI(t.model) + } + + function xr(t) { + var e = t.model, i = t.ecModel, n = t.api, o = t.payload, a = e.pipelineContext.progressiveRender, r = t.view, + s = o && tI(o).updateMethod, l = a ? "incrementalPrepareRender" : s && r[s] ? s : "render"; + return "render" !== l && r[l](e, i, n, o), nI[l] + } + + function _r(t, e, i) { + function n() { + h = (new Date).getTime(), c = null, t.apply(r, s || []) + } + + var o, a, r, s, l, u = 0, h = 0, c = null; + e = e || 0; + var d = function () { + o = (new Date).getTime(), r = this, s = arguments; + var t = l || e, d = l || i; + l = null, a = o - (d ? u : h) - t, clearTimeout(c), d ? c = setTimeout(n, t) : a >= 0 ? n() : c = setTimeout(n, -a), u = o + }; + return d.clear = function () { + c && (clearTimeout(c), c = null) + }, d.debounceNextCall = function (t) { + l = t + }, d + } + + function wr(t, e, i, n) { + var o = t[e]; + if (o) { + var a = o[oI] || o, r = o[rI]; + if (o[aI] !== i || r !== n) { + if (null == i || !n) return t[e] = a; + (o = t[e] = _r(a, i, "debounce" === n))[oI] = a, o[rI] = n, o[aI] = i + } + return o + } + } + + function br(t, e) { + var i = t[e]; + i && i[oI] && (t[e] = i[oI]) + } + + function Sr(t, e, i, n) { + this.ecInstance = t, this.api = e, this.unfinished; + var i = this._dataProcessorHandlers = i.slice(), n = this._visualHandlers = n.slice(); + this._allHandlers = i.concat(n), this._stageTaskMap = R() + } + + function Mr(t, e, i, n, o) { + function a(t, e) { + return t.setDirty && (!t.dirtyMap || t.dirtyMap.get(e.__pipeline.id)) + } + + o = o || {}; + var r; + d(e, function (e, s) { + if (!o.visualType || o.visualType === e.visualType) { + var l = t._stageTaskMap.get(e.uid), u = l.seriesTaskMap, h = l.overallTask; + if (h) { + var c, d = h.agentStubMap; + d.each(function (t) { + a(o, t) && (t.dirty(), c = !0) + }), c && h.dirty(), dI(h, n); + var f = t.getPerformArgs(h, o.block); + d.each(function (t) { + t.perform(f) + }), r |= h.perform(f) + } else u && u.each(function (s, l) { + a(o, s) && s.dirty(); + var u = t.getPerformArgs(s, o.block); + u.skip = !e.performRawSeries && i.isSeriesFiltered(s.context.model), dI(s, n), r |= s.perform(u) + }) + } + }), t.unfinished |= r + } + + function Ir(t, e, i, n, o) { + function a(i) { + var a = i.uid, s = r.get(a) || r.set(a, nr({plan: kr, reset: Pr, count: Or})); + s.context = { + model: i, + ecModel: n, + api: o, + useClearVisual: e.isVisual && !e.isLayout, + plan: e.plan, + reset: e.reset, + scheduler: t + }, Er(t, i, s) + } + + var r = i.seriesTaskMap || (i.seriesTaskMap = R()), s = e.seriesType, l = e.getTargetSeries; + e.createOnAllSeries ? n.eachRawSeries(a) : s ? n.eachRawSeriesByType(s, a) : l && l(n, o).each(a); + var u = t._pipelineMap; + r.each(function (t, e) { + u.get(e) || (t.dispose(), r.removeKey(e)) + }) + } + + function Tr(t, e, i, n, o) { + function a(e) { + var i = e.uid, n = s.get(i); + n || (n = s.set(i, nr({reset: Ar, onDirty: Lr})), r.dirty()), n.context = { + model: e, + overallProgress: h, + modifyOutputEnd: c + }, n.agent = r, n.__block = h, Er(t, e, n) + } + + var r = i.overallTask = i.overallTask || nr({reset: Dr}); + r.context = {ecModel: n, api: o, overallReset: e.overallReset, scheduler: t}; + var s = r.agentStubMap = r.agentStubMap || R(), l = e.seriesType, u = e.getTargetSeries, h = !0, + c = e.modifyOutputEnd; + l ? n.eachRawSeriesByType(l, a) : u ? u(n, o).each(a) : (h = !1, d(n.getSeries(), a)); + var f = t._pipelineMap; + s.each(function (t, e) { + f.get(e) || (t.dispose(), r.dirty(), s.removeKey(e)) + }) + } + + function Dr(t) { + t.overallReset(t.ecModel, t.api, t.payload) + } + + function Ar(t, e) { + return t.overallProgress && Cr + } + + function Cr() { + this.agent.dirty(), this.getDownstream().dirty() + } + + function Lr() { + this.agent && this.agent.dirty() + } + + function kr(t) { + return t.plan && t.plan(t.model, t.ecModel, t.api, t.payload) + } + + function Pr(t) { + t.useClearVisual && t.data.clearAllVisual(); + var e = t.resetDefines = Si(t.reset(t.model, t.ecModel, t.api, t.payload)); + return e.length > 1 ? f(e, function (t, e) { + return Nr(e) + }) : fI + } + + function Nr(t) { + return function (e, i) { + var n = i.data, o = i.resetDefines[t]; + if (o && o.dataEach) for (var a = e.start; a < e.end; a++) o.dataEach(n, a); else o && o.progress && o.progress(e, n) + } + } + + function Or(t) { + return t.data.count() + } + + function Er(t, e, i) { + var n = e.uid, o = t._pipelineMap.get(n); + !o.head && (o.head = i), o.tail && o.tail.pipe(i), o.tail = i, i.__idxInPipeline = o.count++, i.__pipeline = o + } + + function Rr(t) { + pI = null; + try { + t(gI, mI) + } catch (t) { + } + return pI + } + + function zr(t, e) { + for (var i in e.prototype) t[i] = B + } + + function Br(t) { + return function (e, i, n) { + e = e && e.toLowerCase(), D_.prototype[t].call(this, e, i, n) + } + } + + function Vr() { + D_.call(this) + } + + function Gr(t, e, n) { + function o(t, e) { + return t.__prio - e.__prio + } + + n = n || {}, "string" == typeof e && (e = HI[e]), this.id, this.group, this._dom = t; + var a = this._zr = _i(t, { + renderer: n.renderer || "canvas", + devicePixelRatio: n.devicePixelRatio, + width: n.width, + height: n.height + }); + this._throttledZrFlush = _r(m(a.flush, a), 17), (e = i(e)) && GM(e, !0), this._theme = e, this._chartsViews = [], this._chartsMap = {}, this._componentsViews = [], this._componentsMap = {}, this._coordSysMgr = new Ca; + var r = this._api = os(this); + ae(FI, o), ae(VI, o), this._scheduler = new Sr(this, r, VI, FI), D_.call(this), this._messageCenter = new Vr, this._initEvents(), this.resize = m(this.resize, this), this._pendingActions = [], a.animation.on("frame", this._onframe, this), Yr(a, this), N(this) + } + + function Wr(t, e, i) { + var n, o = this._model, a = this._coordSysMgr.getCoordinateSystems(); + e = Oi(o, e); + for (var r = 0; r < a.length; r++) { + var s = a[r]; + if (s[t] && null != (n = s[t](o, e, i))) return n + } + } + + function Fr(t) { + var e = t._model, i = t._scheduler; + i.restorePipelines(e), i.prepareStageTasks(), qr(t, "component", e, i), qr(t, "chart", e, i), i.plan() + } + + function Hr(t, e, i, n, o) { + function a(n) { + n && n.__alive && n[e] && n[e](n.__model, r, t._api, i) + } + + var r = t._model; + if (n) { + var s = {}; + s[n + "Id"] = i[n + "Id"], s[n + "Index"] = i[n + "Index"], s[n + "Name"] = i[n + "Name"]; + var l = {mainType: n, query: s}; + o && (l.subType = o); + var u = i.excludeSeriesId; + null != u && (u = R(Si(u))), r && r.eachComponent(l, function (e) { + u && null != u.get(e.id) || a(t["series" === n ? "_chartsMap" : "_componentsMap"][e.__viewId]) + }, t) + } else bI(t._componentsViews.concat(t._chartsViews), a) + } + + function Zr(t, e) { + var i = t._chartsMap, n = t._scheduler; + e.eachSeries(function (t) { + n.updateStreamModes(t, i[t.__viewId]) + }) + } + + function Ur(t, e) { + var i = t.type, n = t.escapeConnect, o = zI[i], s = o.actionInfo, l = (s.update || "update").split(":"), + u = l.pop(); + l = null != l[0] && II(l[0]), this[kI] = !0; + var h = [t], c = !1; + t.batch && (c = !0, h = f(t.batch, function (e) { + return e = r(a({}, e), t), e.batch = null, e + })); + var d, p = [], g = "highlight" === i || "downplay" === i; + bI(h, function (t) { + d = o.action(t, this._model, this._api), (d = d || a({}, t)).type = s.event || d.type, p.push(d), g ? Hr(this, u, t, "series") : l && Hr(this, u, t, l.main, l.sub) + }, this), "none" === u || g || l || (this[PI] ? (Fr(this), EI.update.call(this, t), this[PI] = !1) : EI[u].call(this, t)), d = c ? { + type: s.event || i, + escapeConnect: n, + batch: p + } : p[0], this[kI] = !1, !e && this._messageCenter.trigger(d.type, d) + } + + function Xr(t) { + for (var e = this._pendingActions; e.length;) { + var i = e.shift(); + Ur.call(this, i, t) + } + } + + function jr(t) { + !t && this.trigger("updated") + } + + function Yr(t, e) { + t.on("rendered", function () { + e.trigger("rendered"), !t.animation.isFinished() || e[PI] || e._scheduler.unfinished || e._pendingActions.length || e.trigger("finished") + }) + } + + function qr(t, e, i, n) { + function o(t) { + var e = "_ec_" + t.id + "_" + t.type, o = s[e]; + if (!o) { + var h = II(t.type); + (o = new (a ? $M.getClass(h.main, h.sub) : gr.getClass(h.sub))).init(i, u), s[e] = o, r.push(o), l.add(o.group) + } + t.__viewId = o.__id = e, o.__alive = !0, o.__model = t, o.group.__ecComponentInfo = { + mainType: t.mainType, + index: t.componentIndex + }, !a && n.prepareView(o, t, i, u) + } + + for (var a = "component" === e, r = a ? t._componentsViews : t._chartsViews, s = a ? t._componentsMap : t._chartsMap, l = t._zr, u = t._api, h = 0; h < r.length; h++) r[h].__alive = !1; + a ? i.eachComponent(function (t, e) { + "series" !== t && o(e) + }) : i.eachSeries(o); + for (h = 0; h < r.length;) { + var c = r[h]; + c.__alive ? h++ : (!a && c.renderTask.dispose(), l.remove(c.group), c.dispose(i, u), r.splice(h, 1), delete s[c.__id], c.__id = c.group.__ecComponentInfo = null) + } + } + + function Kr(t) { + t.clearColorPalette(), t.eachSeries(function (t) { + t.clearColorPalette() + }) + } + + function $r(t, e, i, n) { + Jr(t, e, i, n), bI(t._chartsViews, function (t) { + t.__alive = !1 + }), Qr(t, e, i, n), bI(t._chartsViews, function (t) { + t.__alive || t.remove(e, i) + }) + } + + function Jr(t, e, i, n, o) { + bI(o || t._componentsViews, function (t) { + var o = t.__model; + t.render(o, e, i, n), ns(o, t) + }) + } + + function Qr(t, e, i, n, o) { + var a, r = t._scheduler; + e.eachSeries(function (e) { + var i = t._chartsMap[e.__viewId]; + i.__alive = !0; + var s = i.renderTask; + r.updatePayload(s, n), o && o.get(e.uid) && s.dirty(), a |= s.perform(r.getPerformArgs(s)), i.group.silent = !!e.get("silent"), ns(e, i), is(e, i) + }), r.unfinished |= a, es(t._zr, e), uI(t._zr.dom, e) + } + + function ts(t, e) { + bI(WI, function (i) { + i(t, e) + }) + } + + function es(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 is(t, e) { + var i = t.get("blendMode") || null; + e.group.traverse(function (t) { + t.isGroup || t.style.blend !== i && t.setStyle("blend", i), t.eachPendingDisplayable && t.eachPendingDisplayable(function (t) { + t.setStyle("blend", i) + }) + }) + } + + function ns(t, e) { + var i = t.get("z"), n = t.get("zlevel"); + e.group.traverse(function (t) { + "group" !== t.type && (null != i && (t.z = i), null != n && (t.zlevel = n)) + }) + } + + function os(t) { + var e = t._coordSysMgr; + return a(new Aa(t), { + getCoordinateSystems: m(e.getCoordinateSystems, e), getComponentByElement: function (e) { + for (; e;) { + var i = e.__ecComponentInfo; + if (null != i) return t._model.getComponent(i.mainType, i.index); + e = e.parent + } + } + }) + } + + function as(t) { + function e(t, e) { + for (var n = 0; n < t.length; n++) t[n][i] = e + } + + var i = "__connectUpdateStatus"; + bI(BI, function (n, o) { + t._messageCenter.on(o, function (n) { + if (XI[t.group] && 0 !== t[i]) { + if (n && n.escapeConnect) return; + var o = t.makeActionFromEvent(n), a = []; + bI(UI, function (e) { + e !== t && e.group === t.group && a.push(e) + }), e(a, 0), bI(a, function (t) { + 1 !== t[i] && t.dispatchAction(o) + }), e(a, 2) + } + }) + }) + } + + function rs(t) { + XI[t] = !1 + } + + function ss(t) { + return UI[zi(t, qI)] + } + + function ls(t, e) { + HI[t] = e + } + + function us(t) { + GI.push(t) + } + + function hs(t, e) { + gs(VI, t, e, DI) + } + + function cs(t, e, i) { + "function" == typeof e && (i = e, e = ""); + var n = MI(t) ? t.type : [t, t = {event: e}][0]; + t.event = (t.event || n).toLowerCase(), e = t.event, wI(NI.test(n) && NI.test(e)), zI[n] || (zI[n] = { + action: i, + actionInfo: t + }), BI[e] = n + } + + function ds(t, e) { + Ca.register(t, e) + } + + function fs(t, e) { + gs(FI, t, e, AI, "layout") + } + + function ps(t, e) { + gs(FI, t, e, CI, "visual") + } + + function gs(t, e, i, n, o) { + (SI(e) || MI(e)) && (i = e, e = n); + var a = Sr.wrapStageHandler(i, o); + return a.__prio = e, a.__raw = i, t.push(a), a + } + + function ms(t, e) { + ZI[t] = e + } + + function vs(t) { + return hM.extend(t) + } + + function ys(t) { + return $M.extend(t) + } + + function xs(t) { + return KM.extend(t) + } + + function _s(t) { + return gr.extend(t) + } + + function ws(t) { + return KI[t] + } + + function bs(t) { + return t + } + + function Ss(t, e, i, n, o) { + this._old = t, this._new = e, this._oldKeyGetter = i || bs, this._newKeyGetter = n || bs, this.context = o + } + + function Ms(t, e, i, n, o) { + for (var a = 0; a < t.length; a++) { + var r = "_ec_" + o[n](t[a], a), s = e[r]; + null == s ? (i.push(r), e[r] = a) : (s.length || (e[r] = s = [s]), s.push(a)) + } + } + + function Is(t) { + var e = {}, i = e.encode = {}, n = R(), o = [], a = []; + d(t.dimensions, function (e) { + var r = t.getDimensionInfo(e), s = r.coordDim; + if (s) { + var l = i[s]; + i.hasOwnProperty(s) || (l = i[s] = []), l[r.coordDimIndex] = e, r.isExtraCoord || (n.set(s, 1), Ds(r.type) && (o[0] = e)), r.defaultTooltip && a.push(e) + } + QI.each(function (t, e) { + var n = i[e]; + i.hasOwnProperty(e) || (n = i[e] = []); + var o = r.otherDims[e]; + null != o && !1 !== o && (n[o] = r.name) + }) + }); + var r = [], s = {}; + n.each(function (t, e) { + var n = i[e]; + s[e] = n[0], r = r.concat(n) + }), e.dataDimsOnCoord = r, e.encodeFirstDimNotExtra = s; + var l = i.label; + l && l.length && (o = l.slice()); + var u = i.tooltip; + return u && u.length ? a = u.slice() : a.length || (a = o.slice()), i.defaultedLabel = o, i.defaultedTooltip = a, e + } + + function Ts(t) { + return "category" === t ? "ordinal" : "time" === t ? "time" : "float" + } + + function Ds(t) { + return !("ordinal" === t || "time" === t) + } + + function As(t) { + return t._rawCount > 65535 ? nT : oT + } + + function Cs(t) { + var e = t.constructor; + return e === Array ? t.slice() : new e(t) + } + + function Ls(t, e) { + d(aT.concat(e.__wrappedMethods || []), function (i) { + e.hasOwnProperty(i) && (t[i] = e[i]) + }), t.__wrappedMethods = e.__wrappedMethods, d(rT, function (n) { + t[n] = i(e[n]) + }), t._calculationInfo = a(e._calculationInfo) + } + + function ks(t) { + var e = t._invertedIndicesMap; + d(e, function (i, n) { + var o = t._dimensionInfos[n].ordinalMeta; + if (o) { + i = e[n] = new nT(o.categories.length); + for (a = 0; a < i.length; a++) i[a] = NaN; + for (var a = 0; a < t._count; a++) i[t.get(n, a)] = a + } + }) + } + + function Ps(t, e, i) { + var n; + if (null != e) { + var o = t._chunkSize, a = Math.floor(i / o), r = i % o, s = t.dimensions[e], l = t._storage[s][a]; + if (l) { + n = l[r]; + var u = t._dimensionInfos[s].ordinalMeta; + u && u.categories.length && (n = u.categories[n]) + } + } + return n + } + + function Ns(t) { + return t + } + + function Os(t) { + return t < this._count && t >= 0 ? this._indices[t] : -1 + } + + function Es(t, e) { + var i = t._idList[e]; + return null == i && (i = Ps(t, t._idDimIdx, e)), null == i && (i = eT + e), i + } + + function Rs(t) { + return y(t) || (t = [t]), t + } + + function zs(t, e) { + var i = t.dimensions, n = new sT(f(i, t.getDimensionInfo, t), t.hostModel); + Ls(n, t); + for (var o = n._storage = {}, a = t._storage, r = 0; r < i.length; r++) { + var s = i[r]; + a[s] && (l(e, s) >= 0 ? (o[s] = Bs(a[s]), n._rawExtent[s] = Vs(), n._extent[s] = null) : o[s] = a[s]) + } + return n + } + + function Bs(t) { + for (var e = new Array(t.length), i = 0; i < t.length; i++) e[i] = Cs(t[i]); + return e + } + + function Vs() { + return [1 / 0, -1 / 0] + } + + function Gs(t, e, n) { + function o(t, e, i) { + null != QI.get(e) ? t.otherDims[e] = i : (t.coordDim = e, t.coordDimIndex = i, h.set(e, !0)) + } + + la.isInstance(e) || (e = la.seriesDataToSource(e)), n = n || {}, t = (t || []).slice(); + for (var s = (n.dimsDef || []).slice(), l = R(n.encodeDef), u = R(), h = R(), c = [], f = Ws(e, t, s, n.dimCount), p = 0; p < f; p++) { + var g = s[p] = a({}, w(s[p]) ? s[p] : {name: s[p]}), m = g.name, v = c[p] = {otherDims: {}}; + null != m && null == u.get(m) && (v.name = v.displayName = m, u.set(m, p)), null != g.type && (v.type = g.type), null != g.displayName && (v.displayName = g.displayName) + } + l.each(function (t, e) { + t = Si(t).slice(); + var i = l.set(e, []); + d(t, function (t, n) { + _(t) && (t = u.get(t)), null != t && t < f && (i[n] = t, o(c[t], e, n)) + }) + }); + var y = 0; + d(t, function (t, e) { + var n, t, a, s; + if (_(t)) n = t, t = {}; else { + n = t.name; + var u = t.ordinalMeta; + t.ordinalMeta = null, (t = i(t)).ordinalMeta = u, a = t.dimsDef, s = t.otherDims, t.name = t.coordDim = t.coordDimIndex = t.dimsDef = t.otherDims = null + } + var h = Si(l.get(n)); + if (!h.length) for (var f = 0; f < (a && a.length || 1); f++) { + for (; y < c.length && null != c[y].coordDim;) y++; + y < c.length && h.push(y++) + } + d(h, function (e, i) { + var l = c[e]; + if (o(r(l, t), n, i), null == l.name && a) { + var u = a[i]; + !w(u) && (u = {name: u}), l.name = l.displayName = u.name, l.defaultTooltip = u.defaultTooltip + } + s && r(l.otherDims, s) + }) + }); + var x = n.generateCoord, b = n.generateCoordCount, S = null != b; + b = x ? b || 1 : 0; + for (var M = x || "value", I = 0; I < f; I++) null == (v = c[I] = c[I] || {}).coordDim && (v.coordDim = Fs(M, h, S), v.coordDimIndex = 0, (!x || b <= 0) && (v.isExtraCoord = !0), b--), null == v.name && (v.name = Fs(v.coordDim, u)), null == v.type && xa(e, I, v.name) && (v.type = "ordinal"); + return c + } + + function Ws(t, e, i, n) { + var o = Math.max(t.dimensionsDetectCount || 1, e.length, i.length, n || 0); + return d(e, function (t) { + var e = t.dimsDef; + e && (o = Math.max(o, e.length)) + }), o + } + + function Fs(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 + } + + function Hs(t, e, i) { + var n, o, a, r, s = (i = i || {}).byIndex, l = i.stackedCoordDimension, u = !(!t || !t.get("stack")); + if (d(e, function (t, i) { + _(t) && (e[i] = t = {name: t}), u && !t.isExtraCoord && (s || n || !t.ordinalMeta || (n = t), o || "ordinal" === t.type || "time" === t.type || l && l !== t.coordDim || (o = t)) + }), !o || s || n || (s = !0), o) { + a = "__\0ecstackresult", r = "__\0ecstackedover", n && (n.createInvertedIndices = !0); + var h = o.coordDim, c = o.type, f = 0; + d(e, function (t) { + t.coordDim === h && f++ + }), e.push({ + name: a, + coordDim: h, + coordDimIndex: f, + type: c, + isExtraCoord: !0, + isCalculationCoord: !0 + }), f++, e.push({name: r, coordDim: r, coordDimIndex: f, type: c, isExtraCoord: !0, isCalculationCoord: !0}) + } + return { + stackedDimension: o && o.name, + stackedByDimension: n && n.name, + isStackedByIndex: s, + stackedOverDimension: r, + stackResultDimension: a + } + } + + function Zs(t, e) { + return !!e && e === t.getCalculationInfo("stackedDimension") + } + + function Us(t, e) { + return Zs(t, e) ? t.getCalculationInfo("stackResultDimension") : e + } + + function Xs(t, e, i) { + i = i || {}, la.isInstance(t) || (t = la.seriesDataToSource(t)); + var n, o = e.get("coordinateSystem"), a = Ca.get(o), r = ra(e); + r && (n = f(r.coordSysDims, function (t) { + var e = {name: t}, i = r.axisMap.get(t); + if (i) { + var n = i.get("type"); + e.type = Ts(n) + } + return e + })), n || (n = a && (a.getDimensionsInfo ? a.getDimensionsInfo() : a.dimensions.slice()) || ["x", "y"]); + var s, l, u = hT(t, {coordDimensions: n, generateCoord: i.generateCoord}); + r && d(u, function (t, e) { + var i = t.coordDim, n = r.categoryAxisMap.get(i); + n && (null == s && (s = e), t.ordinalMeta = n.getOrdinalMeta()), null != t.otherDims.itemName && (l = !0) + }), l || null == s || (u[s].otherDims.itemName = 0); + var h = Hs(e, u), c = new sT(u, e); + c.setCalculationInfo(h); + var p = null != s && js(t) ? function (t, e, i, n) { + return n === s ? i : this.defaultDimValueGetter(t, e, i, n) + } : null; + return c.hasItemOption = !1, c.initData(t, null, p), c + } + + function js(t) { + if (t.sourceFormat === mM) { + var e = Ys(t.data || []); + return null != e && !y(Ii(e)) + } + } + + function Ys(t) { + for (var e = 0; e < t.length && null == t[e];) e++; + return t[e] + } + + function qs(t) { + this._setting = t || {}, this._extent = [1 / 0, -1 / 0], this._interval = 0, this.init && this.init.apply(this, arguments) + } + + function Ks(t) { + this.categories = t.categories || [], this._needCollect = t.needCollect, this._deduplication = t.deduplication, this._map + } + + function $s(t) { + return t._map || (t._map = R(t.categories)) + } + + function Js(t) { + return w(t) && null != t.value ? t.value : t + "" + } + + function Qs(t, e, i, n) { + var o = {}, a = t[1] - t[0], r = o.interval = Vo(a / e, !0); + null != i && r < i && (r = o.interval = i), null != n && r > n && (r = o.interval = n); + var s = o.intervalPrecision = tl(r); + return il(o.niceTickExtent = [pT(Math.ceil(t[0] / r) * r, s), pT(Math.floor(t[1] / r) * r, s)], t), o + } + + function tl(t) { + return ko(t) + 2 + } + + function el(t, e, i) { + t[e] = Math.max(Math.min(t[e], i[1]), i[0]) + } + + function il(t, e) { + !isFinite(t[0]) && (t[0] = e[0]), !isFinite(t[1]) && (t[1] = e[1]), el(t, 0, e), el(t, 1, e), t[0] > t[1] && (t[0] = t[1]) + } + + function nl(t, e, i, n) { + var o = []; + if (!t) return o; + e[0] < i[0] && o.push(e[0]); + for (var a = i[0]; a <= i[1] && (o.push(a), (a = pT(a + t, n)) !== o[o.length - 1]);) if (o.length > 1e4) return []; + return e[1] > (o.length ? o[o.length - 1] : i[1]) && o.push(e[1]), o + } + + function ol(t) { + return t.get("stack") || vT + t.seriesIndex + } + + function al(t) { + return t.dim + t.index + } + + function rl(t) { + var e = [], i = t.axis; + if ("category" === i.type) { + for (var n = i.getBandWidth(), o = 0; o < t.count; o++) e.push(r({ + bandWidth: n, + axisKey: "axis0", + stackId: vT + o + }, t)); + for (var a = ul(e), s = [], o = 0; o < t.count; o++) { + var l = a.axis0[vT + o]; + l.offsetCenter = l.offset + l.width / 2, s.push(l) + } + return s + } + } + + function sl(t, e) { + var i = []; + return e.eachSeriesByType(t, function (t) { + dl(t) && !fl(t) && i.push(t) + }), i + } + + function ll(t) { + var e = []; + return d(t, function (t) { + var i = t.getData(), n = t.coordinateSystem.getBaseAxis(), o = n.getExtent(), + a = "category" === n.type ? n.getBandWidth() : Math.abs(o[1] - o[0]) / i.count(), + r = Do(t.get("barWidth"), a), s = Do(t.get("barMaxWidth"), a), l = t.get("barGap"), + u = t.get("barCategoryGap"); + e.push({ + bandWidth: a, + barWidth: r, + barMaxWidth: s, + barGap: l, + barCategoryGap: u, + axisKey: al(n), + stackId: ol(t) + }) + }), ul(e) + } + + function ul(t) { + var e = {}; + d(t, function (t, i) { + var n = t.axisKey, o = t.bandWidth, a = e[n] || { + bandWidth: o, + remainedWidth: o, + autoWidthCount: 0, + categoryGap: "20%", + gap: "30%", + stacks: {} + }, r = a.stacks; + e[n] = a; + var s = t.stackId; + r[s] || a.autoWidthCount++, r[s] = r[s] || {width: 0, maxWidth: 0}; + var l = t.barWidth; + l && !r[s].width && (r[s].width = l, l = Math.min(a.remainedWidth, l), a.remainedWidth -= l); + var u = t.barMaxWidth; + u && (r[s].maxWidth = u); + var h = t.barGap; + null != h && (a.gap = h); + var c = t.barCategoryGap; + null != c && (a.categoryGap = c) + }); + var i = {}; + return d(e, function (t, e) { + i[e] = {}; + var n = t.stacks, o = t.bandWidth, a = Do(t.categoryGap, o), r = Do(t.gap, 1), s = t.remainedWidth, + l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); + u = Math.max(u, 0), d(n, function (t, e) { + var i = t.maxWidth; + i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) + }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); + var h, c = 0; + d(n, function (t, e) { + t.width || (t.width = u), h = t, c += t.width * (1 + r) + }), h && (c -= h.width * r); + var f = -c / 2; + d(n, function (t, n) { + i[e][n] = i[e][n] || {offset: f, width: t.width}, f += t.width * (1 + r) + }) + }), i + } + + function hl(t, e, i) { + if (t && e) { + var n = t[al(e)]; + return null != n && null != i && (n = n[ol(i)]), n + } + } + + function cl(t, e) { + var i = sl(t, e), n = ll(i), o = {}; + d(i, function (t) { + var e = t.getData(), i = t.coordinateSystem, a = i.getBaseAxis(), r = ol(t), s = n[al(a)][r], l = s.offset, + u = s.width, h = i.getOtherAxis(a), c = t.get("barMinHeight") || 0; + o[r] = o[r] || [], e.setLayout({offset: l, size: u}); + for (var d = e.mapDimension(h.dim), f = e.mapDimension(a.dim), p = Zs(e, d), g = h.isHorizontal(), m = pl(a, h, p), v = 0, y = e.count(); v < y; v++) { + var x = e.get(d, v), _ = e.get(f, v); + if (!isNaN(x)) { + var w = x >= 0 ? "p" : "n", b = m; + p && (o[r][_] || (o[r][_] = {p: m, n: m}), b = o[r][_][w]); + var S, M, I, T; + if (g) S = b, M = (D = i.dataToPoint([x, _]))[1] + l, I = D[0] - m, T = u, Math.abs(I) < c && (I = (I < 0 ? -1 : 1) * c), p && (o[r][_][w] += I); else { + var D = i.dataToPoint([_, x]); + S = D[0] + l, M = b, I = u, T = D[1] - m, Math.abs(T) < c && (T = (T <= 0 ? -1 : 1) * c), p && (o[r][_][w] += T) + } + e.setItemLayout(v, {x: S, y: M, width: I, height: T}) + } + } + }, this) + } + + function dl(t) { + return t.coordinateSystem && "cartesian2d" === t.coordinateSystem.type + } + + function fl(t) { + return t.pipelineContext && t.pipelineContext.large + } + + function pl(t, e, i) { + return l(t.getAxesOnZeroOf(), e) >= 0 || i ? e.toGlobalCoord(e.dataToCoord(0)) : e.getGlobalExtent()[0] + } + + function gl(t, e) { + return CT(t, AT(e)) + } + + function ml(t, e) { + var i, n, o, a = t.type, r = e.getMin(), s = e.getMax(), l = null != r, u = null != s, h = t.getExtent(); + "ordinal" === a ? i = e.getCategories().length : (y(n = e.get("boundaryGap")) || (n = [n || 0, n || 0]), "boolean" == typeof n[0] && (n = [0, 0]), n[0] = Do(n[0], 1), n[1] = Do(n[1], 1), o = h[1] - h[0] || Math.abs(h[0])), null == r && (r = "ordinal" === a ? i ? 0 : NaN : h[0] - n[0] * o), null == s && (s = "ordinal" === a ? i ? i - 1 : NaN : h[1] + n[1] * o), "dataMin" === r ? r = h[0] : "function" == typeof r && (r = r({ + min: h[0], + max: h[1] + })), "dataMax" === s ? s = h[1] : "function" == typeof s && (s = s({ + min: h[0], + max: h[1] + })), (null == r || !isFinite(r)) && (r = NaN), (null == s || !isFinite(s)) && (s = NaN), t.setBlank(I(r) || I(s) || "ordinal" === a && !t.getOrdinalMeta().categories.length), e.getNeedCrossZero() && (r > 0 && s > 0 && !l && (r = 0), r < 0 && s < 0 && !u && (s = 0)); + var c = e.ecModel; + if (c && "time" === a) { + var f, p = sl("bar", c); + if (d(p, function (t) { + f |= t.getBaseAxis() === e.axis + }), f) { + var g = ll(p), m = vl(r, s, e, g); + r = m.min, s = m.max + } + } + return [r, s] + } + + function vl(t, e, i, n) { + var o = i.axis.getExtent(), a = o[1] - o[0], r = hl(n, i.axis); + if (void 0 === r) return {min: t, max: e}; + var s = 1 / 0; + d(r, function (t) { + s = Math.min(t.offset, s) + }); + var l = -1 / 0; + d(r, function (t) { + l = Math.max(t.offset + t.width, l) + }), s = Math.abs(s), l = Math.abs(l); + var u = s + l, h = e - t, c = h / (1 - (s + l) / a) - h; + return e += c * (l / u), t -= c * (s / u), {min: t, max: e} + } + + function yl(t, e) { + var i = ml(t, e), n = null != e.getMin(), o = null != e.getMax(), a = e.get("splitNumber"); + "log" === t.type && (t.base = e.get("logBase")); + var r = t.type; + t.setExtent(i[0], i[1]), t.niceExtent({ + splitNumber: a, + fixMin: n, + fixMax: o, + 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) + } + + function xl(t, e) { + if (e = e || t.get("type")) switch (e) { + case"category": + return new fT(t.getOrdinalMeta ? t.getOrdinalMeta() : t.getCategories(), [1 / 0, -1 / 0]); + case"value": + return new mT; + default: + return (qs.getClass(e) || mT).create(t) + } + } + + function _l(t) { + var e = t.scale.getExtent(), i = e[0], n = e[1]; + return !(i > 0 && n > 0 || i < 0 && n < 0) + } + + function wl(t) { + var e = t.getLabelModel().get("formatter"), i = "category" === t.type ? t.scale.getExtent()[0] : null; + return "string" == typeof e ? e = function (t) { + return function (e) { + return t.replace("{value}", null != e ? e : "") + } + }(e) : "function" == typeof e ? function (n, o) { + return null != i && (o = n - i), e(bl(t, n), o) + } : function (e) { + return t.scale.getLabel(e) + } + } + + function bl(t, e) { + return "category" === t.type ? t.scale.getLabel(e) : e + } + + function Sl(t) { + var e = t.model, i = t.scale; + if (e.get("axisLabel.show") && !i.isBlank()) { + var n, o, a = "category" === t.type, r = i.getExtent(); + o = a ? i.count() : (n = i.getTicks()).length; + var s, l = t.getLabelModel(), u = wl(t), h = 1; + o > 40 && (h = Math.ceil(o / 40)); + for (var c = 0; c < o; c += h) { + var d = u(n ? n[c] : r[0] + c), f = Ml(l.getTextRect(d), l.get("rotate") || 0); + s ? s.union(f) : s = f + } + return s + } + } + + function Ml(t, e) { + var i = e * Math.PI / 180, n = t.plain(), o = n.width, a = n.height, r = o * Math.cos(i) + a * Math.sin(i), + s = o * Math.sin(i) + a * Math.cos(i); + return new $t(n.x, n.y, r, s) + } + + function Il(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) + } + } + + function Tl(t, e, i, n, o, a, r) { + var s = 0 === t.indexOf("empty"); + s && (t = t.substr(5, 1).toLowerCase() + t.substr(6)); + var l; + return l = 0 === t.indexOf("image://") ? zn(t.slice(8), new $t(e, i, n, o), r ? "center" : "cover") : 0 === t.indexOf("path://") ? Rn(t.slice(7), {}, new $t(e, i, n, o), r ? "center" : "cover") : new FT({ + shape: { + symbolType: t, + x: e, + y: i, + width: n, + height: o + } + }), l.__isEmptyBrush = s, l.setColor = Il, l.setColor(a), l + } + + function Dl(t, e) { + return Math.abs(t - e) < UT + } + + function Al(t, e, i) { + var n = 0, o = t[0]; + if (!o) return !1; + for (var a = 1; a < t.length; a++) { + var r = t[a]; + n += mn(o[0], o[1], r[0], r[1], e, i), o = r + } + var s = t[0]; + return Dl(o[0], s[0]) && Dl(o[1], s[1]) || (n += mn(o[0], o[1], s[0], s[1], e, i)), 0 !== n + } + + function Cl(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 + } + + function Ll(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 o = i[n].geometry, a = o.coordinates, r = o.encodeOffsets, s = 0; s < a.length; s++) { + var l = a[s]; + if ("Polygon" === o.type) a[s] = kl(l, r[s], e); else if ("MultiPolygon" === o.type) for (var u = 0; u < l.length; u++) { + var h = l[u]; + l[u] = kl(h, r[s][u], e) + } + } + return t.UTF8Encoding = !1, t + } + + function kl(t, e, i) { + for (var n = [], o = e[0], a = 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), o = s += o, a = l += a, n.push([s / i, l / i]) + } + return n + } + + function Pl(t) { + return "category" === t.type ? Ol(t) : zl(t) + } + + function Nl(t, e) { + return "category" === t.type ? Rl(t, e) : {ticks: t.scale.getTicks()} + } + + function Ol(t) { + var e = t.getLabelModel(), i = El(t, e); + return !e.get("show") || t.scale.isBlank() ? {labels: [], labelCategoryInterval: i.labelCategoryInterval} : i + } + + function El(t, e) { + var i = Bl(t, "labels"), n = Xl(e), o = Vl(i, n); + if (o) return o; + var a, r; + return a = x(n) ? Ul(t, n) : Zl(t, r = "auto" === n ? Wl(t) : n), Gl(i, n, { + labels: a, + labelCategoryInterval: r + }) + } + + function Rl(t, e) { + var i = Bl(t, "ticks"), n = Xl(e), o = Vl(i, n); + if (o) return o; + var a, r; + if (e.get("show") && !t.scale.isBlank() || (a = []), x(n)) a = Ul(t, n, !0); else if ("auto" === n) { + var s = El(t, t.getLabelModel()); + r = s.labelCategoryInterval, a = f(s.labels, function (t) { + return t.tickValue + }) + } else a = Zl(t, r = n, !0); + return Gl(i, n, {ticks: a, tickCategoryInterval: r}) + } + + function zl(t) { + var e = t.scale.getTicks(), i = wl(t); + return { + labels: f(e, function (e, n) { + return {formattedLabel: i(e, n), rawLabel: t.scale.getLabel(e), tickValue: e} + }) + } + } + + function Bl(t, e) { + return jT(t)[e] || (jT(t)[e] = []) + } + + function Vl(t, e) { + for (var i = 0; i < t.length; i++) if (t[i].key === e) return t[i].value + } + + function Gl(t, e, i) { + return t.push({key: e, value: i}), i + } + + function Wl(t) { + var e = jT(t).autoInterval; + return null != e ? e : jT(t).autoInterval = t.calculateCategoryInterval() + } + + function Fl(t) { + var e = Hl(t), i = wl(t), n = (e.axisRotate - e.labelRotate) / 180 * Math.PI, o = t.scale, a = o.getExtent(), + r = o.count(); + if (a[1] - a[0] < 1) return 0; + var s = 1; + r > 40 && (s = Math.max(1, Math.floor(r / 40))); + for (var l = a[0], u = t.dataToCoord(l + 1) - t.dataToCoord(l), h = Math.abs(u * Math.cos(n)), c = Math.abs(u * Math.sin(n)), d = 0, f = 0; l <= a[1]; l += s) { + var p = 0, g = 0, m = me(i(l), e.font, "center", "top"); + p = 1.3 * m.width, g = 1.3 * m.height, d = Math.max(d, p, 7), f = Math.max(f, g, 7) + } + var v = d / h, y = f / c; + isNaN(v) && (v = 1 / 0), isNaN(y) && (y = 1 / 0); + var x = Math.max(0, Math.floor(Math.min(v, y))), _ = jT(t.model), w = _.lastAutoInterval, b = _.lastTickCount; + return null != w && null != b && Math.abs(w - x) <= 1 && Math.abs(b - r) <= 1 && w > x ? x = w : (_.lastTickCount = r, _.lastAutoInterval = x), x + } + + function Hl(t) { + var e = t.getLabelModel(); + return { + axisRotate: t.getRotate ? t.getRotate() : t.isHorizontal && !t.isHorizontal() ? 90 : 0, + labelRotate: e.get("rotate") || 0, + font: e.getFont() + } + } + + function Zl(t, e, i) { + function n(t) { + l.push(i ? t : {formattedLabel: o(t), rawLabel: a.getLabel(t), tickValue: t}) + } + + var o = wl(t), a = t.scale, r = a.getExtent(), s = t.getLabelModel(), l = [], u = Math.max((e || 0) + 1, 1), + h = r[0], c = a.count(); + 0 !== h && u > 1 && c / u > 2 && (h = Math.round(Math.ceil(h / u) * u)); + var d = {min: s.get("showMinLabel"), max: s.get("showMaxLabel")}; + d.min && h !== r[0] && n(r[0]); + for (var f = h; f <= r[1]; f += u) n(f); + return d.max && f !== r[1] && n(r[1]), l + } + + function Ul(t, e, i) { + var n = t.scale, o = wl(t), a = []; + return d(n.getTicks(), function (t) { + var r = n.getLabel(t); + e(t, r) && a.push(i ? t : {formattedLabel: o(t), rawLabel: r, tickValue: t}) + }), a + } + + function Xl(t) { + var e = t.get("interval"); + return null == e ? "auto" : e + } + + function jl(t, e) { + var i = (t[1] - t[0]) / e / 2; + t[0] += i, t[1] -= i + } + + function Yl(t, e, i, n, o) { + function a(t, e) { + return h ? t > e : t < e + } + + var r = e.length; + if (t.onBand && !n && r) { + var s, l = t.getExtent(); + if (1 === r) e[0].coord = l[0], s = e[1] = {coord: l[0]}; else { + var u = e[1].coord - e[0].coord; + d(e, function (t) { + t.coord -= u / 2; + var e = e || 0; + e % 2 > 0 && (t.coord -= u / (2 * (e + 1))) + }), s = {coord: e[r - 1].coord + u}, e.push(s) + } + var h = l[0] > l[1]; + a(e[0].coord, l[0]) && (o ? e[0].coord = l[0] : e.shift()), o && a(l[0], e[0].coord) && e.unshift({coord: l[0]}), a(l[1], s.coord) && (o ? s.coord = l[1] : e.pop()), o && a(s.coord, l[1]) && e.push({coord: l[1]}) + } + } + + function ql(t, e) { + var i = t.mapDimension("defaultedLabel", !0), n = i.length; + if (1 === n) return er(t, e, i[0]); + if (n) { + for (var o = [], a = 0; a < i.length; a++) { + var r = er(t, e, i[a]); + o.push(r) + } + return o.join(" ") + } + } + + function Kl(t, e, i) { + sw.call(this), this.updateData(t, e, i) + } + + function $l(t) { + return [t[0] / 2, t[1] / 2] + } + + function Jl(t, e) { + this.parent.drift(t, e) + } + + function Ql(t) { + this.group = new sw, this._symbolCtor = t || Kl + } + + function tu(t, e, i, n) { + return e && !isNaN(e[0]) && !isNaN(e[1]) && !(n.isIgnore && n.isIgnore(i)) && !(n.clipShape && !n.clipShape.contain(e[0], e[1])) && "none" !== t.getItemVisual(i, "symbol") + } + + function eu(t) { + return null == t || w(t) || (t = {isIgnore: t}), t || {} + } + + function iu(t) { + var e = t.hostModel; + return { + itemStyle: e.getModel("itemStyle").getItemStyle(["color"]), + hoverItemStyle: e.getModel("emphasis.itemStyle").getItemStyle(), + symbolRotate: e.get("symbolRotate"), + symbolOffset: e.get("symbolOffset"), + hoverAnimation: e.get("hoverAnimation"), + labelModel: e.getModel("label"), + hoverLabelModel: e.getModel("emphasis.label"), + cursorStyle: e.get("cursor") + } + } + + function nu(t, e, i) { + var n, o = t.getBaseAxis(), a = t.getOtherAxis(o), r = ou(a, i), s = o.dim, l = a.dim, u = e.mapDimension(l), + h = e.mapDimension(s), c = "x" === l || "radius" === l ? 1 : 0, d = f(t.dimensions, function (t) { + return e.mapDimension(t) + }), p = e.getCalculationInfo("stackResultDimension"); + return (n |= Zs(e, d[0])) && (d[0] = p), (n |= Zs(e, d[1])) && (d[1] = p), { + dataDimsForPoint: d, + valueStart: r, + valueAxisDim: l, + baseAxisDim: s, + stacked: !!n, + valueDim: u, + baseDim: h, + baseDataOffset: c, + stackedOverDimension: e.getCalculationInfo("stackedOverDimension") + } + } + + function ou(t, e) { + var i = 0, n = t.scale.getExtent(); + return "start" === e ? i = n[0] : "end" === e ? i = n[1] : n[0] > 0 ? i = n[0] : n[1] < 0 && (i = n[1]), i + } + + function au(t, e, i, n) { + var o = NaN; + t.stacked && (o = i.get(i.getCalculationInfo("stackedOverDimension"), n)), isNaN(o) && (o = t.valueStart); + var a = t.baseDataOffset, r = []; + return r[a] = i.get(t.baseDim, n), r[1 - a] = o, e.dataToPoint(r) + } + + function ru(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 + } + + function su(t) { + return isNaN(t[0]) || isNaN(t[1]) + } + + function lu(t, e, i, n, o, a, r, s, l, u, h) { + return "none" !== u && u ? uu.apply(this, arguments) : hu.apply(this, arguments) + } + + function uu(t, e, i, n, o, a, r, s, l, u, h) { + for (var c = 0, d = i, f = 0; f < n; f++) { + var p = e[d]; + if (d >= o || d < 0) break; + if (su(p)) { + if (h) { + d += a; + continue + } + break + } + if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]); else if (l > 0) { + var g = e[c], m = "y" === u ? 1 : 0, v = (p[m] - g[m]) * l; + uD(cD, g), cD[m] = g[m] + v, uD(dD, p), dD[m] = p[m] - v, t.bezierCurveTo(cD[0], cD[1], dD[0], dD[1], p[0], p[1]) + } else t.lineTo(p[0], p[1]); + c = d, d += a + } + return f + } + + function hu(t, e, i, n, o, a, r, s, l, u, h) { + for (var c = 0, d = i, f = 0; f < n; f++) { + var p = e[d]; + if (d >= o || d < 0) break; + if (su(p)) { + if (h) { + d += a; + continue + } + break + } + if (d === i) t[a > 0 ? "moveTo" : "lineTo"](p[0], p[1]), uD(cD, p); else if (l > 0) { + var g = d + a, m = e[g]; + if (h) for (; m && su(e[g]);) m = e[g += a]; + var v = .5, y = e[c]; + if (!(m = e[g]) || su(m)) uD(dD, p); else { + su(m) && !h && (m = p), U(hD, m, y); + var x, _; + if ("x" === u || "y" === u) { + var w = "x" === u ? 0 : 1; + x = Math.abs(p[w] - y[w]), _ = Math.abs(p[w] - m[w]) + } else x = S_(p, y), _ = S_(p, m); + lD(dD, p, hD, -l * (1 - (v = _ / (_ + x)))) + } + rD(cD, cD, s), sD(cD, cD, r), rD(dD, dD, s), sD(dD, dD, r), t.bezierCurveTo(cD[0], cD[1], dD[0], dD[1], p[0], p[1]), lD(cD, p, hD, l * v) + } else t.lineTo(p[0], p[1]); + c = d, d += a + } + return f + } + + function cu(t, e) { + var i = [1 / 0, 1 / 0], n = [-1 / 0, -1 / 0]; + if (e) for (var o = 0; o < t.length; o++) { + var a = t[o]; + a[0] < i[0] && (i[0] = a[0]), a[1] < i[1] && (i[1] = a[1]), a[0] > n[0] && (n[0] = a[0]), a[1] > n[1] && (n[1] = a[1]) + } + return {min: e ? i : n, max: e ? n : i} + } + + function du(t, e) { + if (t.length === e.length) { + for (var i = 0; i < t.length; i++) { + var n = t[i], o = e[i]; + if (n[0] !== o[0] || n[1] !== o[1]) return + } + return !0 + } + } + + function fu(t) { + return "number" == typeof t ? t : t ? .5 : 0 + } + + function pu(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 gu(t, e, i) { + if (!i.valueDim) return []; + for (var n = [], o = 0, a = e.count(); o < a; o++) n.push(au(i, t, e, o)); + return n + } + + function mu(t, e, i, n) { + var o = pu(t.getAxis("x")), a = pu(t.getAxis("y")), r = t.getBaseAxis().isHorizontal(), + s = Math.min(o[0], o[1]), l = Math.min(a[0], a[1]), u = Math.max(o[0], o[1]) - s, + h = Math.max(a[0], a[1]) - l; + if (i) s -= .5, u += .5, l -= .5, h += .5; else { + var c = n.get("lineStyle.width") || 2, d = n.get("clipOverflow") ? c / 2 : Math.max(u, h); + r ? (l -= d, h += 2 * d) : (s -= d, u += 2 * d) + } + var f = new SS({shape: {x: s, y: l, width: u, height: h}}); + return e && (f.shape[r ? "width" : "height"] = 0, po(f, {shape: {width: u, height: h}}, n)), f + } + + function vu(t, e, i, n) { + var o = t.getAngleAxis(), a = t.getRadiusAxis().getExtent().slice(); + a[0] > a[1] && a.reverse(); + var r = o.getExtent(), s = Math.PI / 180; + i && (a[0] -= .5, a[1] += .5); + var l = new vS({ + shape: { + cx: Ao(t.cx, 1), + cy: Ao(t.cy, 1), + r0: Ao(a[0], 1), + r: Ao(a[1], 1), + startAngle: -r[0] * s, + endAngle: -r[1] * s, + clockwise: o.inverse + } + }); + return e && (l.shape.endAngle = -r[0] * s, po(l, {shape: {endAngle: -r[1] * s}}, n)), l + } + + function yu(t, e, i, n) { + return "polar" === t.type ? vu(t, e, i, n) : mu(t, e, i, n) + } + + function xu(t, e, i) { + for (var n = e.getBaseAxis(), o = "x" === n.dim || "radius" === n.dim ? 0 : 1, a = [], r = 0; r < t.length - 1; r++) { + var s = t[r + 1], l = t[r]; + a.push(l); + var u = []; + switch (i) { + case"end": + u[o] = s[o], u[1 - o] = l[1 - o], a.push(u); + break; + case"middle": + var h = (l[o] + s[o]) / 2, c = []; + u[o] = c[o] = h, u[1 - o] = l[1 - o], c[1 - o] = s[1 - o], a.push(u), a.push(c); + break; + default: + u[o] = l[o], u[1 - o] = s[1 - o], a.push(u) + } + } + return t[r] && a.push(t[r]), a + } + + function _u(t, e) { + var i = t.getVisual("visualMeta"); + if (i && i.length && t.count() && "cartesian2d" === e.type) { + for (var n, o, a = i.length - 1; a >= 0; a--) { + var r = i[a].dimension, s = t.dimensions[r], l = t.getDimensionInfo(s); + if ("x" === (n = l && l.coordDim) || "y" === n) { + o = i[a]; + break + } + } + if (o) { + var u = e.getAxis(n), h = f(o.stops, function (t) { + return {coord: u.toGlobalCoord(u.dataToCoord(t.value)), color: t.color} + }), c = h.length, p = o.outerColors.slice(); + c && h[0].coord > h[c - 1].coord && (h.reverse(), p.reverse()); + var g = h[0].coord - 10, m = h[c - 1].coord + 10, v = m - g; + if (v < .001) return "transparent"; + d(h, function (t) { + t.offset = (t.coord - g) / v + }), h.push({ + offset: c ? h[c - 1].offset : .5, + color: p[1] || "transparent" + }), h.unshift({offset: c ? h[0].offset : .5, color: p[0] || "transparent"}); + var y = new LS(0, 0, 0, 0, h, !0); + return y[n] = g, y[n + "2"] = m, y + } + } + } + + function wu(t, e, i) { + var n = t.get("showAllSymbol"), o = "auto" === n; + if (!n || o) { + var a = i.getAxesByScale("ordinal")[0]; + if (a && (!o || !bu(a, e))) { + var r = e.mapDimension(a.dim), s = {}; + return d(a.getViewLabels(), function (t) { + s[t.tickValue] = 1 + }), function (t) { + return !s.hasOwnProperty(e.get(r, t)) + } + } + } + } + + function bu(t, e) { + var i = t.getExtent(), n = Math.abs(i[1] - i[0]) / t.scale.count(); + isNaN(n) && (n = 0); + for (var o = e.count(), a = Math.max(1, Math.round(o / 5)), r = 0; r < o; r += a) if (1.5 * Kl.getSymbolSize(e, r)[t.isHorizontal() ? 1 : 0] > n) return !1; + return !0 + } + + function Su(t) { + return this._axes[t] + } + + function Mu(t) { + xD.call(this, t) + } + + function Iu(t, e) { + return e.type || (e.data ? "category" : "value") + } + + function Tu(t, e, i) { + return t.getCoordSysModel() === e + } + + function Du(t, e, i) { + this._coordsMap = {}, this._coordsList = [], this._axesMap = {}, this._axesList = [], this._initCartesian(t, e, i), this.model = t + } + + function Au(t, e, i) { + i.getAxesOnZeroOf = function () { + return n ? [n] : [] + }; + var n, o = t[e], a = i.model, r = a.get("axisLine.onZero"), s = a.get("axisLine.onZeroAxisIndex"); + if (r) if (null == s) { + for (var l in o) if (o.hasOwnProperty(l) && Cu(o[l])) { + n = o[l]; + break + } + } else Cu(o[s]) && (n = o[s]) + } + + function Cu(t) { + return t && "category" !== t.type && "time" !== t.type && _l(t) + } + + function Lu(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 + } + } + + function ku(t, e) { + return f(AD, function (e) { + return t.getReferringComponents(e)[0] + }) + } + + function Pu(t) { + return "cartesian2d" === t.get("coordinateSystem") + } + + function Nu(t) { + var e = {componentType: t.mainType}; + return e[t.mainType + "Index"] = t.componentIndex, e + } + + function Ou(t, e, i, n) { + var o, a, r = Oo(i - t.rotation), s = n[0] > n[1], l = "start" === e && !s || "start" !== e && s; + return Eo(r - CD / 2) ? (a = l ? "bottom" : "top", o = "center") : Eo(r - 1.5 * CD) ? (a = l ? "top" : "bottom", o = "center") : (a = "middle", o = r < 1.5 * CD && r > CD / 2 ? l ? "left" : "right" : l ? "right" : "left"), { + rotation: r, + textAlign: o, + textVerticalAlign: a + } + } + + function Eu(t) { + var e = t.get("tooltip"); + return t.get("silent") || !(t.get("triggerEvent") || e && e.show) + } + + function Ru(t, e, i) { + var n = t.get("axisLabel.showMinLabel"), o = t.get("axisLabel.showMaxLabel"); + e = e || [], i = i || []; + var a = e[0], r = e[1], s = e[e.length - 1], l = e[e.length - 2], u = i[0], h = i[1], c = i[i.length - 1], + d = i[i.length - 2]; + !1 === n ? (zu(a), zu(u)) : Bu(a, r) && (n ? (zu(r), zu(h)) : (zu(a), zu(u))), !1 === o ? (zu(s), zu(c)) : Bu(l, s) && (o ? (zu(l), zu(d)) : (zu(s), zu(c))) + } + + function zu(t) { + t && (t.ignore = !0) + } + + function Bu(t, e, i) { + var n = t && t.getBoundingRect().clone(), o = e && e.getBoundingRect().clone(); + if (n && o) { + var a = lt([]); + return dt(a, a, -t.rotation), n.applyTransform(ht([], a, t.getLocalTransform())), o.applyTransform(ht([], a, e.getLocalTransform())), n.intersect(o) + } + } + + function Vu(t) { + return "middle" === t || "center" === t + } + + function Gu(t, e, i) { + var n = e.axis; + if (e.get("axisTick.show") && !n.scale.isBlank()) { + for (var o = e.getModel("axisTick"), a = o.getModel("lineStyle"), s = o.get("length"), l = n.getTicksCoords(), u = [], h = [], c = t._transform, d = [], f = 0; f < l.length; f++) { + var p = l[f].coord; + u[0] = p, u[1] = 0, h[0] = p, h[1] = i.tickDirection * s, c && (Q(u, u, c), Q(h, h, c)); + var g = new MS(Gn({ + anid: "tick_" + l[f].tickValue, + shape: {x1: u[0], y1: u[1], x2: h[0], y2: h[1]}, + style: r(a.getLineStyle(), {stroke: e.get("axisLine.lineStyle.color")}), + z2: 2, + silent: !0 + })); + t.group.add(g), d.push(g) + } + return d + } + } + + function Wu(t, e, i) { + var n = e.axis; + if (T(i.axisLabelShow, e.get("axisLabel.show")) && !n.scale.isBlank()) { + var o = e.getModel("axisLabel"), a = o.get("margin"), r = n.getViewLabels(), + s = (T(i.labelRotate, o.get("rotate")) || 0) * CD / 180, l = PD(i.rotation, s, i.labelDirection), + u = e.getCategories(!0), h = [], c = Eu(e), f = e.get("triggerEvent"); + return d(r, function (r, s) { + var d = r.tickValue, p = r.formattedLabel, g = r.rawLabel, m = o; + u && u[d] && u[d].textStyle && (m = new wo(u[d].textStyle, o, e.ecModel)); + var v = m.getTextColor() || e.get("axisLine.lineStyle.color"), + y = [n.dataToCoord(d), i.labelOffset + i.labelDirection * a], + x = new fS({anid: "label_" + d, position: y, rotation: l.rotation, silent: c, z2: 10}); + no(x.style, m, { + text: p, + textAlign: m.getShallow("align", !0) || l.textAlign, + textVerticalAlign: m.getShallow("verticalAlign", !0) || m.getShallow("baseline", !0) || l.textVerticalAlign, + textFill: "function" == typeof v ? v("category" === n.type ? g : "value" === n.type ? d + "" : d, s) : v + }), f && (x.eventData = Nu(e), x.eventData.targetType = "axisLabel", x.eventData.value = g), t._dumbGroup.add(x), x.updateTransform(), h.push(x), t.group.add(x), x.decomposeTransform() + }), h + } + } + + function Fu(t, e) { + var i = {axesInfo: {}, seriesInvolved: !1, coordSysAxesInfo: {}, coordSysMap: {}}; + return Hu(i, t, e), i.seriesInvolved && Uu(i, t), i + } + + function Hu(t, e, i) { + var n = e.getComponent("tooltip"), o = e.getComponent("axisPointer"), a = o.get("link", !0) || [], r = []; + ND(i.getCoordinateSystems(), function (i) { + function s(n, s, l) { + var c = l.model.getModel("axisPointer", o), d = c.get("show"); + if (d && ("auto" !== d || n || $u(c))) { + null == s && (s = c.get("triggerTooltip")); + var f = (c = n ? Zu(l, h, o, e, n, s) : c).get("snap"), p = Ju(l.model), + g = s || f || "category" === l.type, m = t.axesInfo[p] = { + key: p, + axis: l, + coordSys: i, + axisPointerModel: c, + triggerTooltip: s, + involveSeries: g, + snap: f, + useHandle: $u(c), + seriesModels: [] + }; + u[p] = m, t.seriesInvolved |= g; + var v = Xu(a, l); + if (null != v) { + var y = r[v] || (r[v] = {axesInfo: {}}); + y.axesInfo[p] = m, y.mapper = a[v].mapper, m.linkGroup = y + } + } + } + + if (i.axisPointerEnabled) { + var l = Ju(i.model), u = t.coordSysAxesInfo[l] = {}; + t.coordSysMap[l] = i; + var h = i.model.getModel("tooltip", n); + if (ND(i.getAxes(), OD(s, !1, null)), i.getTooltipAxes && n && h.get("show")) { + var c = "axis" === h.get("trigger"), d = "cross" === h.get("axisPointer.type"), + f = i.getTooltipAxes(h.get("axisPointer.axis")); + (c || d) && ND(f.baseAxes, OD(s, !d || "cross", c)), d && ND(f.otherAxes, OD(s, "cross", !1)) + } + } + }) + } + + function Zu(t, e, n, o, a, s) { + var l = e.getModel("axisPointer"), u = {}; + ND(["type", "snap", "lineStyle", "shadowStyle", "label", "animation", "animationDurationUpdate", "animationEasingUpdate", "z"], function (t) { + u[t] = i(l.get(t)) + }), u.snap = "category" !== t.type && !!s, "cross" === l.get("type") && (u.type = "line"); + var h = u.label || (u.label = {}); + if (null == h.show && (h.show = !1), "cross" === a) { + var c = l.get("label.show"); + if (h.show = null == c || c, !s) { + var d = u.lineStyle = l.get("crossStyle"); + d && r(h, d.textStyle) + } + } + return t.model.getModel("axisPointer", new wo(u, n, o)) + } + + function Uu(t, e) { + e.eachSeries(function (e) { + var i = e.coordinateSystem, n = e.get("tooltip.trigger", !0), o = e.get("tooltip.show", !0); + i && "none" !== n && !1 !== n && "item" !== n && !1 !== o && !1 !== e.get("axisPointer.show", !0) && ND(t.coordSysAxesInfo[Ju(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) + } + + function Xu(t, e) { + for (var i = e.model, n = e.dim, o = 0; o < t.length; o++) { + var a = t[o] || {}; + if (ju(a[n + "AxisId"], i.id) || ju(a[n + "AxisIndex"], i.componentIndex) || ju(a[n + "AxisName"], i.name)) return o + } + } + + function ju(t, e) { + return "all" === t || y(t) && l(t, e) >= 0 || t === e + } + + function Yu(t) { + var e = qu(t); + if (e) { + var i = e.axisPointerModel, n = e.axis.scale, o = i.option, a = i.get("status"), r = i.get("value"); + null != r && (r = n.parse(r)); + var s = $u(i); + null == a && (o.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]), o.value = r, s && (o.status = e.axis.scale.isBlank() ? "hide" : "show") + } + } + + function qu(t) { + var e = (t.ecModel.getComponent("axisPointer") || {}).coordSysAxesInfo; + return e && e.axesInfo[Ju(t)] + } + + function Ku(t) { + var e = qu(t); + return e && e.axisPointerModel + } + + function $u(t) { + return !!t.get("handle.show") + } + + function Ju(t) { + return t.type + "||" + t.id + } + + function Qu(t, e, i, n, o, a) { + var r = ED.getAxisPointerClass(t.axisPointerClass); + if (r) { + var s = Ku(e); + s ? (t._axisPointer || (t._axisPointer = new r)).render(e, s, n, a) : th(t, n) + } + } + + function th(t, e, i) { + var n = t._axisPointer; + n && n.dispose(e, i), t._axisPointer = null + } + + function eh(t, e, i) { + i = i || {}; + var n = t.coordinateSystem, o = e.axis, a = {}, r = o.getAxesOnZeroOf()[0], s = o.position, + l = r ? "onZero" : s, u = o.dim, h = n.getRect(), c = [h.x, h.x + h.width, h.y, h.y + h.height], + d = {left: 0, right: 1, top: 0, bottom: 1, onZero: 2}, f = e.get("offset") || 0, + p = "x" === u ? [c[2] - f, c[3] + f] : [c[0] - f, c[1] + f]; + if (r) { + var g = r.toGlobalCoord(r.dataToCoord(0)); + p[d.onZero] = Math.max(Math.min(g, p[1]), p[0]) + } + a.position = ["y" === u ? p[d[l]] : c[0], "x" === u ? p[d[l]] : c[3]], a.rotation = Math.PI / 2 * ("x" === u ? 0 : 1); + var m = {top: -1, bottom: 1, left: -1, right: 1}; + a.labelDirection = a.tickDirection = a.nameDirection = m[s], a.labelOffset = r ? p[d[s]] - p[d.onZero] : 0, e.get("axisTick.inside") && (a.tickDirection = -a.tickDirection), T(i.labelInside, e.get("axisLabel.inside")) && (a.labelDirection = -a.labelDirection); + var v = e.get("axisLabel.rotate"); + return a.labelRotate = "top" === l ? -v : v, a.z2 = 1, a + } + + function ih(t, e, i, n, o, a, r) { + io(t, e, i.getModel("label"), i.getModel("emphasis.label"), { + labelFetcher: o, + labelDataIndex: a, + defaultText: ql(o.getData(), a), + isRectText: !0, + autoColor: n + }), nh(t), nh(e) + } + + function nh(t, e) { + "outside" === t.textPosition && (t.textPosition = e) + } + + function oh(t, e, i) { + i.style.text = null, fo(i, {shape: {width: 0}}, e, t, function () { + i.parent && i.parent.remove(i) + }) + } + + function ah(t, e, i) { + i.style.text = null, fo(i, {shape: {r: i.shape.r0}}, e, t, function () { + i.parent && i.parent.remove(i) + }) + } + + function rh(t, e, i, n, o, a, s, l) { + var u = e.getItemVisual(i, "color"), h = e.getItemVisual(i, "opacity"), c = n.getModel("itemStyle"), + d = n.getModel("emphasis.itemStyle").getBarItemStyle(); + l || t.setShape("r", c.get("barBorderRadius") || 0), t.useStyle(r({fill: u, opacity: h}, c.getBarItemStyle())); + var f = n.getShallow("cursor"); + f && t.attr("cursor", f); + var p = s ? o.height > 0 ? "bottom" : "top" : o.width > 0 ? "left" : "right"; + l || ih(t.style, d, n, u, a, i, p), eo(t, d) + } + + function sh(t, e) { + var i = t.get(HD) || 0; + return Math.min(i, Math.abs(e.width), Math.abs(e.height)) + } + + function lh(t, e, i) { + var n = t.getData(), o = [], a = n.getLayout("valueAxisHorizontal") ? 1 : 0; + o[1 - a] = n.getLayout("valueAxisStart"); + var r = new XD({shape: {points: n.getLayout("largePoints")}, incremental: !!i, __startPoint: o, __valueIdx: a}); + e.add(r), uh(r, t, n) + } + + function uh(t, e, i) { + var n = i.getVisual("borderColor") || i.getVisual("color"), + o = e.getModel("itemStyle").getItemStyle(["color", "borderColor"]); + t.useStyle(o), t.style.fill = null, t.style.stroke = n, t.style.lineWidth = i.getLayout("barWidth") + } + + function hh(t, e, i, n) { + var o = e.getData(), a = this.dataIndex, r = o.getName(a), s = e.get("selectedOffset"); + n.dispatchAction({type: "pieToggleSelect", from: t, name: r, seriesId: e.id}), o.each(function (t) { + ch(o.getItemGraphicEl(t), o.getItemLayout(t), e.isSelected(o.getName(t)), s, i) + }) + } + + function ch(t, e, i, n, o) { + var a = (e.startAngle + e.endAngle) / 2, r = Math.cos(a), s = Math.sin(a), l = i ? n : 0, u = [r * l, s * l]; + o ? t.animate().when(200, {position: u}).start("bounceOut") : t.attr("position", u) + } + + function dh(t, e) { + function i() { + a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore + } + + function n() { + a.ignore = a.normalIgnore, r.ignore = r.normalIgnore + } + + sw.call(this); + var o = new vS({z2: 2}), a = new bS, r = new fS; + this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) + } + + function fh(t, e, i, n, o, a, r) { + function s(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 l(t, e, i, n, o, a) { + for (var r = e ? Number.MAX_VALUE : 0, s = 0, l = t.length; s < l; s++) if ("center" !== t[s].position) { + var u = Math.abs(t[s].y - n), h = t[s].len, c = t[s].len2, + d = u < o + h ? Math.sqrt((o + h + c) * (o + h + c) - u * u) : Math.abs(t[s].x - i); + e && d >= r && (d = r - 10), !e && d <= r && (d = r + 10), t[s].x = i + d * a, r = d + } + } + + t.sort(function (t, e) { + return t.y - e.y + }); + for (var u, h = 0, c = t.length, d = [], f = [], p = 0; p < c; p++) (u = t[p].y - h) < 0 && function (e, i, n, o) { + for (var a = e; a < i; a++) if (t[a].y += n, a > e && a + 1 < i && t[a + 1].y > t[a].y + t[a].height) return void s(a, n / 2); + s(i - 1, n / 2) + }(p, c, -u), h = t[p].y + t[p].height; + r - h < 0 && s(c - 1, h - r); + for (p = 0; p < c; p++) t[p].y >= i ? f.push(t[p]) : d.push(t[p]); + l(d, !1, e, i, n, o), l(f, !0, e, i, n, o) + } + + function ph(t, e, i, n, o, a) { + for (var r = [], s = [], l = 0; l < t.length; l++) t[l].x < e ? r.push(t[l]) : s.push(t[l]); + fh(s, e, i, n, 1, o, a), fh(r, e, i, n, -1, o, a); + for (l = 0; l < t.length; l++) { + var u = t[l].linePoints; + if (u) { + var h = u[1][0] - u[2][0]; + t[l].x < e ? u[2][0] = t[l].x + 3 : u[2][0] = t[l].x - 3, u[1][1] = u[2][1] = t[l].y, u[1][0] = u[2][0] + h + } + } + } + + function gh() { + this.group = new sw + } + + function mh(t, e, i) { + qT.call(this, t, e, i), this.type = "value", this.angle = 0, this.name = "", this.model + } + + function vh(t, e, i) { + this._model = t, this.dimensions = [], this._indicatorAxes = f(t.getIndicatorModels(), function (t, e) { + var i = "indicator_" + e, n = new mh(i, new mT); + 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 + } + + function yh(t, e) { + return r({show: e}, t) + } + + function xh(t) { + return y(t) || (t = [+t, +t]), t + } + + function _h() { + E_.call(this) + } + + function wh(t) { + this.name = t, this.zoomLimit, E_.call(this), this._roamTransformable = new _h, this._rawTransformable = new _h, this._center, this._zoom + } + + function bh(t, e, i, n) { + var o = i.seriesModel, a = o ? o.coordinateSystem : null; + return a === this ? a[t](n) : null + } + + function Sh(t, e, i, n, o) { + wh.call(this, t), this.map = e, this._nameCoordMap = R(), this.loadGeoJson(i, n, o) + } + + function Mh(t, e, i, n) { + var o = i.geoModel, a = i.seriesModel, + r = o ? o.coordinateSystem : a ? a.coordinateSystem || (a.getReferringComponents("geo")[0] || {}).coordinateSystem : null; + return r === this ? r[t](n) : null + } + + function Ih(t, e) { + var i = t.get("boundingCoords"); + if (null != i) { + var n = i[0], o = i[1]; + isNaN(n[0]) || isNaN(n[1]) || isNaN(o[0]) || isNaN(o[1]) || this.setBoundingRect(n[0], n[1], o[0] - n[0], o[1] - n[1]) + } + var a, r = this.getBoundingRect(), s = t.get("layoutCenter"), l = t.get("layoutSize"), u = e.getWidth(), + h = e.getHeight(), c = t.get("aspectScale") || .75, d = r.width / r.height * c, f = !1; + s && l && (s = [Do(s[0], u), Do(s[1], h)], l = Do(l, Math.min(u, h)), isNaN(s[0]) || isNaN(s[1]) || isNaN(l) || (f = !0)); + if (f) { + var p = {}; + d > 1 ? (p.width = l, p.height = l / d) : (p.height = l, p.width = l * d), p.y = s[1] - p.height / 2, p.x = s[0] - p.width / 2 + } else (a = t.getBoxLayoutParams()).aspect = d, p = Qo(a, {width: u, height: h}); + this.setViewRect(p.x, p.y, p.width, p.height), this.setCenter(t.get("center")), this.setZoom(t.get("zoom")) + } + + function Th(t, e) { + d(e.get("geoCoord"), function (e, i) { + t.addGeoCoord(i, e) + }) + } + + function Dh(t, e, i) { + Lh(t)[e] = i + } + + function Ah(t, e, i) { + var n = Lh(t); + n[e] === i && (n[e] = null) + } + + function Ch(t, e) { + return !!Lh(t)[e] + } + + function Lh(t) { + return t[xA] || (t[xA] = {}) + } + + function kh(t) { + this.pointerChecker, this._zr = t, this._opt = {}; + var e = m, n = e(Ph, this), o = e(Nh, this), a = e(Oh, this), s = e(Eh, this), l = e(Rh, this); + D_.call(this), this.setPointerChecker = function (t) { + this.pointerChecker = t + }, this.enable = function (e, u) { + this.disable(), this._opt = r(i(u) || {}, { + zoomOnMouseWheel: !0, + moveOnMouseMove: !0, + preventDefaultMouseMove: !0 + }), null == e && (e = !0), !0 !== e && "move" !== e && "pan" !== e || (t.on("mousedown", n), t.on("mousemove", o), t.on("mouseup", a)), !0 !== e && "scale" !== e && "zoom" !== e || (t.on("mousewheel", s), t.on("pinch", l)) + }, this.disable = function () { + t.off("mousedown", n), t.off("mousemove", o), t.off("mouseup", a), t.off("mousewheel", s), t.off("pinch", l) + }, this.dispose = this.disable, this.isDragging = function () { + return this._dragging + }, this.isPinching = function () { + return this._pinching + } + } + + function Ph(t) { + if (!(ci(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 Nh(t) { + if (!ci(t) && Bh(this, "moveOnMouseMove", t) && this._dragging && "pinch" !== t.gestureEvent && !Ch(this._zr, "globalPan")) { + var e = t.offsetX, i = t.offsetY, n = this._x, o = this._y, a = e - n, r = i - o; + this._x = e, this._y = i, this._opt.preventDefaultMouseMove && zw(t.event), this.trigger("pan", a, r, n, o, e, i) + } + } + + function Oh(t) { + ci(t) || (this._dragging = !1) + } + + function Eh(t) { + if (Bh(this, "zoomOnMouseWheel", t) && 0 !== t.wheelDelta) { + var e = t.wheelDelta > 0 ? 1.1 : 1 / 1.1; + zh.call(this, t, e, t.offsetX, t.offsetY) + } + } + + function Rh(t) { + if (!Ch(this._zr, "globalPan")) { + var e = t.pinchScale > 1 ? 1.1 : 1 / 1.1; + zh.call(this, t, e, t.pinchX, t.pinchY) + } + } + + function zh(t, e, i, n) { + this.pointerChecker && this.pointerChecker(t, i, n) && (zw(t.event), this.trigger("zoom", e, i, n)) + } + + function Bh(t, e, i) { + var n = t._opt[e]; + return n && (!_(n) || i.event[n + "Key"]) + } + + function Vh(t, e, i) { + var n = t.target, o = n.position; + o[0] += e, o[1] += i, n.dirty() + } + + function Gh(t, e, i, n) { + var o = t.target, a = t.zoomLimit, r = o.position, s = o.scale, l = t.zoom = t.zoom || 1; + if (l *= e, a) { + var u = a.min || 0, h = a.max || 1 / 0; + l = Math.max(Math.min(h, l), u) + } + 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, o.dirty() + } + + function Wh(t, e, i) { + var n = e.getComponentByElement(t.topTarget), o = n && n.coordinateSystem; + return n && n !== i && !_A[n.mainType] && o && o.model !== i + } + + function Fh(t, e) { + var i = t.getItemStyle(), n = t.get("areaColor"); + return null != n && (i.fill = n), i + } + + function Hh(t, e, i, n, o) { + i.off("click"), i.off("mousedown"), e.get("selectedMode") && (i.on("mousedown", function () { + t._mouseDownFlag = !0 + }), i.on("click", function (a) { + if (t._mouseDownFlag) { + t._mouseDownFlag = !1; + for (var r = a.target; !r.__regions;) r = r.parent; + if (r) { + var s = { + type: ("geo" === e.mainType ? "geo" : "map") + "ToggleSelect", + batch: f(r.__regions, function (t) { + return {name: t.name, from: o.uid} + }) + }; + s[e.mainType + "Id"] = e.id, n.dispatchAction(s), Zh(e, i) + } + } + })) + } + + function Zh(t, e) { + e.eachChild(function (e) { + d(e.__regions, function (i) { + e.trigger(t.isSelected(i.name) ? "emphasis" : "normal") + }) + }) + } + + function Uh(t, e) { + var i = new sw; + this._controller = new kh(t.getZr()), this._controllerHost = {target: e ? i : null}, this.group = i, this._updateGroup = e, this._mouseDownFlag + } + + function Xh(t, e, i) { + var n = t.getZoom(), o = t.getCenter(), a = e.zoom, r = t.dataToPoint(o); + if (null != e.dx && null != e.dy) { + r[0] -= e.dx, r[1] -= e.dy; + o = t.pointToData(r); + t.setCenter(o) + } + if (null != a) { + if (i) { + var s = i.min || 0, l = i.max || 1 / 0; + a = Math.max(Math.min(n * a, l), s) / n + } + t.scale[0] *= a, t.scale[1] *= a; + var u = t.position, h = (e.originX - u[0]) * (a - 1), c = (e.originY - u[1]) * (a - 1); + u[0] -= h, u[1] -= c, t.updateTransform(); + o = t.pointToData(r); + t.setCenter(o), t.setZoom(a * n) + } + return {center: t.getCenter(), zoom: t.getZoom()} + } + + function jh(t, e) { + var i = {}; + return d(t, function (t) { + t.each(t.mapDimension("value"), function (e, n) { + var o = "ec-" + t.getName(n); + i[o] = i[o] || [], isNaN(e) || i[o].push(e) + }) + }), t[0].map(t[0].mapDimension("value"), function (n, o) { + for (var a = "ec-" + t[0].getName(o), r = 0, s = 1 / 0, l = -1 / 0, u = i[a].length, h = 0; h < u; h++) s = Math.min(s, i[a][h]), l = Math.max(l, i[a][h]), r += i[a][h]; + var c; + return c = "min" === e ? s : "max" === e ? l : "average" === e ? r / u : r, 0 === u ? NaN : c + }) + } + + function Yh(t) { + var e = t.mainData, i = t.datas; + i || (i = {main: e}, t.datasAttr = {main: "data"}), t.datas = t.mainData = null, tc(e, i, t), wA(i, function (i) { + wA(e.TRANSFERABLE_METHODS, function (e) { + i.wrapMethod(e, v(qh, t)) + }) + }), e.wrapMethod("cloneShallow", v($h, t)), wA(e.CHANGABLE_METHODS, function (i) { + e.wrapMethod(i, v(Kh, t)) + }), k(i[e.dataType] === e) + } + + function qh(t, e) { + if (Qh(this)) { + var i = a({}, this[bA]); + i[this.dataType] = e, tc(e, i, t) + } else ec(e, this.dataType, this[SA], t); + return e + } + + function Kh(t, e) { + return t.struct && t.struct.update(this), e + } + + function $h(t, e) { + return wA(e[bA], function (i, n) { + i !== e && ec(i.cloneShallow(), n, e, t) + }), e + } + + function Jh(t) { + var e = this[SA]; + return null == t || null == e ? e : e[bA][t] + } + + function Qh(t) { + return t[SA] === t + } + + function tc(t, e, i) { + t[bA] = {}, wA(e, function (e, n) { + ec(e, n, t, i) + }) + } + + function ec(t, e, i, n) { + i[bA][e] = t, t[SA] = i, t.dataType = e, n.struct && (t[n.structAttr] = n.struct, n.struct[n.datasAttr[e]] = t), t.getLinkedData = Jh + } + + function ic(t, e, i) { + this.root, this.data, this._nodes = [], this.hostModel = t, this.levelModels = f(e || [], function (e) { + return new wo(e, t, t.ecModel) + }), this.leavesModel = new wo(i || {}, t, t.ecModel) + } + + function nc(t, e) { + var i = e.children; + t.parentNode !== e && (i.push(t), t.parentNode = e) + } + + function oc(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 o = i.length - 1; o >= 0; o--) { + var a = i[o]; + a.hierNode = { + defaultAncestor: null, + ancestor: a, + prelim: 0, + modifier: 0, + change: 0, + shift: 0, + i: o, + thread: null + }, n.push(a) + } + } + + function ac(t, e) { + var i = t.isExpand ? t.children : [], n = t.parentNode.children, o = t.hierNode.i ? n[t.hierNode.i - 1] : null; + if (i.length) { + hc(t); + var a = (i[0].hierNode.prelim + i[i.length - 1].hierNode.prelim) / 2; + o ? (t.hierNode.prelim = o.hierNode.prelim + e(t, o), t.hierNode.modifier = t.hierNode.prelim - a) : t.hierNode.prelim = a + } else o && (t.hierNode.prelim = o.hierNode.prelim + e(t, o)); + t.parentNode.hierNode.defaultAncestor = cc(t, o, t.parentNode.hierNode.defaultAncestor || n[0], e) + } + + function rc(t) { + var e = t.hierNode.prelim + t.parentNode.hierNode.modifier; + t.setLayout({x: e}, !0), t.hierNode.modifier += t.parentNode.hierNode.modifier + } + + function sc(t) { + return arguments.length ? t : mc + } + + function lc(t, e) { + var i = {}; + return t -= Math.PI / 2, i.x = e * Math.cos(t), i.y = e * Math.sin(t), i + } + + function uc(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function hc(t) { + for (var e = t.children, i = e.length, n = 0, o = 0; --i >= 0;) { + var a = e[i]; + a.hierNode.prelim += n, a.hierNode.modifier += n, o += a.hierNode.change, n += a.hierNode.shift + o + } + } + + function cc(t, e, i, n) { + if (e) { + for (var o = t, a = t, r = a.parentNode.children[0], s = e, l = o.hierNode.modifier, u = a.hierNode.modifier, h = r.hierNode.modifier, c = s.hierNode.modifier; s = dc(s), a = fc(a), s && a;) { + o = dc(o), r = fc(r), o.hierNode.ancestor = t; + var d = s.hierNode.prelim + c - a.hierNode.prelim - u + n(s, a); + d > 0 && (gc(pc(s, t, i), t, d), u += d, l += d), c += s.hierNode.modifier, u += a.hierNode.modifier, l += o.hierNode.modifier, h += r.hierNode.modifier + } + s && !dc(o) && (o.hierNode.thread = s, o.hierNode.modifier += c - l), a && !fc(r) && (r.hierNode.thread = a, r.hierNode.modifier += u - h, i = t) + } + return i + } + + function dc(t) { + var e = t.children; + return e.length && t.isExpand ? e[e.length - 1] : t.hierNode.thread + } + + function fc(t) { + var e = t.children; + return e.length && t.isExpand ? e[0] : t.hierNode.thread + } + + function pc(t, e, i) { + return t.hierNode.ancestor.parentNode === e.parentNode ? t.hierNode.ancestor : i + } + + function gc(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 mc(t, e) { + return t.parentNode === e.parentNode ? 1 : 2 + } + + function vc(t, e) { + var i = t.getItemLayout(e); + return i && !isNaN(i.x) && !isNaN(i.y) && "none" !== t.getItemVisual(e, "symbol") + } + + function yc(t, e, i) { + return i.itemModel = e, i.itemStyle = e.getModel("itemStyle").getItemStyle(), i.hoverItemStyle = e.getModel("emphasis.itemStyle").getItemStyle(), i.lineStyle = e.getModel("lineStyle").getLineStyle(), i.labelModel = e.getModel("label"), i.hoverLabelModel = e.getModel("emphasis.label"), !1 === t.isExpand && 0 !== t.children.length ? i.symbolInnerColor = i.itemStyle.fill : i.symbolInnerColor = "#fff", i + } + + function xc(t, e, i, n, o, a) { + var s = !i, l = t.tree.getNodeByDataIndex(e), a = yc(l, l.getModel(), a), u = t.tree.root, + h = l.parentNode === u ? l : l.parentNode || l, c = t.getItemGraphicEl(h.dataIndex), d = h.getLayout(), + f = c ? {x: c.position[0], y: c.position[1], rawX: c.__radialOldRawX, rawY: c.__radialOldRawY} : d, + p = l.getLayout(); + s ? (i = new Kl(t, e, a)).attr("position", [f.x, f.y]) : i.updateData(t, e, a), i.__radialOldRawX = i.__radialRawX, i.__radialOldRawY = i.__radialRawY, i.__radialRawX = p.rawX, i.__radialRawY = p.rawY, n.add(i), t.setItemGraphicEl(e, i), fo(i, {position: [p.x, p.y]}, o); + var g = i.getSymbolPath(); + if ("radial" === a.layout) { + var m, v, y = u.children[0], x = y.getLayout(), _ = y.children.length; + if (p.x === x.x && !0 === l.isExpand) { + var w = {}; + w.x = (y.children[0].getLayout().x + y.children[_ - 1].getLayout().x) / 2, w.y = (y.children[0].getLayout().y + y.children[_ - 1].getLayout().y) / 2, (m = Math.atan2(w.y - x.y, w.x - x.x)) < 0 && (m = 2 * Math.PI + m), (v = w.x < x.x) && (m -= Math.PI) + } else (m = Math.atan2(p.y - x.y, p.x - x.x)) < 0 && (m = 2 * Math.PI + m), 0 === l.children.length || 0 !== l.children.length && !1 === l.isExpand ? (v = p.x < x.x) && (m -= Math.PI) : (v = p.x > x.x) || (m -= Math.PI); + var b = v ? "left" : "right"; + g.setStyle({textPosition: b, textRotation: -m, textOrigin: "center", verticalAlign: "middle"}) + } + if (l.parentNode && l.parentNode !== u) { + var S = i.__edge; + S || (S = i.__edge = new TS({ + shape: wc(a, f, f), + style: r({opacity: 0}, a.lineStyle) + })), fo(S, {shape: wc(a, d, p), style: {opacity: 1}}, o), n.add(S) + } + } + + function _c(t, e, i, n, o, a) { + for (var r, s = t.tree.getNodeByDataIndex(e), l = t.tree.root, a = yc(s, s.getModel(), a), u = s.parentNode === l ? s : s.parentNode || s; null == (r = u.getLayout());) u = u.parentNode === l ? u : u.parentNode || u; + fo(i, {position: [r.x + 1, r.y + 1]}, o, function () { + n.remove(i), t.setItemGraphicEl(e, null) + }), i.fadeOut(null, {keepLabel: !0}); + var h = i.__edge; + h && fo(h, {shape: wc(a, r, r), style: {opacity: 0}}, o, function () { + n.remove(h) + }) + } + + function wc(t, e, i) { + var n, o, a, r, s = t.orient; + if ("radial" === t.layout) { + var l = e.rawX, u = e.rawY, h = i.rawX, c = i.rawY, d = lc(l, u), f = lc(l, u + (c - u) * t.curvature), + p = lc(h, c + (u - c) * t.curvature), g = lc(h, c); + return {x1: d.x, y1: d.y, x2: g.x, y2: g.y, cpx1: f.x, cpy1: f.y, cpx2: p.x, cpy2: p.y} + } + var l = e.x, u = e.y, h = i.x, c = i.y; + return "LR" !== s && "RL" !== s || (n = l + (h - l) * t.curvature, o = u, a = h + (l - h) * t.curvature, r = c), "TB" !== s && "BT" !== s || (n = l, o = u + (c - u) * t.curvature, a = h, r = c + (u - c) * t.curvature), { + x1: l, + y1: u, + x2: h, + y2: c, + cpx1: n, + cpy1: o, + cpx2: a, + cpy2: r + } + } + + function bc(t, e, i) { + for (var n, o = [t], a = []; n = o.pop();) if (a.push(n), n.isExpand) { + var r = n.children; + if (r.length) for (var s = 0; s < r.length; s++) o.push(r[s]) + } + for (; n = a.pop();) e(n, i) + } + + function Sc(t, e) { + for (var i, n = [t]; i = n.pop();) if (e(i), i.isExpand) { + var o = i.children; + if (o.length) for (var a = o.length - 1; a >= 0; a--) n.push(o[a]) + } + } + + function Mc(t, e) { + var i = uc(t, e); + t.layoutInfo = i; + var n = t.get("layout"), o = 0, a = 0, r = null; + "radial" === n ? (o = 2 * Math.PI, a = Math.min(i.height, i.width) / 2, r = sc(function (t, e) { + return (t.parentNode === e.parentNode ? 1 : 2) / t.depth + })) : (o = i.width, a = i.height, r = sc()); + var s = t.getData().tree.root, l = s.children[0]; + if (l) { + oc(s), bc(l, ac, r), s.hierNode.modifier = -l.hierNode.prelim, Sc(l, rc); + var u = l, h = l, c = l; + Sc(l, function (t) { + var e = t.getLayout().x; + e < u.getLayout().x && (u = t), e > h.getLayout().x && (h = t), t.depth > c.depth && (c = t) + }); + var d = u === h ? 1 : r(u, h) / 2, f = d - u.getLayout().x, p = 0, g = 0, m = 0, v = 0; + if ("radial" === n) p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Sc(l, function (t) { + m = (t.getLayout().x + f) * p, v = (t.depth - 1) * g; + var e = lc(m, v); + t.setLayout({x: e.x, y: e.y, rawX: m, rawY: v}, !0) + }); else { + var y = t.getOrient(); + "RL" === y || "LR" === y ? (g = a / (h.getLayout().x + d + f), p = o / (c.depth - 1 || 1), Sc(l, function (t) { + v = (t.getLayout().x + f) * g, m = "LR" === y ? (t.depth - 1) * p : o - (t.depth - 1) * p, t.setLayout({ + x: m, + y: v + }, !0) + })) : "TB" !== y && "BT" !== y || (p = o / (h.getLayout().x + d + f), g = a / (c.depth - 1 || 1), Sc(l, function (t) { + m = (t.getLayout().x + f) * p, v = "TB" === y ? (t.depth - 1) * g : a - (t.depth - 1) * g, t.setLayout({ + x: m, + y: v + }, !0) + })) + } + } + } + + function Ic(t, e, i) { + if (t && l(e, t.type) >= 0) { + var n = i.getData().tree.root, o = t.targetNode; + if (o && n.contains(o)) return {node: o}; + var a = t.targetNodeId; + if (null != a && (o = n.getNodeById(a))) return {node: o} + } + } + + function Tc(t) { + for (var e = []; t;) (t = t.parentNode) && e.push(t); + return e.reverse() + } + + function Dc(t, e) { + return l(Tc(t), e) >= 0 + } + + function Ac(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 + } + + function Cc(t) { + var e = 0; + d(t.children, function (t) { + Cc(t); + var i = t.value; + y(i) && (i = i[0]), e += i + }); + var i = t.value; + y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i + } + + function Lc(t, e) { + var i = e.get("color"); + if (i) { + var n; + return d(t = t || [], function (t) { + var e = new wo(t), i = e.get("color"); + (e.get("itemStyle.color") || i && "none" !== i) && (n = !0) + }), n || ((t[0] || (t[0] = {})).color = i.slice()), t + } + } + + function kc(t) { + this.group = new sw, t.add(this.group) + } + + function Pc(t, e, i, n, o, a) { + var r = [[o ? t : t - IA, e], [t + i, e], [t + i, e + n], [o ? t : t - IA, e + n]]; + return !a && r.splice(2, 0, [t + i + IA, e + n / 2]), !o && r.push([t, e + n / 2]), r + } + + function Nc(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 && Ac(i, e) + } + } + + function Oc() { + var t, e = [], i = {}; + return { + add: function (t, n, o, a, r) { + return _(a) && (r = a, a = 0), !i[t.id] && (i[t.id] = 1, e.push({ + el: t, + target: n, + time: o, + delay: a, + easing: r + }), !0) + }, done: function (e) { + return t = e, this + }, start: function () { + for (var n = e.length, o = 0, a = e.length; o < a; o++) { + var r = e[o]; + r.el.animateTo(r.target, r.time, r.delay, r.easing, function () { + --n || (e.length = 0, i = {}, t && t()) + }) + } + return this + } + } + } + + function Ec(t, e, n, o, r, s, l, u, h, c) { + function d(t, e) { + w ? !t.invisible && s.push(t) : (e(), t.__tmWillVisible || (t.invisible = !1)) + } + + function f(e, n, o, a, r, s) { + var u = l.getModel(), + h = T(t.getFormattedLabel(l.dataIndex, "normal", null, null, s ? "upperLabel" : "label"), u.get("name")); + if (!s && v.isLeafRoot) { + var c = t.get("drillDownIcon", !0); + h = c ? c + " " + h : h + } + var d = u.getModel(s ? PA : LA), f = u.getModel(s ? NA : kA), p = d.getShallow("show"); + io(e, n, d, f, { + defaultText: p ? h : null, + autoColor: o, + isRectText: !0 + }), s && (e.textRect = i(s)), e.truncate = p && d.get("ellipsis") ? { + outerWidth: a, + outerHeight: r, + minChar: 2 + } : null + } + + function p(t, i, o, a) { + var s = null != S && n[t][S], l = r[t]; + return s ? (n[t][S] = null, g(l, s, t)) : w || ((s = new i({z: Rc(o, a)})).__tmDepth = o, s.__tmStorageName = t, m(l, s, t)), e[t][b] = s + } + + function g(t, e, i) { + (t[b] = {}).old = "nodeGroup" === i ? e.position.slice() : a({}, e.shape) + } + + function m(t, e, i) { + var n = t[b] = {}, a = l.parentNode; + if (a && (!o || "drillDown" === o.direction)) { + var s = 0, u = 0, h = r.background[a.getRawIndex()]; + !o && h && h.old && (s = h.old.width, u = h.old.height), n.old = "nodeGroup" === i ? [0, u] : { + x: s, + y: u, + width: 0, + height: 0 + } + } + n.fadein = "nodeGroup" !== i + } + + if (l) { + var v = l.getLayout(); + if (v && v.isInView) { + var y = v.width, x = v.height, _ = v.borderWidth, w = v.invisible, b = l.getRawIndex(), + S = u && u.getRawIndex(), M = l.viewChildren, I = v.upperHeight, D = M && M.length, + A = l.getModel("itemStyle"), C = l.getModel("emphasis.itemStyle"), L = p("nodeGroup", DA); + if (L) { + if (h.add(L), L.attr("position", [v.x || 0, v.y || 0]), L.__tmNodeWidth = y, L.__tmNodeHeight = x, v.isAboveViewRoot) return L; + var k = p("background", AA, c, EA); + if (k && function (e, i, n) { + i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex, i.setShape({ + x: 0, + y: 0, + width: y, + height: x + }); + var o = l.getVisual("borderColor", !0), a = C.get("borderColor"); + d(i, function () { + var t = BA(A); + t.fill = o; + var e = zA(C); + if (e.fill = a, n) { + var r = y - 2 * _; + f(t, e, o, r, I, {x: _, y: 0, width: r, height: I}) + } else t.text = e.text = null; + i.setStyle(t), eo(i, e) + }), e.add(i) + }(L, k, D && v.upperHeight), !D) { + var P = p("content", AA, c, RA); + P && function (e, i) { + i.dataIndex = l.dataIndex, i.seriesIndex = t.seriesIndex; + var n = Math.max(y - 2 * _, 0), o = Math.max(x - 2 * _, 0); + i.culling = !0, i.setShape({x: _, y: _, width: n, height: o}); + var a = l.getVisual("color", !0); + d(i, function () { + var t = BA(A); + t.fill = a; + var e = zA(C); + f(t, e, a, n, o), i.setStyle(t), eo(i, e) + }), e.add(i) + }(L, P) + } + return L + } + } + } + } + + function Rc(t, e) { + var i = t * OA + e; + return (i - 1) / i + } + + function zc(t) { + var e = t.pieceList; + t.hasSpecialVisual = !1, d(e, function (e, i) { + e.originIndex = i, null != e.visual && (t.hasSpecialVisual = !0) + }) + } + + function Bc(t) { + var e = t.categories, i = t.visual, n = t.categoryMap = {}; + if (WA(e, function (t, e) { + n[t] = e + }), !y(i)) { + var o = []; + w(i) ? WA(i, function (t, e) { + var i = n[e]; + o[null != i ? i : HA] = t + }) : o[HA] = i, i = jc(t, o) + } + for (var a = e.length - 1; a >= 0; a--) null == i[a] && (delete n[e[a]], e.pop()) + } + + function Vc(t, e) { + var i = t.visual, n = []; + w(i) ? WA(i, function (t) { + n.push(t) + }) : null != i && n.push(i); + var o = {color: 1, symbol: 1}; + e || 1 !== n.length || o.hasOwnProperty(t.type) || (n[1] = n[0]), jc(t, n) + } + + function Gc(t) { + return { + applyVisual: function (e, i, n) { + e = this.mapValueToVisual(e), n("color", t(i("color"), e)) + }, _doMap: Uc([0, 1]) + } + } + + function Wc(t) { + var e = this.option.visual; + return e[Math.round(To(t, [0, 1], [0, e.length - 1], !0))] || {} + } + + function Fc(t) { + return function (e, i, n) { + n(t, this.mapValueToVisual(e)) + } + } + + function Hc(t) { + var e = this.option.visual; + return e[this.option.loop && t !== HA ? t % e.length : t] + } + + function Zc() { + return this.option.visual[0] + } + + function Uc(t) { + return { + linear: function (e) { + return To(e, t, this.option.visual, !0) + }, category: Hc, piecewise: function (e, i) { + var n = Xc.call(this, i); + return null == n && (n = To(e, t, this.option.visual, !0)), n + }, fixed: Zc + } + } + + function Xc(t) { + var e = this.option, i = e.pieceList; + if (e.hasSpecialVisual) { + var n = i[ZA.findPieceIndex(t, i)]; + if (n && n.visual) return n.visual[this.type] + } + } + + function jc(t, e) { + return t.visual = e, "color" === t.type && (t.parsedVisual = f(e, function (t) { + return At(t) + })), e + } + + function Yc(t, e, i) { + return t ? e <= i : e < i + } + + function qc(t, e, i, n, o, a) { + var r = t.getModel(), s = t.getLayout(); + if (s && !s.invisible && s.isInView) { + var l, u = t.getModel(YA), h = Kc(u, e, i[t.depth], n), c = u.get("borderColor"), + f = u.get("borderColorSaturation"); + null != f && (c = Jc(f, l = $c(h))), t.setVisual("borderColor", c); + var p = t.viewChildren; + if (p && p.length) { + var g = td(t, r, s, u, h, p); + d(p, function (t, e) { + (t.depth >= o.length || t === o[t.depth]) && qc(t, id(r, h, t, e, g, a), i, n, o, a) + }) + } else l = $c(h), t.setVisual("color", l) + } + } + + function Kc(t, e, i, n) { + var o = a({}, e); + return d(["color", "colorAlpha", "colorSaturation"], function (a) { + var r = t.get(a, !0); + null == r && i && (r = i[a]), null == r && (r = e[a]), null == r && (r = n.get(a)), null != r && (o[a] = r) + }), o + } + + function $c(t) { + var e = Qc(t, "color"); + if (e) { + var i = Qc(t, "colorAlpha"), n = Qc(t, "colorSaturation"); + return n && (e = Et(e, null, null, n)), i && (e = Rt(e, i)), e + } + } + + function Jc(t, e) { + return null != e ? Et(e, null, null, t) : null + } + + function Qc(t, e) { + var i = t[e]; + if (null != i && "none" !== i) return i + } + + function td(t, e, i, n, o, a) { + if (a && a.length) { + var r = ed(e, "color") || null != o.color && "none" !== o.color && (ed(e, "colorAlpha") || ed(e, "colorSaturation")); + if (r) { + var s = e.get("visualMin"), l = e.get("visualMax"), u = i.dataExtent.slice(); + null != s && s < u[0] && (u[0] = s), null != l && l > u[1] && (u[1] = l); + var h = e.get("colorMappingBy"), c = {type: r.name, dataExtent: u, visual: r.range}; + "color" !== c.type || "index" !== h && "id" !== h ? c.mappingMethod = "linear" : (c.mappingMethod = "category", c.loop = !0); + var d = new ZA(c); + return d.__drColorMappingBy = h, d + } + } + } + + function ed(t, e) { + var i = t.get(e); + return jA(i) && i.length ? {name: e, range: i} : null + } + + function id(t, e, i, n, o, r) { + var s = a({}, e); + if (o) { + var l = o.type, u = "color" === l && o.__drColorMappingBy, + h = "index" === u ? n : "id" === u ? r.mapIdToIndex(i.getId()) : i.getValue(t.get("visualDimension")); + s[l] = o.mapValueToVisual(h) + } + return s + } + + function nd(t, e, i, n) { + var o, a; + if (!t.isRemoved()) { + var r = t.getLayout(); + o = r.width, a = r.height; + var s = (f = t.getModel()).get(tC), l = f.get(eC) / 2, u = fd(f), h = Math.max(s, u), c = s - l, d = h - l, + f = t.getModel(); + t.setLayout({borderWidth: s, upperHeight: h, upperLabelHeight: u}, !0); + var p = (o = KA(o - 2 * c, 0)) * (a = KA(a - c - d, 0)), g = od(t, f, p, e, i, n); + if (g.length) { + var m = {x: c, y: d, width: o, height: a}, v = $A(o, a), y = 1 / 0, x = []; + x.area = 0; + for (var _ = 0, w = g.length; _ < w;) { + var b = g[_]; + x.push(b), x.area += b.getLayout().area; + var S = ld(x, v, e.squareRatio); + S <= y ? (_++, y = S) : (x.area -= x.pop().getLayout().area, ud(x, v, m, l, !1), v = $A(m.width, m.height), x.length = x.area = 0, y = 1 / 0) + } + if (x.length && ud(x, v, m, l, !0), !i) { + var M = f.get("childrenVisibleMin"); + null != M && p < M && (i = !0) + } + for (var _ = 0, w = g.length; _ < w; _++) nd(g[_], e, i, n + 1) + } + } + } + + function od(t, e, i, n, o, a) { + var r = t.children || [], s = n.sort; + "asc" !== s && "desc" !== s && (s = null); + var l = null != n.leafDepth && n.leafDepth <= a; + if (o && !l) return t.viewChildren = []; + rd(r = g(r, function (t) { + return !t.isRemoved() + }), s); + var u = sd(e, r, s); + if (0 === u.sum) return t.viewChildren = []; + if (u.sum = ad(e, i, u.sum, s, r), 0 === u.sum) return t.viewChildren = []; + for (var h = 0, c = r.length; h < c; h++) { + var d = r[h].getValue() / u.sum * i; + r[h].setLayout({area: d}) + } + return l && (r.length && t.setLayout({isLeafRoot: !0}, !0), r.length = 0), t.viewChildren = r, t.setLayout({dataExtent: u.dataExtent}, !0), r + } + + function ad(t, e, i, n, o) { + if (!n) return i; + for (var a = t.get("visibleMin"), r = o.length, s = r, l = r - 1; l >= 0; l--) { + var u = o["asc" === n ? r - l - 1 : l].getValue(); + u / i * e < a && (s = l, i -= u) + } + return "asc" === n ? o.splice(0, r - s) : o.splice(s, r - s), i + } + + function rd(t, e) { + return 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 + }), t + } + + function sd(t, e, i) { + for (var n = 0, o = 0, a = e.length; o < a; o++) n += e[o].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]; + QA(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} + } + + function ld(t, e, i) { + for (var n, o = 0, a = 1 / 0, r = 0, s = t.length; r < s; r++) (n = t[r].getLayout().area) && (n < a && (a = n), n > o && (o = n)); + var l = t.area * t.area, u = e * e * i; + return l ? KA(u * o / l, l / (u * a)) : 1 / 0 + } + + function ud(t, e, i, n, o) { + var a = e === i.width ? 0 : 1, r = 1 - a, s = ["x", "y"], l = ["width", "height"], u = i[s[a]], + h = e ? t.area / e : 0; + (o || h > i[l[r]]) && (h = i[l[r]]); + for (var c = 0, d = t.length; c < d; c++) { + var f = t[c], p = {}, g = h ? f.getLayout().area / h : 0, m = p[l[r]] = KA(h - 2 * n, 0), + v = i[s[a]] + i[l[a]] - u, y = c === d - 1 || v < g ? v : g, x = p[l[a]] = KA(y - 2 * n, 0); + p[s[r]] = i[s[r]] + $A(n, m / 2), p[s[a]] = u + $A(n, x / 2), u += y, f.setLayout(p, !0) + } + i[s[r]] += h, i[l[r]] -= h + } + + function hd(t, e, i, n, o) { + var a = (e || {}).node, r = [n, o]; + if (!a || a === i) return r; + for (var s, l = n * o, u = l * t.option.zoomToNodeRatio; s = a.parentNode;) { + for (var h = 0, c = s.children, d = 0, f = c.length; d < f; d++) h += c[d].getValue(); + var p = a.getValue(); + if (0 === p) return r; + u *= h / p; + var g = s.getModel(), m = g.get(tC); + (u += 4 * m * m + (3 * m + Math.max(m, fd(g))) * Math.pow(u, .5)) > jS && (u = jS), a = s + } + u < l && (u = l); + var v = Math.pow(u / l, .5); + return [n * v, o * v] + } + + function cd(t, e, i) { + if (e) return {x: e.x, y: e.y}; + var n = {x: 0, y: 0}; + if (!i) return n; + var o = i.node, a = o.getLayout(); + if (!a) return n; + for (var r = [a.width / 2, a.height / 2], s = o; 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]} + } + + function dd(t, e, i, n, o) { + var a = t.getLayout(), r = i[o], s = r && r === t; + if (!(r && !s || o === i.length && t !== n)) { + t.setLayout({isInView: !0, invisible: !s && !e.intersect(a), isAboveViewRoot: s}, !0); + var l = new $t(e.x - a.x, e.y - a.y, e.width, e.height); + QA(t.viewChildren || [], function (t) { + dd(t, l, i, n, o + 1) + }) + } + } + + function fd(t) { + return t.get(iC) ? t.get(nC) : 0 + } + + function pd(t) { + return "_EC_" + t + } + + function gd(t, e) { + this.id = null == t ? "" : t, this.inEdges = [], this.outEdges = [], this.edges = [], this.hostGraph, this.dataIndex = null == e ? -1 : e + } + + function md(t, e, i) { + this.node1 = t, this.node2 = e, this.dataIndex = null == i ? -1 : i + } + + function vd(t) { + return isNaN(+t.cpx1) || isNaN(+t.cpy1) + } + + function yd(t) { + return "_" + t + "Type" + } + + function xd(t, e, i) { + var n = e.getItemVisual(i, "color"), o = e.getItemVisual(i, t), a = e.getItemVisual(i, t + "Size"); + if (o && "none" !== o) { + y(a) || (a = [a, a]); + var r = Tl(o, -a[0] / 2, -a[1] / 2, a[0], a[1], n); + return r.name = t, r + } + } + + function _d(t) { + var e = new dC({name: "line"}); + return wd(e.shape, t), e + } + + function wd(t, e) { + var i = e[0], n = e[1], o = e[2]; + t.x1 = i[0], t.y1 = i[1], t.x2 = n[0], t.y2 = n[1], t.percent = 1, o ? (t.cpx1 = o[0], t.cpy1 = o[1]) : (t.cpx1 = NaN, t.cpy1 = NaN) + } + + function bd(t, e, i) { + sw.call(this), this._createLine(t, e, i) + } + + function Sd(t) { + this._ctor = t || bd, this.group = new sw + } + + function Md(t, e, i, n) { + if (Ad(e.getItemLayout(i))) { + var o = new t._ctor(e, i, n); + e.setItemGraphicEl(i, o), t.group.add(o) + } + } + + function Id(t, e, i, n, o, a) { + var r = e.getItemGraphicEl(n); + Ad(i.getItemLayout(o)) ? (r ? r.updateData(i, o, a) : r = new t._ctor(i, o, a), i.setItemGraphicEl(o, r), t.group.add(r)) : t.group.remove(r) + } + + function Td(t) { + var e = t.hostModel; + return { + lineStyle: e.getModel("lineStyle").getLineStyle(), + hoverLineStyle: e.getModel("emphasis.lineStyle").getLineStyle(), + labelModel: e.getModel("label"), + hoverLabelModel: e.getModel("emphasis.label") + } + } + + function Dd(t) { + return isNaN(t[0]) || isNaN(t[1]) + } + + function Ad(t) { + return !Dd(t[0]) && !Dd(t[1]) + } + + function Cd(t, e, i) { + for (var n, o = t[0], a = t[1], r = t[2], s = 1 / 0, l = i * i, u = .1, h = .1; h <= .9; h += .1) mC[0] = xC(o[0], a[0], r[0], h), mC[1] = xC(o[1], a[1], r[1], h), (f = wC(_C(mC, e) - l)) < s && (s = f, n = h); + for (var c = 0; c < 32; c++) { + var d = n + u; + vC[0] = xC(o[0], a[0], r[0], n), vC[1] = xC(o[1], a[1], r[1], n), yC[0] = xC(o[0], a[0], r[0], d), yC[1] = xC(o[1], a[1], r[1], d); + var f = _C(vC, e) - l; + if (wC(f) < .01) break; + var p = _C(yC, e) - l; + u /= 2, f < 0 ? p >= 0 ? n += u : n -= u : p >= 0 ? n -= u : n += u + } + return n + } + + function Ld(t, e) { + return t.getVisual("opacity") || t.getModel().get(e) + } + + function kd(t, e, i) { + var n = t.getGraphicEl(), o = Ld(t, e); + null != i && (null == o && (o = 1), o *= i), n.downplay && n.downplay(), n.traverse(function (t) { + "group" !== t.type && t.setStyle("opacity", o) + }) + } + + function Pd(t, e) { + var i = Ld(t, e), n = t.getGraphicEl(); + n.highlight && n.highlight(), n.traverse(function (t) { + "group" !== t.type && t.setStyle("opacity", i) + }) + } + + function Nd(t) { + return t instanceof Array || (t = [t, t]), t + } + + function Od(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")]) + }), Ed(i) + } + } + + function Ed(t) { + t.eachEdge(function (t) { + var e = t.getModel().get("lineStyle.curveness") || 0, i = W(t.node1.getLayout()), + n = W(t.node2.getLayout()), o = [i, n]; + +e && o.push([(i[0] + n[0]) / 2 - (i[1] - n[1]) * e, (i[1] + n[1]) / 2 - (n[0] - i[0]) * e]), t.setLayout(o) + }) + } + + function Rd(t) { + var e = t.coordinateSystem; + if (!e || "view" === e.type) { + var i = e.getBoundingRect(), n = t.getData(), o = n.graph, a = 0, r = n.getSum("value"), + s = 2 * Math.PI / (r || n.count()), l = i.width / 2 + i.x, u = i.height / 2 + i.y, + h = Math.min(i.width, i.height) / 2; + o.eachNode(function (t) { + var e = t.getValue("value"); + a += s * (r ? e : 1) / 2, t.setLayout([h * Math.cos(a) + l, h * Math.sin(a) + u]), a += s * (r ? e : 1) / 2 + }), n.setLayout({cx: l, cy: u}), o.eachEdge(function (t) { + var e, i = t.getModel().get("lineStyle.curveness") || 0, n = W(t.node1.getLayout()), + o = W(t.node2.getLayout()), a = (n[0] + o[0]) / 2, r = (n[1] + o[1]) / 2; + +i && (e = [l * (i *= 3) + a * (1 - i), u * i + r * (1 - i)]), t.setLayout([n, o, e]) + }) + } + } + + function zd(t, e, i) { + for (var n = i.rect, o = n.width, a = n.height, r = [n.x + o / 2, n.y + a / 2], s = null == i.gravity ? .1 : i.gravity, l = 0; l < t.length; l++) { + var u = t[l]; + u.p || (u.p = V(o * (Math.random() - .5) + r[0], a * (Math.random() - .5) + r[1])), u.pp = W(u.p), u.edges = null + } + var h = .6; + return { + warmUp: function () { + h = .5 + }, setFixed: function (e) { + t[e].fixed = !0 + }, setUnfixed: function (e) { + t[e].fixed = !1 + }, step: function (i) { + for (var n = [], o = t.length, a = 0; a < e.length; a++) { + var l = e[a], u = l.n1; + U(n, (p = l.n2).p, u.p); + var c = X(n) - l.d, d = p.w / (u.w + p.w); + isNaN(d) && (d = 0), q(n, n), !u.fixed && IC(u.p, u.p, n, d * c * h), !p.fixed && IC(p.p, p.p, n, -(1 - d) * c * h) + } + for (a = 0; a < o; a++) (v = t[a]).fixed || (U(n, r, v.p), IC(v.p, v.p, n, s * h)); + for (a = 0; a < o; a++) for (var u = t[a], f = a + 1; f < o; f++) { + var p = t[f]; + U(n, p.p, u.p), 0 === (c = X(n)) && (F(n, Math.random() - .5, Math.random() - .5), c = 1); + var g = (u.rep + p.rep) / c / c; + !u.fixed && IC(u.pp, u.pp, n, g), !p.fixed && IC(p.pp, p.pp, n, -g) + } + for (var m = [], a = 0; a < o; a++) { + var v = t[a]; + v.fixed || (U(m, v.p, v.pp), IC(v.p, v.p, m, h), G(v.pp, v.p)) + } + h *= .992, i && i(t, e, h < .01) + } + } + } + + function Bd(t, e, i) { + var n = t.getBoxLayoutParams(); + return n.aspect = i, Qo(n, {width: e.getWidth(), height: e.getHeight()}) + } + + function Vd(t, e) { + var i = t.get("center"), n = e.getWidth(), o = e.getHeight(), a = Math.min(n, o); + return {cx: Do(i[0], e.getWidth()), cy: Do(i[1], e.getHeight()), r: Do(t.get("radius"), a / 2)} + } + + function Gd(t, e) { + return e && ("string" == typeof e ? t = e.replace("{value}", null != t ? t : "") : "function" == typeof e && (t = e(t))), t + } + + function Wd(t, e) { + function i() { + a.ignore = a.hoverIgnore, r.ignore = r.hoverIgnore + } + + function n() { + a.ignore = a.normalIgnore, r.ignore = r.normalIgnore + } + + sw.call(this); + var o = new wS, a = new bS, r = new fS; + this.add(o), this.add(a), this.add(r), this.updateData(t, e, !0), this.on("emphasis", i).on("normal", n).on("mouseover", i).on("mouseout", n) + } + + function Fd(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function Hd(t, e) { + for (var i = t.mapDimension("value"), n = t.mapArray(i, function (t) { + return t + }), o = [], a = "ascending" === e, r = 0, s = t.count(); r < s; r++) o[r] = r; + return "function" == typeof e ? o.sort(e) : "none" !== e && o.sort(function (t, e) { + return a ? n[t] - n[e] : n[e] - n[t] + }), o + } + + function Zd(t) { + t.each(function (e) { + var i, n, o, a, r = t.getItemModel(e), s = r.getModel("label").get("position"), l = r.getModel("labelLine"), + u = t.getItemLayout(e), h = u.points, c = "inner" === s || "inside" === s || "center" === s; + if (c) i = "center", a = [[n = (h[0][0] + h[1][0] + h[2][0] + h[3][0]) / 4, o = (h[0][1] + h[1][1] + h[2][1] + h[3][1]) / 4], [n, o]]; else { + var d, f, p, g = l.get("length"); + "left" === s ? (d = (h[3][0] + h[0][0]) / 2, f = (h[3][1] + h[0][1]) / 2, n = (p = d - g) - 5, i = "right") : (d = (h[1][0] + h[2][0]) / 2, f = (h[1][1] + h[2][1]) / 2, n = (p = d + g) + 5, i = "left"); + var m = f; + a = [[d, f], [p, m]], o = m + } + u.label = {linePoints: a, x: n, y: o, verticalAlign: "middle", textAlign: i, inside: c} + }) + } + + function Ud(t) { + if (!t.parallel) { + var e = !1; + d(t.series, function (t) { + t && "parallel" === t.type && (e = !0) + }), e && (t.parallel = [{}]) + } + } + + function Xd(t) { + d(Si(t.parallelAxis), function (e) { + if (w(e)) { + var i = e.parallelIndex || 0, o = Si(t.parallel)[i]; + o && o.parallelAxisDefault && n(e, o.parallelAxisDefault, !1) + } + }) + } + + function jd(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 Yd(t, e) { + return Math.min(e[1], Math.max(e[0], t)) + } + + function qd(t, e, i) { + this._axesMap = R(), this._axesLayout = {}, this.dimensions = t.dimensions, this._rect, this._model = t, this._init(t, e, i) + } + + function Kd(t, e) { + return OC(EC(t, e[0]), e[1]) + } + + function $d(t, e) { + var i = e.layoutLength / (e.axisCount - 1); + return {position: i * t, axisNameAvailableWidth: i, axisLabelShow: !0} + } + + function Jd(t, e) { + var i, n, o = e.layoutLength, a = e.axisExpandWidth, r = e.axisCount, s = e.axisCollapseWidth, + l = e.winInnerIndices, u = s, h = !1; + return t < l[0] ? (i = t * s, n = s) : t <= l[1] ? (i = e.axisExpandWindow0Pos + t * a - e.axisExpandWindow[0], u = a, h = !0) : (i = o - (r - 1 - t) * s, n = s), { + position: i, + axisNameAvailableWidth: u, + axisLabelShow: h, + nameTruncateMaxWidth: n + } + } + + function Qd(t) { + D_.call(this), this._zr = t, this.group = new sw, this._brushType, this._brushOption, this._panels, this._track = [], this._dragging, this._covers = [], this._creatingCover, this._creatingPanel, this._enableGlobalPan, this._uid = "brushController_" + eL++, this._handlers = {}, HC(iL, function (t, e) { + this._handlers[e] = m(t, this) + }, this) + } + + function tf(t, e) { + var o = t._zr; + t._enableGlobalPan || Dh(o, $C, t._uid), HC(t._handlers, function (t, e) { + o.on(e, t) + }), t._brushType = e.brushType, t._brushOption = n(i(tL), e, !0) + } + + function ef(t) { + var e = t._zr; + Ah(e, $C, t._uid), HC(t._handlers, function (t, i) { + e.off(i, t) + }), t._brushType = t._brushOption = null + } + + function nf(t, e) { + var i = nL[e.brushType].createCover(t, e); + return i.__brushOption = e, rf(i, e), t.group.add(i), i + } + + function of(t, e) { + var i = lf(e); + return i.endCreating && (i.endCreating(t, e), rf(e, e.__brushOption)), e + } + + function af(t, e) { + var i = e.__brushOption; + lf(e).updateCoverShape(t, e, i.range, i) + } + + function rf(t, e) { + var i = e.z; + null == i && (i = YC), t.traverse(function (t) { + t.z = i, t.z2 = i + }) + } + + function sf(t, e) { + lf(e).updateCommon(t, e), af(t, e) + } + + function lf(t) { + return nL[t.__brushOption.brushType] + } + + function uf(t, e, i) { + var n = t._panels; + if (!n) return !0; + var o, a = t._transform; + return HC(n, function (t) { + t.isTargetByCursor(e, i, a) && (o = t) + }), o + } + + function hf(t, e) { + var i = t._panels; + if (!i) return !0; + var n = e.__brushOption.panelId; + return null == n || i[n] + } + + function cf(t) { + var e = t._covers, i = e.length; + return HC(e, function (e) { + t.group.remove(e) + }, t), e.length = 0, !!i + } + + function df(t, e) { + var n = ZC(t._covers, function (t) { + var e = t.__brushOption, n = i(e.range); + return {brushType: e.brushType, panelId: e.panelId, range: n} + }); + t.trigger("brush", n, {isEnd: !!e.isEnd, removeOnClick: !!e.removeOnClick}) + } + + function ff(t) { + var e = t._track; + if (!e.length) return !1; + var i = e[e.length - 1], n = e[0], o = i[0] - n[0], a = i[1] - n[1]; + return jC(o * o + a * a, .5) > qC + } + + function pf(t) { + var e = t.length - 1; + return e < 0 && (e = 0), [t[0], t[e]] + } + + function gf(t, e, i, n) { + var o = new sw; + return o.add(new SS({ + name: "main", + style: xf(i), + silent: !0, + draggable: !0, + cursor: "move", + drift: FC(t, e, o, "nswe"), + ondragend: FC(df, e, {isEnd: !0}) + })), HC(n, function (i) { + o.add(new SS({ + name: i, + style: {opacity: 0}, + draggable: !0, + silent: !0, + invisible: !0, + drift: FC(t, e, o, i), + ondragend: FC(df, e, {isEnd: !0}) + })) + }), o + } + + function mf(t, e, i, n) { + var o = n.brushStyle.lineWidth || 0, a = XC(o, KC), r = i[0][0], s = i[1][0], l = r - o / 2, u = s - o / 2, + h = i[0][1], c = i[1][1], d = h - a + o / 2, f = c - a + o / 2, p = h - r, g = c - s, m = p + o, v = g + o; + yf(t, e, "main", r, s, p, g), n.transformable && (yf(t, e, "w", l, u, a, v), yf(t, e, "e", d, u, a, v), yf(t, e, "n", l, u, m, a), yf(t, e, "s", l, f, m, a), yf(t, e, "nw", l, u, a, a), yf(t, e, "ne", d, u, a, a), yf(t, e, "sw", l, f, a, a), yf(t, e, "se", d, f, a, a)) + } + + function vf(t, e) { + var i = e.__brushOption, n = i.transformable, o = e.childAt(0); + o.useStyle(xf(i)), o.attr({ + silent: !n, + cursor: n ? "move" : "default" + }), HC(["w", "e", "n", "s", "se", "sw", "ne", "nw"], function (i) { + var o = e.childOfName(i), a = bf(t, i); + o && o.attr({silent: !n, invisible: !n, cursor: n ? QC[a] + "-resize" : null}) + }) + } + + function yf(t, e, i, n, o, a, r) { + var s = e.childOfName(i); + s && s.setShape(Df(Tf(t, e, [[n, o], [n + a, o + r]]))) + } + + function xf(t) { + return r({strokeNoScale: !0}, t.brushStyle) + } + + function _f(t, e, i, n) { + var o = [UC(t, i), UC(e, n)], a = [XC(t, i), XC(e, n)]; + return [[o[0], a[0]], [o[1], a[1]]] + } + + function wf(t) { + return go(t.group) + } + + function bf(t, e) { + if (e.length > 1) return ("e" === (n = [bf(t, (e = e.split(""))[0]), bf(t, e[1])])[0] || "w" === n[0]) && n.reverse(), n.join(""); + var i = {left: "w", right: "e", top: "n", bottom: "s"}, + n = vo({w: "left", e: "right", n: "top", s: "bottom"}[e], wf(t)); + return i[n] + } + + function Sf(t, e, i, n, o, a, r, s) { + var l = n.__brushOption, u = t(l.range), h = If(i, a, r); + HC(o.split(""), function (t) { + var e = JC[t]; + u[e[0]][e[1]] += h[e[0]] + }), l.range = e(_f(u[0][0], u[1][0], u[0][1], u[1][1])), sf(i, n), df(i, {isEnd: !1}) + } + + function Mf(t, e, i, n, o) { + var a = e.__brushOption.range, r = If(t, i, n); + HC(a, function (t) { + t[0] += r[0], t[1] += r[1] + }), sf(t, e), df(t, {isEnd: !1}) + } + + function If(t, e, i) { + var n = t.group, o = n.transformCoordToLocal(e, i), a = n.transformCoordToLocal(0, 0); + return [o[0] - a[0], o[1] - a[1]] + } + + function Tf(t, e, n) { + var o = hf(t, e); + return o && !0 !== o ? o.clipPath(n, t._transform) : i(n) + } + + function Df(t) { + var e = UC(t[0][0], t[1][0]), i = UC(t[0][1], t[1][1]); + return {x: e, y: i, width: XC(t[0][0], t[1][0]) - e, height: XC(t[0][1], t[1][1]) - i} + } + + function Af(t, e, i) { + if (t._brushType) { + var n = t._zr, o = t._covers, a = uf(t, e, i); + if (!t._dragging) for (var r = 0; r < o.length; r++) { + var s = o[r].__brushOption; + if (a && (!0 === a || s.panelId === a.panelId) && nL[s.brushType].contain(o[r], i[0], i[1])) return + } + a && n.setCursorStyle("crosshair") + } + } + + function Cf(t) { + var e = t.event; + e.preventDefault && e.preventDefault() + } + + function Lf(t, e, i) { + return t.childOfName("main").contain(e, i) + } + + function kf(t, e, n, o) { + var a, r = t._creatingCover, s = t._creatingPanel, l = t._brushOption; + if (t._track.push(n.slice()), ff(t) || r) { + if (s && !r) { + "single" === l.brushMode && cf(t); + var u = i(l); + u.brushType = Pf(u.brushType, s), u.panelId = !0 === s ? null : s.panelId, r = t._creatingCover = nf(t, u), t._covers.push(r) + } + if (r) { + var h = nL[Pf(t._brushType, s)]; + r.__brushOption.range = h.getCreatingRange(Tf(t, r, t._track)), o && (of(t, r), h.updateCommon(t, r)), af(t, r), a = {isEnd: o} + } + } else o && "single" === l.brushMode && l.removeOnClick && uf(t, e, n) && cf(t) && (a = { + isEnd: o, + removeOnClick: !0 + }); + return a + } + + function Pf(t, e) { + return "auto" === t ? e.defaultBrushType : t + } + + function Nf(t) { + if (this._dragging) { + Cf(t); + var e = kf(this, t, this.group.transformCoordToLocal(t.offsetX, t.offsetY), !0); + this._dragging = !1, this._track = [], this._creatingCover = null, e && df(this, e) + } + } + + function Of(t) { + return { + createCover: function (e, i) { + return gf(FC(Sf, 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 = pf(e); + return [UC(i[0][t], i[1][t]), XC(i[0][t], i[1][t])] + }, updateCoverShape: function (e, i, n, o) { + var a, r = hf(e, i); + if (!0 !== r && r.getLinearBrushOtherExtent) a = r.getLinearBrushOtherExtent(t, e._transform); else { + var s = e._zr; + a = [0, [s.getWidth(), s.getHeight()][1 - t]] + } + var l = [n, a]; + t && l.reverse(), mf(e, i, l, o) + }, updateCommon: vf, contain: Lf + } + } + + function Ef(t) { + return t = Bf(t), function (e, i) { + return xo(e, t) + } + } + + function Rf(t, e) { + return t = Bf(t), function (i) { + var n = null != e ? e : i, o = n ? t.width : t.height, a = n ? t.x : t.y; + return [a, a + (o || 0)] + } + } + + function zf(t, e, i) { + return t = Bf(t), function (n, o, a) { + return t.contain(o[0], o[1]) && !Wh(n, e, i) + } + } + + function Bf(t) { + return $t.create(t) + } + + function Vf(t, e, i) { + return i && "axisAreaSelect" === i.type && e.findComponents({mainType: "parallelAxis", query: i})[0] === t + } + + function Gf(t) { + var e = t.axis; + return f(t.activeIntervals, function (t) { + return {brushType: "lineX", panelId: "pl", range: [e.dataToCoord(t[0], !0), e.dataToCoord(t[1], !0)]} + }) + } + + function Wf(t, e) { + return e.getComponent("parallel", t.get("parallelIndex")) + } + + function Ff(t, e) { + var i = t._model; + return i.get("axisExpandable") && i.get("axisExpandTriggerOn") === e + } + + function Hf(t, e) { + if (!t.encodeDefine) { + var i = e.ecModel.getComponent("parallel", e.get("parallelIndex")); + if (i) { + var n = t.encodeDefine = R(); + d(i.dimensions, function (t) { + var e = Zf(t); + n.set(t, e) + }) + } + } + } + + function Zf(t) { + return +t.replace("dim", "") + } + + function Uf(t, e, i) { + var n = t.model, o = t.getRect(), a = new SS({shape: {x: o.x, y: o.y, width: o.width, height: o.height}}), + r = "horizontal" === n.get("layout") ? "width" : "height"; + return a.setShape(r, 0), po(a, {shape: {width: o.width, height: o.height}}, e, i), a + } + + function Xf(t, e, i, n) { + for (var o = [], a = 0; a < i.length; a++) { + var r = i[a], s = t.get(t.mapDimension(r), e); + Kf(s, n.getAxis(r).type) || o.push(n.dataToPoint(s, r)) + } + return o + } + + function jf(t, e, i, n, o) { + var a = Xf(t, i, n, o), r = new bS({shape: {points: a}, silent: !0, z2: 10}); + return e.add(r), t.setItemGraphicEl(i, r), r + } + + function Yf(t) { + var e = t.get("smooth", !0); + return !0 === e && (e = sL), {lineStyle: t.getModel("lineStyle").getLineStyle(), smooth: null != e ? e : sL} + } + + function qf(t, e, i, n) { + var o = n.lineStyle; + e.hasItemOption && (o = e.getItemModel(i).getModel("lineStyle").getLineStyle()), t.useStyle(o); + var a = t.style; + a.fill = null, a.stroke = e.getItemVisual(i, "color"), a.opacity = e.getItemVisual(i, "opacity"), n.smooth && (t.shape.smooth = n.smooth) + } + + function Kf(t, e) { + return "category" === e ? null == t : null == t || isNaN(t) + } + + function $f(t, e, i) { + var n = new SS({shape: {x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20}}); + return po(n, {shape: {width: t.width + 20, height: t.height + 20}}, e, i), n + } + + function Jf() { + function t(e, n) { + if (n >= i.length) return e; + for (var o = -1, a = e.length, r = i[n++], s = {}, l = {}; ++o < a;) { + var u = r(e[o]), h = l[u]; + h ? h.push(e[o]) : l[u] = [e[o]] + } + return d(l, function (e, i) { + s[i] = t(e, n) + }), s + } + + function e(t, o) { + if (o >= i.length) return t; + var a = [], r = n[o++]; + return d(t, function (t, i) { + a.push({key: i, values: e(t, o)}) + }), r ? a.sort(function (t, e) { + return r(t.key, e.key) + }) : a + } + + var i = [], n = []; + return { + key: function (t) { + return i.push(t), this + }, sortKeys: function (t) { + return n[i.length - 1] = t, this + }, entries: function (i) { + return e(t(i, 0), 0) + } + } + } + + function Qf(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}) + } + + function tp(t, e, i, n, o, a, r) { + ip(t, e, i, o), ap(t, e, a, n, r), dp(t) + } + + function ep(t) { + d(t, function (t) { + var e = gp(t.outEdges, xp), i = gp(t.inEdges, xp), n = Math.max(e, i); + t.setLayout({value: n}, !0) + }) + } + + function ip(t, e, i, n) { + for (var o = [], a = [], r = [], s = [], l = 0, u = 0; u < e.length; u++) o[u] = 1; + for (u = 0; u < t.length; u++) a[u] = t[u].inEdges.length, 0 === a[u] && r.push(t[u]); + for (; r.length;) d(r, function (n) { + n.setLayout({x: l}, !0), n.setLayout({dx: i}, !0), d(n.outEdges, function (i) { + var n = e.indexOf(i); + o[n] = 0; + var r = i.node2, l = t.indexOf(r); + 0 == --a[l] && s.push(r) + }) + }), ++l, r = s, s = []; + for (u = 0; u < o.length; u++) ; + np(t, l), op(t, (n - i) / (l - 1)) + } + + function np(t, e) { + d(t, function (t) { + t.outEdges.length || t.setLayout({x: e - 1}, !0) + }) + } + + function op(t, e) { + d(t, function (t) { + var i = t.getLayout().x * e; + t.setLayout({x: i}, !0) + }) + } + + function ap(t, e, i, n, o) { + var a = Jf().key(function (t) { + return t.getLayout().x + }).sortKeys(yp).entries(t).map(function (t) { + return t.values + }); + rp(t, a, e, i, n), sp(a, n, i); + for (var r = 1; o > 0; o--) lp(a, r *= .99), sp(a, n, i), hp(a, r), sp(a, n, i) + } + + function rp(t, e, i, n, o) { + var a = []; + d(e, function (t) { + var e = t.length, i = 0; + d(t, function (t) { + i += t.getLayout().value + }); + var r = (n - (e - 1) * o) / i; + a.push(r) + }), a.sort(function (t, e) { + return t - e + }); + var r = a[0]; + d(e, function (t) { + d(t, function (t, e) { + t.setLayout({y: e}, !0); + var i = t.getLayout().value * r; + t.setLayout({dy: i}, !0) + }) + }), d(i, function (t) { + var e = +t.getValue() * r; + t.setLayout({dy: e}, !0) + }) + } + + function sp(t, e, i) { + d(t, function (t) { + var n, o, a, r = 0, s = t.length; + for (t.sort(vp), a = 0; a < s; a++) { + if (n = t[a], (o = r - n.getLayout().y) > 0) { + l = n.getLayout().y + o; + n.setLayout({y: l}, !0) + } + r = n.getLayout().y + n.getLayout().dy + e + } + if ((o = r - e - i) > 0) { + var l = n.getLayout().y - o; + for (n.setLayout({y: l}, !0), r = n.getLayout().y, a = s - 2; a >= 0; --a) (o = (n = t[a]).getLayout().y + n.getLayout().dy + e - r) > 0 && (l = n.getLayout().y - o, n.setLayout({y: l}, !0)), r = n.getLayout().y + } + }) + } + + function lp(t, e) { + d(t.slice().reverse(), function (t) { + d(t, function (t) { + if (t.outEdges.length) { + var i = gp(t.outEdges, up) / gp(t.outEdges, xp), n = t.getLayout().y + (i - mp(t)) * e; + t.setLayout({y: n}, !0) + } + }) + }) + } + + function up(t) { + return mp(t.node2) * t.getValue() + } + + function hp(t, e) { + d(t, function (t) { + d(t, function (t) { + if (t.inEdges.length) { + var i = gp(t.inEdges, cp) / gp(t.inEdges, xp), n = t.getLayout().y + (i - mp(t)) * e; + t.setLayout({y: n}, !0) + } + }) + }) + } + + function cp(t) { + return mp(t.node1) * t.getValue() + } + + function dp(t) { + d(t, function (t) { + t.outEdges.sort(fp), t.inEdges.sort(pp) + }), d(t, function (t) { + var e = 0, i = 0; + d(t.outEdges, function (t) { + t.setLayout({sy: e}, !0), e += t.getLayout().dy + }), d(t.inEdges, function (t) { + t.setLayout({ty: i}, !0), i += t.getLayout().dy + }) + }) + } + + function fp(t, e) { + return t.node2.getLayout().y - e.node2.getLayout().y + } + + function pp(t, e) { + return t.node1.getLayout().y - e.node1.getLayout().y + } + + function gp(t, e) { + for (var i = 0, n = t.length, o = -1; ++o < n;) { + var a = +e.call(t, t[o], o); + isNaN(a) || (i += a) + } + return i + } + + function mp(t) { + return t.getLayout().y + t.getLayout().dy / 2 + } + + function vp(t, e) { + return t.getLayout().y - e.getLayout().y + } + + function yp(t, e) { + return t - e + } + + function xp(t) { + return t.getValue() + } + + function _p(t, e, i, n, o) { + var a = t.ends, r = new pL({shape: {points: o ? bp(a, n, t) : a}}); + return wp(t, r, e, i, o), r + } + + function wp(t, e, i, n, o) { + var a = i.hostModel; + (0, BS[o ? "initProps" : "updateProps"])(e, {shape: {points: t.ends}}, a, n); + var r = i.getItemModel(n), s = r.getModel(dL), l = i.getItemVisual(n, "color"), + u = s.getItemStyle(["borderColor"]); + u.stroke = l, u.strokeNoScale = !0, e.useStyle(u), e.z2 = 100, eo(e, r.getModel(fL).getItemStyle()) + } + + function bp(t, e, i) { + return f(t, function (t) { + return t = t.slice(), t[e] = i.initBaseline, t + }) + } + + function Sp(t) { + var e = [], i = []; + return t.eachSeriesByType("boxplot", function (t) { + var n = t.getBaseAxis(), o = l(i, n); + o < 0 && (o = i.length, i[o] = n, e[o] = {axis: n, seriesModels: []}), e[o].seriesModels.push(t) + }), e + } + + function Mp(t) { + var e, i, n = t.axis, o = t.seriesModels, a = o.length, r = t.boxWidthList = [], s = t.boxOffsetList = [], + l = []; + if ("category" === n.type) i = n.getBandWidth(); else { + var u = 0; + mL(o, function (t) { + u = Math.max(u, t.getData().count()) + }), e = n.getExtent(), Math.abs(e[1] - e[0]) + } + mL(o, function (t) { + var e = t.get("boxWidth"); + y(e) || (e = [e, e]), l.push([Do(e[0], i) || 0, Do(e[1], i) || 0]) + }); + var h = .8 * i - 2, c = h / a * .3, d = (h - c * (a - 1)) / a, f = d / 2 - h / 2; + mL(o, function (t, e) { + s.push(f), f += c + d, r.push(Math.min(Math.max(d, l[e][0]), l[e][1])) + }) + } + + function Ip(t, e, i) { + function n(t, i, n) { + var o = s.get(i, n), a = []; + a[u] = t, a[h] = o; + var l; + return isNaN(t) || isNaN(o) ? l = [NaN, NaN] : (l = r.dataToPoint(a))[u] += e, l + } + + function o(t, e, i) { + var n = e.slice(), o = e.slice(); + n[u] += l, o[u] -= l, i ? t.push(n, o) : t.push(o, n) + } + + function a(t, e) { + var i = e.slice(), n = e.slice(); + i[u] -= l, n[u] += l, t.push(i, n) + } + + var r = t.coordinateSystem, s = t.getData(), l = i / 2, u = "horizontal" === t.get("layout") ? 0 : 1, h = 1 - u, + c = ["x", "y"], d = s.mapDimension(c[u]), f = s.mapDimension(c[h], !0); + if (!(null == d || f.length < 5)) for (var p = 0; p < s.count(); p++) { + var g = s.get(d, p), m = n(g, f[2], p), v = n(g, f[0], p), y = n(g, f[1], p), x = n(g, f[3], p), + _ = n(g, f[4], p), w = []; + o(w, y, 0), o(w, x, 1), w.push(v, y, _, x), a(w, v), a(w, _), a(w, m), s.setItemLayout(p, { + initBaseline: m[h], + ends: w + }) + } + } + + function Tp(t, e, i) { + var n = t.ends; + return new _L({shape: {points: i ? Ap(n, t) : n}, z2: 100}) + } + + function Dp(t, e, i, n) { + var o = e.getItemModel(i), a = o.getModel(vL), r = e.getItemVisual(i, "color"), + s = e.getItemVisual(i, "borderColor") || r, l = a.getItemStyle(xL); + t.useStyle(l), t.style.strokeNoScale = !0, t.style.fill = r, t.style.stroke = s, t.__simpleBox = n, eo(t, o.getModel(yL).getItemStyle()) + } + + function Ap(t, e) { + return f(t, function (t) { + return t = t.slice(), t[1] = e.initBaseline, t + }) + } + + function Cp(t, e, i) { + var n = t.getData(), o = n.getLayout("largePoints"), a = new wL({shape: {points: o}, __sign: 1}); + e.add(a); + var r = new wL({shape: {points: o}, __sign: -1}); + e.add(r), Lp(1, a, t, n), Lp(-1, r, t, n), i && (a.incremental = !0, r.incremental = !0) + } + + function Lp(t, e, i, n) { + var o = t > 0 ? "P" : "N", a = n.getVisual("borderColor" + o) || n.getVisual("color" + o), + r = i.getModel(vL).getItemStyle(xL); + e.useStyle(r), e.style.fill = null, e.style.stroke = a + } + + function kp(t, e, i, n, o) { + return i > n ? -1 : i < n ? 1 : e > 0 ? t.get(o, e - 1) <= n ? 1 : -1 : 1 + } + + function Pp(t, e) { + var i, n = t.getBaseAxis(), + o = "category" === n.type ? n.getBandWidth() : (i = n.getExtent(), Math.abs(i[1] - i[0]) / e.count()), + a = Do(D(t.get("barMaxWidth"), o), o), r = Do(D(t.get("barMinWidth"), 1), o), s = t.get("barWidth"); + return null != s ? Do(s, o) : Math.max(Math.min(o / 2, a), r) + } + + function Np(t) { + return y(t) || (t = [+t, +t]), t + } + + function Op(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 Ep(t, e) { + sw.call(this); + var i = new Kl(t, e), n = new sw; + this.add(i), this.add(n), n.beforeUpdate = function () { + this.attr(i.getScale()) + }, this.updateData(t, e) + } + + function Rp(t) { + var e = t.data; + e && e[0] && e[0][0] && e[0][0].coord && (t.data = f(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), o([e, t[0], t[1]]) + })) + } + + function zp(t, e, i) { + sw.call(this), this.add(this.createLine(t, e, i)), this._updateEffectSymbol(t, e) + } + + function Bp(t, e, i) { + sw.call(this), this._createPolyline(t, e, i) + } + + function Vp(t, e, i) { + zp.call(this, t, e, i), this._lastFrame = 0, this._lastFramePercent = 0 + } + + function Gp() { + this.group = new sw + } + + function Wp(t) { + return t instanceof Array || (t = [t, t]), t + } + + function Fp() { + var t = m_(); + this.canvas = t, this.blurSize = 30, this.pointSize = 20, this.maxOpacity = 1, this.minOpacity = 0, this._gradientPixels = {} + } + + function Hp(t, e, i) { + var n = t[1] - t[0], o = (e = f(e, function (e) { + return {interval: [(e.interval[0] - t[0]) / n, (e.interval[1] - t[0]) / n]} + })).length, a = 0; + return function (t) { + for (n = a; n < o; n++) if ((r = e[n].interval)[0] <= t && t <= r[1]) { + a = n; + break + } + if (n === o) for (var n = a - 1; n >= 0; n--) { + var r = e[n].interval; + if (r[0] <= t && t <= r[1]) { + a = n; + break + } + } + return n >= 0 && n < o && i[n] + } + } + + function Zp(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] + } + } + + function Up(t) { + var e = t.dimensions; + return "lng" === e[0] && "lat" === e[1] + } + + function Xp(t, e, i, n) { + var o = t.getItemLayout(e), a = i.get("symbolRepeat"), r = i.get("symbolClip"), + s = i.get("symbolPosition") || "start", l = (i.get("symbolRotate") || 0) * Math.PI / 180 || 0, + u = i.get("symbolPatternSize") || 2, h = i.isAnimationEnabled(), c = { + dataIndex: e, + layout: o, + itemModel: i, + symbolType: t.getItemVisual(e, "symbol") || "circle", + color: t.getItemVisual(e, "color"), + symbolClip: r, + symbolRepeat: a, + symbolRepeatDirection: i.get("symbolRepeatDirection"), + symbolPatternSize: u, + rotation: l, + animationModel: h ? i : null, + hoverAnimation: h && i.get("hoverAnimation"), + z2: i.getShallow("z", !0) || 0 + }; + jp(i, a, o, n, c), qp(t, e, o, a, r, c.boundingLength, c.pxSign, u, n, c), Kp(i, c.symbolScale, l, n, c); + var d = c.symbolSize, f = i.get("symbolOffset"); + return y(f) && (f = [Do(f[0], d[0]), Do(f[1], d[1])]), $p(i, d, o, a, r, f, s, c.valueLineWidth, c.boundingLength, c.repeatCutLength, n, c), c + } + + function jp(t, e, i, n, o) { + var a, r = n.valueDim, s = t.get("symbolBoundingData"), l = n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()), + u = l.toGlobalCoord(l.dataToCoord(0)), h = 1 - +(i[r.wh] <= 0); + if (y(s)) { + var c = [Yp(l, s[0]) - u, Yp(l, s[1]) - u]; + c[1] < c[0] && c.reverse(), a = c[h] + } else a = null != s ? Yp(l, s) - u : e ? n.coordSysExtent[r.index][h] - u : i[r.wh]; + o.boundingLength = a, e && (o.repeatCutLength = i[r.wh]), o.pxSign = a > 0 ? 1 : a < 0 ? -1 : 0 + } + + function Yp(t, e) { + return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e))) + } + + function qp(t, e, i, n, o, a, r, s, l, u) { + var h = l.valueDim, c = l.categoryDim, d = Math.abs(i[c.wh]), f = t.getItemVisual(e, "symbolSize"); + y(f) ? f = f.slice() : (null == f && (f = "100%"), f = [f, f]), f[c.index] = Do(f[c.index], d), f[h.index] = Do(f[h.index], n ? d : Math.abs(a)), u.symbolSize = f, (u.symbolScale = [f[0] / s, f[1] / s])[h.index] *= (l.isHorizontal ? -1 : 1) * r + } + + function Kp(t, e, i, n, o) { + var a = t.get(FL) || 0; + a && (ZL.attr({ + scale: e.slice(), + rotation: i + }), ZL.updateTransform(), a /= ZL.getLineScale(), a *= e[n.valueDim.index]), o.valueLineWidth = a + } + + function $p(t, e, i, n, o, r, s, l, u, h, c, d) { + var f = c.categoryDim, p = c.valueDim, g = d.pxSign, m = Math.max(e[p.index] + l, 0), v = m; + if (n) { + var y = Math.abs(u), x = T(t.get("symbolMargin"), "15%") + "", _ = !1; + x.lastIndexOf("!") === x.length - 1 && (_ = !0, x = x.slice(0, x.length - 1)), x = Do(x, e[p.index]); + var w = Math.max(m + 2 * x, 0), b = _ ? 0 : 2 * x, S = Wo(n), M = S ? n : pg((y + b) / w); + w = m + 2 * (x = (y - M * m) / 2 / (_ ? M : M - 1)), b = _ ? 0 : 2 * x, S || "fixed" === n || (M = h ? pg((Math.abs(h) + b) / w) : 0), v = M * w - b, d.repeatTimes = M, d.symbolMargin = x + } + var I = g * (v / 2), D = d.pathPosition = []; + D[f.index] = i[f.wh] / 2, D[p.index] = "start" === s ? I : "end" === s ? u - I : u / 2, r && (D[0] += r[0], D[1] += r[1]); + var A = d.bundlePosition = []; + A[f.index] = i[f.xy], A[p.index] = i[p.xy]; + var C = d.barRectShape = a({}, i); + C[p.wh] = g * Math.max(Math.abs(i[p.wh]), Math.abs(D[p.index] + I)), C[f.wh] = i[f.wh]; + var L = d.clipShape = {}; + L[f.xy] = -i[f.xy], L[f.wh] = c.ecSize[f.wh], L[p.xy] = 0, L[p.wh] = i[p.wh] + } + + function Jp(t) { + var e = t.symbolPatternSize, i = Tl(t.symbolType, -e / 2, -e / 2, e, e, t.color); + return i.attr({culling: !0}), "image" !== i.type && i.setStyle({strokeNoScale: !0}), i + } + + function Qp(t, e, i, n) { + function o(t) { + var e = l.slice(), n = i.pxSign, o = t; + return ("start" === i.symbolRepeatDirection ? n > 0 : n < 0) && (o = h - 1 - t), e[u.index] = d * (o - h / 2 + .5) + l[u.index], { + position: e, + scale: i.symbolScale.slice(), + rotation: i.rotation + } + } + + var a = t.__pictorialBundle, r = i.symbolSize, s = i.valueLineWidth, l = i.pathPosition, u = e.valueDim, + h = i.repeatTimes || 0, c = 0, d = r[e.valueDim.index] + s + 2 * i.symbolMargin; + for (cg(t, function (t) { + t.__pictorialAnimationIndex = c, t.__pictorialRepeatTimes = h, c < h ? dg(t, null, o(c), i, n) : dg(t, null, {scale: [0, 0]}, i, n, function () { + a.remove(t) + }), rg(t, i), c++ + }); c < h; c++) { + var f = Jp(i); + f.__pictorialAnimationIndex = c, f.__pictorialRepeatTimes = h, a.add(f); + var p = o(c); + dg(f, {position: p.position, scale: [0, 0]}, { + scale: p.scale, + rotation: p.rotation + }, i, n), f.on("mouseover", function () { + cg(t, function (t) { + t.trigger("emphasis") + }) + }).on("mouseout", function () { + cg(t, function (t) { + t.trigger("normal") + }) + }), rg(f, i) + } + } + + function tg(t, e, i, n) { + var o = t.__pictorialBundle, a = t.__pictorialMainPath; + a ? dg(a, null, { + position: i.pathPosition.slice(), + scale: i.symbolScale.slice(), + rotation: i.rotation + }, i, n) : (a = t.__pictorialMainPath = Jp(i), o.add(a), dg(a, { + position: i.pathPosition.slice(), + scale: [0, 0], + rotation: i.rotation + }, {scale: i.symbolScale.slice()}, i, n), a.on("mouseover", function () { + this.trigger("emphasis") + }).on("mouseout", function () { + this.trigger("normal") + })), rg(a, i) + } + + function eg(t, e, i) { + var n = a({}, e.barRectShape), o = t.__pictorialBarRect; + o ? dg(o, null, {shape: n}, e, i) : (o = t.__pictorialBarRect = new SS({ + z2: 2, + shape: n, + silent: !0, + style: {stroke: "transparent", fill: "transparent", lineWidth: 0} + }), t.add(o)) + } + + function ig(t, e, i, n) { + if (i.symbolClip) { + var o = t.__pictorialClipPath, r = a({}, i.clipShape), s = e.valueDim, l = i.animationModel, + u = i.dataIndex; + if (o) fo(o, {shape: r}, l, u); else { + r[s.wh] = 0, o = new SS({shape: r}), t.__pictorialBundle.setClipPath(o), t.__pictorialClipPath = o; + var h = {}; + h[s.wh] = i.clipShape[s.wh], BS[n ? "updateProps" : "initProps"](o, {shape: h}, l, u) + } + } + } + + function ng(t, e) { + var i = t.getItemModel(e); + return i.getAnimationDelayParams = og, i.isAnimationEnabled = ag, i + } + + function og(t) { + return {index: t.__pictorialAnimationIndex, count: t.__pictorialRepeatTimes} + } + + function ag() { + return this.parentModel.isAnimationEnabled() && !!this.getShallow("animation") + } + + function rg(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 sg(t, e, i, n) { + var o = new sw, a = new sw; + return o.add(a), o.__pictorialBundle = a, a.attr("position", i.bundlePosition.slice()), i.symbolRepeat ? Qp(o, e, i) : tg(o, e, i), eg(o, i, n), ig(o, e, i, n), o.__pictorialShapeStr = hg(t, i), o.__pictorialSymbolMeta = i, o + } + + function lg(t, e, i) { + var n = i.animationModel, o = i.dataIndex; + fo(t.__pictorialBundle, {position: i.bundlePosition.slice()}, n, o), i.symbolRepeat ? Qp(t, e, i, !0) : tg(t, e, i, !0), eg(t, i, !0), ig(t, e, i, !0) + } + + function ug(t, e, i, n) { + var o = n.__pictorialBarRect; + o && (o.style.text = null); + var a = []; + cg(n, function (t) { + a.push(t) + }), n.__pictorialMainPath && a.push(n.__pictorialMainPath), n.__pictorialClipPath && (i = null), d(a, function (t) { + fo(t, {scale: [0, 0]}, i, e, function () { + n.parent && n.parent.remove(n) + }) + }), t.setItemGraphicEl(e, null) + } + + function hg(t, e) { + return [t.getItemVisual(e.dataIndex, "symbol") || "none", !!e.symbolRepeat, !!e.symbolClip].join(":") + } + + function cg(t, e, i) { + d(t.__pictorialBundle.children(), function (n) { + n !== t.__pictorialBarRect && e.call(i, n) + }) + } + + function dg(t, e, i, n, o, a) { + e && t.attr(e), n.symbolClip && !o ? i && t.attr(i) : i && BS[o ? "updateProps" : "initProps"](t, i, n.animationModel, n.dataIndex, a) + } + + function fg(t, e, i) { + var n = i.color, o = i.dataIndex, a = i.itemModel, s = a.getModel("itemStyle").getItemStyle(["color"]), + l = a.getModel("emphasis.itemStyle").getItemStyle(), u = a.getShallow("cursor"); + cg(t, function (t) { + t.setColor(n), t.setStyle(r({fill: n, opacity: i.opacity}, s)), eo(t, l), u && (t.cursor = u), t.z2 = i.z2 + }); + var h = {}, c = e.valueDim.posDesc[+(i.boundingLength > 0)], d = t.__pictorialBarRect; + ih(d.style, h, a, n, e.seriesModel, o, c), eo(d, h) + } + + function pg(t) { + var e = Math.round(t); + return Math.abs(t - e) < 1e-4 ? e : Math.ceil(t) + } + + function gg(t, e, i) { + this.dimension = "single", this.dimensions = ["single"], this._axis = null, this._rect, this._init(t, e, i), this.model = t + } + + function mg(t, e) { + e = e || {}; + var i = t.coordinateSystem, n = t.axis, o = {}, a = n.position, r = n.orient, s = i.getRect(), + l = [s.x, s.x + s.width, s.y, s.y + s.height], + u = {horizontal: {top: l[2], bottom: l[3]}, vertical: {left: l[0], right: l[1]}}; + o.position = ["vertical" === r ? u.vertical[a] : l[0], "horizontal" === r ? u.horizontal[a] : l[3]]; + var h = {horizontal: 0, vertical: 1}; + o.rotation = Math.PI / 2 * h[r]; + var c = {top: -1, bottom: 1, right: 1, left: -1}; + o.labelDirection = o.tickDirection = o.nameDirection = c[a], t.get("axisTick.inside") && (o.tickDirection = -o.tickDirection), T(e.labelInside, t.get("axisLabel.inside")) && (o.labelDirection = -o.labelDirection); + var d = e.rotate; + return null == d && (d = t.get("axisLabel.rotate")), o.labelRotation = "top" === a ? -d : d, o.z2 = 1, o + } + + function vg(t, e, i, n, o) { + var r = t.axis; + if (!r.scale.isBlank() && r.containData(e)) if (t.involveSeries) { + var s = yg(e, t), l = s.payloadBatch, u = s.snapToValue; + l[0] && null == o.seriesIndex && a(o, l[0]), !n && t.snap && r.containData(u) && null != u && (e = u), i.showPointer(t, e, l, o), i.showTooltip(t, s, u) + } else i.showPointer(t, e) + } + + function yg(t, e) { + var i = e.axis, n = i.dim, o = t, a = [], r = Number.MAX_VALUE, s = -1; + return $L(e.seriesModels, function (e, l) { + var u, h, c = e.getData().mapDimension(n, !0); + if (e.getAxisTooltipData) { + var d = e.getAxisTooltipData(c, t, i); + h = d.dataIndices, u = d.nestestValue + } else { + if (!(h = e.getData().indicesOfNearest(c[0], t, "category" === i.type ? .5 : null)).length) return; + u = e.getData().get(c[0], h[0]) + } + if (null != u && isFinite(u)) { + var f = t - u, p = Math.abs(f); + p <= r && ((p < r || f >= 0 && s < 0) && (r = p, s = f, o = u, a.length = 0), $L(h, function (t) { + a.push({seriesIndex: e.seriesIndex, dataIndexInside: t, dataIndex: e.getData().getRawIndex(t)}) + })) + } + }), {payloadBatch: a, snapToValue: o} + } + + function xg(t, e, i, n) { + t[e.key] = {value: i, payloadBatch: n} + } + + function _g(t, e, i, n) { + var o = i.payloadBatch, a = e.axis, r = a.model, s = e.axisPointerModel; + if (e.triggerTooltip && o.length) { + var l = e.coordSys.model, u = Ju(l), h = t.map[u]; + h || (h = t.map[u] = { + coordSysId: l.id, + coordSysIndex: l.componentIndex, + coordSysType: l.type, + coordSysMainType: l.mainType, + dataByAxis: [] + }, t.list.push(h)), h.dataByAxis.push({ + axisDim: a.dim, + axisIndex: r.componentIndex, + axisType: r.type, + axisId: r.id, + value: n, + valueLabelOpt: {precision: s.get("label.precision"), formatter: s.get("label.formatter")}, + seriesDataIndices: o.slice() + }) + } + } + + function wg(t, e, i) { + var n = i.axesInfo = []; + $L(e, function (e, i) { + var o = e.axisPointerModel.option, a = t[i]; + a ? (!e.useHandle && (o.status = "show"), o.value = a.value, o.seriesDataIndices = (a.payloadBatch || []).slice()) : !e.useHandle && (o.status = "hide"), "show" === o.status && n.push({ + axisDim: e.axis.dim, + axisIndex: e.axis.model.componentIndex, + value: o.value + }) + }) + } + + function bg(t, e, i, n) { + if (!Tg(e) && t.list.length) { + var o = ((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: o.dataIndexInside, + dataIndex: o.dataIndex, + seriesIndex: o.seriesIndex, + dataByCoordSys: t.list + }) + } else n({type: "hideTip"}) + } + + function Sg(t, e, i) { + var n = i.getZr(), o = QL(n).axisPointerLastHighlights || {}, a = QL(n).axisPointerLastHighlights = {}; + $L(t, function (t, e) { + var i = t.axisPointerModel.option; + "show" === i.status && $L(i.seriesDataIndices, function (t) { + var e = t.seriesIndex + " | " + t.dataIndex; + a[e] = t + }) + }); + var r = [], s = []; + d(o, function (t, e) { + !a[e] && s.push(t) + }), d(a, function (t, e) { + !o[e] && r.push(t) + }), s.length && i.dispatchAction({ + type: "downplay", + escapeConnect: !0, + batch: s + }), r.length && i.dispatchAction({type: "highlight", escapeConnect: !0, batch: r}) + } + + function Mg(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 + } + } + + function Ig(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 Tg(t) { + return !t || null == t[0] || isNaN(t[0]) || null == t[1] || isNaN(t[1]) + } + + function Dg(t, e, i) { + if (!a_.node) { + var n = e.getZr(); + tk(n).records || (tk(n).records = {}), Ag(n, e), (tk(n).records[t] || (tk(n).records[t] = {})).handler = i + } + } + + function Ag(t, e) { + function i(i, n) { + t.on(i, function (i) { + var o = Pg(e); + ek(tk(t).records, function (t) { + t && n(t, i, o.dispatchAction) + }), Cg(o.pendings, e) + }) + } + + tk(t).initialized || (tk(t).initialized = !0, i("click", v(kg, "click")), i("mousemove", v(kg, "mousemove")), i("globalout", Lg)) + } + + function Cg(t, e) { + var i, n = t.showTip.length, o = t.hideTip.length; + n ? i = t.showTip[n - 1] : o && (i = t.hideTip[o - 1]), i && (i.dispatchAction = null, e.dispatchAction(i)) + } + + function Lg(t, e, i) { + t.handler("leave", null, i) + } + + function kg(t, e, i, n) { + e.handler(t, i, n) + } + + function Pg(t) { + var e = {showTip: [], hideTip: []}, i = function (n) { + var o = e[n.type]; + o ? o.push(n) : (n.dispatchAction = i, t.dispatchAction(n)) + }; + return {dispatchAction: i, pendings: e} + } + + function Ng(t, e) { + if (!a_.node) { + var i = e.getZr(); + (tk(i).records || {})[t] && (tk(i).records[t] = null) + } + } + + function Og() { + } + + function Eg(t, e, i, n) { + Rg(nk(i).lastProp, n) || (nk(i).lastProp = n, e ? fo(i, n, t) : (i.stopAnimation(), i.attr(n))) + } + + function Rg(t, e) { + if (w(t) && w(e)) { + var i = !0; + return d(e, function (e, n) { + i = i && Rg(t[n], e) + }), !!i + } + return t === e + } + + function zg(t, e) { + t[e.get("label.show") ? "show" : "hide"]() + } + + function Bg(t) { + return {position: t.position.slice(), rotation: t.rotation || 0} + } + + function Vg(t, e, i) { + var n = e.get("z"), o = e.get("zlevel"); + t && t.traverse(function (t) { + "group" !== t.type && (null != n && (t.z = n), null != o && (t.zlevel = o), t.silent = i) + }) + } + + function Gg(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 + } + + function Wg(t, e, i, n, o) { + var a = Hg(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 = KS(r.get("padding") || 0), l = r.getFont(), u = me(a, l), h = o.position, + c = u.width + s[1] + s[3], d = u.height + s[0] + s[2], f = o.align; + "right" === f && (h[0] -= c), "center" === f && (h[0] -= c / 2); + var p = o.verticalAlign; + "bottom" === p && (h[1] -= d), "middle" === p && (h[1] -= d / 2), Fg(h, 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: h.slice(), + style: { + text: a, + 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 Fg(t, e, i, n) { + var o = n.getWidth(), a = n.getHeight(); + t[0] = Math.min(t[0] + e, o) - e, t[1] = Math.min(t[1] + i, a) - i, t[0] = Math.max(t[0], 0), t[1] = Math.max(t[1], 0) + } + + function Hg(t, e, i, n, o) { + t = e.scale.parse(t); + var a = e.scale.getLabel(t, {precision: o.precision}), r = o.formatter; + if (r) { + var s = {value: bl(e, t), seriesData: []}; + d(n, function (t) { + var e = i.getSeriesByIndex(t.seriesIndex), n = t.dataIndexInside, o = e && e.getDataParams(n); + o && s.seriesData.push(o) + }), _(r) ? a = r.replace("{value}", a) : x(r) && (a = r(s)) + } + return a + } + + function Zg(t, e, i) { + var n = st(); + return dt(n, n, i.rotation), ct(n, n, i.position), mo([t.dataToCoord(e), (i.labelOffset || 0) + (i.labelDirection || 1) * (i.labelMargin || 0)], n) + } + + function Ug(t, e, i, n, o, a) { + var r = LD.innerTextLayout(i.rotation, 0, i.labelDirection); + i.labelMargin = o.get("label.margin"), Wg(e, n, o, a, { + position: Zg(n.axis, t, i), + align: r.textAlign, + verticalAlign: r.textVerticalAlign + }) + } + + function Xg(t, e, i) { + return i = i || 0, {x1: t[i], y1: t[1 - i], x2: e[i], y2: e[1 - i]} + } + + function jg(t, e, i) { + return i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]} + } + + function Yg(t, e, i, n, o, a) { + return {cx: t, cy: e, r0: i, r: n, startAngle: o, endAngle: a, clockwise: !0} + } + + function qg(t, e) { + var i = {}; + return i[e.dim + "AxisIndex"] = e.index, t.getCartesian(i) + } + + function Kg(t) { + return "x" === t.dim ? 0 : 1 + } + + function $g(t) { + return t.isHorizontal() ? 0 : 1 + } + + function Jg(t, e) { + var i = t.getRect(); + return [i[lk[e]], i[lk[e]] + i[uk[e]]] + } + + function Qg(t, e, i) { + var n = new SS({shape: {x: t.x - 10, y: t.y - 10, width: 0, height: t.height + 20}}); + return po(n, {shape: {width: t.width + 20, height: t.height + 20}}, e, i), n + } + + function tm(t, e, i) { + if (t.count()) for (var n, o = e.coordinateSystem, a = e.getLayerSeries(), r = t.mapDimension("single"), s = t.mapDimension("value"), l = f(a, function (e) { + return f(e.indices, function (e) { + var i = o.dataToPoint(t.get(r, e)); + return i[1] = t.get(s, e), i + }) + }), u = em(l), h = u.y0, c = i / u.max, d = a.length, p = a[0].indices.length, g = 0; g < p; ++g) { + n = h[g] * c, t.setItemLayout(a[0].indices[g], {layerIndex: 0, x: l[0][g][0], y0: n, y: l[0][g][1] * c}); + for (var m = 1; m < d; ++m) n += l[m - 1][g][1] * c, t.setItemLayout(a[m].indices[g], { + layerIndex: m, + x: l[m][g][0], + y0: n, + y: l[m][g][1] * c + }) + } + } + + function em(t) { + for (var e = t.length, i = t[0].length, n = [], o = [], a = 0, r = {}, s = 0; s < i; ++s) { + for (var l = 0, u = 0; l < e; ++l) u += t[l][s][1]; + u > a && (a = u), n.push(u) + } + for (var h = 0; h < i; ++h) o[h] = (a - n[h]) / 2; + a = 0; + for (var c = 0; c < i; ++c) { + var d = n[c] + o[c]; + d > a && (a = d) + } + return r.y0 = o, r.max = a, r + } + + function im(t) { + var e = 0; + d(t.children, function (t) { + im(t); + var i = t.value; + y(i) && (i = i[0]), e += i + }); + var i = t.value; + y(i) && (i = i[0]), (null == i || isNaN(i)) && (i = e), i < 0 && (i = 0), y(t.value) ? t.value[0] = i : t.value = i + } + + function nm(t, e, i) { + function n() { + r.ignore = r.hoverIgnore + } + + function o() { + r.ignore = r.normalIgnore + } + + sw.call(this); + var a = new vS({z2: pk}); + a.seriesIndex = e.seriesIndex; + var r = new fS({z2: gk, silent: t.getModel("label").get("silent")}); + this.add(a), this.add(r), this.updateData(!0, t, "normal", e, i), this.on("emphasis", n).on("normal", o).on("mouseover", n).on("mouseout", o) + } + + function om(t, e, i) { + var n = t.getVisual("color"), o = t.getVisual("visualMeta"); + o && 0 !== o.length || (n = null); + var a = t.getModel("itemStyle").get("color"); + if (a) return a; + if (n) return n; + if (0 === t.depth) return i.option.color[0]; + var r = i.option.color.length; + return a = i.option.color[am(t) % r] + } + + function am(t) { + for (var e = t; e.depth > 1;) e = e.parentNode; + return l(t.getAncestors()[0].children, e) + } + + function rm(t, e, i) { + return i !== fk.NONE && (i === fk.SELF ? t === e : i === fk.ANCESTOR ? t === e || t.isAncestorOf(e) : t === e || t.isDescendantOf(e)) + } + + function sm(t, e) { + var i = t.children || []; + t.children = lm(i, e), i.length && d(t.children, function (t) { + sm(t, e) + }) + } + + function lm(t, e) { + if ("function" == typeof e) return t.sort(e); + var i = "asc" === e; + return t.sort(function (t, e) { + var n = (t.getValue() - e.getValue()) * (i ? 1 : -1); + return 0 === n ? (t.dataIndex - e.dataIndex) * (i ? -1 : 1) : n + }) + } + + function um(t, e) { + return e = e || [0, 0], f(["x", "y"], function (i, n) { + var o = this.getAxis(i), a = e[n], r = t[n] / 2; + return "category" === o.type ? o.getBandWidth() : Math.abs(o.dataToCoord(a - r) - o.dataToCoord(a + r)) + }, this) + } + + function hm(t, e) { + return e = e || [0, 0], f([0, 1], function (i) { + var n = e[i], o = t[i] / 2, a = [], r = []; + return a[i] = n - o, r[i] = n + o, a[1 - i] = r[1 - i] = e[1 - i], Math.abs(this.dataToPoint(a)[i] - this.dataToPoint(r)[i]) + }, this) + } + + function cm(t, e) { + var i = this.getAxis(), n = e instanceof Array ? e[0] : e, o = (t instanceof Array ? t[0] : t) / 2; + return "category" === i.type ? i.getBandWidth() : Math.abs(i.dataToCoord(n - o) - i.dataToCoord(n + o)) + } + + function dm(t, e) { + return f(["Radius", "Angle"], function (i, n) { + var o = this["get" + i + "Axis"](), a = e[n], r = t[n] / 2, s = "dataTo" + i, + l = "category" === o.type ? o.getBandWidth() : Math.abs(o[s](a - r) - o[s](a + r)); + return "Angle" === i && (l = l * Math.PI / 180), l + }, this) + } + + function fm(t) { + var e, i = t.type; + if ("path" === i) { + var n = t.shape; + (e = Rn(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 Je({})).__customImagePath = t.style.image : "text" === i ? (e = new fS({})).__customText = t.style.text : e = new (0, BS[i.charAt(0).toUpperCase() + i.slice(1)]); + return e.__customGraphicType = i, e.name = t.name, e + } + + function pm(t, e, n, o, a, r) { + var s = {}, l = n.style || {}; + if (n.shape && (s.shape = i(n.shape)), n.position && (s.position = n.position.slice()), n.scale && (s.scale = n.scale.slice()), n.origin && (s.origin = n.origin.slice()), n.rotation && (s.rotation = n.rotation), "image" === t.type && n.style) { + u = s.style = {}; + d(["x", "y", "width", "height"], function (e) { + gm(e, u, l, t.style, r) + }) + } + if ("text" === t.type && n.style) { + var u = s.style = {}; + d(["x", "y"], function (e) { + gm(e, u, l, t.style, r) + }), !l.hasOwnProperty("textFill") && l.fill && (l.textFill = l.fill), !l.hasOwnProperty("textStroke") && l.stroke && (l.textStroke = l.stroke) + } + if ("group" !== t.type && (t.useStyle(l), r)) { + t.style.opacity = 0; + var h = l.opacity; + null == h && (h = 1), po(t, {style: {opacity: h}}, o, e) + } + r ? t.attr(s) : fo(t, s, o, e), t.attr({ + z2: n.z2 || 0, + silent: n.silent + }), !1 !== n.styleEmphasis && eo(t, n.styleEmphasis) + } + + function gm(t, e, i, n, o) { + null == i[t] || o || (e[t] = i[t], i[t] = n[t]) + } + + function mm(t, e, i, n) { + function o(t) { + null == t && (t = h), v && (c = e.getItemModel(t), d = c.getModel(bk), f = c.getModel(Sk), p = e.getItemVisual(t, "color"), v = !1) + } + + var s = t.get("renderItem"), l = t.coordinateSystem, u = {}; + l && (u = l.prepareCustoms ? l.prepareCustoms() : Ik[l.type](l)); + var h, c, d, f, p, g = r({ + getWidth: n.getWidth, + getHeight: n.getHeight, + getZr: n.getZr, + getDevicePixelRatio: n.getDevicePixelRatio, + value: function (t, i) { + return null == i && (i = h), e.get(e.getDimension(t || 0), i) + }, + style: function (i, n) { + null == n && (n = h), o(n); + var r = c.getModel(_k).getItemStyle(); + null != p && (r.fill = p); + var s = e.getItemVisual(n, "opacity"); + return null != s && (r.opacity = s), no(r, d, null, { + autoColor: p, + isRectText: !0 + }), r.text = d.getShallow("show") ? D(t.getFormattedLabel(n, "normal"), ql(e, n)) : null, i && a(r, i), r + }, + styleEmphasis: function (i, n) { + null == n && (n = h), o(n); + var r = c.getModel(wk).getItemStyle(); + return no(r, f, null, {isRectText: !0}, !0), r.text = f.getShallow("show") ? A(t.getFormattedLabel(n, "emphasis"), t.getFormattedLabel(n, "normal"), ql(e, n)) : null, i && a(r, i), r + }, + visual: function (t, i) { + return null == i && (i = h), e.getItemVisual(i, t) + }, + barLayout: function (t) { + if (l.getBaseAxis) return rl(r({axis: l.getBaseAxis()}, t), n) + }, + currentSeriesIndices: function () { + return i.getCurrentSeriesIndices() + }, + font: function (t) { + return ho(t, i) + } + }, u.api || {}), m = { + context: {}, + seriesId: t.id, + seriesName: t.name, + seriesIndex: t.seriesIndex, + coordSys: u.coordSys, + dataInsideLength: e.count(), + encode: vm(t.getData()) + }, v = !0; + return function (t) { + return h = t, v = !0, s && s(r({dataIndexInside: t, dataIndex: e.getRawIndex(t)}, m), g) || {} + } + } + + function vm(t) { + var e = {}; + return d(t.dimensions, function (i, n) { + var o = t.getDimensionInfo(i); + if (!o.isExtraCoord) { + var a = o.coordDim; + (e[a] = e[a] || [])[o.coordDimIndex] = n + } + }), e + } + + function ym(t, e, i, n, o, a) { + return (t = xm(t, e, i, n, o, a)) && a.setItemGraphicEl(e, t), t + } + + function xm(t, e, i, n, o, a) { + 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 || (o.remove(t), t = null), null != r) { + var s = !t; + if (!t && (t = fm(i)), pm(t, e, i, n, a, s), "group" === r) { + var l = t.children() || [], u = i.children || []; + if (i.diffChildrenByName) _m({ + oldChildren: l, + newChildren: u, + dataIndex: e, + animatableModel: n, + group: t, + data: a + }); else { + for (var h = 0; h < u.length; h++) xm(t.childAt(h), e, u[h], n, t, a); + for (; h < l.length; h++) l[h] && t.remove(l[h]) + } + } + return o.add(t), t + } + } + + function _m(t) { + new Ss(t.oldChildren, t.newChildren, wm, wm, t).add(bm).update(bm).remove(Sm).execute() + } + + function wm(t, e) { + var i = t && t.name; + return null != i ? i : Mk + e + } + + function bm(t, e) { + var i = this.context, n = null != t ? i.newChildren[t] : null; + xm(null != e ? i.oldChildren[e] : null, i.dataIndex, n, i.animatableModel, i.group, i.data) + } + + function Sm(t) { + var e = this.context, i = e.oldChildren[t]; + i && e.group.remove(i) + } + + function Mm(t, e, i, n) { + var o = i.type, a = new (0, BS[o.charAt(0).toUpperCase() + o.slice(1)])(i); + e.add(a), n.set(t, a), a.__ecGraphicId = t + } + + function Im(t, e) { + var i = t && t.parent; + i && ("group" === t.type && t.traverse(function (t) { + Im(t, e) + }), e.removeKey(t.__ecGraphicId), i.remove(t)) + } + + function Tm(t) { + return t = a({}, t), d(["id", "parentId", "$action", "hv", "bounding"].concat(aM), function (e) { + delete t[e] + }), t + } + + function Dm(t, e) { + var i; + return d(e, function (e) { + null != t[e] && "auto" !== t[e] && (i = !0) + }), i + } + + function Am(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 + } + + function Cm(t, e, i) { + var o = a({}, i), r = t[e], s = i.$action || "merge"; + "merge" === s ? r ? (n(r, o, !0), ia(r, o, {ignoreSize: !0}), oa(i, r)) : t[e] = o : "replace" === s ? t[e] = o : "remove" === s && r && (t[e] = null) + } + + function Lm(t, e) { + t && (t.hv = e.hv = [Dm(e, ["left", "right"]), Dm(e, ["top", "bottom"])], "group" === t.type && (null == t.width && (t.width = e.width = 0), null == t.height && (t.height = e.height = 0))) + } + + function km(t, e, i) { + var n, o = {}, a = "toggleSelected" === t; + return i.eachComponent("legend", function (i) { + a && null != n ? i[n ? "select" : "unSelect"](e.name) : (i[t](e.name), n = i.isSelected(e.name)), d(i.getData(), function (t) { + var e = t.get("name"); + if ("\n" !== e && "" !== e) { + var n = i.isSelected(e); + o.hasOwnProperty(e) ? o[e] = o[e] && n : o[e] = n + } + }) + }), {name: e.name, selected: o} + } + + function Pm(t, e, i) { + var n = e.getBoxLayoutParams(), o = e.get("padding"), a = {width: i.getWidth(), height: i.getHeight()}, + r = Qo(n, a, o); + sM(e.get("orient"), t, e.get("itemGap"), r.width, r.height), ta(t, n, a, o) + } + + function Nm(t, e) { + var i = KS(e.get("padding")), n = e.getItemStyle(["color", "opacity"]); + return n.fill = e.get("backgroundColor"), t = new SS({ + 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 + }) + } + + function Om(t, e) { + e.dispatchAction({type: "legendToggleSelect", name: t}) + } + + function Em(t, e, i, n) { + var o = i.getZr().storage.getDisplayList()[0]; + o && o.useHoverLayer || i.dispatchAction({type: "highlight", seriesName: t.name, name: e, excludeSeriesId: n}) + } + + function Rm(t, e, i, n) { + var o = i.getZr().storage.getDisplayList()[0]; + o && o.useHoverLayer || i.dispatchAction({type: "downplay", seriesName: t.name, name: e, excludeSeriesId: n}) + } + + function zm(t, e, i) { + var n = [1, 1]; + n[t.getOrient().index] = 0, ia(e, i, {type: "box", ignoreSize: n}) + } + + function Bm(t) { + var e = "left " + t + "s cubic-bezier(0.23, 1, 0.32, 1),top " + t + "s cubic-bezier(0.23, 1, 0.32, 1)"; + return f(Vk, function (t) { + return t + "transition:" + e + }).join(";") + } + + function Vm(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"), zk(["decoration", "align"], function (i) { + var n = t.get(i); + n && e.push("text-" + i + ":" + n) + }), e.join(";") + } + + function Gm(t) { + var e = [], i = t.get("transitionDuration"), n = t.get("backgroundColor"), o = t.getModel("textStyle"), + a = t.get("padding"); + return i && e.push(Bm(i)), n && (a_.canvasSupported ? e.push("background-Color:" + n) : (e.push("background-Color:#" + Pt(n)), e.push("filter:alpha(opacity=70)"))), zk(["width", "color", "radius"], function (i) { + var n = "border-" + i, o = Bk(n), a = t.get(o); + null != a && e.push(n + ":" + a + ("color" === i ? "" : "px")) + }), e.push(Vm(o)), null != a && e.push("padding:" + KS(a).join("px ") + "px"), e.join(";") + ";" + } + + function Wm(t, e) { + if (a_.wxa) return null; + 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 o = this; + i.onmouseenter = function () { + o._enterable && (clearTimeout(o._hideTimeout), o._show = !0), o._inContent = !0 + }, i.onmousemove = function (e) { + if (e = e || window.event, !o._enterable) { + var i = n.handler; + li(t, e, !0), i.dispatch("mousemove", e) + } + }, i.onmouseleave = function () { + o._enterable && o._show && o.hideLater(o._hideDelay), o._inContent = !1 + } + } + + function Fm(t) { + for (var e = t.pop(); t.length;) { + var i = t.pop(); + i && (wo.isInstance(i) && (i = i.get("tooltip", !0)), "string" == typeof i && (i = {formatter: i}), e = new wo(i, e, e.ecModel)) + } + return e + } + + function Hm(t, e) { + return t.dispatchAction || m(e.dispatchAction, e) + } + + function Zm(t, e, i, n, o, a, r) { + var s = Xm(i), l = s.width, u = s.height; + return null != a && (t + l + a > n ? t -= l + a : t += a), null != r && (e + u + r > o ? e -= u + r : e += r), [t, e] + } + + function Um(t, e, i, n, o) { + var a = Xm(i), r = a.width, s = a.height; + return t = Math.min(t + r, n) - r, e = Math.min(e + s, o) - s, t = Math.max(t, 0), e = Math.max(e, 0), [t, e] + } + + function Xm(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 jm(t, e, i) { + var n = i[0], o = i[1], a = 0, r = 0, s = e.width, l = e.height; + switch (t) { + case"inside": + a = e.x + s / 2 - n / 2, r = e.y + l / 2 - o / 2; + break; + case"top": + a = e.x + s / 2 - n / 2, r = e.y - o - 5; + break; + case"bottom": + a = e.x + s / 2 - n / 2, r = e.y + l + 5; + break; + case"left": + a = e.x - n - 5, r = e.y + l / 2 - o / 2; + break; + case"right": + a = e.x + s + 5, r = e.y + l / 2 - o / 2 + } + return [a, r] + } + + function Ym(t) { + return "center" === t || "middle" === t + } + + function qm(t) { + return t.get("stack") || "__ec_stack_" + t.seriesIndex + } + + function Km(t) { + return t.dim + } + + function $m(t, e) { + var i = {}; + d(t, function (t, e) { + var n = t.getData(), o = t.coordinateSystem.getBaseAxis(), a = o.getExtent(), + r = "category" === o.type ? o.getBandWidth() : Math.abs(a[1] - a[0]) / n.count(), s = i[Km(o)] || { + bandWidth: r, + remainedWidth: r, + autoWidthCount: 0, + categoryGap: "20%", + gap: "30%", + stacks: {} + }, l = s.stacks; + i[Km(o)] = s; + var u = qm(t); + l[u] || s.autoWidthCount++, l[u] = l[u] || {width: 0, maxWidth: 0}; + var h = Do(t.get("barWidth"), r), c = Do(t.get("barMaxWidth"), r), d = t.get("barGap"), + f = t.get("barCategoryGap"); + h && !l[u].width && (h = Math.min(s.remainedWidth, h), l[u].width = h, s.remainedWidth -= h), c && (l[u].maxWidth = c), null != d && (s.gap = d), null != f && (s.categoryGap = f) + }); + var n = {}; + return d(i, function (t, e) { + n[e] = {}; + var i = t.stacks, o = t.bandWidth, a = Do(t.categoryGap, o), r = Do(t.gap, 1), s = t.remainedWidth, + l = t.autoWidthCount, u = (s - a) / (l + (l - 1) * r); + u = Math.max(u, 0), d(i, function (t, e) { + var i = t.maxWidth; + i && i < u && (i = Math.min(i, s), t.width && (i = Math.min(i, t.width)), s -= i, t.width = i, l--) + }), u = (s - a) / (l + (l - 1) * r), u = Math.max(u, 0); + var h, c = 0; + d(i, function (t, e) { + t.width || (t.width = u), h = t, c += t.width * (1 + r) + }), h && (c -= h.width * r); + var f = -c / 2; + d(i, function (t, i) { + n[e][i] = n[e][i] || {offset: f, width: t.width}, f += t.width * (1 + r) + }) + }), n + } + + function Jm(t, e) { + qT.call(this, "radius", t, e), this.type = "category" + } + + function Qm(t, e) { + e = e || [0, 360], qT.call(this, "angle", t, e), this.type = "category" + } + + function tv(t, e) { + return e.type || (e.data ? "category" : "value") + } + + function ev(t, e, i) { + var n = e.get("center"), o = i.getWidth(), a = i.getHeight(); + t.cx = Do(n[0], o), t.cy = Do(n[1], a); + var r = t.getRadiusAxis(), s = Math.min(o, a) / 2, l = Do(e.get("radius"), s); + r.inverse ? r.setExtent(l, 0) : r.setExtent(0, l) + } + + function iv(t, e) { + var i = this, n = i.getAngleAxis(), o = i.getRadiusAxis(); + if (n.scale.setExtent(1 / 0, -1 / 0), o.scale.setExtent(1 / 0, -1 / 0), t.eachSeries(function (t) { + if (t.coordinateSystem === i) { + var e = t.getData(); + d(e.mapDimension("radius", !0), function (t) { + o.scale.unionExtentFromData(e, Us(e, t)) + }), d(e.mapDimension("angle", !0), function (t) { + n.scale.unionExtentFromData(e, Us(e, t)) + }) + } + }), yl(n.scale, n.model), yl(o.scale, o.model), "category" === n.type && !n.onBand) { + var a = n.getExtent(), r = 360 / n.scale.count(); + n.inverse ? a[1] += r : a[1] -= r, n.setExtent(a[0], a[1]) + } + } + + function nv(t, e) { + if (t.type = e.get("type"), t.scale = xl(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 + } + + function ov(t, e, i) { + e[1] > e[0] && (e = e.slice().reverse()); + var n = t.coordToPoint([e[0], i]), o = t.coordToPoint([e[1], i]); + return {x1: n[0], y1: n[1], x2: o[0], y2: o[1]} + } + + function av(t) { + return t.getRadiusAxis().inverse ? 0 : 1 + } + + function rv(t) { + var e = t[0], i = t[t.length - 1]; + e && i && Math.abs(Math.abs(e.coord - i.coord) - 360) < 1e-4 && t.pop() + } + + function sv(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 + } + } + + function lv(t, e, i, n, o) { + var a = e.axis, r = a.dataToCoord(t), s = n.getAngleAxis().getExtent()[0]; + s = s / 180 * Math.PI; + var l, u, h, c = n.getRadiusAxis().getExtent(); + if ("radius" === a.dim) { + var d = st(); + dt(d, d, s), ct(d, d, [n.cx, n.cy]), l = mo([r, -o], d); + var f = e.getModel("axisLabel").get("rotate") || 0, p = LD.innerTextLayout(s, f * Math.PI / 180, -1); + u = p.textAlign, h = p.textVerticalAlign + } else { + var g = c[1]; + l = n.coordToPoint([g + o, r]); + var m = n.cx, v = n.cy; + u = Math.abs(l[0] - m) / g < .3 ? "center" : l[0] > m ? "left" : "right", h = Math.abs(l[1] - v) / g < .3 ? "middle" : l[1] > v ? "top" : "bottom" + } + return {position: l, align: u, verticalAlign: h} + } + + function uv(t, e) { + e.update = "updateView", cs(e, function (e, i) { + var n = {}; + return i.eachComponent({mainType: "geo", query: e}, function (i) { + i[t](e.name), d(i.coordinateSystem.regions, function (t) { + n[t.name] = i.isSelected(t.name) || !1 + }) + }), {selected: n, name: e.name} + }) + } + + function hv(t) { + var e = {}; + d(t, function (t) { + e[t] = 1 + }), t.length = 0, d(e, function (e, i) { + t.push(i) + }) + } + + function cv(t) { + if (t) for (var e in t) if (t.hasOwnProperty(e)) return !0 + } + + function dv(t, e, n) { + function o() { + var t = function () { + }; + return t.prototype.__hidden = t.prototype, new t + } + + var a = {}; + return tP(e, function (e) { + var r = a[e] = o(); + tP(t[e], function (t, o) { + if (ZA.isValidType(o)) { + var a = {type: o, visual: t}; + n && n(a, e), r[o] = new ZA(a), "opacity" === o && ((a = i(a)).type = "colorAlpha", r.__hidden.__alphaForOpacity = new ZA(a)) + } + }) + }), a + } + + function fv(t, e, n) { + var o; + d(n, function (t) { + e.hasOwnProperty(t) && cv(e[t]) && (o = !0) + }), o && d(n, function (n) { + e.hasOwnProperty(n) && cv(e[n]) ? t[n] = i(e[n]) : delete t[n] + }) + } + + function pv(t, e, i, n, o, a) { + function r(t) { + return i.getItemVisual(h, t) + } + + function s(t, e) { + i.setItemVisual(h, t, e) + } + + function l(t, l) { + h = null == a ? t : l; + var c = i.getRawDataItem(h); + if (!c || !1 !== c.visualMap) for (var d = n.call(o, t), f = e[d], p = u[d], g = 0, m = p.length; g < m; g++) { + var v = p[g]; + f[v] && f[v].applyVisual(t, r, s) + } + } + + var u = {}; + d(t, function (t) { + var i = ZA.prepareVisualTypes(e[t]); + u[t] = i + }); + var h; + null == a ? i.each(l) : i.each([a], l) + } + + function gv(t, e, i, n) { + var o = {}; + return d(t, function (t) { + var i = ZA.prepareVisualTypes(e[t]); + o[t] = i + }), { + progress: function (t, a) { + null != n && (n = a.getDimension(n)); + for (var r; null != (r = t.next());) { + var s = a.getRawDataItem(r); + if (s && !1 === s.visualMap) return; + for (var l = null != n ? a.get(n, r, !0) : r, u = i(l), h = e[u], c = o[u], d = 0, f = c.length; d < f; d++) { + var p = c[d]; + h[p] && h[p].applyVisual(l, function (t) { + return a.getItemVisual(r, t) + }, function (t, e) { + a.setItemVisual(r, t, e) + }) + } + } + } + } + } + + function mv(t) { + var e = ["x", "y"], i = ["width", "height"]; + return { + point: function (e, i, n) { + if (e) { + var o = n.range; + return vv(e[t], o) + } + }, rect: function (n, o, a) { + if (n) { + var r = a.range, s = [n[e[t]], n[e[t]] + n[i[t]]]; + return s[1] < s[0] && s.reverse(), vv(s[0], r) || vv(s[1], r) || vv(r[0], s) || vv(r[1], s) + } + } + } + } + + function vv(t, e) { + return e[0] <= t && t <= e[1] + } + + function yv(t, e, i, n, o) { + for (var a = 0, r = o[o.length - 1]; a < o.length; a++) { + var s = o[a]; + if (xv(t, e, i, n, s[0], s[1], r[0], r[1])) return !0; + r = s + } + } + + function xv(t, e, i, n, o, a, r, s) { + var l = wv(i - t, o - r, n - e, a - s); + if (_v(l)) return !1; + var u = wv(o - t, o - r, a - e, a - s) / l; + if (u < 0 || u > 1) return !1; + var h = wv(i - t, o - t, n - e, a - e) / l; + return !(h < 0 || h > 1) + } + + function _v(t) { + return t <= 1e-6 && t >= -1e-6 + } + + function wv(t, e, i, n) { + return t * n - e * i + } + + function bv(t, e, i) { + var n = this._targetInfoList = [], o = {}, a = Mv(e, t); + iP(lP, function (t, e) { + (!i || !i.include || nP(i.include, e) >= 0) && t(a, n, o) + }) + } + + function Sv(t) { + return t[0] > t[1] && t.reverse(), t + } + + function Mv(t, e) { + return Oi(t, e, {includeMainTypes: rP}) + } + + function Iv(t, e, i, n) { + var o = i.getAxis(["x", "y"][t]), a = Sv(f([0, 1], function (t) { + return e ? o.coordToData(o.toLocalCoord(n[t])) : o.toGlobalCoord(o.dataToCoord(n[t])) + })), r = []; + return r[t] = a, r[1 - t] = [NaN, NaN], {values: a, xyMinMax: r} + } + + function Tv(t, e, i, n) { + return [e[0] - n[t] * i[0], e[1] - n[t] * i[1]] + } + + function Dv(t, e) { + var i = Av(t), n = Av(e), o = [i[0] / n[0], i[1] / n[1]]; + return isNaN(o[0]) && (o[0] = 1), isNaN(o[1]) && (o[1] = 1), o + } + + function Av(t) { + return t ? [t[0][1] - t[0][0], t[1][1] - t[1][0]] : [NaN, NaN] + } + + function Cv(t, e, i, n, o) { + if (o) { + var a = t.getZr(); + a[gP] || (a[pP] || (a[pP] = Lv), wr(a, pP, i, e)(t, n)) + } + } + + function Lv(t, e) { + if (!t.isDisposed()) { + var i = t.getZr(); + i[gP] = !0, t.dispatchAction({type: "brushSelect", batch: e}), i[gP] = !1 + } + } + + function kv(t, e, i, n) { + for (var o = 0, a = e.length; o < a; o++) { + var r = e[o]; + if (t[r.brushType](n, i, r.selectors, r)) return !0 + } + } + + function Pv(t) { + var e = t.brushSelector; + if (_(e)) { + var i = []; + return d(eP, function (t, n) { + i[n] = function (i, n, o, a) { + var r = n.getItemLayout(i); + return t[e](r, o, a) + } + }), i + } + if (x(e)) { + var n = {}; + return d(eP, function (t, i) { + n[i] = e + }), n + } + return e + } + + function Nv(t, e) { + var i = t.option.seriesIndex; + return null != i && "all" !== i && (y(i) ? l(i, e) < 0 : e !== i) + } + + function Ov(t) { + var e = t.selectors = {}; + return d(eP[t.brushType], function (i, n) { + e[n] = function (n) { + return i(n, e, t) + } + }), t + } + + function Ev(t) { + return new $t(t[0][0], t[1][0], t[0][1] - t[0][0], t[1][1] - t[1][0]) + } + + function Rv(t, e) { + return n({ + brushType: t.brushType, + brushMode: t.brushMode, + transformable: t.transformable, + brushStyle: new wo(t.brushStyle).getItemStyle(), + removeOnClick: t.removeOnClick, + z: t.z + }, e, !0) + } + + function zv(t, e, i, n) { + (!n || n.$from !== t.id) && this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice()) + } + + function Bv(t, e) { + xP[t] = e + } + + function Vv(t) { + return xP[t] + } + + function Gv(t, e, i) { + this.model = t, this.ecModel = e, this.api = i, this._brushType, this._brushMode + } + + function Wv(t, e, i) { + this._model = t + } + + function Fv(t, e, i, n) { + var o = i.calendarModel, a = i.seriesModel, r = o ? o.coordinateSystem : a ? a.coordinateSystem : null; + return r === this ? r[t](n) : null + } + + function Hv(t, e) { + var i = t.cellSize; + y(i) ? 1 === i.length && (i[1] = i[0]) : i = t.cellSize = [i, i]; + var n = f([0, 1], function (t) { + return ea(e, t) && (i[t] = "auto"), null != i[t] && "auto" !== i[t] + }); + ia(t, e, {type: "box", ignoreSize: n}) + } + + function Zv(t) { + return l(IP, t) >= 0 + } + + function Uv(t, e, i) { + function n(t, e) { + return l(e.nodes, t) >= 0 + } + + function o(t, n) { + var o = !1; + return e(function (e) { + d(i(t, e) || [], function (t) { + n.records[e.name][t] && (o = !0) + }) + }), o + } + + function a(t, n) { + n.nodes.push(t), e(function (e) { + d(i(t, e) || [], function (t) { + n.records[e.name][t] = !0 + }) + }) + } + + return function (i) { + var r = {nodes: [], records: {}}; + if (e(function (t) { + r.records[t.name] = {} + }), !i) return r; + a(i, r); + var s; + do { + s = !1, t(function (t) { + !n(t, r) && o(t, r) && (a(t, r), s = !0) + }) + } while (s); + return r + } + } + + function Xv(t, e, i) { + var n = [1 / 0, -1 / 0]; + return DP(i, function (t) { + var i = t.getData(); + i && DP(i.mapDimension(e, !0), function (t) { + var e = i.getApproximateExtent(t); + e[0] < n[0] && (n[0] = e[0]), e[1] > n[1] && (n[1] = e[1]) + }) + }), n[1] < n[0] && (n = [NaN, NaN]), jv(t, n), n + } + + function jv(t, e) { + var i = t.getAxisModel(), n = i.getMin(!0), o = "category" === i.get("type"), a = o && i.getCategories().length; + null != n && "dataMin" !== n && "function" != typeof n ? e[0] = n : o && (e[0] = a > 0 ? 0 : NaN); + var r = i.getMax(!0); + return null != r && "dataMax" !== r && "function" != typeof r ? e[1] = r : o && (e[1] = a > 0 ? a - 1 : NaN), i.get("scale", !0) || (e[0] > 0 && (e[0] = 0), e[1] < 0 && (e[1] = 0)), e + } + + function Yv(t, e) { + var i = t.getAxisModel(), n = t._percentWindow, o = t._valueWindow; + if (n) { + var a = Po(o, [0, 500]); + a = Math.min(a, 20); + var r = e || 0 === n[0] && 100 === n[1]; + i.setRange(r ? null : +o[0].toFixed(a), r ? null : +o[1].toFixed(a)) + } + } + + function qv(t) { + var e = t._minMaxSpan = {}, i = t._dataZoomModel; + DP(["min", "max"], function (n) { + e[n + "Span"] = i.get(n + "Span"); + var o = i.get(n + "ValueSpan"); + if (null != o && (e[n + "ValueSpan"] = o, null != (o = t.getAxisModel().axis.scale.parse(o)))) { + var a = t._dataExtent; + e[n + "Span"] = To(a[0] + o, a, [0, 100], !0) + } + }) + } + + function Kv(t) { + var e = {}; + return LP(["start", "end", "startValue", "endValue", "throttle"], function (i) { + t.hasOwnProperty(i) && (e[i] = t[i]) + }), e + } + + function $v(t, e) { + var i = t._rangePropMode, n = t.get("rangeMode"); + LP([["start", "startValue"], ["end", "endValue"]], function (t, o) { + var a = null != e[t[0]], r = null != e[t[1]]; + a && !r ? i[o] = "percent" : !a && r ? i[o] = "value" : n ? i[o] = n[o] : a && (i[o] = "percent") + }) + } + + function Jv(t) { + return {x: "y", y: "x", radius: "angle", angle: "radius"}[t] + } + + function Qv(t) { + return "vertical" === t ? "ns-resize" : "ew-resize" + } + + function ty(t, e) { + var i = ny(t), n = e.dataZoomId, o = e.coordId; + d(i, function (t, i) { + var a = t.dataZoomInfos; + a[n] && l(e.allCoordIds, o) < 0 && (delete a[n], t.count--) + }), ay(i); + var a = i[o]; + a || ((a = i[o] = { + coordId: o, + dataZoomInfos: {}, + count: 0 + }).controller = oy(t, a), a.dispatchAction = v(uy, t)), !a.dataZoomInfos[n] && a.count++, a.dataZoomInfos[n] = e; + var r = hy(a.dataZoomInfos); + a.controller.enable(r.controlType, r.opt), a.controller.setPointerChecker(e.containsPoint), wr(a, "dispatchAction", e.throttleRate, "fixRate") + } + + function ey(t, e) { + var i = ny(t); + d(i, function (t) { + t.controller.dispose(); + var i = t.dataZoomInfos; + i[e] && (delete i[e], t.count--) + }), ay(i) + } + + function iy(t) { + return t.type + "\0_" + t.id + } + + function ny(t) { + var e = t.getZr(); + return e[ZP] || (e[ZP] = {}) + } + + function oy(t, e) { + var i = new kh(t.getZr()); + return i.on("pan", HP(ry, e)), i.on("zoom", HP(sy, e)), i + } + + function ay(t) { + d(t, function (e, i) { + e.count || (e.controller.dispose(), delete t[i]) + }) + } + + function ry(t, e, i, n, o, a, r) { + ly(t, function (s) { + return s.panGetRange(t.controller, e, i, n, o, a, r) + }) + } + + function sy(t, e, i, n) { + ly(t, function (o) { + return o.zoomGetRange(t.controller, e, i, n) + }) + } + + function ly(t, e) { + var i = []; + d(t.dataZoomInfos, function (t) { + var n = e(t); + !t.disabled && n && i.push({dataZoomId: t.dataZoomId, start: n[0], end: n[1]}) + }), i.length && t.dispatchAction(i) + } + + function uy(t, e) { + t.dispatchAction({type: "dataZoom", batch: e}) + } + + function hy(t) { + var e, i = {}, n = {type_true: 2, type_move: 1, type_false: 0, type_undefined: -1}; + return d(t, function (t) { + var o = !t.disabled && (!t.zoomLock || "move"); + n["type_" + o] > n["type_" + e] && (e = o), a(i, t.roamControllerOpt) + }), {controlType: e, opt: i} + } + + function cy(t, e) { + return t && t.hasOwnProperty && t.hasOwnProperty(e) + } + + function dy(t, e, i, n) { + for (var o = e.targetVisuals[n], a = ZA.prepareVisualTypes(o), r = {color: t.getData().getVisual("color")}, s = 0, l = a.length; s < l; s++) { + var u = a[s], h = o["opacity" === u ? "__alphaForOpacity" : u]; + h && h.applyVisual(i, function (t) { + return r[t] + }, function (t, e) { + r[t] = e + }) + } + return r.color + } + + function fy(t, e, i) { + if (i[0] === i[1]) return i.slice(); + for (var n = (i[1] - i[0]) / 200, o = i[0], a = [], r = 0; r <= 200 && o < i[1]; r++) a.push(o), o += n; + return a.push(i[1]), a + } + + function py(t, e, i) { + var n = t.option, o = n.align; + if (null != o && "auto" !== o) return o; + for (var a = { + width: e.getWidth(), + height: e.getHeight() + }, r = "horizontal" === n.orient ? 1 : 0, s = [["left", "right", "width"], ["top", "bottom", "height"]], l = s[r], u = [0, null, 10], h = {}, c = 0; c < 3; c++) h[s[1 - r][c]] = u[c], h[l[c]] = 2 === c ? i[0] : n[l[c]]; + var d = [["x", "width", 3], ["y", "height", 0]][r], f = Qo(h, a, n.padding); + return l[(f.margin[d[2]] || 0) + f[d[0]] + .5 * f[d[1]] < .5 * a[d[1]] ? 0 : 1] + } + + function gy(t) { + return d(t || [], function (e) { + null != t.dataIndex && (t.dataIndexInside = t.dataIndex, t.dataIndex = null) + }), t + } + + function my(t, e, i, n) { + return new wS({ + shape: {points: t}, draggable: !!i, cursor: e, drift: i, onmousemove: function (t) { + zw(t.event) + }, ondragend: n + }) + } + + function vy(t, e) { + return 0 === t ? [[0, 0], [e, 0], [e, -e]] : [[0, 0], [e, 0], [e, e]] + } + + function yy(t, e, i, n) { + return t ? [[0, -dN(e, fN(i, 0))], [gN, 0], [0, dN(e, fN(n - i, 0))]] : [[0, 0], [5, -5], [5, 5]] + } + + function xy(t, e, i) { + var n = pN / 2, o = t.get("hoverLinkDataSize"); + return o && (n = hN(o, e, i, !0) / 2), n + } + + function _y(t) { + var e = t.get("hoverLinkOnHandle"); + return !!(null == e ? t.get("realtime") : e) + } + + function wy(t) { + return "vertical" === t ? "ns-resize" : "ew-resize" + } + + function by(t, e) { + var i = t.inverse; + ("vertical" === t.orient ? !i : i) && e.reverse() + } + + function Sy(t) { + Mi(t, "label", ["show"]) + } + + function My(t) { + return !(isNaN(parseFloat(t.x)) && isNaN(parseFloat(t.y))) + } + + function Iy(t) { + return !isNaN(parseFloat(t.x)) && !isNaN(parseFloat(t.y)) + } + + function Ty(t, e, i, n, o, a) { + var r = [], s = Zs(e, n) ? e.getCalculationInfo("stackResultDimension") : n, l = Py(e, s, t), + u = e.indicesOfNearest(s, l)[0]; + r[o] = e.get(i, u), r[a] = e.get(n, u); + var h = Lo(e.get(n, u)); + return (h = Math.min(h, 20)) >= 0 && (r[a] = +r[a].toFixed(h)), r + } + + function Dy(t, e) { + var n = t.getData(), o = t.coordinateSystem; + if (e && !Iy(e) && !y(e.coord) && o) { + var a = o.dimensions, r = Ay(e, n, o, t); + if ((e = i(e)).type && MN[e.type] && r.baseAxis && r.valueAxis) { + var s = bN(a, r.baseAxis.dim), l = bN(a, r.valueAxis.dim); + e.coord = MN[e.type](n, r.baseDataDim, r.valueDataDim, s, l), e.value = e.coord[l] + } else { + for (var u = [null != e.xAxis ? e.xAxis : e.radiusAxis, null != e.yAxis ? e.yAxis : e.angleAxis], h = 0; h < 2; h++) MN[u[h]] && (u[h] = Py(n, n.mapDimension(a[h]), u[h])); + e.coord = u + } + } + return e + } + + function Ay(t, e, i, n) { + var o = {}; + return null != t.valueIndex || null != t.valueDim ? (o.valueDataDim = null != t.valueIndex ? e.getDimension(t.valueIndex) : t.valueDim, o.valueAxis = i.getAxis(Cy(n, o.valueDataDim)), o.baseAxis = i.getOtherAxis(o.valueAxis), o.baseDataDim = e.mapDimension(o.baseAxis.dim)) : (o.baseAxis = n.getBaseAxis(), o.valueAxis = i.getOtherAxis(o.baseAxis), o.baseDataDim = e.mapDimension(o.baseAxis.dim), o.valueDataDim = e.mapDimension(o.valueAxis.dim)), o + } + + function Cy(t, e) { + var i = t.getData(), n = i.dimensions; + e = i.getDimension(e); + for (var o = 0; o < n.length; o++) { + var a = i.getDimensionInfo(n[o]); + if (a.name === e) return a.coordDim + } + } + + function Ly(t, e) { + return !(t && t.containData && e.coord && !My(e)) || t.containData(e.coord) + } + + function ky(t, e, i, n) { + return n < 2 ? t.coord && t.coord[n] : t.value + } + + function Py(t, e, i) { + if ("average" === i) { + var n = 0, o = 0; + return t.each(e, function (t, e) { + isNaN(t) || (n += t, o++) + }), n / o + } + return "median" === i ? t.getMedian(e) : t.getDataExtent(e, !0)["max" === i ? 1 : 0] + } + + function Ny(t, e, i) { + var n = e.coordinateSystem; + t.each(function (o) { + var a, r = t.getItemModel(o), s = Do(r.get("x"), i.getWidth()), l = Do(r.get("y"), i.getHeight()); + if (isNaN(s) || isNaN(l)) { + if (e.getMarkerPosition) a = e.getMarkerPosition(t.getValues(t.dimensions, o)); else if (n) { + var u = t.get(n.dimensions[0], o), h = t.get(n.dimensions[1], o); + a = n.dataToPoint([u, h]) + } + } else a = [s, l]; + isNaN(s) || (a[0] = s), isNaN(l) || (a[1] = l), t.setItemLayout(o, a) + }) + } + + function Oy(t, e, i) { + var n; + n = t ? f(t && t.dimensions, function (t) { + return r({name: t}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}) + }) : [{name: "value", type: "float"}]; + var o = new sT(n, i), a = f(i.get("data"), v(Dy, e)); + return t && (a = g(a, v(Ly, t))), o.initData(a, null, t ? ky : function (t) { + return t.value + }), o + } + + function Ey(t) { + return !isNaN(t) && !isFinite(t) + } + + function Ry(t, e, i, n) { + var o = 1 - t, a = n.dimensions[t]; + return Ey(e[o]) && Ey(i[o]) && e[t] === i[t] && n.getAxis(a).containData(e[t]) + } + + function zy(t, e) { + if ("cartesian2d" === t.type) { + var i = e[0].coord, n = e[1].coord; + if (i && n && (Ry(1, i, n, t) || Ry(0, i, n, t))) return !0 + } + return Ly(t, e[0]) && Ly(t, e[1]) + } + + function By(t, e, i, n, o) { + var a, r = n.coordinateSystem, s = t.getItemModel(e), l = Do(s.get("x"), o.getWidth()), + u = Do(s.get("y"), o.getHeight()); + if (isNaN(l) || isNaN(u)) { + if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(t.dimensions, e)); else { + var h = r.dimensions, c = t.get(h[0], e), d = t.get(h[1], e); + a = r.dataToPoint([c, d]) + } + if ("cartesian2d" === r.type) { + var f = r.getAxis("x"), p = r.getAxis("y"), h = r.dimensions; + Ey(t.get(h[0], e)) ? a[0] = f.toGlobalCoord(f.getExtent()[i ? 0 : 1]) : Ey(t.get(h[1], e)) && (a[1] = p.toGlobalCoord(p.getExtent()[i ? 0 : 1])) + } + isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u) + } else a = [l, u]; + t.setItemLayout(e, a) + } + + function Vy(t, e, i) { + var n; + n = t ? f(t && t.dimensions, function (t) { + return r({name: t}, e.getData().getDimensionInfo(e.getData().mapDimension(t)) || {}) + }) : [{name: "value", type: "float"}]; + var o = new sT(n, i), a = new sT(n, i), s = new sT([], i), l = f(i.get("data"), v(TN, e, t, i)); + t && (l = g(l, v(zy, t))); + var u = t ? ky : function (t) { + return t.value + }; + return o.initData(f(l, function (t) { + return t[0] + }), null, u), a.initData(f(l, function (t) { + return t[1] + }), null, u), s.initData(f(l, function (t) { + return t[2] + })), s.hasItemOption = !0, {from: o, to: a, line: s} + } + + function Gy(t) { + return !isNaN(t) && !isFinite(t) + } + + function Wy(t, e, i, n) { + var o = 1 - t; + return Gy(e[o]) && Gy(i[o]) + } + + function Fy(t, e) { + var i = e.coord[0], n = e.coord[1]; + return !("cartesian2d" !== t.type || !i || !n || !Wy(1, i, n, t) && !Wy(0, i, n, t)) || (Ly(t, { + coord: i, + x: e.x0, + y: e.y0 + }) || Ly(t, {coord: n, x: e.x1, y: e.y1})) + } + + function Hy(t, e, i, n, o) { + var a, r = n.coordinateSystem, s = t.getItemModel(e), l = Do(s.get(i[0]), o.getWidth()), + u = Do(s.get(i[1]), o.getHeight()); + if (isNaN(l) || isNaN(u)) { + if (n.getMarkerPosition) a = n.getMarkerPosition(t.getValues(i, e)); else { + var h = [f = t.get(i[0], e), p = t.get(i[1], e)]; + r.clampData && r.clampData(h, h), a = r.dataToPoint(h, !0) + } + if ("cartesian2d" === r.type) { + var c = r.getAxis("x"), d = r.getAxis("y"), f = t.get(i[0], e), p = t.get(i[1], e); + Gy(f) ? a[0] = c.toGlobalCoord(c.getExtent()["x0" === i[0] ? 0 : 1]) : Gy(p) && (a[1] = d.toGlobalCoord(d.getExtent()["y0" === i[1] ? 0 : 1])) + } + isNaN(l) || (a[0] = l), isNaN(u) || (a[1] = u) + } else a = [l, u]; + return a + } + + function Zy(t, e, i) { + var n, o, a = ["x0", "y0", "x1", "y1"]; + t ? (n = f(t && t.dimensions, function (t) { + var i = e.getData(); + return r({name: t}, i.getDimensionInfo(i.mapDimension(t)) || {}) + }), o = new sT(f(a, function (t, e) { + return {name: t, type: n[e % 2].type} + }), i)) : o = new sT(n = [{name: "value", type: "float"}], i); + var s = f(i.get("data"), v(DN, e, t, i)); + t && (s = g(s, v(Fy, t))); + var l = t ? function (t, e, i, n) { + return t.coord[Math.floor(n / 2)][n % 2] + } : function (t) { + return t.value + }; + return o.initData(s, null, l), o.hasItemOption = !0, o + } + + function Uy(t) { + var e = t.type, i = {number: "value", time: "time"}; + if (i[e] && (t.axisType = i[e], delete t.type), Xy(t), jy(t, "controlPosition")) { + var n = t.controlStyle || (t.controlStyle = {}); + jy(n, "position") || (n.position = t.controlPosition), "none" !== n.position || jy(n, "show") || (n.show = !1, delete n.position), delete t.controlPosition + } + d(t.data || [], function (t) { + w(t) && !y(t) && (!jy(t, "value") && jy(t, "name") && (t.value = t.name), Xy(t)) + }) + } + + function Xy(t) { + var e = t.itemStyle || (t.itemStyle = {}), i = e.emphasis || (e.emphasis = {}), n = t.label || t.label || {}, + o = n.normal || (n.normal = {}), a = {normal: 1, emphasis: 1}; + d(n, function (t, e) { + a[e] || jy(o, e) || (o[e] = t) + }), i.label && !jy(n, "emphasis") && (n.emphasis = i.label, delete i.label) + } + + function jy(t, e) { + return t.hasOwnProperty(e) + } + + function Yy(t, e) { + return Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}, t.get("padding")) + } + + function qy(t, e, n, o) { + return Rn(t.get(e).replace(/^path:\/\//, ""), i(o || {}), new $t(n[0], n[1], n[2], n[3]), "center") + } + + function Ky(t, e, i, o, a, r) { + var s = e.get("color"); + a ? (a.setColor(s), i.add(a), r && r.onUpdate(a)) : ((a = Tl(t.get("symbol"), -1, -1, 2, 2, s)).setStyle("strokeNoScale", !0), i.add(a), r && r.onCreate(a)); + var l = e.getItemStyle(["color", "symbol", "symbolSize"]); + a.setStyle(l), o = n({rectHover: !0, z2: 100}, o, !0); + var u = t.get("symbolSize"); + (u = u instanceof Array ? u.slice() : [+u, +u])[0] /= 2, u[1] /= 2, o.scale = u; + var h = t.get("symbolOffset"); + if (h) { + var c = o.position = o.position || [0, 0]; + c[0] += Do(h[0], u[0]), c[1] += Do(h[1], u[1]) + } + var d = t.get("symbolRotate"); + return o.rotation = (d || 0) * Math.PI / 180 || 0, a.attr(o), a.updateTransform(), a + } + + function $y(t, e, i, n, o) { + if (!t.dragging) { + var a = n.getModel("checkpointStyle"), r = i.dataToCoord(n.getData().get(["value"], e)); + o || !a.get("animation", !0) ? t.attr({position: [r, 0]}) : (t.stopAnimation(!0), t.animateTo({position: [r, 0]}, a.get("animationDuration", !0), a.get("animationEasing", !0))) + } + } + + function Jy(t) { + return 0 === t.indexOf("my") + } + + function Qy(t) { + this.model = t + } + + function tx(t) { + this.model = t + } + + function ex(t) { + var e = {}, i = [], n = []; + return t.eachRawSeries(function (t) { + var o = t.coordinateSystem; + if (!o || "cartesian2d" !== o.type && "polar" !== o.type) i.push(t); else { + var a = o.getBaseAxis(); + if ("category" === a.type) { + var r = a.dim + "_" + a.index; + e[r] || (e[r] = {categoryAxis: a, valueAxis: o.getOtherAxis(a), series: []}, n.push({ + axisDim: a.dim, + axisIndex: a.index + })), e[r].series.push(t) + } else i.push(t) + } + }), {seriesGroupByCategoryAxis: e, other: i, meta: n} + } + + function ix(t) { + var e = []; + return d(t, function (t, i) { + var n = t.categoryAxis, o = t.valueAxis.dim, a = [" "].concat(f(t.series, function (t) { + return t.name + })), r = [n.model.getCategories()]; + d(t.series, function (t) { + r.push(t.getRawData().mapArray(o, function (t) { + return t + })) + }); + for (var s = [a.join(HN)], l = 0; l < r[0].length; l++) { + for (var u = [], h = 0; h < r.length; h++) u.push(r[h][l]); + s.push(u.join(HN)) + } + e.push(s.join("\n")) + }), e.join("\n\n" + FN + "\n\n") + } + + function nx(t) { + return f(t, function (t) { + var e = t.getRawData(), i = [t.name], n = []; + return e.each(e.dimensions, function () { + for (var t = arguments.length, o = arguments[t - 1], a = e.getName(o), r = 0; r < t - 1; r++) n[r] = arguments[r]; + i.push((a ? a + HN : "") + n.join(HN)) + }), i.join("\n") + }).join("\n\n" + FN + "\n\n") + } + + function ox(t) { + var e = ex(t); + return { + value: g([ix(e.seriesGroupByCategoryAxis), nx(e.other)], function (t) { + return t.replace(/[\n\t\s]/g, "") + }).join("\n\n" + FN + "\n\n"), meta: e.meta + } + } + + function ax(t) { + return t.replace(/^\s\s*/, "").replace(/\s\s*$/, "") + } + + function rx(t) { + if (t.slice(0, t.indexOf("\n")).indexOf(HN) >= 0) return !0 + } + + function sx(t) { + for (var e = t.split(/\n+/g), i = [], n = f(ax(e.shift()).split(ZN), function (t) { + return {name: t, data: []} + }), o = 0; o < e.length; o++) { + var a = ax(e[o]).split(ZN); + i.push(a.shift()); + for (var r = 0; r < a.length; r++) n[r] && (n[r].data[o] = a[r]) + } + return {series: n, categories: i} + } + + function lx(t) { + for (var e = t.split(/\n+/g), i = ax(e.shift()), n = [], o = 0; o < e.length; o++) { + var a, r = ax(e[o]).split(ZN), s = "", l = !1; + isNaN(r[0]) ? (l = !0, s = r[0], r = r.slice(1), n[o] = { + name: s, + value: [] + }, a = n[o].value) : a = n[o] = []; + for (var u = 0; u < r.length; u++) a.push(+r[u]); + 1 === a.length && (l ? n[o].value = a[0] : n[o] = a[0]) + } + return {name: i, data: n} + } + + function ux(t, e) { + var i = {series: []}; + return d(t.split(new RegExp("\n*" + FN + "\n*", "g")), function (t, n) { + if (rx(t)) { + var o = sx(t), a = e[n], r = a.axisDim + "Axis"; + a && (i[r] = i[r] || [], i[r][a.axisIndex] = {data: o.categories}, i.series = i.series.concat(o.series)) + } else { + o = lx(t); + i.series.push(o) + } + }), i + } + + function hx(t) { + this._dom = null, this.model = t + } + + function cx(t, e) { + return f(t, function (t, i) { + var n = e && e[i]; + return w(n) && !y(n) ? (w(t) && !y(t) && (t = t.value), r({value: t}, n)) : t + }) + } + + function dx(t, e) { + var i = mx(t); + UN(e, function (e, n) { + for (var o = i.length - 1; o >= 0 && !i[o][n]; o--) ; + if (o < 0) { + var a = t.queryComponents({mainType: "dataZoom", subType: "select", id: n})[0]; + if (a) { + var r = a.getPercentRange(); + i[0][n] = {dataZoomId: n, start: r[0], end: r[1]} + } + } + }), i.push(e) + } + + function fx(t) { + var e = mx(t), i = e[e.length - 1]; + e.length > 1 && e.pop(); + var n = {}; + return UN(i, function (t, i) { + for (var o = e.length - 1; o >= 0; o--) if (t = e[o][i]) { + n[i] = t; + break + } + }), n + } + + function px(t) { + t[XN] = null + } + + function gx(t) { + return mx(t).length + } + + function mx(t) { + var e = t[XN]; + return e || (e = t[XN] = [{}]), e + } + + function vx(t, e, i) { + (this._brushController = new Qd(i.getZr())).on("brush", m(this._onBrush, this)).mount(), this._isZoomActive + } + + function yx(t) { + var e = {}; + return d(["xAxisIndex", "yAxisIndex"], function (i) { + e[i] = t[i], null == e[i] && (e[i] = "all"), (!1 === e[i] || "none" === e[i]) && (e[i] = []) + }), e + } + + function xx(t, e) { + t.setIconStatus("back", gx(e) > 1 ? "emphasis" : "normal") + } + + function _x(t, e, i, n, o) { + var a = i._isZoomActive; + n && "takeGlobalCursor" === n.type && (a = "dataZoomSelect" === n.key && n.dataZoomSelectActive), i._isZoomActive = a, t.setIconStatus("zoom", a ? "emphasis" : "normal"); + var r = new bv(yx(t.option), e, {include: ["grid"]}); + i._brushController.setPanels(r.makePanelOpts(o, function (t) { + return t.xAxisDeclared && !t.yAxisDeclared ? "lineX" : !t.xAxisDeclared && t.yAxisDeclared ? "lineY" : "rect" + })).enableBrush(!!a && {brushType: "auto", brushStyle: {lineWidth: 0, fill: "rgba(0,0,0,0.2)"}}) + } + + function bx(t) { + this.model = t + } + + function Sx(t) { + return QN(t) + } + + function Mx() { + if (!iO && nO) { + iO = !0; + var t = nO.styleSheets; + t.length < 31 ? nO.createStyleSheet().addRule(".zrvml", "behavior:url(#default#VML)") : t[0].addRule(".zrvml", "behavior:url(#default#VML)") + } + } + + function Ix(t) { + return parseInt(t, 10) + } + + function Tx(t, e) { + Mx(), 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 o = e.delFromStorage, a = e.addToStorage; + e.delFromStorage = function (t) { + o.call(e, t), t && t.onRemove && t.onRemove(n) + }, e.addToStorage = function (t) { + t.onAdd && t.onAdd(n), a.call(e, t) + }, this._firstPaint = !0 + } + + function Dx(t) { + return function () { + ew('In IE8.0 VML mode painter not support method "' + t + '"') + } + } + + function Ax(t) { + return document.createElementNS(zO, t) + } + + function Cx(t) { + return WO(1e4 * t) / 1e4 + } + + function Lx(t) { + return t < jO && t > -jO + } + + function kx(t, e) { + var i = e ? t.textFill : t.fill; + return null != i && i !== GO + } + + function Px(t, e) { + var i = e ? t.textStroke : t.stroke; + return null != i && i !== GO + } + + function Nx(t, e) { + e && Ox(t, "transform", "matrix(" + VO.call(e, ",") + ")") + } + + function Ox(t, e, i) { + (!i || "linear" !== i.type && "radial" !== i.type) && ("string" == typeof i && i.indexOf("NaN") > -1 && console.log(i), t.setAttribute(e, i)) + } + + function Ex(t, e, i) { + t.setAttributeNS("http://www.w3.org/1999/xlink", e, i) + } + + function Rx(t, e, i) { + if (kx(e, i)) { + var n = i ? e.textFill : e.fill; + n = "transparent" === n ? GO : n, "none" !== t.getAttribute("clip-path") && n === GO && (n = "rgba(0, 0, 0, 0.002)"), Ox(t, "fill", n), Ox(t, "fill-opacity", e.opacity) + } else Ox(t, "fill", GO); + if (Px(e, i)) { + var o = i ? e.textStroke : e.stroke; + Ox(t, "stroke", o = "transparent" === o ? GO : o), Ox(t, "stroke-width", (i ? e.textStrokeWidth : e.lineWidth) / (!i && e.strokeNoScale ? e.host.getLineScale() : 1)), Ox(t, "paint-order", i ? "stroke" : "fill"), Ox(t, "stroke-opacity", e.opacity), e.lineDash ? (Ox(t, "stroke-dasharray", e.lineDash.join(",")), Ox(t, "stroke-dashoffset", WO(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", GO) + } + + function zx(t) { + for (var e = [], i = t.data, n = t.len(), o = 0; o < n;) { + var a = "", r = 0; + switch (i[o++]) { + case BO.M: + a = "M", r = 2; + break; + case BO.L: + a = "L", r = 2; + break; + case BO.Q: + a = "Q", r = 4; + break; + case BO.C: + a = "C", r = 6; + break; + case BO.A: + var s = i[o++], l = i[o++], u = i[o++], h = i[o++], c = i[o++], d = i[o++], f = i[o++], p = i[o++], + g = Math.abs(d), m = Lx(g - UO) && !Lx(g), v = !1; + v = g >= UO || !Lx(g) && (d > -ZO && d < 0 || d > ZO) == !!p; + var y = Cx(s + u * HO(c)), x = Cx(l + h * FO(c)); + m && (d = p ? UO - 1e-4 : 1e-4 - UO, v = !0, 9 === o && e.push("M", y, x)); + var _ = Cx(s + u * HO(c + d)), w = Cx(l + h * FO(c + d)); + e.push("A", Cx(u), Cx(h), WO(f * XO), +v, +p, _, w); + break; + case BO.Z: + a = "Z"; + break; + case BO.R: + var _ = Cx(i[o++]), w = Cx(i[o++]), b = Cx(i[o++]), S = Cx(i[o++]); + e.push("M", _, w, "L", _ + b, w, "L", _ + b, w + S, "L", _, w + S, "L", _, w) + } + a && e.push(a); + for (var M = 0; M < r; M++) e.push(Cx(i[o++])) + } + return e.join(" ") + } + + function Bx(t) { + return "middle" === t ? "middle" : "bottom" === t ? "baseline" : "hanging" + } + + function Vx() { + } + + function Gx(t, e, i, n) { + for (var o = 0, a = e.length, r = 0, s = 0; o < a; o++) { + var l = e[o]; + if (l.removed) { + for (var u = [], h = s; h < s + l.count; h++) u.push(h); + l.indices = u, s += l.count + } else { + for (var u = [], h = r; h < r + l.count; h++) u.push(h); + l.indices = u, r += l.count, l.added || (s += l.count) + } + } + return e + } + + function Wx(t) { + return {newPos: t.newPos, components: t.components.slice(0)} + } + + function Fx(t, e, i, n, o) { + this._zrId = t, this._svgRoot = e, this._tagNames = "string" == typeof i ? [i] : i, this._markLabel = n, this._domName = o || "_dom", this.nextId = 0 + } + + function Hx(t, e) { + Fx.call(this, t, e, ["linearGradient", "radialGradient"], "__gradient_in_use__") + } + + function Zx(t, e) { + Fx.call(this, t, e, "clipPath", "__clippath_in_use__") + } + + function Ux(t, e) { + Fx.call(this, t, e, ["filter"], "__filter_in_use__", "_shadowDom") + } + + function Xx(t) { + return t && (t.shadowBlur || t.shadowOffsetX || t.shadowOffsetY || t.textShadowBlur || t.textShadowOffsetX || t.textShadowOffsetY) + } + + function jx(t) { + return parseInt(t, 10) + } + + function Yx(t) { + return t instanceof In ? YO : t instanceof Je ? qO : t instanceof fS ? KO : YO + } + + function qx(t, e) { + return e && t && e.parentNode !== t + } + + function Kx(t, e, i) { + if (qx(t, e) && i) { + var n = i.nextSibling; + n ? t.insertBefore(e, n) : t.appendChild(e) + } + } + + function $x(t, e) { + if (qx(t, e)) { + var i = t.firstChild; + i ? t.insertBefore(e, i) : t.appendChild(e) + } + } + + function Jx(t, e) { + e && t && e.parentNode === t && t.removeChild(e) + } + + function Qx(t) { + return t.__textSvgEl + } + + function t_(t) { + return t.__svgEl + } + + function e_(t) { + return function () { + ew('In SVG mode painter not support method "' + t + '"') + } + } + + var i_ = 2311, n_ = function () { + return i_++ + }, o_ = {}, a_ = o_ = "object" == typeof wx && "function" == typeof wx.getSystemInfoSync ? { + browser: {}, + os: {}, + node: !1, + wxa: !0, + canvasSupported: !0, + svgSupported: !1, + touchEventsSupported: !0 + } : "undefined" == typeof document && "undefined" != typeof self ? { + browser: {}, + os: {}, + node: !1, + worker: !0, + canvasSupported: !0 + } : "undefined" == typeof navigator ? { + browser: {}, + os: {}, + node: !0, + worker: !1, + canvasSupported: !0, + svgSupported: !0 + } : function (t) { + var e = {}, i = {}, n = t.match(/Firefox\/([\d.]+)/), + o = t.match(/MSIE\s([\d.]+)/) || t.match(/Trident\/.+?rv:(([\d.]+))/), a = t.match(/Edge\/([\d.]+)/), + r = /micromessenger/i.test(t); + return n && (i.firefox = !0, i.version = n[1]), o && (i.ie = !0, i.version = o[1]), a && (i.edge = !0, i.version = a[1]), r && (i.weChat = !0), { + 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), r_ = { + "[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 + }, l_ = Object.prototype.toString, u_ = Array.prototype, h_ = u_.forEach, c_ = u_.filter, d_ = u_.slice, + f_ = u_.map, p_ = u_.reduce, g_ = {}, m_ = function () { + return g_.createCanvas() + }; + g_.createCanvas = function () { + return document.createElement("canvas") + }; + var v_, y_ = "__ec_primitive__"; + E.prototype = { + constructor: E, get: function (t) { + return this.hasOwnProperty(t) ? this[t] : null + }, set: function (t, e) { + return this[t] = e + }, each: function (t, e) { + void 0 !== e && (t = m(t, e)); + for (var i in this) this.hasOwnProperty(i) && t(this[i], i) + }, removeKey: function (t) { + delete this[t] + } + }; + var x_ = (Object.freeze || Object)({ + $override: e, + clone: i, + merge: n, + mergeAll: o, + extend: a, + defaults: r, + createCanvas: m_, + getContext: s, + indexOf: l, + inherits: u, + mixin: h, + isArrayLike: c, + each: d, + map: f, + reduce: p, + filter: g, + find: function (t, e, i) { + if (t && e) for (var n = 0, o = t.length; n < o; n++) if (e.call(i, t[n], n, t)) return t[n] + }, + bind: m, + curry: v, + isArray: y, + isFunction: x, + isString: _, + isObject: w, + isBuiltInObject: b, + isTypedArray: S, + isDom: M, + eqNaN: I, + retrieve: T, + retrieve2: D, + retrieve3: A, + slice: C, + normalizeCssArray: L, + assert: k, + trim: P, + setAsPrimitive: N, + isPrimitive: O, + createHashMap: R, + concatArray: z, + noop: B + }), __ = "undefined" == typeof Float32Array ? Array : Float32Array, w_ = X, b_ = j, S_ = K, M_ = $, + I_ = (Object.freeze || Object)({ + create: V, + copy: G, + clone: W, + set: F, + add: H, + scaleAndAdd: Z, + sub: U, + len: X, + length: w_, + lenSquare: j, + lengthSquare: b_, + mul: function (t, e, i) { + return t[0] = e[0] * i[0], t[1] = e[1] * i[1], t + }, + div: function (t, e, i) { + return t[0] = e[0] / i[0], t[1] = e[1] / i[1], t + }, + dot: function (t, e) { + return t[0] * e[0] + t[1] * e[1] + }, + scale: Y, + normalize: q, + distance: K, + dist: S_, + distanceSquare: $, + distSquare: M_, + negate: function (t, e) { + return t[0] = -e[0], t[1] = -e[1], t + }, + lerp: J, + applyTransform: Q, + min: tt, + max: et + }); + it.prototype = { + constructor: it, _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(nt(e, t), "dragstart", t.event)) + }, _drag: function (t) { + var e = this._draggingTarget; + if (e) { + var i = t.offsetX, n = t.offsetY, o = i - this._x, a = n - this._y; + this._x = i, this._y = n, e.drift(o, a, t), this.dispatchToElement(nt(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(nt(s, t), "dragleave", t.event), r && r !== s && this.dispatchToElement(nt(r, t), "dragenter", t.event)) + } + }, _dragEnd: function (t) { + var e = this._draggingTarget; + e && (e.dragging = !1), this.dispatchToElement(nt(e, t), "dragend", t.event), this._dropTarget && this.dispatchToElement(nt(this._dropTarget, t), "drop", t.event), this._draggingTarget = null, this._dropTarget = null + } + }; + var T_ = Array.prototype.slice, D_ = function () { + this._$handlers = {} + }; + D_.prototype = { + constructor: D_, one: function (t, e, i) { + var n = this._$handlers; + if (!e || !t) return this; + n[t] || (n[t] = []); + for (var o = 0; o < n[t].length; o++) if (n[t][o].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 o = 0; o < n[t].length; o++) if (n[t][o].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 = [], o = 0, a = i[t].length; o < a; o++) i[t][o].h != e && n.push(i[t][o]); + 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 = T_.call(e, 1)); + for (var n = this._$handlers[t], o = n.length, a = 0; a < o;) { + switch (i) { + case 1: + n[a].h.call(n[a].ctx); + break; + case 2: + n[a].h.call(n[a].ctx, e[1]); + break; + case 3: + n[a].h.call(n[a].ctx, e[1], e[2]); + break; + default: + n[a].h.apply(n[a].ctx, e) + } + n[a].one ? (n.splice(a, 1), o--) : a++ + } + } + return this + }, triggerWithContext: function (t) { + if (this._$handlers[t]) { + var e = arguments, i = e.length; + i > 4 && (e = T_.call(e, 1, e.length - 1)); + for (var n = e[e.length - 1], o = this._$handlers[t], a = o.length, r = 0; r < a;) { + switch (i) { + case 1: + o[r].h.call(n); + break; + case 2: + o[r].h.call(n, e[1]); + break; + case 3: + o[r].h.call(n, e[1], e[2]); + break; + default: + o[r].h.apply(n, e) + } + o[r].one ? (o.splice(r, 1), a--) : r++ + } + } + return this + } + }; + var A_ = "silent"; + at.prototype.dispose = function () { + }; + var C_ = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"], + L_ = function (t, e, i, n) { + D_.call(this), this.storage = t, this.painter = e, this.painterRoot = n, i = i || new at, this.proxy = null, this._hovered = {}, this._lastTouchMoment, this._lastX, this._lastY, it.call(this), this.setHandlerProxy(i) + }; + L_.prototype = { + constructor: L_, setHandlerProxy: function (t) { + this.proxy && this.proxy.dispose(), t && (d(C_, function (e) { + t.on && t.on(e, this[e], this) + }, this), t.handler = this), this.proxy = t + }, mousemove: function (t) { + var e = t.zrX, i = t.zrY, n = this._hovered, o = n.target; + o && !o.__zr && (o = (n = this.findHover(n.x, n.y)).target); + var a = this._hovered = this.findHover(e, i), r = a.target, s = this.proxy; + s.setCursor && s.setCursor(r ? r.cursor : "default"), o && r !== o && this.dispatchToElement(n, "mouseout", t), this.dispatchToElement(a, "mousemove", t), r && r !== o && this.dispatchToElement(a, "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 o = "on" + e, a = ot(e, t, i); n && (n[o] && (a.cancelBubble = n[o].call(n, a)), n.trigger(e, a), n = n.parent, !a.cancelBubble);) ; + a.cancelBubble || (this.trigger(e, a), this.painter && this.painter.eachOtherLayer(function (t) { + "function" == typeof t[o] && t[o].call(t, a), t.trigger && t.trigger(e, a) + })) + } + }, findHover: function (t, e, i) { + for (var n = this.storage.getDisplayList(), o = {x: t, y: e}, a = n.length - 1; a >= 0; a--) { + var r; + if (n[a] !== i && !n[a].ignore && (r = rt(n[a], t, e)) && (!o.topTarget && (o.topTarget = n[a]), r !== A_)) { + o.target = n[a]; + break + } + } + return o + } + }, d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) { + L_.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 ("mouseup" === t) this._upEl = n; else if ("click" === t) { + if (this._downEl !== this._upEl || !this._downPoint || S_(this._downPoint, [e.zrX, e.zrY]) > 4) return; + this._downPoint = null + } + this.dispatchToElement(i, t, e) + } + }), h(L_, D_), h(L_, it); + var k_ = "undefined" == typeof Float32Array ? Array : Float32Array, P_ = (Object.freeze || Object)({ + create: st, + identity: lt, + copy: ut, + mul: ht, + translate: ct, + rotate: dt, + scale: ft, + invert: pt, + clone: gt + }), N_ = lt, O_ = 5e-5, E_ = 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 + }, R_ = E_.prototype; + R_.transform = null, R_.needLocalTransform = function () { + return mt(this.rotation) || mt(this.position[0]) || mt(this.position[1]) || mt(this.scale[0] - 1) || mt(this.scale[1] - 1) + }, R_.updateTransform = function () { + var t = this.parent, e = t && t.transform, i = this.needLocalTransform(), n = this.transform; + i || e ? (n = n || st(), i ? this.getLocalTransform(n) : N_(n), e && (i ? ht(n, t.transform, n) : ut(n, t.transform)), this.transform = n, this.invTransform = this.invTransform || st(), pt(this.invTransform, n)) : n && N_(n) + }, R_.getLocalTransform = function (t) { + return E_.getLocalTransform(this, t) + }, R_.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) + }, R_.restoreTransform = function (t) { + var e = t.dpr || 1; + t.setTransform(e, 0, 0, e, 0, 0) + }; + var z_ = []; + R_.decomposeTransform = function () { + if (this.transform) { + var t = this.parent, e = this.transform; + t && t.transform && (ht(z_, t.invTransform, e), e = z_); + var i = e[0] * e[0] + e[1] * e[1], n = e[2] * e[2] + e[3] * e[3], o = this.position, a = this.scale; + mt(i - 1) && (i = Math.sqrt(i)), mt(n - 1) && (n = Math.sqrt(n)), e[0] < 0 && (i = -i), e[3] < 0 && (n = -n), o[0] = e[4], o[1] = e[5], a[0] = i, a[1] = n, this.rotation = Math.atan2(-e[1] / n, e[0] / i) + } + }, R_.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] + }, R_.transformCoordToLocal = function (t, e) { + var i = [t, e], n = this.invTransform; + return n && Q(i, i, n), i + }, R_.transformCoordToGlobal = function (t, e) { + var i = [t, e], n = this.transform; + return n && Q(i, i, n), i + }, E_.getLocalTransform = function (t, e) { + N_(e = e || []); + var i = t.origin, n = t.scale || [1, 1], o = t.rotation || 0, a = t.position || [0, 0]; + return i && (e[4] -= i[0], e[5] -= i[1]), ft(e, e, n), o && dt(e, e, o), i && (e[4] += i[0], e[5] += i[1]), e[4] += a[0], e[5] += a[1], e + }; + var B_ = { + 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; + return 0 === t ? 0 : 1 === t ? 1 : (!i || i < 1 ? (i = 1, e = .1) : e = .4 * Math.asin(1 / i) / (2 * Math.PI), (t *= 2) < 1 ? i * Math.pow(2, 10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * -.5 : i * Math.pow(2, -10 * (t -= 1)) * Math.sin((t - e) * (2 * Math.PI) / .4) * .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 - B_.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 * B_.bounceIn(2 * t) : .5 * B_.bounceOut(2 * t - 1) + .5 + } + }; + vt.prototype = { + constructor: vt, 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, o = "string" == typeof n ? B_[n] : n, a = "function" == typeof o ? o(i) : i; + return this.fire("frame", a), 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 V_ = function () { + this.head = null, this.tail = null, this._len = 0 + }, G_ = V_.prototype; + G_.insert = function (t) { + var e = new W_(t); + return this.insertEntry(e), e + }, G_.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++ + }, G_.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-- + }, G_.len = function () { + return this._len + }, G_.clear = function () { + this.head = this.tail = null, this._len = 0 + }; + var W_ = function (t) { + this.value = t, this.next, this.prev + }, F_ = function (t) { + this._list = new V_, this._map = {}, this._maxSize = t || 10, this._lastRemovedEntry = null + }, H_ = F_.prototype; + H_.put = function (t, e) { + var i = this._list, n = this._map, o = null; + if (null == n[t]) { + var a = i.len(), r = this._lastRemovedEntry; + if (a >= this._maxSize && a > 0) { + var s = i.head; + i.remove(s), delete n[s.key], o = s.value, this._lastRemovedEntry = s + } + r ? r.value = e : r = new W_(e), r.key = t, i.insertEntry(r), n[t] = r + } + return o + }, H_.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 + }, H_.clear = function () { + this._list.clear(), this._map = {} + }; + var Z_ = { + 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] + }, U_ = new F_(20), X_ = null, j_ = Nt, Y_ = Ot, q_ = (Object.freeze || Object)({ + parse: At, + lift: kt, + toHex: Pt, + fastLerp: Nt, + fastMapToColor: j_, + lerp: Ot, + mapToColor: Y_, + modifyHSL: Et, + modifyAlpha: Rt, + stringify: zt + }), K_ = Array.prototype.slice, $_ = function (t, e, i, n) { + this._tracks = {}, this._target = t, this._loop = e || !1, this._getter = i || Bt, this._setter = n || Vt, this._clipCount = 0, this._delay = 0, this._doneList = [], this._onframeList = [], this._clipList = [] + }; + $_.prototype = { + when: function (t, e) { + var i = this._tracks; + for (var n in e) if (e.hasOwnProperty(n)) { + if (!i[n]) { + i[n] = []; + var o = this._getter(this._target, n); + if (null == o) continue; + 0 !== t && i[n].push({time: 0, value: jt(o)}) + } + 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, o = 0; + for (var a in this._tracks) if (this._tracks.hasOwnProperty(a)) { + var r = Kt(this, t, function () { + --o || n._doneCallback() + }, this._tracks[a], a, e); + r && (this._clipList.push(r), o++, this.animation && this.animation.addClip(r), i = r) + } + if (i) { + var s = i.onframe; + i.onframe = function (t, e) { + s(t, e); + for (var i = 0; i < n._onframeList.length; i++) n._onframeList[i](t, e) + } + } + return o || this._doneCallback(), this + }, stop: function (t) { + for (var e = this._clipList, i = this.animation, n = 0; n < e.length; n++) { + var o = e[n]; + t && o.onframe(this._target, 1), i && i.removeClip(o) + } + 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 J_ = 1; + "undefined" != typeof window && (J_ = Math.max(window.devicePixelRatio || 1, 1)); + var Q_ = J_, tw = function () { + }, ew = tw, iw = function () { + this.animators = [] + }; + iw.prototype = { + constructor: iw, animate: function (t, e) { + var i, n = !1, o = this, a = this.__zr; + if (t) { + var r = t.split("."), s = o; + n = "shape" === r[0]; + for (var u = 0, h = r.length; u < h; u++) s && (s = s[r[u]]); + s && (i = s) + } else i = o; + if (i) { + var c = o.animators, d = new $_(i, e); + return d.during(function (t) { + o.dirty(n) + }).done(function () { + c.splice(l(c, d), 1) + }), c.push(d), a && a.animation.addAnimator(d), d + } + ew('Property "' + t + '" is not existed in element ' + o.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, o, a) { + _(i) ? (o = n, n = i, i = 0) : x(n) ? (o = n, n = "linear", i = 0) : x(i) ? (o = i, i = 0) : x(e) ? (o = e, e = 500) : e || (e = 500), this.stopAnimation(), this._animateToShallow("", this, t, e, i); + var r = this.animators.slice(), s = r.length; + s || o && o(); + for (var l = 0; l < r.length; l++) r[l].done(function () { + --s || o && o() + }).start(n, a) + }, _animateToShallow: function (t, e, i, n, o) { + var a = {}, r = 0; + for (var s in i) if (i.hasOwnProperty(s)) if (null != e[s]) w(i[s]) && !c(i[s]) ? this._animateToShallow(t ? t + "." + s : s, e[s], i[s], n, o) : (a[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, a).delay(o || 0), this + } + }; + var nw = function (t) { + E_.call(this, t), D_.call(this, t), iw.call(this, t), this.id = t.id || n_() + }; + nw.prototype = { + type: "element", name: "", __zr: null, ignore: !1, clipPath: null, isGroup: !1, 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 (w(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) + } + }, h(nw, iw), h(nw, E_), h(nw, D_); + var ow = Q, aw = Math.min, rw = Math.max; + $t.prototype = { + constructor: $t, union: function (t) { + var e = aw(t.x, this.x), i = aw(t.y, this.y); + this.width = rw(t.x + t.width, this.x + this.width) - e, this.height = rw(t.y + t.height, this.y + this.height) - i, this.x = e, this.y = i + }, applyTransform: function () { + var t = [], e = [], i = [], n = []; + return function (o) { + if (o) { + t[0] = i[0] = this.x, t[1] = n[1] = this.y, e[0] = n[0] = this.x + this.width, e[1] = i[1] = this.y + this.height, ow(t, t, o), ow(e, e, o), ow(i, i, o), ow(n, n, o), this.x = aw(t[0], e[0], i[0], n[0]), this.y = aw(t[1], e[1], i[1], n[1]); + var a = rw(t[0], e[0], i[0], n[0]), r = rw(t[1], e[1], i[1], n[1]); + this.width = a - this.x, this.height = r - this.y + } + } + }(), calculateTransform: function (t) { + var e = this, i = t.width / e.width, n = t.height / e.height, o = st(); + return ct(o, o, [-e.x, -e.y]), ft(o, o, [i, n]), ct(o, o, [t.x, t.y]), o + }, intersect: function (t) { + if (!t) return !1; + t instanceof $t || (t = $t.create(t)); + var e = this, i = e.x, n = e.x + e.width, o = e.y, a = e.y + e.height, r = t.x, s = t.x + t.width, l = t.y, + u = t.y + t.height; + return !(n < r || s < i || a < l || u < o) + }, 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 $t(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} + } + }, $t.create = function (t) { + return new $t(t.x, t.y, t.width, t.height) + }; + var sw = function (t) { + t = t || {}, nw.call(this, t); + for (var e in t) t.hasOwnProperty(e) && (this[e] = t[e]); + this._children = [], this.__storage = null, this.__dirty = !0 + }; + sw.prototype = { + constructor: sw, 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 sw && t.addChildrenToStorage(e)), i && i.refresh() + }, remove: function (t) { + var e = this.__zr, i = this.__storage, n = this._children, o = l(n, t); + return o < 0 ? this : (n.splice(o, 1), t.parent = null, i && (i.delFromStorage(t), t instanceof sw && 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 sw && 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 o = i[n]; + t.call(e, o, 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 sw && 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 sw && i.delChildrenFromStorage(t) + } + }, dirty: function () { + return this.__dirty = !0, this.__zr && this.__zr.refresh(), this + }, getBoundingRect: function (t) { + for (var e = null, i = new $t(0, 0, 0, 0), n = t || this._children, o = [], a = 0; a < n.length; a++) { + var r = n[a]; + if (!r.ignore && !r.invisible) { + var s = r.getBoundingRect(), l = r.getLocalTransform(o); + l ? (i.copy(s), i.applyTransform(l), (e = e || i.clone()).union(i)) : (e = e || s.clone()).union(s) + } + } + return e || i + } + }, u(sw, nw); + var lw = 32, uw = 7, hw = function () { + this._roots = [], this._displayList = [], this._displayListLen = 0 + }; + hw.prototype = { + constructor: hw, 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, o = e.length; n < o; n++) this._updateAndAddDisplayable(e[n], null, t); + i.length = this._displayListLen, a_.canvasSupported && ae(i, re) + }, _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 o = n, a = t; o;) o.parent = a, o.updateTransform(), e.push(o), a = o, o = o.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 sw && t.addChildrenToStorage(this), this.addToStorage(t), this._roots.push(t)) + }, delRoot: function (t) { + if (null == t) { + for (i = 0; i < this._roots.length; i++) { + var e = this._roots[i]; + e instanceof sw && e.delChildrenFromStorage(this) + } + return this._roots = [], this._displayList = [], void (this._displayListLen = 0) + } + if (t instanceof Array) for (var i = 0, n = t.length; i < n; i++) this.delRoot(t[i]); else { + var o = l(this._roots, t); + o >= 0 && (this.delFromStorage(t), this._roots.splice(o, 1), t instanceof sw && t.delChildrenFromStorage(this)) + } + }, addToStorage: function (t) { + return t && (t.__storage = this, t.dirty(!1)), this + }, delFromStorage: function (t) { + return t && (t.__storage = null), this + }, dispose: function () { + this._renderList = this._roots = null + }, displayableSortFunc: re + }; + var cw = { + shadowBlur: 1, + shadowOffsetX: 1, + shadowOffsetY: 1, + textShadowBlur: 1, + textShadowOffsetX: 1, + textShadowOffsetY: 1, + textBoxShadowBlur: 1, + textBoxShadowOffsetX: 1, + textBoxShadowOffsetY: 1 + }, dw = function (t, e, i) { + return cw.hasOwnProperty(e) ? i *= t.dpr : i + }, + fw = [["shadowBlur", 0], ["shadowOffsetX", 0], ["shadowOffsetY", 0], ["shadowColor", "#000"], ["lineCap", "butt"], ["lineJoin", "miter"], ["miterLimit", 10]], + pw = function (t, e) { + this.extendFrom(t, !1), this.host = e + }; + pw.prototype = { + constructor: pw, + 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, o = i && i.style, a = !o, r = 0; r < fw.length; r++) { + var s = fw[r], l = s[0]; + (a || n[l] !== o[l]) && (t[l] = dw(t, l, n[l] || s[1])) + } + if ((a || n.fill !== o.fill) && (t.fillStyle = n.fill), (a || n.stroke !== o.stroke) && (t.strokeStyle = n.stroke), (a || n.opacity !== o.opacity) && (t.globalAlpha = null == n.opacity ? 1 : n.opacity), (a || n.blend !== o.blend) && (t.globalCompositeOperation = n.blend || "source-over"), this.hasStroke()) { + var u = n.lineWidth; + t.lineWidth = u / (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 ? le : se)(t, e, i), o = e.colorStops, a = 0; a < o.length; a++) n.addColorStop(o[a].offset, o[a].color); + return n + } + }; + for (var gw = pw.prototype, mw = 0; mw < fw.length; mw++) { + var vw = fw[mw]; + vw[0] in gw || (gw[vw[0]] = vw[1]) + } + pw.getGradient = gw.getGradient; + var yw = function (t, e) { + this.image = t, this.repeat = e, this.type = "pattern" + }; + yw.prototype.getCanvasPattern = function (t) { + return t.createPattern(this.image, this.repeat || "repeat") + }; + var xw = function (t, e, i) { + var n; + i = i || Q_, "string" == typeof t ? n = he(t, e, i) : w(t) && (t = (n = t).id), this.id = t, this.dom = n; + var o = n.style; + o && (n.onselectstart = ue, o["-webkit-user-select"] = "none", o["user-select"] = "none", o["-webkit-touch-callout"] = "none", o["-webkit-tap-highlight-color"] = "rgba(0,0,0,0)", o.padding = 0, o.margin = 0, o["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 + }; + xw.prototype = { + constructor: xw, + __dirty: !0, + __used: !1, + __drawIndex: 0, + __startIndex: 0, + __endIndex: 0, + incremental: !1, + getElementCount: function () { + return this.__endIndex - this.__startIndex + }, + initContext: function () { + this.ctx = this.dom.getContext("2d"), this.ctx.dpr = this.dpr + }, + createBackBuffer: function () { + var t = this.dpr; + this.domBack = he("back-" + this.id, this.painter, t), this.ctxBack = this.domBack.getContext("2d"), 1 != t && this.ctxBack.scale(t, t) + }, + resize: function (t, e) { + var i = this.dpr, n = this.dom, o = n.style, a = this.domBack; + o && (o.width = t + "px", o.height = e + "px"), n.width = t * i, n.height = e * i, a && (a.width = t * i, a.height = e * i, 1 != i && this.ctxBack.scale(i, i)) + }, + clear: function (t, e) { + var i = this.dom, n = this.ctx, o = i.width, a = i.height, e = e || this.clearColor, + r = this.motionBlur && !t, s = this.lastFrameAlpha, l = this.dpr; + if (r && (this.domBack || this.createBackBuffer(), this.ctxBack.globalCompositeOperation = "copy", this.ctxBack.drawImage(i, 0, 0, o / l, a / l)), n.clearRect(0, 0, o, a), e && "transparent" !== e) { + var u; + e.colorStops ? (u = e.__canvasGradient || pw.getGradient(n, e, { + x: 0, + y: 0, + width: o, + height: a + }), e.__canvasGradient = u) : e.image && (u = yw.prototype.getCanvasPattern.call(e, n)), n.save(), n.fillStyle = u || e, n.fillRect(0, 0, o, a), n.restore() + } + if (r) { + var h = this.domBack; + n.save(), n.globalAlpha = s, n.drawImage(h, 0, 0, o, a), n.restore() + } + } + }; + var _w = "undefined" != typeof window && (window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.msRequestAnimationFrame && window.msRequestAnimationFrame.bind(window) || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame) || function (t) { + setTimeout(t, 16) + }, ww = new F_(50), bw = {}, Sw = 0, Mw = 5e3, Iw = /\{([a-zA-Z0-9_]+)\|([^}]*)\}/g, Tw = "12px sans-serif", + Dw = {}; + Dw.measureText = function (t, e) { + var i = s(); + return i.font = e || Tw, i.measureText(t) + }; + var Aw = {left: 1, right: 1, center: 1}, Cw = {top: 1, bottom: 1, middle: 1}, Lw = new $t, kw = function () { + }; + kw.prototype = { + constructor: kw, drawRectText: function (t, e) { + var i = this.style; + e = i.textRect || e, this.__dirty && Ne(i); + var n = i.text; + if (null != n && (n += ""), Ke(n, i)) { + t.save(); + var o = this.transform; + i.transformText ? this.setTransform(t) : o && (Lw.copy(e), Lw.applyTransform(o), e = Lw), Ee(this, t, n, i, e), t.restore() + } + } + }, $e.prototype = { + constructor: $e, + 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, + incremental: !1, + inplace: !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 ? nw.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 pw(t, this), this.dirty(!1), this + } + }, u($e, nw), h($e, kw), Je.prototype = { + constructor: Je, type: "image", brush: function (t, e) { + var i = this.style, n = i.image; + i.bind(t, this, e); + var o = this._image = de(n, this._image, this, this.onload); + if (o && pe(o)) { + var a = i.x || 0, r = i.y || 0, s = i.width, l = i.height, u = o.width / o.height; + if (null == s && null != l ? s = l * u : null == l && null != s ? l = s / u : null == s && null == l && (s = o.width, l = o.height), this.setTransform(t), i.sWidth && i.sHeight) { + var h = i.sx || 0, c = i.sy || 0; + t.drawImage(o, h, c, i.sWidth, i.sHeight, a, r, s, l) + } else if (i.sx && i.sy) { + var d = s - (h = i.sx), f = l - (c = i.sy); + t.drawImage(o, h, c, d, f, a, r, s, l) + } else t.drawImage(o, a, r, s, l); + null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect())) + } + }, getBoundingRect: function () { + var t = this.style; + return this._rect || (this._rect = new $t(t.x || 0, t.y || 0, t.width || 0, t.height || 0)), this._rect + } + }, u(Je, $e); + var Pw = new $t(0, 0, 0, 0), Nw = new $t(0, 0, 0, 0), Ow = function (t, e, i) { + this.type = "canvas"; + var n = !t.nodeName || "CANVAS" === t.nodeName.toUpperCase(); + this._opts = i = a({}, i || {}), this.dpr = i.devicePixelRatio || Q_, this._singleCanvas = n, this.root = t; + var o = t.style; + o && (o["-webkit-tap-highlight-color"] = "transparent", o["-webkit-user-select"] = o["user-select"] = o["-webkit-touch-callout"] = "none", t.innerHTML = ""), this.storage = e; + var r = this._zlevelList = [], s = this._layers = {}; + if (this._layerConfig = {}, this._needsManuallyCompositing = !1, n) { + var l = t.width, u = t.height; + null != i.width && (l = i.width), null != i.height && (u = i.height), this.dpr = i.devicePixelRatio || 1, t.width = l * this.dpr, t.height = u * this.dpr, this._width = l, this._height = u; + var h = new xw(t, this, this.dpr); + h.__builtin__ = !0, h.initContext(), s[314159] = h, h.zlevel = 314159, r.push(314159), this._domRoot = t + } else { + this._width = this._getSize(0), this._height = this._getSize(1); + var c = this._domRoot = oi(this._width, this._height); + t.appendChild(c) + } + this._hoverlayer = null, this._hoverElements = [] + }; + Ow.prototype = { + constructor: Ow, 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._redrawId = Math.random(), this._paintList(e, t, this._redrawId); + for (var n = 0; n < i.length; n++) { + var o = i[n], a = this._layers[o]; + if (!a.__builtin__ && a.refresh) { + var r = 0 === n ? this._backgroundColor : null; + a.refresh(r) + } + } + return this.refreshHover(), 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 = l(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) { + ae(t, this.storage.displayableSortFunc), i || (i = this._hoverlayer = this.getLayer(1e5)); + var n = {}; + i.ctx.save(); + for (var o = 0; o < e;) { + var a = t[o], r = a.__from; + r && r.__zr ? (o++, r.invisible || (a.transform = r.transform, a.invTransform = r.invTransform, a.__clipPaths = r.__clipPaths, this._doPaintEl(a, i, !0, n))) : (t.splice(o, 1), r.__hoverMir = null, e--) + } + i.ctx.restore() + } + }, getHoverLayer: function () { + return this.getLayer(1e5) + }, _paintList: function (t, e, i) { + if (this._redrawId === i) { + e = e || !1, this._updateLayerStatus(t); + var n = this._doPaintList(t, e); + if (this._needsManuallyCompositing && this._compositeManually(), !n) { + var o = this; + _w(function () { + o._paintList(t, e, i) + }) + } + } + }, _compositeManually: function () { + var t = this.getLayer(314159).ctx, e = this._domRoot.width, i = this._domRoot.height; + t.clearRect(0, 0, e, i), this.eachBuiltinLayer(function (n) { + n.virtual && t.drawImage(n.dom, 0, 0, e, i) + }) + }, _doPaintList: function (t, e) { + for (var i = [], n = 0; n < this._zlevelList.length; n++) { + var o = this._zlevelList[n]; + (s = this._layers[o]).__builtin__ && s !== this._hoverlayer && (s.__dirty || e) && i.push(s) + } + for (var a = !0, r = 0; r < i.length; r++) { + var s = i[r], l = s.ctx, u = {}; + l.save(); + var h = e ? s.__startIndex : s.__drawIndex, c = !e && s.incremental && Date.now, f = c && Date.now(), + p = s.zlevel === this._zlevelList[0] ? this._backgroundColor : null; + if (s.__startIndex === s.__endIndex) s.clear(!1, p); else if (h === s.__startIndex) { + var g = t[h]; + g.incremental && g.notClear && !e || s.clear(!1, p) + } + -1 === h && (console.error("For some unknown reason. drawIndex is -1"), h = s.__startIndex); + for (var m = h; m < s.__endIndex; m++) { + var v = t[m]; + if (this._doPaintEl(v, s, e, u), v.__dirty = !1, c && Date.now() - f > 15) break + } + s.__drawIndex = m, s.__drawIndex < s.__endIndex && (a = !1), u.prevElClipPaths && l.restore(), l.restore() + } + return a_.wxa && d(this._layers, function (t) { + t && t.ctx && t.ctx.draw && t.ctx.draw() + }), a + }, _doPaintEl: function (t, e, i, n) { + var o = e.ctx, a = t.transform; + if ((e.__dirty || i) && !t.invisible && 0 !== t.style.opacity && (!a || a[0] || a[3]) && (!t.culling || !ei(t, this._width, this._height))) { + var r = t.__clipPaths; + n.prevElClipPaths && !ii(r, n.prevElClipPaths) || (n.prevElClipPaths && (e.ctx.restore(), n.prevElClipPaths = null, n.prevEl = null), r && (o.save(), ni(r, o), n.prevElClipPaths = r)), t.beforeBrush && t.beforeBrush(o), t.brush(o, n.prevEl || null), n.prevEl = t, t.afterBrush && t.afterBrush(o) + } + }, getLayer: function (t, e) { + this._singleCanvas && !this._needsManuallyCompositing && (t = 314159); + var i = this._layers[t]; + return i || ((i = new xw("zr_" + t, this, this.dpr)).zlevel = t, i.__builtin__ = !0, this._layerConfig[t] && n(i, this._layerConfig[t], !0), e && (i.virtual = e), this.insertLayer(t, i), i.initContext()), i + }, insertLayer: function (t, e) { + var i = this._layers, n = this._zlevelList, o = n.length, a = null, r = -1, s = this._domRoot; + if (i[t]) ew("ZLevel " + t + " has been used already"); else if (ti(e)) { + if (o > 0 && t > n[0]) { + for (r = 0; r < o - 1 && !(n[r] < t && n[r + 1] > t); r++) ; + a = i[n[r]] + } + if (n.splice(r + 1, 0, t), i[t] = e, !e.virtual) if (a) { + var l = a.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 ew("Layer of zlevel " + t + " is not valid") + }, eachLayer: function (t, e) { + var i, n, o = this._zlevelList; + for (n = 0; n < o.length; n++) i = o[n], t.call(e, this._layers[i], i) + }, eachBuiltinLayer: function (t, e) { + var i, n, o, a = this._zlevelList; + for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ && t.call(e, i, n) + }, eachOtherLayer: function (t, e) { + var i, n, o, a = this._zlevelList; + for (o = 0; o < a.length; o++) n = a[o], (i = this._layers[n]).__builtin__ || t.call(e, i, n) + }, getLayers: function () { + return this._layers + }, _updateLayerStatus: function (t) { + function e(t) { + i && (i.__endIndex !== t && (i.__dirty = !0), i.__endIndex = t) + } + + if (this.eachBuiltinLayer(function (t, e) { + t.__dirty = t.__used = !1 + }), this._singleCanvas) for (o = 1; o < t.length; o++) if ((r = t[o]).zlevel !== t[o - 1].zlevel || r.incremental) { + this._needsManuallyCompositing = !0; + break + } + for (var i = null, n = 0, o = 0; o < t.length; o++) { + var a, r = t[o], s = r.zlevel; + r.incremental ? ((a = this.getLayer(s + .001, this._needsManuallyCompositing)).incremental = !0, n = 1) : a = this.getLayer(s + (n > 0 ? .01 : 0), this._needsManuallyCompositing), a.__builtin__ || ew("ZLevel " + s + " has been used by unkown layer " + a.id), a !== i && (a.__used = !0, a.__startIndex !== o && (a.__dirty = !0), a.__startIndex = o, a.incremental ? a.__drawIndex = -1 : a.__drawIndex = o, e(o), i = a), r.__dirty && (a.__dirty = !0, a.incremental && a.__drawIndex < 0 && (a.__drawIndex = o)) + } + e(o), this.eachBuiltinLayer(function (t, e) { + !t.__used && t.getElementCount() > 0 && (t.__dirty = !0, t.__startIndex = t.__endIndex = t.__drawIndex = 0), t.__dirty && t.__drawIndex < 0 && (t.__drawIndex = t.__startIndex) + }) + }, clear: function () { + return this.eachBuiltinLayer(this._clearLayer), this + }, _clearLayer: function (t) { + t.clear() + }, setBackgroundColor: function (t) { + this._backgroundColor = t + }, configLayer: function (t, e) { + if (e) { + var i = this._layerConfig; + i[t] ? n(i[t], e, !0) : i[t] = e; + for (var o = 0; o < this._zlevelList.length; o++) { + var a = this._zlevelList[o]; + a !== t && a !== t + .01 || n(this._layers[a], 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(l(i, t), 1)) + }, resize: function (t, e) { + if (this._domRoot.style) { + 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) { + i.style.width = t + "px", i.style.height = e + "px"; + for (var o in this._layers) this._layers.hasOwnProperty(o) && this._layers[o].resize(t, e); + d(this._progressiveLayers, function (i) { + i.resize(t, e) + }), this.refresh(!0) + } + this._width = t, this._height = e + } else { + if (null == t || null == e) return; + this._width = t, this._height = e, this.getLayer(314159).resize(t, e) + } + return 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 && !this._compositeManually) return this._layers[314159].dom; + var e = new xw("image", this, t.pixelRatio || this.dpr); + if (e.initContext(), e.clear(!1, t.backgroundColor || this._backgroundColor), t.pixelRatio <= this.dpr) { + this.refresh(); + var i = e.dom.width, n = e.dom.height, o = e.ctx; + this.eachLayer(function (t) { + t.__builtin__ ? o.drawImage(t.dom, 0, 0, i, n) : t.renderToCanvas && (e.ctx.save(), t.renderToCanvas(e.ctx), e.ctx.restore()) + }) + } else for (var a = {}, r = this.storage.getDisplayList(!0), s = 0; s < r.length; s++) { + var l = r[s]; + this._doPaintEl(l, e, !0, a) + } + return 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], + o = ["paddingLeft", "paddingTop"][t], a = ["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] || Qe(s[i]) || Qe(r.style[i])) - (Qe(s[o]) || 0) - (Qe(s[a]) || 0) | 0 + }, pathToImage: function (t, e) { + e = e || this.dpr; + var i = document.createElement("canvas"), n = i.getContext("2d"), o = t.getBoundingRect(), a = t.style, + r = a.shadowBlur * e, s = a.shadowOffsetX * e, l = a.shadowOffsetY * e, + u = a.hasStroke() ? a.lineWidth : 0, h = Math.max(u / 2, -s + r), c = Math.max(u / 2, s + r), + d = Math.max(u / 2, -l + r), f = Math.max(u / 2, l + r), p = o.width + h + c, g = o.height + d + f; + i.width = p * e, i.height = g * e, n.scale(e, e), n.clearRect(0, 0, p, g), n.dpr = e; + var m = {position: t.position, rotation: t.rotation, scale: t.scale}; + t.position = [h - o.x, d - o.y], t.rotation = 0, t.scale = [1, 1], t.updateTransform(), t && t.brush(n); + var v = new Je({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 Ew = "undefined" != typeof window && !!window.addEventListener, + Rw = /^(?:mouse|pointer|contextmenu|drag|drop)|click/, zw = Ew ? function (t) { + t.preventDefault(), t.stopPropagation(), t.cancelBubble = !0 + } : function (t) { + t.returnValue = !1, t.cancelBubble = !0 + }, Bw = 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, D_.call(this) + }; + Bw.prototype = { + constructor: Bw, 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 = l(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, o = [], a = [], r = 0; r < n; r++) { + var s = i[r], l = s.step(t, e); + l && (o.push(l), a.push(s)) + } + for (r = 0; r < n;) i[r]._needsRemove ? (i[r] = i[n - 1], i.pop(), n--) : r++; + n = o.length; + for (r = 0; r < n; r++) a[r].fire(o[r]); + this._time = t, this.onframe(e), this.trigger("frame", e), this.stage.update && this.stage.update() + }, _startLoop: function () { + function t() { + e._running && (_w(t), !e._paused && e._update()) + } + + var e = this; + this._running = !0, _w(t) + }, 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 = [] + }, isFinished: function () { + return !this._clips.length + }, animate: function (t, e) { + var i = new $_(t, (e = e || {}).loop, e.getter, e.setter); + return this.addAnimator(i), i + } + }, h(Bw, D_); + var Vw = function () { + this._track = [] + }; + Vw.prototype = { + constructor: Vw, 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 o = {points: [], touches: [], target: e, event: t}, a = 0, r = n.length; a < r; a++) { + var s = n[a], l = ri(i, s, {}); + o.points.push([l.zrX, l.zrY]), o.touches.push(s) + } + this._track.push(o) + } + }, _recognize: function (t) { + for (var e in Gw) if (Gw.hasOwnProperty(e)) { + var i = Gw[e](this._track, t); + if (i) return i + } + } + }; + var Gw = { + pinch: function (t, e) { + var i = t.length; + if (i) { + var n = (t[i - 1] || {}).points, o = (t[i - 2] || {}).points || n; + if (o && o.length > 1 && n && n.length > 1) { + var a = di(n) / di(o); + !isFinite(a) && (a = 1), e.pinchScale = a; + var r = fi(n); + return e.pinchX = r[0], e.pinchY = r[1], {type: "pinch", target: t[0].target, event: e} + } + } + } + }, Ww = ["click", "dblclick", "mousewheel", "mouseout", "mouseup", "mousedown", "mousemove", "contextmenu"], + Fw = ["touchstart", "touchend", "touchmove"], + Hw = {pointerdown: 1, pointerup: 1, pointermove: 1, pointerout: 1}, Zw = f(Ww, function (t) { + var e = t.replace("mouse", "pointer"); + return Hw[e] ? e : t + }), Uw = { + mousemove: function (t) { + t = li(this.dom, t), this.trigger("mousemove", t) + }, mouseout: function (t) { + var e = (t = li(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 = li(this.dom, t)).zrByTouch = !0, this._lastTouchMoment = new Date, gi(this, t, "start"), Uw.mousemove.call(this, t), Uw.mousedown.call(this, t), mi(this) + }, touchmove: function (t) { + (t = li(this.dom, t)).zrByTouch = !0, gi(this, t, "change"), Uw.mousemove.call(this, t), mi(this) + }, touchend: function (t) { + (t = li(this.dom, t)).zrByTouch = !0, gi(this, t, "end"), Uw.mouseup.call(this, t), +new Date - this._lastTouchMoment < 300 && Uw.click.call(this, t), mi(this) + }, pointerdown: function (t) { + Uw.mousedown.call(this, t) + }, pointermove: function (t) { + vi(t) || Uw.mousemove.call(this, t) + }, pointerup: function (t) { + Uw.mouseup.call(this, t) + }, pointerout: function (t) { + vi(t) || Uw.mouseout.call(this, t) + } + }; + d(["click", "mousedown", "mouseup", "mousewheel", "dblclick", "contextmenu"], function (t) { + Uw[t] = function (e) { + e = li(this.dom, e), this.trigger(t, e) + } + }); + var Xw = xi.prototype; + Xw.dispose = function () { + for (var t = Ww.concat(Fw), e = 0; e < t.length; e++) { + var i = t[e]; + hi(this.dom, pi(i), this._handlers[i]) + } + }, Xw.setCursor = function (t) { + this.dom.style && (this.dom.style.cursor = t || "default") + }, h(xi, D_); + var jw = !a_.canvasSupported, Yw = {canvas: Ow}, qw = {}, Kw = function (t, e, i) { + i = i || {}, this.dom = e, this.id = t; + var n = this, o = new hw, a = i.renderer; + if (jw) { + if (!Yw.vml) throw new Error("You need to require 'zrender/vml/vml' to support IE8"); + a = "vml" + } else a && Yw[a] || (a = "canvas"); + var r = new Yw[a](e, o, i, t); + this.storage = o, this.painter = r; + var s = a_.node || a_.worker ? null : new xi(r.getViewportRoot()); + this.handler = new L_(o, r, s, r.root), this.animation = new Bw({stage: {update: m(this.flush, this)}}), this.animation.start(), this._needsRefresh; + var l = o.delFromStorage, u = o.addToStorage; + o.delFromStorage = function (t) { + l.call(o, t), t && t.removeSelfFromZr(n) + }, o.addToStorage = function (t) { + u.call(o, t), t.addSelfToZr(n) + } + }; + Kw.prototype = { + constructor: Kw, 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 && this.painter.configLayer(t, e), this._needsRefresh = !0 + }, setBackgroundColor: function (t) { + this.painter.setBackgroundColor && this.painter.setBackgroundColor(t), this._needsRefresh = !0 + }, refreshImmediately: function () { + this._needsRefresh = !1, this.painter.refresh(), this._needsRefresh = !1 + }, refresh: function () { + this._needsRefresh = !0 + }, flush: function () { + var t; + this._needsRefresh && (t = !0, this.refreshImmediately()), this._needsRefreshHover && (t = !0, this.refreshHoverImmediately()), t && this.trigger("rendered") + }, 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 () { + this.animation.stop(), this.clear(), this.storage.dispose(), this.painter.dispose(), this.handler.dispose(), this.animation = this.storage = this.painter = this.handler = null, bi(this.id) + } + }; + var $w = (Object.freeze || Object)({ + version: "4.0.4", init: _i, dispose: function (t) { + if (t) t.dispose(); else { + for (var e in qw) qw.hasOwnProperty(e) && qw[e].dispose(); + qw = {} + } + return this + }, getInstance: function (t) { + return qw[t] + }, registerPainter: wi + }), Jw = d, Qw = w, tb = y, eb = "series\0", + ib = ["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"], + nb = 0, ob = ".", ab = "___EC__COMPONENT__CONTAINER___", rb = 0, sb = 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 o = {}, a = 0; a < t.length; a++) { + var r = t[a][1]; + if (!(i && l(i, r) >= 0 || n && l(n, r) < 0)) { + var s = e.getShallow(r); + null != s && (o[t[a][0]] = s) + } + } + return o + } + }, + lb = sb([["lineWidth", "width"], ["stroke", "color"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + ub = { + getLineStyle: function (t) { + var e = lb(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] + } + }, + hb = sb([["fill", "color"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["opacity"], ["shadowColor"]]), + cb = { + getAreaStyle: function (t, e) { + return hb(this, t, e) + } + }, db = Math.pow, fb = Math.sqrt, pb = 1e-8, gb = 1e-4, mb = fb(3), vb = 1 / 3, yb = V(), xb = V(), _b = V(), + wb = Math.min, bb = Math.max, Sb = Math.sin, Mb = Math.cos, Ib = 2 * Math.PI, Tb = V(), Db = V(), Ab = V(), + Cb = [], Lb = [], kb = {M: 1, L: 2, C: 3, Q: 4, A: 5, Z: 6, R: 7}, Pb = [], Nb = [], Ob = [], Eb = [], + Rb = Math.min, zb = Math.max, Bb = Math.cos, Vb = Math.sin, Gb = Math.sqrt, Wb = Math.abs, + Fb = "undefined" != typeof Float32Array, Hb = function (t) { + this._saveData = !t, this._saveData && (this.data = []), this._ctx = null + }; + Hb.prototype = { + constructor: Hb, + _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 = Wb(1 / Q_ / t) || 0, this._uy = Wb(1 / Q_ / 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(kb.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 = Wb(t - this._xi) > this._ux || Wb(e - this._yi) > this._uy || this._len < 5; + return this.addData(kb.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, o, a) { + return this.addData(kb.C, t, e, i, n, o, a), this._ctx && (this._needsDash() ? this._dashedBezierTo(t, e, i, n, o, a) : this._ctx.bezierCurveTo(t, e, i, n, o, a)), this._xi = o, this._yi = a, this + }, + quadraticCurveTo: function (t, e, i, n) { + return this.addData(kb.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, o, a) { + return this.addData(kb.A, t, e, i, i, n, o - n, 0, a ? 0 : 1), this._ctx && this._ctx.arc(t, e, i, n, o, a), this._xi = Bb(o) * i + t, this._yi = Vb(o) * i + t, this + }, + arcTo: function (t, e, i, n, o) { + return this._ctx && this._ctx.arcTo(t, e, i, n, o), this + }, + rect: function (t, e, i, n) { + return this._ctx && this._ctx.rect(t, e, i, n), this.addData(kb.R, t, e, i, n), this + }, + closePath: function () { + this.addData(kb.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 || !Fb || (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, o = 0; o < e; o++) i += t[o].len(); + Fb && this.data instanceof Float32Array && (this.data = new Float32Array(n + i)); + for (o = 0; o < e; o++) for (var a = t[o].data, r = 0; r < a.length; r++) this.data[n++] = a[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, o = this._dashSum, a = this._dashOffset, r = this._lineDash, s = this._ctx, l = this._xi, + u = this._yi, h = t - l, c = e - u, d = Gb(h * h + c * c), f = l, p = u, g = r.length; + for (h /= d, c /= d, a < 0 && (a = o + a), f -= (a %= o) * h, p -= a * c; h > 0 && f <= t || h < 0 && f >= t || 0 == h && (c > 0 && p <= e || c < 0 && p >= e);) f += h * (i = r[n = this._dashIdx]), p += c * i, this._dashIdx = (n + 1) % g, h > 0 && f < l || h < 0 && f > l || c > 0 && p < u || c < 0 && p > u || s[n % 2 ? "moveTo" : "lineTo"](h >= 0 ? Rb(f, t) : zb(f, t), c >= 0 ? Rb(p, e) : zb(p, e)); + h = f - t, c = p - e, this._dashOffset = -Gb(h * h + c * c) + }, + _dashedBezierTo: function (t, e, i, n, o, a) { + var r, s, l, u, h, c = this._dashSum, d = this._dashOffset, f = this._lineDash, p = this._ctx, g = this._xi, + m = this._yi, v = ji, y = 0, x = this._dashIdx, _ = f.length, w = 0; + for (d < 0 && (d = c + d), d %= c, r = 0; r < 1; r += .1) s = v(g, t, i, o, r + .1) - v(g, t, i, o, r), l = v(m, e, n, a, r + .1) - v(m, e, n, a, r), y += Gb(s * s + l * l); + for (; x < _ && !((w += f[x]) > d); x++) ; + for (r = (w - d) / y; r <= 1;) u = v(g, t, i, o, r), h = v(m, e, n, a, r), x % 2 ? p.moveTo(u, h) : p.lineTo(u, h), r += f[x] / y, x = (x + 1) % _; + x % 2 != 0 && p.lineTo(o, a), s = o - u, l = a - h, this._dashOffset = -Gb(s * s + l * l) + }, + _dashedQuadraticTo: function (t, e, i, n) { + var o = i, a = 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, o, a) + }, + toStatic: function () { + var t = this.data; + t instanceof Array && (t.length = this._len, Fb && (this.data = new Float32Array(t))) + }, + getBoundingRect: function () { + Pb[0] = Pb[1] = Ob[0] = Ob[1] = Number.MAX_VALUE, Nb[0] = Nb[1] = Eb[0] = Eb[1] = -Number.MAX_VALUE; + for (var t = this.data, e = 0, i = 0, n = 0, o = 0, a = 0; a < t.length;) { + var r = t[a++]; + switch (1 == a && (n = e = t[a], o = i = t[a + 1]), r) { + case kb.M: + e = n = t[a++], i = o = t[a++], Ob[0] = n, Ob[1] = o, Eb[0] = n, Eb[1] = o; + break; + case kb.L: + sn(e, i, t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.C: + ln(e, i, t[a++], t[a++], t[a++], t[a++], t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.Q: + un(e, i, t[a++], t[a++], t[a], t[a + 1], Ob, Eb), e = t[a++], i = t[a++]; + break; + case kb.A: + var s = t[a++], l = t[a++], u = t[a++], h = t[a++], c = t[a++], d = t[a++] + c, + f = (t[a++], 1 - t[a++]); + 1 == a && (n = Bb(c) * u + s, o = Vb(c) * h + l), hn(s, l, u, h, c, d, f, Ob, Eb), e = Bb(d) * u + s, i = Vb(d) * h + l; + break; + case kb.R: + sn(n = e = t[a++], o = i = t[a++], n + t[a++], o + t[a++], Ob, Eb); + break; + case kb.Z: + e = n, i = o + } + tt(Pb, Pb, Ob), et(Nb, Nb, Eb) + } + return 0 === a && (Pb[0] = Pb[1] = Nb[0] = Nb[1] = 0), new $t(Pb[0], Pb[1], Nb[0] - Pb[0], Nb[1] - Pb[1]) + }, + rebuildPath: function (t) { + for (var e, i, n, o, a, r, s = this.data, l = this._ux, u = this._uy, h = this._len, c = 0; c < h;) { + var d = s[c++]; + switch (1 == c && (e = n = s[c], i = o = s[c + 1]), d) { + case kb.M: + e = n = s[c++], i = o = s[c++], t.moveTo(n, o); + break; + case kb.L: + a = s[c++], r = s[c++], (Wb(a - n) > l || Wb(r - o) > u || c === h - 1) && (t.lineTo(a, r), n = a, o = r); + break; + case kb.C: + t.bezierCurveTo(s[c++], s[c++], s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1]; + break; + case kb.Q: + t.quadraticCurveTo(s[c++], s[c++], s[c++], s[c++]), n = s[c - 2], o = s[c - 1]; + break; + case kb.A: + var f = s[c++], p = s[c++], g = s[c++], m = s[c++], v = s[c++], y = s[c++], x = s[c++], + _ = s[c++], w = g > m ? g : m, b = g > m ? 1 : g / m, S = g > m ? m / g : 1, M = v + y; + Math.abs(g - m) > .001 ? (t.translate(f, p), t.rotate(x), t.scale(b, S), t.arc(0, 0, w, v, M, 1 - _), t.scale(1 / b, 1 / S), t.rotate(-x), t.translate(-f, -p)) : t.arc(f, p, w, v, M, 1 - _), 1 == c && (e = Bb(v) * g + f, i = Vb(v) * m + p), n = Bb(M) * g + f, o = Vb(M) * m + p; + break; + case kb.R: + e = n = s[c], i = o = s[c + 1], t.rect(s[c++], s[c++], s[c++], s[c++]); + break; + case kb.Z: + t.closePath(), n = e, o = i + } + } + } + }, Hb.CMD = kb; + var Zb = 2 * Math.PI, Ub = 2 * Math.PI, Xb = Hb.CMD, jb = 2 * Math.PI, Yb = 1e-4, qb = [-1, -1, -1], Kb = [-1, -1], + $b = yw.prototype.getCanvasPattern, Jb = Math.abs, Qb = new Hb(!0); + In.prototype = { + constructor: In, type: "path", __dirtyPath: !0, strokeContainThreshold: 5, brush: function (t, e) { + var i = this.style, n = this.path || Qb, o = i.hasStroke(), a = i.hasFill(), r = i.fill, s = i.stroke, + l = a && !!r.colorStops, u = o && !!s.colorStops, h = a && !!r.image, c = o && !!s.image; + if (i.bind(t, this, e), this.setTransform(t), this.__dirty) { + var d; + l && (d = d || this.getBoundingRect(), this._fillGradient = i.getGradient(t, r, d)), u && (d = d || this.getBoundingRect(), this._strokeGradient = i.getGradient(t, s, d)) + } + l ? t.fillStyle = this._fillGradient : h && (t.fillStyle = $b.call(r, t)), u ? t.strokeStyle = this._strokeGradient : c && (t.strokeStyle = $b.call(s, t)); + var f = i.lineDash, p = i.lineDashOffset, g = !!t.setLineDash, m = this.getGlobalScale(); + n.setScale(m[0], m[1]), this.__dirtyPath || f && !g && o ? (n.beginPath(t), f && !g && (n.setLineDash(f), n.setLineDashOffset(p)), this.buildPath(n, this.shape, !1), this.path && (this.__dirtyPath = !1)) : (t.beginPath(), this.path.rebuildPath(t)), a && n.fill(t), f && g && (t.setLineDash(f), t.lineDashOffset = p), o && n.stroke(t), f && g && t.setLineDash([]), null != i.text && (this.restoreTransform(t), this.drawRectText(t, this.getBoundingRect())) + }, buildPath: function (t, e, i) { + }, createPathProxy: function () { + this.path = new Hb + }, getBoundingRect: function () { + var t = this._rect, e = this.style, i = !t; + if (i) { + var n = this.path; + n || (n = this.path = new Hb), this.__dirtyPath && (n.beginPath(), this.buildPath(n, this.shape, !1)), t = n.getBoundingRect() + } + if (this._rect = t, e.hasStroke()) { + var o = this._rectWithStroke || (this._rectWithStroke = t.clone()); + if (this.__dirty || i) { + o.copy(t); + var a = e.lineWidth, r = e.strokeNoScale ? this.getLineScale() : 1; + e.hasFill() || (a = Math.max(a, this.strokeContainThreshold || 4)), r > 1e-10 && (o.width += a / r, o.height += a / r, o.x -= a / r / 2, o.y -= a / r / 2) + } + return o + } + return t + }, contain: function (t, e) { + var i = this.transformCoordToLocal(t, e), n = this.getBoundingRect(), o = this.style; + if (t = i[0], e = i[1], n.contain(t, e)) { + var a = this.path.data; + if (o.hasStroke()) { + var r = o.lineWidth, s = o.strokeNoScale ? this.getLineScale() : 1; + if (s > 1e-10 && (o.hasFill() || (r = Math.max(r, this.strokeContainThreshold)), Mn(a, r / s, t, e))) return !0 + } + if (o.hasFill()) return Sn(a, 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) : $e.prototype.attrKV.call(this, t, e) + }, setShape: function (t, e) { + var i = this.shape; + if (i) { + if (w(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 && Jb(t[0] - 1) > 1e-10 && Jb(t[3] - 1) > 1e-10 ? Math.sqrt(Jb(t[0] * t[3] - t[2] * t[1])) : 1 + } + }, In.extend = function (t) { + var e = function (e) { + In.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 o in i) !n.hasOwnProperty(o) && i.hasOwnProperty(o) && (n[o] = i[o]) + } + t.init && t.init.call(this, e) + }; + u(e, In); + for (var i in t) "style" !== i && "shape" !== i && (e.prototype[i] = t[i]); + return e + }, u(In, $e); + var tS = Hb.CMD, eS = [[], [], []], iS = Math.sqrt, nS = Math.atan2, oS = function (t, e) { + var i, n, o, a, r, s, l = t.data, u = tS.M, h = tS.C, c = tS.L, d = tS.R, f = tS.A, p = tS.Q; + for (o = 0, a = 0; o < l.length;) { + switch (i = l[o++], a = o, n = 0, i) { + case u: + case c: + n = 1; + break; + case h: + n = 3; + break; + case p: + n = 2; + break; + case f: + var g = e[4], m = e[5], v = iS(e[0] * e[0] + e[1] * e[1]), y = iS(e[2] * e[2] + e[3] * e[3]), + x = nS(-e[1] / y, e[0] / v); + l[o] *= v, l[o++] += g, l[o] *= y, l[o++] += m, l[o++] *= v, l[o++] *= y, l[o++] += x, l[o++] += x, a = o += 2; + break; + case d: + s[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1], s[0] += l[o++], s[1] += l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1] + } + for (r = 0; r < n; r++) (s = eS[r])[0] = l[o++], s[1] = l[o++], Q(s, s, e), l[a++] = s[0], l[a++] = s[1] + } + }, aS = ["m", "M", "l", "L", "v", "V", "h", "H", "z", "Z", "c", "C", "q", "Q", "t", "T", "s", "S", "a", "A"], + rS = Math.sqrt, sS = Math.sin, lS = Math.cos, uS = Math.PI, hS = function (t) { + return Math.sqrt(t[0] * t[0] + t[1] * t[1]) + }, cS = function (t, e) { + return (t[0] * e[0] + t[1] * e[1]) / (hS(t) * hS(e)) + }, dS = function (t, e) { + return (t[0] * e[1] < t[1] * e[0] ? -1 : 1) * Math.acos(cS(t, e)) + }, fS = function (t) { + $e.call(this, t) + }; + fS.prototype = { + constructor: fS, type: "text", brush: function (t, e) { + var i = this.style; + this.__dirty && Ne(i), 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), Ke(n, i) && (this.setTransform(t), Ee(this, t, n, i), this.restoreTransform(t)) + }, getBoundingRect: function () { + var t = this.style; + if (this.__dirty && Ne(t), !this._rect) { + var e = t.text; + null != e ? e += "" : e = ""; + var i = me(t.text + "", t.font, t.textAlign, t.textVerticalAlign, t.textPadding, t.rich); + if (i.x += t.x || 0, i.y += t.y || 0, Xe(t.textStroke, t.textStrokeWidth)) { + var n = t.textStrokeWidth; + i.x -= n / 2, i.y -= n / 2, i.width += n, i.height += n + } + this._rect = i + } + return this._rect + } + }, u(fS, $e); + var pS = In.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) + } + }), gS = [["shadowBlur", 0], ["shadowColor", "#000"], ["shadowOffsetX", 0], ["shadowOffsetY", 0]], + mS = function (t) { + return a_.browser.ie && a_.browser.version >= 11 ? function () { + var e, i = this.__clipPaths, n = this.style; + if (i) for (var o = 0; o < i.length; o++) { + var a = i[o], r = a && a.shape, s = a && a.type; + if (r && ("sector" === s && r.startAngle === r.endAngle || "rect" === s && (!r.width || !r.height))) { + for (l = 0; l < gS.length; l++) gS[l][2] = n[gS[l][0]], n[gS[l][0]] = gS[l][1]; + e = !0; + break + } + } + if (t.apply(this, arguments), e) for (var l = 0; l < gS.length; l++) n[gS[l][0]] = gS[l][2] + } : t + }, vS = In.extend({ + type: "sector", + shape: {cx: 0, cy: 0, r0: 0, r: 0, startAngle: 0, endAngle: 2 * Math.PI, clockwise: !0}, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = Math.max(e.r0 || 0, 0), a = Math.max(e.r, 0), r = e.startAngle, s = e.endAngle, + l = e.clockwise, u = Math.cos(r), h = Math.sin(r); + t.moveTo(u * o + i, h * o + n), t.lineTo(u * a + i, h * a + n), t.arc(i, n, a, r, s, !l), t.lineTo(Math.cos(s) * o + i, Math.sin(s) * o + n), 0 !== o && t.arc(i, n, o, s, r, l), t.closePath() + } + }), yS = In.extend({ + type: "ring", shape: {cx: 0, cy: 0, r: 0, r0: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = 2 * Math.PI; + t.moveTo(i + e.r, n), t.arc(i, n, e.r, 0, o, !1), t.moveTo(i + e.r0, n), t.arc(i, n, e.r0, 0, o, !0) + } + }), xS = function (t, e) { + for (var i = t.length, n = [], o = 0, a = 1; a < i; a++) o += K(t[a - 1], t[a]); + var r = o / 2; + r = r < i ? i : r; + for (a = 0; a < r; a++) { + var s, l, u, h = a / (r - 1) * (e ? i : i - 1), c = Math.floor(h), d = h - c, f = t[c % i]; + e ? (s = t[(c - 1 + i) % i], l = t[(c + 1) % i], u = t[(c + 2) % i]) : (s = t[0 === c ? c : c - 1], l = t[c > i - 2 ? i - 1 : c + 1], u = t[c > i - 3 ? i - 1 : c + 2]); + var p = d * d, g = d * p; + n.push([kn(s[0], f[0], l[0], u[0], d, p, g), kn(s[1], f[1], l[1], u[1], d, p, g)]) + } + return n + }, _S = function (t, e, i, n) { + var o, a, r, s, l = [], u = [], h = [], c = []; + if (n) { + r = [1 / 0, 1 / 0], s = [-1 / 0, -1 / 0]; + for (var d = 0, f = t.length; d < f; d++) tt(r, r, t[d]), et(s, s, t[d]); + tt(r, r, n[0]), et(s, s, n[1]) + } + for (var d = 0, f = t.length; d < f; d++) { + var p = t[d]; + if (i) o = t[d ? d - 1 : f - 1], a = t[(d + 1) % f]; else { + if (0 === d || d === f - 1) { + l.push(W(t[d])); + continue + } + o = t[d - 1], a = t[d + 1] + } + U(u, a, o), Y(u, u, e); + var g = K(p, o), m = K(p, a), v = g + m; + 0 !== v && (g /= v, m /= v), Y(h, u, -g), Y(c, u, m); + var y = H([], p, h), x = H([], p, c); + n && (et(y, y, r), tt(y, y, s), et(x, x, r), tt(x, x, s)), l.push(y), l.push(x) + } + return i && l.push(l.shift()), l + }, wS = In.extend({ + type: "polygon", + shape: {points: null, smooth: !1, smoothConstraint: null}, + buildPath: function (t, e) { + Pn(t, e, !0) + } + }), bS = In.extend({ + type: "polyline", + shape: {points: null, smooth: !1, smoothConstraint: null}, + style: {stroke: "#000", fill: null}, + buildPath: function (t, e) { + Pn(t, e, !1) + } + }), SS = In.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, o = e.width, a = e.height; + e.r ? Pe(t, e) : t.rect(i, n, o, a), t.closePath() + } + }), MS = In.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, o = e.x2, a = e.y2, r = e.percent; + 0 !== r && (t.moveTo(i, n), r < 1 && (o = i * (1 - r) + o * r, a = n * (1 - r) + a * r), t.lineTo(o, a)) + }, + pointAt: function (t) { + var e = this.shape; + return [e.x1 * (1 - t) + e.x2 * t, e.y1 * (1 - t) + e.y2 * t] + } + }), IS = [], TS = In.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, o = e.x2, a = e.y2, r = e.cpx1, s = e.cpy1, l = e.cpx2, u = e.cpy2, h = e.percent; + 0 !== h && (t.moveTo(i, n), null == l || null == u ? (h < 1 && (on(i, r, o, h, IS), r = IS[1], o = IS[2], on(n, s, a, h, IS), s = IS[1], a = IS[2]), t.quadraticCurveTo(r, s, o, a)) : (h < 1 && ($i(i, r, l, o, h, IS), r = IS[1], l = IS[2], o = IS[3], $i(n, s, u, a, h, IS), s = IS[1], u = IS[2], a = IS[3]), t.bezierCurveTo(r, s, l, u, o, a))) + }, + pointAt: function (t) { + return Nn(this.shape, t, !1) + }, + tangentAt: function (t) { + var e = Nn(this.shape, t, !0); + return q(e, e) + } + }), DS = In.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, o = Math.max(e.r, 0), a = e.startAngle, r = e.endAngle, s = e.clockwise, + l = Math.cos(a), u = Math.sin(a); + t.moveTo(l * o + i, u * o + n), t.arc(i, n, o, a, r, !s) + } + }), AS = In.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(), In.prototype.getBoundingRect.call(this) + } + }), CS = function (t) { + this.colorStops = t || [] + }; + CS.prototype = { + constructor: CS, addColorStop: function (t, e) { + this.colorStops.push({offset: t, color: e}) + } + }; + var LS = function (t, e, i, n, o, a) { + 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 = a || !1, CS.call(this, o) + }; + LS.prototype = {constructor: LS}, u(LS, CS); + var kS = function (t, e, i, n, o) { + this.x = null == t ? .5 : t, this.y = null == e ? .5 : e, this.r = null == i ? .5 : i, this.type = "radial", this.global = o || !1, CS.call(this, n) + }; + kS.prototype = {constructor: kS}, u(kS, CS), On.prototype.incremental = !0, On.prototype.clearDisplaybles = function () { + this._displayables = [], this._temporaryDisplayables = [], this._cursor = 0, this.dirty(), this.notClear = !1 + }, On.prototype.addDisplayable = function (t, e) { + e ? this._temporaryDisplayables.push(t) : this._displayables.push(t), this.dirty() + }, On.prototype.addDisplayables = function (t, e) { + e = e || !1; + for (var i = 0; i < t.length; i++) this.addDisplayable(t[i], e) + }, On.prototype.eachPendingDisplayable = function (t) { + for (e = this._cursor; e < this._displayables.length; e++) t && t(this._displayables[e]); + for (var e = 0; e < this._temporaryDisplayables.length; e++) t && t(this._temporaryDisplayables[e]) + }, On.prototype.update = function () { + this.updateTransform(); + for (t = this._cursor; t < this._displayables.length; t++) (e = this._displayables[t]).parent = this, e.update(), e.parent = null; + for (var t = 0; t < this._temporaryDisplayables.length; t++) { + var e = this._temporaryDisplayables[t]; + e.parent = this, e.update(), e.parent = null + } + }, On.prototype.brush = function (t, e) { + for (i = this._cursor; i < this._displayables.length; i++) (n = this._displayables[i]).beforeBrush && n.beforeBrush(t), n.brush(t, i === this._cursor ? null : this._displayables[i - 1]), n.afterBrush && n.afterBrush(t); + this._cursor = i; + for (var i = 0; i < this._temporaryDisplayables.length; i++) { + var n = this._temporaryDisplayables[i]; + n.beforeBrush && n.beforeBrush(t), n.brush(t, 0 === i ? null : this._temporaryDisplayables[i - 1]), n.afterBrush && n.afterBrush(t) + } + this._temporaryDisplayables = [], this.notClear = !0 + }; + var PS = []; + On.prototype.getBoundingRect = function () { + if (!this._rect) { + for (var t = new $t(1 / 0, 1 / 0, -1 / 0, -1 / 0), e = 0; e < this._displayables.length; e++) { + var i = this._displayables[e], n = i.getBoundingRect().clone(); + i.needLocalTransform() && n.applyTransform(i.getLocalTransform(PS)), t.union(n) + } + this._rect = t + } + return this._rect + }, On.prototype.contain = function (t, e) { + var i = this.transformCoordToLocal(t, e); + if (this.getBoundingRect().contain(i[0], i[1])) for (var n = 0; n < this._displayables.length; n++) if (this._displayables[n].contain(t, e)) return !0; + return !1 + }, u(On, $e); + var NS = Math.round, OS = Math.max, ES = Math.min, RS = {}, zS = function (t, e) { + for (var i = [], n = t.length, o = 0; o < n; o++) { + var a = t[o]; + a.path || a.createPathProxy(), a.__dirtyPath && a.buildPath(a.path, a.shape, !0), i.push(a.path) + } + var r = new In(e); + return r.createPathProxy(), r.buildPath = function (t) { + t.appendPath(i); + var e = t.getContext(); + e && t.rebuildPath(e) + }, r + }, BS = (Object.freeze || Object)({ + extendShape: En, + extendPath: function (t, e) { + return Ln(t, e) + }, + makePath: Rn, + makeImage: zn, + mergePath: zS, + resizePath: Vn, + subPixelOptimizeLine: Gn, + subPixelOptimizeRect: Wn, + subPixelOptimize: Fn, + setHoverStyle: eo, + setLabelStyle: io, + setTextStyle: no, + setText: function (t, e, i) { + var n, o = {isRectText: !0}; + !1 === i ? n = !0 : o.autoColor = i, oo(t, e, o, n), t.host && t.host.dirty && t.host.dirty(!1) + }, + getFont: ho, + updateProps: fo, + initProps: po, + getTransform: go, + applyTransform: mo, + transformDirection: vo, + groupTransition: yo, + clipPointsByRect: xo, + clipRectByRect: function (t, e) { + var i = OS(t.x, e.x), n = ES(t.x + t.width, e.x + e.width), o = OS(t.y, e.y), + a = ES(t.y + t.height, e.y + e.height); + if (n >= i && a >= o) return {x: i, y: o, width: n - i, height: a - o} + }, + createIcon: _o, + Group: sw, + Image: Je, + Text: fS, + Circle: pS, + Sector: vS, + Ring: yS, + Polygon: wS, + Polyline: bS, + Rect: SS, + Line: MS, + BezierCurve: TS, + Arc: DS, + IncrementalDisplayable: On, + CompoundPath: AS, + LinearGradient: LS, + RadialGradient: kS, + BoundingRect: $t + }), VS = ["textStyle", "color"], GS = { + getTextColor: function (t) { + var e = this.ecModel; + return this.getShallow("color") || (!t && e ? e.get(VS) : null) + }, getFont: function () { + return ho({ + fontStyle: this.getShallow("fontStyle"), + fontWeight: this.getShallow("fontWeight"), + fontSize: this.getShallow("fontSize"), + fontFamily: this.getShallow("fontFamily") + }, this.ecModel) + }, getTextRect: function (t) { + return me(t, this.getFont(), this.getShallow("align"), this.getShallow("verticalAlign") || this.getShallow("baseline"), this.getShallow("padding"), this.getShallow("rich"), this.getShallow("truncateText")) + } + }, + WS = sb([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"], ["textPosition"], ["textAlign"]]), + FS = { + getItemStyle: function (t, e) { + var i = WS(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] + } + }, HS = h, ZS = Ni(); + wo.prototype = { + constructor: wo, init: null, mergeOption: function (t) { + n(this.option, t, !0) + }, get: function (t, e) { + return null == t ? this.option : bo(this.option, this.parsePath(t), !e && So(this, t)) + }, getShallow: function (t, e) { + var i = this.option, n = null == i ? i : i[t], o = !e && So(this, t); + return null == n && o && (n = o.getShallow(t)), n + }, getModel: function (t, e) { + var i, n = null == t ? this.option : bo(this.option, t = this.parsePath(t)); + return e = e || (i = So(this, t)) && i.getModel(t), new wo(n, e, this.ecModel) + }, isEmpty: function () { + return null == this.option + }, restoreData: function () { + }, clone: function () { + return new (0, this.constructor)(i(this.option)) + }, setReadOnly: function (t) { + }, parsePath: function (t) { + return "string" == typeof t && (t = t.split(".")), t + }, customizeGetParent: function (t) { + ZS(this).getParent = t + }, isAnimationEnabled: function () { + if (!a_.node) { + if (null != this.option.animation) return !!this.option.animation; + if (this.parentModel) return this.parentModel.isAnimationEnabled() + } + } + }, Gi(wo), Wi(wo), HS(wo, ub), HS(wo, cb), HS(wo, GS), HS(wo, FS); + var US = 0, XS = 1e-4, jS = 9007199254740991, + YS = /^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/, + qS = (Object.freeze || Object)({ + linearMap: To, + parsePercent: Do, + round: Ao, + asc: Co, + getPrecision: Lo, + getPrecisionSafe: ko, + getPixelPrecision: Po, + getPercentWithPrecision: No, + MAX_SAFE_INTEGER: jS, + remRadian: Oo, + isRadianAroundZero: Eo, + parseDate: Ro, + quantity: zo, + nice: Vo, + reformIntervals: Go, + isNumeric: Wo + }), KS = L, $S = /([&<>"'])/g, JS = {"&": "&", "<": "<", ">": ">", '"': """, "'": "'"}, + QS = ["a", "b", "c", "d", "e", "f", "g"], tM = function (t, e) { + return "{" + t + (null == e ? "" : e) + "}" + }, eM = be, iM = me, nM = (Object.freeze || Object)({ + addCommas: Fo, + toCamelCase: Ho, + normalizeCssArray: KS, + encodeHTML: Zo, + formatTpl: Uo, + formatTplSimple: Xo, + getTooltipMarker: jo, + formatTime: qo, + capitalFirst: Ko, + truncateText: eM, + getTextRect: iM + }), oM = d, aM = ["left", "right", "top", "bottom", "width", "height"], + rM = [["width", "left", "right"], ["height", "top", "bottom"]], sM = $o, + lM = (v($o, "vertical"), v($o, "horizontal"), { + 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") + } + } + }), uM = Ni(), hM = wo.extend({ + type: "component", + id: "", + name: "", + mainType: "", + subType: "", + componentIndex: 0, + defaultOption: null, + ecModel: null, + dependentModels: [], + uid: null, + layoutMode: null, + $constructor: function (t, e, i, n) { + wo.call(this, t, e, i, n), this.uid = Mo("ec_cpt_model") + }, + init: function (t, e, i, n) { + this.mergeDefaultAndTheme(t, i) + }, + mergeDefaultAndTheme: function (t, e) { + var i = this.layoutMode, o = i ? na(t) : {}; + n(t, e.getTheme().get(this.mainType)), n(t, this.getDefaultOption()), i && ia(t, o, i) + }, + mergeOption: function (t, e) { + n(this.option, t, !0); + var i = this.layoutMode; + i && ia(this.option, t, i) + }, + optionUpdated: function (t, e) { + }, + getDefaultOption: function () { + var t = uM(this); + if (!t.defaultOption) { + for (var e = [], i = this.constructor; i;) { + var o = i.prototype.defaultOption; + o && e.push(o), i = i.superClass + } + for (var a = {}, r = e.length - 1; r >= 0; r--) a = n(a, e[r], !0); + t.defaultOption = a + } + return t.defaultOption + }, + getReferringComponents: function (t) { + return this.ecModel.queryComponents({ + mainType: t, + index: this.get(t + "Index", !0), + id: this.get(t + "Id", !0) + }) + } + }); + Zi(hM, {registerWhenExtend: !0}), function (t) { + var e = {}; + t.registerSubTypeDefaulter = function (t, i) { + t = Bi(t), e[t.main] = i + }, t.determineSubType = function (i, n) { + var o = n.type; + if (!o) { + var a = Bi(i).main; + t.hasSubTypes(i) && e[a] && (o = e[a](n)) + } + return o + } + }(hM), function (t, e) { + function i(t) { + var i = {}, a = []; + return d(t, function (r) { + var s = n(i, r), u = o(s.originalDeps = e(r), t); + s.entryCount = u.length, 0 === s.entryCount && a.push(r), d(u, function (t) { + l(s.predecessor, t) < 0 && s.predecessor.push(t); + var e = n(i, t); + l(e.successor, t) < 0 && e.successor.push(r) + }) + }), {graph: i, noEntryList: a} + } + + function n(t, e) { + return t[e] || (t[e] = {predecessor: [], successor: []}), t[e] + } + + function o(t, e) { + var i = []; + return d(t, function (t) { + l(e, t) >= 0 && i.push(t) + }), i + } + + t.topologicalTravel = function (t, e, n, o) { + function a(t) { + s[t].entryCount--, 0 === s[t].entryCount && l.push(t) + } + + if (t.length) { + var r = i(e), s = r.graph, l = r.noEntryList, u = {}; + for (d(t, function (t) { + u[t] = !0 + }); l.length;) { + var h = l.pop(), c = s[h], f = !!u[h]; + f && (n.call(o, h, c.originalDeps.slice()), delete u[h]), d(c.successor, f ? function (t) { + u[t] = !0, a(t) + } : a) + } + d(u, function () { + throw new Error("Circle dependency may exists") + }) + } + } + }(hM, function (t) { + var e = []; + return d(hM.getClassesByMainType(t), function (t) { + e = e.concat(t.prototype.dependencies || []) + }), e = f(e, function (t) { + return Bi(t).main + }), "dataset" !== t && l(e, "dataset") <= 0 && e.unshift("dataset"), e + }), h(hM, lM); + var cM = ""; + "undefined" != typeof navigator && (cM = navigator.platform || ""); + var dM = { + color: ["#c23531", "#2f4554", "#61a0a8", "#d48265", "#91c7ae", "#749f83", "#ca8622", "#bda29a", "#6e7074", "#546570", "#c4ccd3"], + gradientColor: ["#f6efa6", "#d88273", "#bf444c"], + textStyle: { + fontFamily: cM.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 + }, fM = Ni(), pM = { + clearColorPalette: function () { + fM(this).colorIdx = 0, fM(this).colorNameMap = {} + }, getColorFromPalette: function (t, e, i) { + var n = fM(e = e || this), o = n.colorIdx || 0, a = n.colorNameMap = n.colorNameMap || {}; + if (a.hasOwnProperty(t)) return a[t]; + var r = Si(this.get("color", !0)), s = this.get("colorLayer", !0), l = null != i && s ? aa(s, i) : r; + if ((l = l || r) && l.length) { + var u = l[o]; + return t && (a[t] = u), n.colorIdx = (o + 1) % l.length, u + } + } + }, gM = { + cartesian2d: function (t, e, i, n) { + var o = t.getReferringComponents("xAxis")[0], a = t.getReferringComponents("yAxis")[0]; + e.coordSysDims = ["x", "y"], i.set("x", o), i.set("y", a), sa(o) && (n.set("x", o), e.firstCategoryDimIndex = 0), sa(a) && (n.set("y", a), e.firstCategoryDimIndex = 1) + }, singleAxis: function (t, e, i, n) { + var o = t.getReferringComponents("singleAxis")[0]; + e.coordSysDims = ["single"], i.set("single", o), sa(o) && (n.set("single", o), e.firstCategoryDimIndex = 0) + }, polar: function (t, e, i, n) { + var o = t.getReferringComponents("polar")[0], a = o.findAxisModel("radiusAxis"), + r = o.findAxisModel("angleAxis"); + e.coordSysDims = ["radius", "angle"], i.set("radius", a), i.set("angle", r), sa(a) && (n.set("radius", a), e.firstCategoryDimIndex = 0), sa(r) && (n.set("angle", r), e.firstCategoryDimIndex = 1) + }, geo: function (t, e, i, n) { + e.coordSysDims = ["lng", "lat"] + }, parallel: function (t, e, i, n) { + var o = t.ecModel, a = o.getComponent("parallel", t.get("parallelIndex")), + r = e.coordSysDims = a.dimensions.slice(); + d(a.parallelAxisIndex, function (t, a) { + var s = o.getComponent("parallelAxis", t), l = r[a]; + i.set(l, s), sa(s) && null == e.firstCategoryDimIndex && (n.set(l, s), e.firstCategoryDimIndex = a) + }) + } + }, mM = "original", vM = "arrayRows", yM = "objectRows", xM = "keyedColumns", _M = "unknown", wM = "typedArray", + bM = "column", SM = "row"; + la.seriesDataToSource = function (t) { + return new la({data: t, sourceFormat: S(t) ? wM : mM, fromDataset: !1}) + }, Wi(la); + var MM = Ni(), IM = "\0_ec_inner", TM = wo.extend({ + init: function (t, e, i, n) { + i = i || {}, this.option = null, this._theme = new wo(i), this._optionManager = n + }, setOption: function (t, e) { + k(!(IM 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)) : Sa.call(this, n), e = !0 + } + if ("timeline" !== t && "media" !== t || this.restoreData(), !t || "recreate" === t || "timeline" === t) { + var o = i.getTimelineOption(this); + o && (this.mergeOption(o), e = !0) + } + if (!t || "recreate" === t || "media" === t) { + var a = i.getMediaOption(this, this._api); + a.length && d(a, function (t) { + this.mergeOption(t, e = !0) + }, this) + } + return e + }, mergeOption: function (t) { + var e = this.option, o = this._componentsMap, r = []; + ca(this), d(t, function (t, o) { + null != t && (hM.hasClass(o) ? o && r.push(o) : e[o] = null == e[o] ? i(t) : n(e[o], t, !0)) + }), hM.topologicalTravel(r, hM.getAllClassMainTypes(), function (i, n) { + var r = Si(t[i]), s = Di(o.get(i), r); + Ai(s), d(s, function (t, e) { + var n = t.option; + w(n) && (t.keyInfo.mainType = i, t.keyInfo.subType = Ia(i, n, t.exist)) + }); + var l = Ma(o, n); + e[i] = [], o.set(i, []), d(s, function (t, n) { + var r = t.exist, s = t.option; + if (k(w(s) || r, "Empty component definition"), s) { + var u = hM.getClass(i, t.keyInfo.subType, !0); + if (r && r instanceof u) r.name = t.keyInfo.name, r.mergeOption(s, this), r.optionUpdated(s, !1); else { + var h = a({dependentModels: l, componentIndex: n}, t.keyInfo); + a(r = new u(s, this, this, h), h), r.init(s, this, this, h), r.optionUpdated(null, !0) + } + } else r.mergeOption({}, this), r.optionUpdated({}, !1); + o.get(i)[n] = r, e[i][n] = r.option + }, this), "series" === i && Ta(this, o.get("series")) + }, this), this._seriesIndicesMap = R(this._seriesIndices = this._seriesIndices || []) + }, getOption: function () { + var t = i(this.option); + return d(t, function (e, i) { + if (hM.hasClass(i)) { + for (var n = (e = Si(e)).length - 1; n >= 0; n--) Li(e[n]) && e.splice(n, 1); + t[i] = e + } + }), delete t[IM], 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 = t.index, n = t.id, o = t.name, a = this._componentsMap.get(e); + if (!a || !a.length) return []; + var r; + if (null != i) y(i) || (i = [i]), r = g(f(i, function (t) { + return a[t] + }), function (t) { + return !!t + }); else if (null != n) { + var s = y(n); + r = g(a, function (t) { + return s && l(n, t.id) >= 0 || !s && t.id === n + }) + } else if (null != o) { + var u = y(o); + r = g(a, function (t) { + return u && l(o, t.name) >= 0 || !u && t.name === o + }) + } else r = a.slice(); + return Da(r, t) + }, findComponents: function (t) { + var e = t.query, i = t.mainType, n = function (t) { + var e = i + "Index", n = i + "Id", o = i + "Name"; + return !t || null == t[e] && null == t[n] && null == t[o] ? null : { + mainType: i, + index: t[e], + id: t[n], + name: t[o] + } + }(e); + return function (e) { + return t.filter ? g(e, t.filter) : e + }(Da(n ? this.queryComponents(n) : this._componentsMap.get(i), t)) + }, eachComponent: function (t, e, i) { + var n = this._componentsMap; + "function" == typeof t ? (i = e, e = t, n.each(function (t, n) { + d(t, function (t, o) { + e.call(i, n, t, o) + }) + })) : _(t) ? d(n.get(t), e, i) : w(t) && d(this.findComponents(t), e, i) + }, getSeriesByName: function (t) { + return g(this._componentsMap.get("series"), function (e) { + return e.name === t + }) + }, getSeriesByIndex: function (t) { + return this._componentsMap.get("series")[t] + }, getSeriesByType: function (t) { + return g(this._componentsMap.get("series"), function (e) { + return e.subType === t + }) + }, getSeries: function () { + return this._componentsMap.get("series").slice() + }, getSeriesCount: function () { + return this._componentsMap.get("series").length + }, eachSeries: function (t, e) { + d(this._seriesIndices, function (i) { + var n = this._componentsMap.get("series")[i]; + t.call(e, n, i) + }, this) + }, eachRawSeries: function (t, e) { + d(this._componentsMap.get("series"), t, e) + }, eachSeriesByType: function (t, e, i) { + d(this._seriesIndices, function (n) { + var o = this._componentsMap.get("series")[n]; + o.subType === t && e.call(i, o, n) + }, this) + }, eachRawSeriesByType: function (t, e, i) { + return d(this.getSeriesByType(t), e, i) + }, isSeriesFiltered: function (t) { + return null == this._seriesIndicesMap.get(t.componentIndex) + }, getCurrentSeriesIndices: function () { + return (this._seriesIndices || []).slice() + }, filterSeries: function (t, e) { + Ta(this, g(this._componentsMap.get("series"), t, e)) + }, restoreData: function (t) { + var e = this._componentsMap; + Ta(this, e.get("series")); + var i = []; + e.each(function (t, e) { + i.push(e) + }), hM.topologicalTravel(i, hM.getAllClassMainTypes(), function (i, n) { + d(e.get(i), function (e) { + ("series" !== i || !wa(e, t)) && e.restoreData() + }) + }) + } + }); + h(TM, pM); + var DM = ["getDom", "getZr", "getWidth", "getHeight", "getDevicePixelRatio", "dispatchAction", "isDisposed", "on", "off", "getDataURL", "getConnectedDataURL", "getModel", "getOption", "getViewOfComponentModel", "getViewOfSeriesModel"], + AM = {}; + Ca.prototype = { + constructor: Ca, create: function (t, e) { + var i = []; + d(AM, function (n, o) { + var a = n.create(t, e); + i = i.concat(a || []) + }), this._coordinateSystems = i + }, update: function (t, e) { + d(this._coordinateSystems, function (i) { + i.update && i.update(t, e) + }) + }, getCoordinateSystems: function () { + return this._coordinateSystems.slice() + } + }, Ca.register = function (t, e) { + AM[t] = e + }, Ca.get = function (t) { + return AM[t] + }; + var CM = d, LM = i, kM = f, PM = n, NM = /^(min|max)?(.+)$/; + La.prototype = { + constructor: La, setOption: function (t, e) { + t && d(Si(t.series), function (t) { + t && t.data && S(t.data) && N(t.data) + }), t = LM(t, !0); + var i = this._optionBackup, n = ka.call(this, t, e, !i); + this._newBaseOption = n.baseOption, i ? (Ea(i.baseOption, n.baseOption), n.timelineOptions.length && (i.timelineOptions = n.timelineOptions), n.mediaList.length && (i.mediaList = n.mediaList), n.mediaDefault && (i.mediaDefault = n.mediaDefault)) : this._optionBackup = n + }, mountOption: function (t) { + var e = this._optionBackup; + return this._timelineOptions = kM(e.timelineOptions, LM), this._mediaList = kM(e.mediaList, LM), this._mediaDefault = LM(e.mediaDefault), this._currentMediaIndices = [], LM(t ? e.baseOption : this._newBaseOption) + }, getTimelineOption: function (t) { + var e, i = this._timelineOptions; + if (i.length) { + var n = t.getComponent("timeline"); + n && (e = LM(i[n.getCurrentIndex()], !0)) + } + return e + }, getMediaOption: function (t) { + var e = this._api.getWidth(), i = this._api.getHeight(), n = this._mediaList, o = this._mediaDefault, + a = [], r = []; + if (!n.length && !o) return r; + for (var s = 0, l = n.length; s < l; s++) Pa(n[s].query, e, i) && a.push(s); + return !a.length && o && (a = [-1]), a.length && !Oa(a, this._currentMediaIndices) && (r = kM(a, function (t) { + return LM(-1 === t ? o.option : n[t].option) + })), this._currentMediaIndices = a, r + } + }; + var OM = d, EM = w, RM = ["areaStyle", "lineStyle", "nodeStyle", "linkStyle", "chordStyle", "label", "labelLine"], + zM = function (t, e) { + OM(Fa(t.series), function (t) { + EM(t) && Wa(t) + }); + var i = ["xAxis", "yAxis", "radiusAxis", "angleAxis", "singleAxis", "parallelAxis", "radar"]; + e && i.push("valueAxis", "categoryAxis", "logAxis", "timeAxis"), OM(i, function (e) { + OM(Fa(t[e]), function (t) { + t && (Va(t, "axisLabel"), Va(t.axisPointer, "label")) + }) + }), OM(Fa(t.parallel), function (t) { + var e = t && t.parallelAxisDefault; + Va(e, "axisLabel"), Va(e && e.axisPointer, "label") + }), OM(Fa(t.calendar), function (t) { + za(t, "itemStyle"), Va(t, "dayLabel"), Va(t, "monthLabel"), Va(t, "yearLabel") + }), OM(Fa(t.radar), function (t) { + Va(t, "name") + }), OM(Fa(t.geo), function (t) { + EM(t) && (Ga(t), OM(Fa(t.regions), function (t) { + Ga(t) + })) + }), OM(Fa(t.timeline), function (t) { + Ga(t), za(t, "label"), za(t, "itemStyle"), za(t, "controlStyle", !0); + var e = t.data; + y(e) && d(e, function (t) { + w(t) && (za(t, "label"), za(t, "itemStyle")) + }) + }), OM(Fa(t.toolbox), function (t) { + za(t, "iconStyle"), OM(t.feature, function (t) { + za(t, "iconStyle") + }) + }), Va(Ha(t.axisPointer), "label"), Va(Ha(t.tooltip).axisPointer, "label") + }, BM = [["x", "left"], ["y", "top"], ["x2", "right"], ["y2", "bottom"]], + VM = ["grid", "geo", "parallel", "legend", "toolbox", "title", "visualMap", "dataZoom", "timeline"], + GM = function (t, e) { + zM(t, e), t.series = Si(t.series), d(t.series, function (t) { + if (w(t)) { + var e = t.type; + if ("pie" !== e && "gauge" !== e || null != t.clockWise && (t.clockwise = t.clockWise), "gauge" === e) { + var i = Za(t, "pointer.color"); + null != i && Ua(t, "itemStyle.normal.color", i) + } + Xa(t) + } + }), t.dataRange && (t.visualMap = t.dataRange), d(VM, function (e) { + var i = t[e]; + i && (y(i) || (i = [i]), d(i, function (t) { + Xa(t) + })) + }) + }, WM = Ya.prototype; + WM.pure = !1, WM.persistent = !0, WM.getSource = function () { + return this._source + }; + var FM = { + arrayRows_column: { + pure: !0, count: function () { + return Math.max(0, this._data.length - this._source.startIndex) + }, getItem: function (t) { + return this._data[t + this._source.startIndex] + }, appendData: $a + }, + arrayRows_row: { + pure: !0, count: function () { + var t = this._data[0]; + return t ? Math.max(0, t.length - this._source.startIndex) : 0 + }, getItem: function (t) { + t += this._source.startIndex; + for (var e = [], i = this._data, n = 0; n < i.length; n++) { + var o = i[n]; + e.push(o ? o[t] : null) + } + return e + }, appendData: function () { + throw new Error('Do not support appendData when set seriesLayoutBy: "row".') + } + }, + objectRows: {pure: !0, count: qa, getItem: Ka, appendData: $a}, + keyedColumns: { + pure: !0, count: function () { + var t = this._source.dimensionsDefine[0].name, e = this._data[t]; + return e ? e.length : 0 + }, getItem: function (t) { + for (var e = [], i = this._source.dimensionsDefine, n = 0; n < i.length; n++) { + var o = this._data[i[n].name]; + e.push(o ? o[t] : null) + } + return e + }, appendData: function (t) { + var e = this._data; + d(t, function (t, i) { + for (var n = e[i] || (e[i] = []), o = 0; o < (t || []).length; o++) n.push(t[o]) + }) + } + }, + original: {count: qa, getItem: Ka, appendData: $a}, + typedArray: { + persistent: !1, pure: !0, count: function () { + return this._data ? this._data.length / this._dimSize : 0 + }, getItem: function (t, e) { + t -= this._offset, e = e || []; + for (var i = this._dimSize * t, n = 0; n < this._dimSize; n++) e[n] = this._data[i + n]; + return e + }, appendData: function (t) { + this._data = t + }, clean: function () { + this._offset += this.count(), this._data = null + } + } + }, HM = { + arrayRows: Ja, objectRows: function (t, e, i, n) { + return null != i ? t[n] : t + }, keyedColumns: Ja, original: function (t, e, i, n) { + var o = Ii(t); + return null != i && o instanceof Array ? o[i] : o + }, typedArray: Ja + }, ZM = { + arrayRows: Qa, objectRows: function (t, e, i, n) { + return tr(t[e], this._dimensionInfos[e]) + }, keyedColumns: Qa, original: function (t, e, i, n) { + var o = t && (null == t.value ? t : t.value); + return !this._rawData.pure && Ti(t) && (this.hasItemOption = !0), tr(o instanceof Array ? o[n] : o, this._dimensionInfos[e]) + }, typedArray: function (t, e, i, n) { + return t[n] + } + }, UM = /\{@(.+?)\}/g, XM = { + getDataParams: function (t, e) { + var i = this.getData(e), n = this.getRawValue(t, e), o = i.getRawIndex(t), a = i.getName(t), + 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: a, + dataIndex: o, + data: r, + dataType: e, + value: n, + color: s, + marker: jo(s), + $vars: ["seriesName", "name", "value"] + } + }, getFormattedLabel: function (t, e, i, n, o) { + e = e || "normal"; + var a = this.getData(i), r = a.getItemModel(t), s = this.getDataParams(t, i); + null != n && s.value instanceof Array && (s.value = s.value[n]); + var l = r.get("normal" === e ? [o || "label", "formatter"] : [e, o || "label", "formatter"]); + return "function" == typeof l ? (s.status = e, l(s)) : "string" == typeof l ? Uo(l, s).replace(UM, function (e, i) { + var n = i.length; + return "[" === i.charAt(0) && "]" === i.charAt(n - 1) && (i = +i.slice(1, n - 1)), er(a, t, i) + }) : void 0 + }, getRawValue: function (t, e) { + return er(this.getData(e), t) + }, formatTooltip: function () { + } + }, jM = or.prototype; + jM.perform = function (t) { + function e(t) { + return !(t >= 1) && (t = 1), t + } + + var i = this._upstream, n = t && t.skip; + if (this._dirty && i) { + var o = this.context; + o.data = o.outputData = i.context.outputData + } + this.__pipeline && (this.__pipeline.currentTask = this); + var a; + this._plan && !n && (a = this._plan(this.context)); + var r = e(this._modBy), s = this._modDataCount || 0, l = e(t && t.modBy), u = t && t.modDataCount || 0; + r === l && s === u || (a = "reset"); + var h; + (this._dirty || "reset" === a) && (this._dirty = !1, h = rr(this, n)), this._modBy = l, this._modDataCount = u; + var c = t && t.step; + if (this._dueEnd = i ? i._outputDueEnd : this._count ? this._count(this.context) : 1 / 0, this._progress) { + var d = this._dueIndex, f = Math.min(null != c ? this._dueIndex + c : 1 / 0, this._dueEnd); + if (!n && (h || d < f)) { + var p = this._progress; + if (y(p)) for (var g = 0; g < p.length; g++) ar(this, p[g], d, f, l, u); else ar(this, p, d, f, l, u) + } + this._dueIndex = f; + var m = null != this._settedOutputEnd ? this._settedOutputEnd : f; + this._outputDueEnd = m + } else this._dueIndex = this._outputDueEnd = null != this._settedOutputEnd ? this._settedOutputEnd : this._dueEnd; + return this.unfinished() + }; + var YM = function () { + function t() { + return n < i ? n++ : null + } + + function e() { + var t = n % r * o + Math.ceil(n / r), e = n >= i ? null : t < a ? t : n; + return n++, e + } + + var i, n, o, a, r, s = { + reset: function (l, u, h, c) { + n = l, i = u, o = h, a = c, r = Math.ceil(a / o), s.next = o > 1 && a > 0 ? e : t + } + }; + return s + }(); + jM.dirty = function () { + this._dirty = !0, this._onDirty && this._onDirty(this.context) + }, jM.unfinished = function () { + return this._progress && this._dueIndex < this._dueEnd + }, jM.pipe = function (t) { + (this._downstream !== t || this._dirty) && (this._downstream = t, t._upstream = this, t.dirty()) + }, jM.dispose = function () { + this._disposed || (this._upstream && (this._upstream._downstream = null), this._downstream && (this._downstream._upstream = null), this._dirty = !1, this._disposed = !0) + }, jM.getUpstream = function () { + return this._upstream + }, jM.getDownstream = function () { + return this._downstream + }, jM.setOutputEnd = function (t) { + this._outputDueEnd = this._settedOutputEnd = t + }; + var qM = Ni(), KM = hM.extend({ + type: "series.__base__", + seriesIndex: 0, + coordinateSystem: null, + defaultOption: null, + legendDataProvider: null, + visualColorAccessPath: "itemStyle.color", + layoutMode: null, + init: function (t, e, i, n) { + this.seriesIndex = this.componentIndex, this.dataTask = nr({ + count: ur, + reset: hr + }), this.dataTask.context = {model: this}, this.mergeDefaultAndTheme(t, i), da(this); + var o = this.getInitialData(t, i); + dr(o, this), this.dataTask.context.data = o, qM(this).dataBeforeProcessed = o, sr(this) + }, + mergeDefaultAndTheme: function (t, e) { + var i = this.layoutMode, o = i ? na(t) : {}, a = this.subType; + hM.hasClass(a) && (a += "Series"), n(t, e.getTheme().get(this.subType)), n(t, this.getDefaultOption()), Mi(t, "label", ["show"]), this.fillDataTextStyle(t.data), i && ia(t, o, i) + }, + mergeOption: function (t, e) { + t = n(this.option, t, !0), this.fillDataTextStyle(t.data); + var i = this.layoutMode; + i && ia(this.option, t, i), da(this); + var o = this.getInitialData(t, e); + dr(o, this), this.dataTask.dirty(), this.dataTask.context.data = o, qM(this).dataBeforeProcessed = o, sr(this) + }, + fillDataTextStyle: function (t) { + if (t && !S(t)) for (var e = ["show"], i = 0; i < t.length; i++) t[i] && t[i].label && Mi(t[i], "label", e) + }, + getInitialData: function () { + }, + appendData: function (t) { + this.getRawData().appendData(t.data) + }, + getData: function (t) { + var e = pr(this); + if (e) { + var i = e.context.data; + return null == t ? i : i.getLinkedData(t) + } + return qM(this).data + }, + setData: function (t) { + var e = pr(this); + if (e) { + var i = e.context; + i.data !== t && e.modifyOutputEnd && e.setOutputEnd(t.count()), i.outputData = t, e !== this.dataTask && (i.data = t) + } + qM(this).data = t + }, + getSource: function () { + return ha(this) + }, + getRawData: function () { + return qM(this).dataBeforeProcessed + }, + getBaseAxis: function () { + var t = this.coordinateSystem; + return t && t.getBaseAxis && t.getBaseAxis() + }, + formatTooltip: function (t, e, i) { + function n(t) { + return Zo(Fo(t)) + } + + var o = this.getData(), a = o.mapDimension("defaultedTooltip", !0), r = a.length, s = this.getRawValue(t), + l = y(s), u = o.getItemVisual(t, "color"); + w(u) && u.colorStops && (u = (u.colorStops[0] || {}).color), u = u || "transparent"; + var h = r > 1 || l && !r ? function (i) { + function n(t, i) { + var n = o.getDimensionInfo(i); + if (n && !1 !== n.otherDims.tooltip) { + var a = n.type, l = jo({color: u, type: "subItem"}), + h = (r ? l + Zo(n.displayName || "-") + ": " : "") + Zo("ordinal" === a ? t + "" : "time" === a ? e ? "" : qo("yyyy/MM/dd hh:mm:ss", t) : Fo(t)); + h && s.push(h) + } + } + + var r = p(i, function (t, e, i) { + var n = o.getDimensionInfo(i); + return t |= n && !1 !== n.tooltip && null != n.displayName + }, 0), s = []; + return a.length ? d(a, function (e) { + n(er(o, t, e), e) + }) : d(i, n), (r ? "
    " : "") + s.join(r ? "
    " : ", ") + }(s) : n(r ? er(o, t, a[0]) : l ? s[0] : s), c = jo(u), f = o.getName(t), g = this.name; + return Ci(this) || (g = ""), g = g ? Zo(g) + (e ? ": " : "
    ") : "", e ? c + g + h : g + c + (f ? Zo(f) + ": " + h : h) + }, + isAnimationEnabled: function () { + if (a_.node) return !1; + var t = this.getShallow("animation"); + return t && this.getData().count() > this.getShallow("animationThreshold") && (t = !1), t + }, + restoreData: function () { + this.dataTask.dirty() + }, + getColorFromPalette: function (t, e, i) { + var n = this.ecModel, o = pM.getColorFromPalette.call(this, t, e, i); + return o || (o = n.getColorFromPalette(t, e, i)), o + }, + coordDimToDataDim: function (t) { + return this.getRawData().mapDimension(t, !0) + }, + getProgressive: function () { + return this.get("progressive") + }, + getProgressiveThreshold: function () { + return this.get("progressiveThreshold") + }, + getAxisTooltipData: null, + getTooltipPosition: null, + pipeTask: null, + preventIncremental: null, + pipelineContext: null + }); + h(KM, XM), h(KM, pM); + var $M = function () { + this.group = new sw, this.uid = Mo("viewComponent") + }; + $M.prototype = { + constructor: $M, init: function (t, e) { + }, render: function (t, e, i, n) { + }, dispose: function () { + } + }; + var JM = $M.prototype; + JM.updateView = JM.updateLayout = JM.updateVisual = function (t, e, i, n) { + }, Gi($M), Zi($M, {registerWhenExtend: !0}); + var QM = function () { + var t = Ni(); + return function (e) { + var i = t(e), n = e.pipelineContext, o = i.large, a = i.progressiveRender, r = i.large = n.large, + s = i.progressiveRender = n.progressiveRender; + return !!(o ^ r || a ^ s) && "reset" + } + }, tI = Ni(), eI = QM(); + gr.prototype = { + type: "chart", init: function (t, e) { + }, render: function (t, e, i, n) { + }, highlight: function (t, e, i, n) { + vr(t.getData(), n, "emphasis") + }, downplay: function (t, e, i, n) { + vr(t.getData(), n, "normal") + }, remove: function (t, e) { + this.group.removeAll() + }, dispose: function () { + }, incrementalPrepareRender: null, incrementalRender: null, updateTransform: null + }; + var iI = gr.prototype; + iI.updateView = iI.updateLayout = iI.updateVisual = function (t, e, i, n) { + this.render(t, e, i, n) + }, Gi(gr), Zi(gr, {registerWhenExtend: !0}), gr.markUpdateMethod = function (t, e) { + tI(t).updateMethod = e + }; + var nI = { + incrementalPrepareRender: { + progress: function (t, e) { + e.view.incrementalRender(t, e.model, e.ecModel, e.api, e.payload) + } + }, render: { + forceFirstProgress: !0, progress: function (t, e) { + e.view.render(e.model, e.ecModel, e.api, e.payload) + } + } + }, oI = "\0__throttleOriginMethod", aI = "\0__throttleRate", rI = "\0__throttleType", sI = { + createOnAllSeries: !0, performRawSeries: !0, reset: function (t, e) { + var i = t.getData(), n = (t.visualColorAccessPath || "itemStyle.color").split("."), + o = t.get(n) || t.getColorFromPalette(t.name, null, e.getSeriesCount()); + if (i.setVisual("color", o), !e.isSeriesFiltered(t)) { + "function" != typeof o || o instanceof CS || i.each(function (e) { + i.setItemVisual(e, "color", o(t.getDataParams(e))) + }); + return { + dataEach: i.hasItemOption ? function (t, e) { + var i = t.getItemModel(e).get(n, !0); + null != i && t.setItemVisual(e, "color", i) + } : null + } + } + } + }, lI = { + toolbox: { + brush: { + title: { + rect: "矩形选择", + polygon: "圈选", + lineX: "横向选择", + lineY: "纵向选择", + keep: "保持选择", + clear: "清除选择" + } + }, + dataView: {title: "数据视图", lang: ["数据视图", "关闭", "刷新"]}, + dataZoom: {title: {zoom: "区域缩放", back: "区域缩放还原"}}, + magicType: {title: {line: "切换为折线图", bar: "切换为柱状图", stack: "切换为堆叠", tiled: "切换为平铺"}}, + restore: {title: "还原"}, + saveAsImage: {title: "保存为图片", lang: ["右键另存为图片"]} + }, + series: { + typeNames: { + pie: "饼图", + bar: "柱状图", + line: "折线图", + scatter: "散点图", + effectScatter: "涟漪散点图", + radar: "雷达图", + tree: "树图", + treemap: "矩形树图", + boxplot: "箱型图", + candlestick: "K线图", + k: "K线图", + heatmap: "热力图", + map: "地图", + parallel: "平行坐标图", + lines: "线图", + graph: "关系图", + sankey: "桑基图", + funnel: "漏斗图", + gauge: "仪表盘图", + pictorialBar: "象形柱图", + themeRiver: "主题河流图", + sunburst: "旭日图" + } + }, + aria: { + general: {withTitle: "这是一个关于“{title}”的图表。", withoutTitle: "这是一个图表,"}, + series: { + single: { + prefix: "", + withName: "图表类型是{seriesType},表示{seriesName}。", + withoutName: "图表类型是{seriesType}。" + }, + multiple: { + prefix: "它由{seriesCount}个图表系列组成。", + withName: "第{seriesId}个系列是一个表示{seriesName}的{seriesType},", + withoutName: "第{seriesId}个系列是一个{seriesType},", + separator: {middle: ";", end: "。"} + } + }, + data: { + allData: "其数据是——", + partialData: "其中,前{displayCnt}项是——", + withName: "{name}的数据是{value}", + withoutName: "{value}", + separator: {middle: ",", end: ""} + } + } + }, uI = function (t, e) { + function i(t, e) { + if ("string" != typeof t) return t; + var i = t; + return d(e, function (t, e) { + i = i.replace(new RegExp("\\{\\s*" + e + "\\s*\\}", "g"), t) + }), i + } + + function n(t) { + var e = a.get(t); + if (null == e) { + for (var i = t.split("."), n = lI.aria, o = 0; o < i.length; ++o) n = n[i[o]]; + return n + } + return e + } + + function o(t) { + return lI.series.typeNames[t] || "自定义图" + } + + var a = e.getModel("aria"); + if (a.get("show")) if (a.get("description")) t.setAttribute("aria-label", a.get("description")); else { + var r = 0; + e.eachSeries(function (t, e) { + ++r + }, this); + var s, l = a.get("data.maxCount") || 10, u = a.get("series.maxCount") || 10, h = Math.min(r, u); + if (!(r < 1)) { + var c = function () { + var t = e.getModel("title").option; + return t && t.length && (t = t[0]), t && t.text + }(); + s = c ? i(n("general.withTitle"), {title: c}) : n("general.withoutTitle"); + var f = []; + s += i(n(r > 1 ? "series.multiple.prefix" : "series.single.prefix"), {seriesCount: r}), e.eachSeries(function (t, e) { + if (e < h) { + var a, s = t.get("name"), u = "series." + (r > 1 ? "multiple" : "single") + "."; + a = i(a = n(s ? u + "withName" : u + "withoutName"), { + seriesId: t.seriesIndex, + seriesName: t.get("name"), + seriesType: o(t.subType) + }); + var c = t.getData(); + window.data = c, c.count() > l ? a += i(n("data.partialData"), {displayCnt: l}) : a += n("data.allData"); + for (var d = [], p = 0; p < c.count(); p++) if (p < l) { + var g = c.getName(p), m = er(c, p); + d.push(i(n(g ? "data.withName" : "data.withoutName"), {name: g, value: m})) + } + a += d.join(n("data.separator.middle")) + n("data.separator.end"), f.push(a) + } + }), s += f.join(n("series.multiple.separator.middle")) + n("series.multiple.separator.end"), t.setAttribute("aria-label", s) + } + } + }, hI = Math.PI, cI = Sr.prototype; + cI.restoreData = function (t, e) { + t.restoreData(e), this._stageTaskMap.each(function (t) { + var e = t.overallTask; + e && e.dirty() + }) + }, cI.getPerformArgs = function (t, e) { + if (t.__pipeline) { + var i = this._pipelineMap.get(t.__pipeline.id), n = i.context, + o = !e && i.progressiveEnabled && (!n || n.progressiveRender) && t.__idxInPipeline > i.blockIndex ? i.step : null, + a = n && n.modDataCount; + return {step: o, modBy: null != a ? Math.ceil(a / o) : null, modDataCount: a} + } + }, cI.getPipeline = function (t) { + return this._pipelineMap.get(t) + }, cI.updateStreamModes = function (t, e) { + var i = this._pipelineMap.get(t.uid), n = t.getData().count(), + o = i.progressiveEnabled && e.incrementalPrepareRender && n >= i.threshold, + a = t.get("large") && n >= t.get("largeThreshold"), r = "mod" === t.get("progressiveChunkMode") ? n : null; + t.pipelineContext = i.context = {progressiveRender: o, modDataCount: r, large: a} + }, cI.restorePipelines = function (t) { + var e = this, i = e._pipelineMap = R(); + t.eachSeries(function (t) { + var n = t.getProgressive(), o = t.uid; + i.set(o, { + id: o, + head: null, + tail: null, + threshold: t.getProgressiveThreshold(), + progressiveEnabled: n && !(t.preventIncremental && t.preventIncremental()), + blockIndex: -1, + step: Math.round(n || 700), + count: 0 + }), Er(e, t, t.dataTask) + }) + }, cI.prepareStageTasks = function () { + var t = this._stageTaskMap, e = this.ecInstance.getModel(), i = this.api; + d(this._allHandlers, function (n) { + var o = t.get(n.uid) || t.set(n.uid, []); + n.reset && Ir(this, n, o, e, i), n.overallReset && Tr(this, n, o, e, i) + }, this) + }, cI.prepareView = function (t, e, i, n) { + var o = t.renderTask, a = o.context; + a.model = e, a.ecModel = i, a.api = n, o.__block = !t.incrementalPrepareRender, Er(this, e, o) + }, cI.performDataProcessorTasks = function (t, e) { + Mr(this, this._dataProcessorHandlers, t, e, {block: !0}) + }, cI.performVisualTasks = function (t, e, i) { + Mr(this, this._visualHandlers, t, e, i) + }, cI.performSeriesTasks = function (t) { + var e; + t.eachSeries(function (t) { + e |= t.dataTask.perform() + }), this.unfinished |= e + }, cI.plan = function () { + this._pipelineMap.each(function (t) { + var e = t.tail; + do { + if (e.__block) { + t.blockIndex = e.__idxInPipeline; + break + } + e = e.getUpstream() + } while (e) + }) + }; + var dI = cI.updatePayload = function (t, e) { + "remain" !== e && (t.context.payload = e) + }, fI = Nr(0); + Sr.wrapStageHandler = function (t, e) { + return x(t) && (t = { + overallReset: t, + seriesType: Rr(t) + }), t.uid = Mo("stageHandler"), e && (t.visualType = e), t + }; + var pI, gI = {}, mI = {}; + zr(gI, TM), zr(mI, Aa), gI.eachSeriesByType = gI.eachRawSeriesByType = function (t) { + pI = t + }, gI.eachComponent = function (t) { + "series" === t.mainType && t.subType && (pI = t.subType) + }; + var vI = ["#37A2DA", "#32C5E9", "#67E0E3", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#E062AE", "#E690D1", "#e7bcf3", "#9d96f5", "#8378EA", "#96BFFF"], + yI = { + color: vI, + colorLayer: [["#37A2DA", "#ffd85c", "#fd7b5f"], ["#37A2DA", "#67E0E3", "#FFDB5C", "#ff9f7f", "#E062AE", "#9d96f5"], ["#37A2DA", "#32C5E9", "#9FE6B8", "#FFDB5C", "#ff9f7f", "#fb7293", "#e7bcf3", "#8378EA", "#96BFFF"], vI] + }, + xI = ["#dd6b66", "#759aa0", "#e69d87", "#8dc1a9", "#ea7e53", "#eedd78", "#73a373", "#73b9bc", "#7289ab", "#91ca8c", "#f49f42"], + _I = { + color: xI, + backgroundColor: "#333", + tooltip: {axisPointer: {lineStyle: {color: "#eee"}, crossStyle: {color: "#eee"}}}, + legend: {textStyle: {color: "#eee"}}, + textStyle: {color: "#eee"}, + title: {textStyle: {color: "#eee"}}, + toolbox: {iconStyle: {normal: {borderColor: "#eee"}}}, + dataZoom: {textStyle: {color: "#eee"}}, + visualMap: {textStyle: {color: "#eee"}}, + timeline: { + lineStyle: {color: "#eee"}, + itemStyle: {normal: {color: xI[1]}}, + label: {normal: {textStyle: {color: "#eee"}}}, + controlStyle: {normal: {color: "#eee", borderColor: "#eee"}} + }, + timeAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + logAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + valueAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + categoryAxis: { + axisLine: {lineStyle: {color: "#eee"}}, + axisTick: {lineStyle: {color: "#eee"}}, + axisLabel: {textStyle: {color: "#eee"}}, + splitLine: {lineStyle: {type: "dashed", color: "#aaa"}}, + splitArea: {areaStyle: {color: "#eee"}} + }, + line: {symbol: "circle"}, + graph: {color: xI}, + gauge: {title: {textStyle: {color: "#eee"}}}, + candlestick: { + itemStyle: { + normal: { + color: "#FD1050", + color0: "#0CF49B", + borderColor: "#FD1050", + borderColor0: "#0CF49B" + } + } + } + }; + _I.categoryAxis.splitLine.show = !1, hM.extend({ + type: "dataset", + defaultOption: {seriesLayoutBy: bM, sourceHeader: null, dimensions: null, source: null}, + optionUpdated: function () { + ua(this) + } + }), $M.extend({type: "dataset"}); + var wI = k, bI = d, SI = x, MI = w, II = hM.parseClassType, TI = {zrender: "4.0.4"}, DI = 1e3, AI = 1e3, CI = 3e3, + LI = { + PROCESSOR: {FILTER: DI, STATISTIC: 5e3}, + VISUAL: {LAYOUT: AI, GLOBAL: 2e3, CHART: CI, COMPONENT: 4e3, BRUSH: 5e3} + }, kI = "__flagInMainProcess", PI = "__optionUpdated", NI = /^[a-zA-Z0-9_]+$/; + Vr.prototype.on = Br("on"), Vr.prototype.off = Br("off"), Vr.prototype.one = Br("one"), h(Vr, D_); + var OI = Gr.prototype; + OI._onframe = function () { + if (!this._disposed) { + var t = this._scheduler; + if (this[PI]) { + var e = this[PI].silent; + this[kI] = !0, Fr(this), EI.update.call(this), this[kI] = !1, this[PI] = !1, Xr.call(this, e), jr.call(this, e) + } else if (t.unfinished) { + var i = 1, n = this._model; + this._api; + t.unfinished = !1; + do { + var o = +new Date; + t.performSeriesTasks(n), t.performDataProcessorTasks(n), Zr(this, n), t.performVisualTasks(n), Qr(this, this._model, 0, "remain"), i -= +new Date - o + } while (i > 0 && t.unfinished); + t.unfinished || this._zr.flush() + } + } + }, OI.getDom = function () { + return this._dom + }, OI.getZr = function () { + return this._zr + }, OI.setOption = function (t, e, i) { + var n; + if (MI(e) && (i = e.lazyUpdate, n = e.silent, e = e.notMerge), this[kI] = !0, !this._model || e) { + var o = new La(this._api), a = this._theme, r = this._model = new TM(null, null, a, o); + r.scheduler = this._scheduler, r.init(null, null, a, o) + } + this._model.setOption(t, GI), i ? (this[PI] = {silent: n}, this[kI] = !1) : (Fr(this), EI.update.call(this), this._zr.flush(), this[PI] = !1, this[kI] = !1, Xr.call(this, n), jr.call(this, n)) + }, OI.setTheme = function () { + console.log("ECharts#setTheme() is DEPRECATED in ECharts 3.0") + }, OI.getModel = function () { + return this._model + }, OI.getOption = function () { + return this._model && this._model.getOption() + }, OI.getWidth = function () { + return this._zr.getWidth() + }, OI.getHeight = function () { + return this._zr.getHeight() + }, OI.getDevicePixelRatio = function () { + return this._zr.painter.dpr || window.devicePixelRatio || 1 + }, OI.getRenderedCanvas = function (t) { + if (a_.canvasSupported) return (t = t || {}).pixelRatio = t.pixelRatio || 1, t.backgroundColor = t.backgroundColor || this._model.get("backgroundColor"), this._zr.painter.getRenderedCanvas(t) + }, OI.getSvgDataUrl = function () { + if (a_.svgSupported) { + var t = this._zr; + return d(t.storage.getDisplayList(), function (t) { + t.stopAnimation(!0) + }), t.painter.pathToDataUrl() + } + }, OI.getDataURL = function (t) { + var e = (t = t || {}).excludeComponents, i = this._model, n = [], o = this; + bI(e, function (t) { + i.eachComponent({mainType: t}, function (t) { + var e = o._componentsMap[t.__viewId]; + e.group.ignore || (n.push(e), e.group.ignore = !0) + }) + }); + var a = "svg" === this._zr.painter.getType() ? this.getSvgDataUrl() : this.getRenderedCanvas(t).toDataURL("image/" + (t && t.type || "png")); + return bI(n, function (t) { + t.group.ignore = !1 + }), a + }, OI.getConnectedDataURL = function (t) { + if (a_.canvasSupported) { + var e = this.group, n = Math.min, o = Math.max; + if (XI[e]) { + var a = 1 / 0, r = 1 / 0, s = -1 / 0, l = -1 / 0, u = [], h = t && t.pixelRatio || 1; + d(UI, function (h, c) { + if (h.group === e) { + var d = h.getRenderedCanvas(i(t)), f = h.getDom().getBoundingClientRect(); + a = n(f.left, a), r = n(f.top, r), s = o(f.right, s), l = o(f.bottom, l), u.push({ + dom: d, + left: f.left, + top: f.top + }) + } + }); + var c = (s *= h) - (a *= h), f = (l *= h) - (r *= h), p = m_(); + p.width = c, p.height = f; + var g = _i(p); + return bI(u, function (t) { + var e = new Je({style: {x: t.left * h - a, y: t.top * h - r, image: t.dom}}); + g.add(e) + }), g.refreshImmediately(), p.toDataURL("image/" + (t && t.type || "png")) + } + return this.getDataURL(t) + } + }, OI.convertToPixel = v(Wr, "convertToPixel"), OI.convertFromPixel = v(Wr, "convertFromPixel"), OI.containPixel = function (t, e) { + var i; + return t = Oi(this._model, t), d(t, function (t, n) { + n.indexOf("Models") >= 0 && d(t, function (t) { + var o = t.coordinateSystem; + if (o && o.containPoint) i |= !!o.containPoint(e); else if ("seriesModels" === n) { + var a = this._chartsMap[t.__viewId]; + a && a.containPoint && (i |= a.containPoint(e, t)) + } + }, this) + }, this), !!i + }, OI.getVisual = function (t, e) { + var i = (t = Oi(this._model, t, {defaultMainType: "series"})).seriesModel.getData(), + n = t.hasOwnProperty("dataIndexInside") ? t.dataIndexInside : t.hasOwnProperty("dataIndex") ? i.indexOfRawIndex(t.dataIndex) : null; + return null != n ? i.getItemVisual(n, e) : i.getVisual(e) + }, OI.getViewOfComponentModel = function (t) { + return this._componentsMap[t.__viewId] + }, OI.getViewOfSeriesModel = function (t) { + return this._chartsMap[t.__viewId] + }; + var EI = { + prepareAndUpdate: function (t) { + Fr(this), EI.update.call(this, t) + }, update: function (t) { + var e = this._model, i = this._api, n = this._zr, o = this._coordSysMgr, a = this._scheduler; + if (e) { + a.restoreData(e, t), a.performSeriesTasks(e), o.create(e, i), a.performDataProcessorTasks(e, t), Zr(this, e), o.update(e, i), Kr(e), a.performVisualTasks(e, t), $r(this, e, i, t); + var r = e.get("backgroundColor") || "transparent"; + if (a_.canvasSupported) n.setBackgroundColor(r); else { + var s = At(r); + r = zt(s, "rgb"), 0 === s[3] && (r = "transparent") + } + ts(e, i) + } + }, updateTransform: function (t) { + var e = this._model, i = this, n = this._api; + if (e) { + var o = []; + e.eachComponent(function (a, r) { + var s = i.getViewOfComponentModel(r); + if (s && s.__alive) if (s.updateTransform) { + var l = s.updateTransform(r, e, n, t); + l && l.update && o.push(s) + } else o.push(s) + }); + var a = R(); + e.eachSeries(function (o) { + var r = i._chartsMap[o.__viewId]; + if (r.updateTransform) { + var s = r.updateTransform(o, e, n, t); + s && s.update && a.set(o.uid, 1) + } else a.set(o.uid, 1) + }), Kr(e), this._scheduler.performVisualTasks(e, t, { + setDirty: !0, + dirtyMap: a + }), Qr(i, e, 0, t, a), ts(e, this._api) + } + }, updateView: function (t) { + var e = this._model; + e && (gr.markUpdateMethod(t, "updateView"), Kr(e), this._scheduler.performVisualTasks(e, t, {setDirty: !0}), $r(this, this._model, this._api, t), ts(e, this._api)) + }, updateVisual: function (t) { + EI.update.call(this, t) + }, updateLayout: function (t) { + EI.update.call(this, t) + } + }; + OI.resize = function (t) { + this._zr.resize(t); + var e = this._model; + if (this._loadingFX && this._loadingFX.resize(), e) { + var i = e.resetOption("media"), n = t && t.silent; + this[kI] = !0, i && Fr(this), EI.update.call(this), this[kI] = !1, Xr.call(this, n), jr.call(this, n) + } + }, OI.showLoading = function (t, e) { + if (MI(t) && (e = t, t = ""), t = t || "default", this.hideLoading(), ZI[t]) { + var i = ZI[t](this._api, e), n = this._zr; + this._loadingFX = i, n.add(i) + } + }, OI.hideLoading = function () { + this._loadingFX && this._zr.remove(this._loadingFX), this._loadingFX = null + }, OI.makeActionFromEvent = function (t) { + var e = a({}, t); + return e.type = BI[t.type], e + }, OI.dispatchAction = function (t, e) { + MI(e) || (e = {silent: !!e}), zI[t.type] && this._model && (this[kI] ? this._pendingActions.push(t) : (Ur.call(this, t, e.silent), e.flush ? this._zr.flush(!0) : !1 !== e.flush && a_.browser.weChat && this._throttledZrFlush(), Xr.call(this, e.silent), jr.call(this, e.silent))) + }, OI.appendData = function (t) { + var e = t.seriesIndex; + this.getModel().getSeriesByIndex(e).appendData(t), this._scheduler.unfinished = !0 + }, OI.on = Br("on"), OI.off = Br("off"), OI.one = Br("one"); + var RI = ["click", "dblclick", "mouseover", "mouseout", "mousemove", "mousedown", "mouseup", "globalout", "contextmenu"]; + OI._initEvents = function () { + bI(RI, function (t) { + this._zr.on(t, function (e) { + var i, n = this.getModel(), o = e.target; + if ("globalout" === t) i = {}; else if (o && null != o.dataIndex) { + var r = o.dataModel || n.getSeriesByIndex(o.seriesIndex); + i = r && r.getDataParams(o.dataIndex, o.dataType) || {} + } else o && o.eventData && (i = a({}, o.eventData)); + i && (i.event = e, i.type = t, this.trigger(t, i)) + }, this) + }, this), bI(BI, function (t, e) { + this._messageCenter.on(e, function (t) { + this.trigger(e, t) + }, this) + }, this) + }, OI.isDisposed = function () { + return this._disposed + }, OI.clear = function () { + this.setOption({series: []}, !0) + }, OI.dispose = function () { + if (!this._disposed) { + this._disposed = !0, Ri(this.getDom(), qI, ""); + var t = this._api, e = this._model; + bI(this._componentsViews, function (i) { + i.dispose(e, t) + }), bI(this._chartsViews, function (i) { + i.dispose(e, t) + }), this._zr.dispose(), delete UI[this.id] + } + }, h(Gr, D_); + var zI = {}, BI = {}, VI = [], GI = [], WI = [], FI = [], HI = {}, ZI = {}, UI = {}, XI = {}, jI = new Date - 0, + YI = new Date - 0, qI = "_echarts_instance_", KI = {}, $I = rs; + ps(2e3, sI), us(GM), hs(5e3, function (t) { + var e = R(); + t.eachSeries(function (t) { + var i = t.get("stack"); + if (i) { + var n = e.get(i) || e.set(i, []), o = t.getData(), a = { + stackResultDimension: o.getCalculationInfo("stackResultDimension"), + stackedOverDimension: o.getCalculationInfo("stackedOverDimension"), + stackedDimension: o.getCalculationInfo("stackedDimension"), + stackedByDimension: o.getCalculationInfo("stackedByDimension"), + isStackedByIndex: o.getCalculationInfo("isStackedByIndex"), + data: o, + seriesModel: t + }; + if (!a.stackedDimension || !a.isStackedByIndex && !a.stackedByDimension) return; + n.length && o.setCalculationInfo("stackedOnSeries", n[n.length - 1].seriesModel), n.push(a) + } + }), e.each(ja) + }), ms("default", function (t, e) { + r(e = e || {}, { + text: "loading", + color: "#c23531", + textColor: "#000", + maskColor: "rgba(255, 255, 255, 0.8)", + zlevel: 0 + }); + var i = new SS({style: {fill: e.maskColor}, zlevel: e.zlevel, z: 1e4}), n = new DS({ + shape: {startAngle: -hI / 2, endAngle: -hI / 2 + .1, r: 10}, + style: {stroke: e.color, lineCap: "round", lineWidth: 5}, + zlevel: e.zlevel, + z: 10001 + }), o = new SS({ + 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 * hI / 2}).start("circularInOut"), n.animateShape(!0).when(1e3, {startAngle: 3 * hI / 2}).delay(300).start("circularInOut"); + var a = new sw; + return a.add(n), a.add(o), a.add(i), a.resize = function () { + var e = t.getWidth() / 2, a = t.getHeight() / 2; + n.setShape({cx: e, cy: a}); + var r = n.shape.r; + o.setShape({x: e - r, y: a - r, width: 2 * r, height: 2 * r}), i.setShape({ + x: 0, + y: 0, + width: t.getWidth(), + height: t.getHeight() + }) + }, a.resize(), a + }), cs({type: "highlight", event: "highlight", update: "highlight"}, B), cs({ + type: "downplay", + event: "downplay", + update: "downplay" + }, B), ls("light", yI), ls("dark", _I); + var JI = {}; + Ss.prototype = { + constructor: Ss, 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 = [], o = []; + for (Ms(t, {}, n, "_oldKeyGetter", this), Ms(e, i, o, "_newKeyGetter", this), a = 0; a < t.length; a++) null != (s = i[r = n[a]]) ? ((u = s.length) ? (1 === u && (i[r] = null), s = s.unshift()) : i[r] = null, this._update && this._update(s, a)) : this._remove && this._remove(a); + for (var a = 0; a < o.length; a++) { + var r = o[a]; + if (i.hasOwnProperty(r)) { + var s = i[r]; + if (null == s) continue; + if (s.length) for (var l = 0, u = s.length; l < u; l++) this._add && this._add(s[l]); else this._add && this._add(s) + } + } + } + }; + var QI = R(["tooltip", "label", "itemName", "itemId", "seriesName"]), tT = w, eT = "e\0\0", iT = { + float: "undefined" == typeof Float64Array ? Array : Float64Array, + int: "undefined" == typeof Int32Array ? Array : Int32Array, + ordinal: Array, + number: Array, + time: Array + }, nT = "undefined" == typeof Uint32Array ? Array : Uint32Array, + oT = "undefined" == typeof Uint16Array ? Array : Uint16Array, + aT = ["hasItemOption", "_nameList", "_idList", "_invertedIndicesMap", "_rawData", "_chunkSize", "_chunkCount", "_dimValueGetter", "_count", "_rawCount", "_nameDimIdx", "_idDimIdx"], + rT = ["_extent", "_approximateExtent", "_rawExtent"], sT = function (t, e) { + t = t || ["x", "y"]; + for (var i = {}, n = [], o = {}, a = 0; a < t.length; a++) { + var r = t[a]; + _(r) && (r = {name: r}); + var s = r.name; + r.type = r.type || "float", r.coordDim || (r.coordDim = s, r.coordDimIndex = 0), r.otherDims = r.otherDims || {}, n.push(s), i[s] = r, r.index = a, r.createInvertedIndices && (o[s] = []) + } + this.dimensions = n, this._dimensionInfos = i, this.hostModel = e, this.dataType, this._indices = null, this._count = 0, this._rawCount = 0, this._storage = {}, this._nameList = [], this._idList = [], this._optionModels = [], this._visual = {}, this._layout = {}, this._itemVisuals = [], this.hasItemVisual = {}, this._itemLayouts = [], this._graphicEls = [], this._chunkSize = 1e5, this._chunkCount = 0, this._rawData, this._rawExtent = {}, this._extent = {}, this._approximateExtent = {}, this._dimensionsSummary = Is(this), this._invertedIndicesMap = o, this._calculationInfo = {} + }, lT = sT.prototype; + lT.type = "list", lT.hasItemOption = !0, lT.getDimension = function (t) { + return isNaN(t) || (t = this.dimensions[t] || t), t + }, lT.getDimensionInfo = function (t) { + return this._dimensionInfos[this.getDimension(t)] + }, lT.getDimensionsOnCoord = function () { + return this._dimensionsSummary.dataDimsOnCoord.slice() + }, lT.mapDimension = function (t, e) { + var i = this._dimensionsSummary; + if (null == e) return i.encodeFirstDimNotExtra[t]; + var n = i.encode[t]; + return !0 === e ? (n || []).slice() : n && n[e] + }, lT.initData = function (t, e, i) { + (la.isInstance(t) || c(t)) && (t = new Ya(t, this.dimensions.length)), this._rawData = t, this._storage = {}, this._indices = null, this._nameList = e || [], this._idList = [], this._nameRepeatCount = {}, i || (this.hasItemOption = !1), this.defaultDimValueGetter = ZM[this._rawData.getSource().sourceFormat], this._dimValueGetter = i = i || this.defaultDimValueGetter, this._rawExtent = {}, this._initDataFromProvider(0, t.count()), t.pure && (this.hasItemOption = !1) + }, lT.getProvider = function () { + return this._rawData + }, lT.appendData = function (t) { + var e = this._rawData, i = this.count(); + e.appendData(t); + var n = e.count(); + e.persistent || (n += i), this._initDataFromProvider(i, n) + }, lT._initDataFromProvider = function (t, e) { + if (!(t >= e)) { + for (var i, n = this._chunkSize, o = this._rawData, a = this._storage, r = this.dimensions, s = r.length, l = this._dimensionInfos, u = this._nameList, h = this._idList, c = this._rawExtent, d = this._nameRepeatCount = {}, f = this._chunkCount, p = f - 1, g = 0; g < s; g++) { + c[T = r[g]] || (c[T] = [1 / 0, -1 / 0]); + var m = l[T]; + 0 === m.otherDims.itemName && (i = this._nameDimIdx = g), 0 === m.otherDims.itemId && (this._idDimIdx = g); + var v = iT[m.type]; + a[T] || (a[T] = []); + var y = a[T][p]; + if (y && y.length < n) { + for (var x = new v(Math.min(e - p * n, n)), _ = 0; _ < y.length; _++) x[_] = y[_]; + a[T][p] = x + } + for (I = f * n; I < e; I += n) a[T].push(new v(Math.min(e - I, n))); + this._chunkCount = a[T].length + } + for (var w = new Array(s), b = t; b < e; b++) { + w = o.getItem(b, w); + for (var S = Math.floor(b / n), M = b % n, I = 0; I < s; I++) { + var T = r[I], D = a[T][S], A = this._dimValueGetter(w, T, b, I); + D[M] = A; + var C = c[T]; + A < C[0] && (C[0] = A), A > C[1] && (C[1] = A) + } + if (!o.pure) { + var L = u[b]; + if (w && null == L) if (null != w.name) u[b] = L = w.name; else if (null != i) { + var k = r[i], P = a[k][S]; + if (P) { + L = P[M]; + var N = l[k].ordinalMeta; + N && N.categories.length && (L = N.categories[L]) + } + } + var O = null == w ? null : w.id; + null == O && null != L && (d[L] = d[L] || 0, O = L, d[L] > 0 && (O += "__ec__" + d[L]), d[L]++), null != O && (h[b] = O) + } + } + !o.persistent && o.clean && o.clean(), this._rawCount = this._count = e, this._extent = {}, ks(this) + } + }, lT.count = function () { + return this._count + }, lT.getIndices = function () { + var t = this._indices; + if (t) { + var e = t.constructor, i = this._count; + if (e === Array) { + n = new e(i); + for (o = 0; o < i; o++) n[o] = t[o] + } else n = new e(t.buffer, 0, i) + } else for (var n = new (e = As(this))(this.count()), o = 0; o < n.length; o++) n[o] = o; + return n + }, lT.get = function (t, e) { + if (!(e >= 0 && e < this._count)) return NaN; + var i = this._storage; + if (!i[t]) return NaN; + e = this.getRawIndex(e); + var n = Math.floor(e / this._chunkSize), o = e % this._chunkSize; + return i[t][n][o] + }, lT.getByRawIndex = function (t, e) { + if (!(e >= 0 && e < this._rawCount)) return NaN; + var i = this._storage[t]; + if (!i) return NaN; + var n = Math.floor(e / this._chunkSize), o = e % this._chunkSize; + return i[n][o] + }, lT._getFast = function (t, e) { + var i = Math.floor(e / this._chunkSize), n = e % this._chunkSize; + return this._storage[t][i][n] + }, lT.getValues = function (t, e) { + var i = []; + y(t) || (e = t, t = this.dimensions); + for (var n = 0, o = t.length; n < o; n++) i.push(this.get(t[n], e)); + return i + }, lT.hasValue = function (t) { + for (var e = this._dimensionsSummary.dataDimsOnCoord, i = this._dimensionInfos, n = 0, o = e.length; n < o; n++) if ("ordinal" !== i[e[n]].type && isNaN(this.get(e[n], t))) return !1; + return !0 + }, lT.getDataExtent = function (t) { + t = this.getDimension(t); + var e = [1 / 0, -1 / 0]; + if (!this._storage[t]) return e; + var i, n = this.count(); + if (!this._indices) return this._rawExtent[t].slice(); + if (i = this._extent[t]) return i.slice(); + for (var o = (i = e)[0], a = i[1], r = 0; r < n; r++) { + var s = this._getFast(t, this.getRawIndex(r)); + s < o && (o = s), s > a && (a = s) + } + return i = [o, a], this._extent[t] = i, i + }, lT.getApproximateExtent = function (t) { + return t = this.getDimension(t), this._approximateExtent[t] || this.getDataExtent(t) + }, lT.setApproximateExtent = function (t, e) { + e = this.getDimension(e), this._approximateExtent[e] = t.slice() + }, lT.getCalculationInfo = function (t) { + return this._calculationInfo[t] + }, lT.setCalculationInfo = function (t, e) { + tT(t) ? a(this._calculationInfo, t) : this._calculationInfo[t] = e + }, lT.getSum = function (t) { + var e = 0; + if (this._storage[t]) for (var i = 0, n = this.count(); i < n; i++) { + var o = this.get(t, i); + isNaN(o) || (e += o) + } + return e + }, lT.getMedian = function (t) { + var e = []; + this.each(t, function (t, i) { + isNaN(t) || e.push(t) + }); + var i = [].concat(e).sort(function (t, e) { + return t - e + }), n = this.count(); + return 0 === n ? 0 : n % 2 == 1 ? i[(n - 1) / 2] : (i[n / 2] + i[n / 2 - 1]) / 2 + }, lT.rawIndexOf = function (t, e) { + var i = (t && this._invertedIndicesMap[t])[e]; + return null == i || isNaN(i) ? -1 : i + }, lT.indexOfName = function (t) { + for (var e = 0, i = this.count(); e < i; e++) if (this.getName(e) === t) return e; + return -1 + }, lT.indexOfRawIndex = function (t) { + if (!this._indices) return t; + if (t >= this._rawCount || t < 0) return -1; + var e = this._indices, i = e[t]; + if (null != i && i < this._count && i === t) return t; + for (var n = 0, o = this._count - 1; n <= o;) { + var a = (n + o) / 2 | 0; + if (e[a] < t) n = a + 1; else { + if (!(e[a] > t)) return a; + o = a - 1 + } + } + return -1 + }, lT.indicesOfNearest = function (t, e, i) { + var n = []; + if (!this._storage[t]) return n; + null == i && (i = 1 / 0); + for (var o = Number.MAX_VALUE, a = -1, r = 0, s = this.count(); r < s; r++) { + var l = e - this.get(t, r), u = Math.abs(l); + l <= i && u <= o && ((u < o || l >= 0 && a < 0) && (o = u, a = l, n.length = 0), n.push(r)) + } + return n + }, lT.getRawIndex = Ns, lT.getRawDataItem = function (t) { + if (this._rawData.persistent) return this._rawData.getItem(this.getRawIndex(t)); + for (var e = [], i = 0; i < this.dimensions.length; i++) { + var n = this.dimensions[i]; + e.push(this.get(n, t)) + } + return e + }, lT.getName = function (t) { + var e = this.getRawIndex(t); + return this._nameList[e] || Ps(this, this._nameDimIdx, e) || "" + }, lT.getId = function (t) { + return Es(this, this.getRawIndex(t)) + }, lT.each = function (t, e, i, n) { + if (this._count) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this; + for (var o = (t = f(Rs(t), this.getDimension, this)).length, a = 0; a < this.count(); a++) switch (o) { + case 0: + e.call(i, a); + break; + case 1: + e.call(i, this.get(t[0], a), a); + break; + case 2: + e.call(i, this.get(t[0], a), this.get(t[1], a), a); + break; + default: + for (var r = 0, s = []; r < o; r++) s[r] = this.get(t[r], a); + s[r] = a, e.apply(i, s) + } + } + }, lT.filterSelf = function (t, e, i, n) { + if (this._count) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this, t = f(Rs(t), this.getDimension, this); + for (var o = this.count(), a = new (As(this))(o), r = [], s = t.length, l = 0, u = t[0], h = 0; h < o; h++) { + var c, d = this.getRawIndex(h); + if (0 === s) c = e.call(i, h); else if (1 === s) { + var p = this._getFast(u, d); + c = e.call(i, p, h) + } else { + for (var g = 0; g < s; g++) r[g] = this._getFast(u, d); + r[g] = h, c = e.apply(i, r) + } + c && (a[l++] = d) + } + return l < o && (this._indices = a), this._count = l, this._extent = {}, this.getRawIndex = this._indices ? Os : Ns, this + } + }, lT.selectRange = function (t) { + if (this._count) { + var e = []; + for (var i in t) t.hasOwnProperty(i) && e.push(i); + var n = e.length; + if (n) { + var o = this.count(), a = new (As(this))(o), r = 0, s = e[0], l = t[s][0], u = t[s][1], h = !1; + if (!this._indices) { + var c = 0; + if (1 === n) { + for (var d = this._storage[e[0]], f = 0; f < this._chunkCount; f++) for (var p = d[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) ((w = p[m]) >= l && w <= u || isNaN(w)) && (a[r++] = c), c++; + h = !0 + } else if (2 === n) { + for (var d = this._storage[s], v = this._storage[e[1]], y = t[e[1]][0], x = t[e[1]][1], f = 0; f < this._chunkCount; f++) for (var p = d[f], _ = v[f], g = Math.min(this._count - f * this._chunkSize, this._chunkSize), m = 0; m < g; m++) { + var w = p[m], b = _[m]; + (w >= l && w <= u || isNaN(w)) && (b >= y && b <= x || isNaN(b)) && (a[r++] = c), c++ + } + h = !0 + } + } + if (!h) if (1 === n) for (m = 0; m < o; m++) { + M = this.getRawIndex(m); + ((w = this._getFast(s, M)) >= l && w <= u || isNaN(w)) && (a[r++] = M) + } else for (m = 0; m < o; m++) { + for (var S = !0, M = this.getRawIndex(m), f = 0; f < n; f++) { + var I = e[f]; + ((w = this._getFast(i, M)) < t[I][0] || w > t[I][1]) && (S = !1) + } + S && (a[r++] = this.getRawIndex(m)) + } + return r < o && (this._indices = a), this._count = r, this._extent = {}, this.getRawIndex = this._indices ? Os : Ns, this + } + } + }, lT.mapArray = function (t, e, i, n) { + "function" == typeof t && (n = i, i = e, e = t, t = []), i = i || n || this; + var o = []; + return this.each(t, function () { + o.push(e && e.apply(this, arguments)) + }, i), o + }, lT.map = function (t, e, i, n) { + i = i || n || this; + var o = zs(this, t = f(Rs(t), this.getDimension, this)); + o._indices = this._indices, o.getRawIndex = o._indices ? Os : Ns; + for (var a = o._storage, r = [], s = this._chunkSize, l = t.length, u = this.count(), h = [], c = o._rawExtent, d = 0; d < u; d++) { + for (var p = 0; p < l; p++) h[p] = this.get(t[p], d); + h[l] = d; + var g = e && e.apply(i, h); + if (null != g) { + "object" != typeof g && (r[0] = g, g = r); + for (var m = this.getRawIndex(d), v = Math.floor(m / s), y = m % s, x = 0; x < g.length; x++) { + var _ = t[x], w = g[x], b = c[_], S = a[_]; + S && (S[v][y] = w), w < b[0] && (b[0] = w), w > b[1] && (b[1] = w) + } + } + } + return o + }, lT.downSample = function (t, e, i, n) { + for (var o = zs(this, [t]), a = o._storage, r = [], s = Math.floor(1 / e), l = a[t], u = this.count(), h = this._chunkSize, c = o._rawExtent[t], d = new (As(this))(u), f = 0, p = 0; p < u; p += s) { + s > u - p && (s = u - p, r.length = s); + for (var g = 0; g < s; g++) { + var m = this.getRawIndex(p + g), v = Math.floor(m / h), y = m % h; + r[g] = l[v][y] + } + var x = i(r), _ = this.getRawIndex(Math.min(p + n(r, x) || 0, u - 1)), w = _ % h; + l[Math.floor(_ / h)][w] = x, x < c[0] && (c[0] = x), x > c[1] && (c[1] = x), d[f++] = _ + } + return o._count = f, o._indices = d, o.getRawIndex = Os, o + }, lT.getItemModel = function (t) { + var e = this.hostModel; + return new wo(this.getRawDataItem(t), e, e && e.ecModel) + }, lT.diff = function (t) { + var e = this; + return new Ss(t ? t.getIndices() : [], this.getIndices(), function (e) { + return Es(t, e) + }, function (t) { + return Es(e, t) + }) + }, lT.getVisual = function (t) { + var e = this._visual; + return e && e[t] + }, lT.setVisual = function (t, e) { + if (tT(t)) for (var i in t) t.hasOwnProperty(i) && this.setVisual(i, t[i]); else this._visual = this._visual || {}, this._visual[t] = e + }, lT.setLayout = function (t, e) { + if (tT(t)) for (var i in t) t.hasOwnProperty(i) && this.setLayout(i, t[i]); else this._layout[t] = e + }, lT.getLayout = function (t) { + return this._layout[t] + }, lT.getItemLayout = function (t) { + return this._itemLayouts[t] + }, lT.setItemLayout = function (t, e, i) { + this._itemLayouts[t] = i ? a(this._itemLayouts[t] || {}, e) : e + }, lT.clearItemLayouts = function () { + this._itemLayouts.length = 0 + }, lT.getItemVisual = function (t, e, i) { + var n = this._itemVisuals[t], o = n && n[e]; + return null != o || i ? o : this.getVisual(e) + }, lT.setItemVisual = function (t, e, i) { + var n = this._itemVisuals[t] || {}, o = this.hasItemVisual; + if (this._itemVisuals[t] = n, tT(e)) for (var a in e) e.hasOwnProperty(a) && (n[a] = e[a], o[a] = !0); else n[e] = i, o[e] = !0 + }, lT.clearAllVisual = function () { + this._visual = {}, this._itemVisuals = [], this.hasItemVisual = {} + }; + var uT = function (t) { + t.seriesIndex = this.seriesIndex, t.dataIndex = this.dataIndex, t.dataType = this.dataType + }; + lT.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(uT, e)), this._graphicEls[t] = e + }, lT.getItemGraphicEl = function (t) { + return this._graphicEls[t] + }, lT.eachItemGraphicEl = function (t, e) { + d(this._graphicEls, function (i, n) { + i && t && t.call(e, i, n) + }) + }, lT.cloneShallow = function (t) { + if (!t) { + var e = f(this.dimensions, this.getDimensionInfo, this); + t = new sT(e, this.hostModel) + } + if (t._storage = this._storage, Ls(t, this), this._indices) { + var i = this._indices.constructor; + t._indices = new i(this._indices) + } else t._indices = null; + return t.getRawIndex = t._indices ? Os : Ns, t + }, lT.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(C(arguments))) + }) + }, lT.TRANSFERABLE_METHODS = ["cloneShallow", "downSample", "map"], lT.CHANGABLE_METHODS = ["filterSelf", "selectRange"]; + var hT = function (t, e) { + return e = e || {}, Gs(e.coordDimensions || [], t, { + dimsDef: e.dimensionsDefine || t.dimensionsDefine, + encodeDef: e.encodeDefine || t.encodeDefine, + dimCount: e.dimensionsCount, + generateCoord: e.generateCoord, + generateCoordCount: e.generateCoordCount + }) + }; + qs.prototype.parse = function (t) { + return t + }, qs.prototype.getSetting = function (t) { + return this._setting[t] + }, qs.prototype.contain = function (t) { + var e = this._extent; + return t >= e[0] && t <= e[1] + }, qs.prototype.normalize = function (t) { + var e = this._extent; + return e[1] === e[0] ? .5 : (t - e[0]) / (e[1] - e[0]) + }, qs.prototype.scale = function (t) { + var e = this._extent; + return t * (e[1] - e[0]) + e[0] + }, qs.prototype.unionExtent = function (t) { + var e = this._extent; + t[0] < e[0] && (e[0] = t[0]), t[1] > e[1] && (e[1] = t[1]) + }, qs.prototype.unionExtentFromData = function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, qs.prototype.getExtent = function () { + return this._extent.slice() + }, qs.prototype.setExtent = function (t, e) { + var i = this._extent; + isNaN(t) || (i[0] = t), isNaN(e) || (i[1] = e) + }, qs.prototype.isBlank = function () { + return this._isBlank + }, qs.prototype.setBlank = function (t) { + this._isBlank = t + }, qs.prototype.getLabel = null, Gi(qs), Zi(qs, {registerWhenExtend: !0}), Ks.createByAxisModel = function (t) { + var e = t.option, i = e.data, n = i && f(i, Js); + return new Ks({categories: n, needCollect: !n, deduplication: !1 !== e.dedplication}) + }; + var cT = Ks.prototype; + cT.getOrdinal = function (t) { + return $s(this).get(t) + }, cT.parseAndCollect = function (t) { + var e, i = this._needCollect; + if ("string" != typeof t && !i) return t; + if (i && !this._deduplication) return e = this.categories.length, this.categories[e] = t, e; + var n = $s(this); + return null == (e = n.get(t)) && (i ? (e = this.categories.length, this.categories[e] = t, n.set(t, e)) : e = NaN), e + }; + var dT = qs.prototype, fT = qs.extend({ + type: "ordinal", init: function (t, e) { + t && !y(t) || (t = new Ks({categories: t})), this._ordinalMeta = t, this._extent = e || [0, t.categories.length - 1] + }, parse: function (t) { + return "string" == typeof t ? this._ordinalMeta.getOrdinal(t) : Math.round(t) + }, contain: function (t) { + return t = this.parse(t), dT.contain.call(this, t) && null != this._ordinalMeta.categories[t] + }, normalize: function (t) { + return dT.normalize.call(this, this.parse(t)) + }, scale: function (t) { + return Math.round(dT.scale.call(this, t)) + }, getTicks: function () { + for (var t = [], e = this._extent, i = e[0]; i <= e[1];) t.push(i), i++; + return t + }, getLabel: function (t) { + if (!this.isBlank()) return this._ordinalMeta.categories[t] + }, count: function () { + return this._extent[1] - this._extent[0] + 1 + }, unionExtentFromData: function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, getOrdinalMeta: function () { + return this._ordinalMeta + }, niceTicks: B, niceExtent: B + }); + fT.create = function () { + return new fT + }; + var pT = Ao, gT = Ao, mT = qs.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]), mT.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 = tl(t) + }, getTicks: function () { + return nl(this._interval, this._extent, this._niceExtent, this._intervalPrecision) + }, getLabel: function (t, e) { + if (null == t) return ""; + var i = e && e.precision; + return null == i ? i = ko(t) || 0 : "auto" === i && (i = this._intervalPrecision), t = gT(t, i, !0), Fo(t) + }, niceTicks: function (t, e, i) { + t = t || 5; + var n = this._extent, o = n[1] - n[0]; + if (isFinite(o)) { + o < 0 && (o = -o, n.reverse()); + var a = Qs(n, t, e, i); + this._intervalPrecision = a.intervalPrecision, this._interval = a.interval, this._niceExtent = a.niceTickExtent + } + }, niceExtent: function (t) { + var e = this._extent; + if (e[0] === e[1]) if (0 !== e[0]) { + var i = e[0]; + t.fixMax ? e[0] -= i / 2 : (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 o = this._interval; + t.fixMin || (e[0] = gT(Math.floor(e[0] / o) * o)), t.fixMax || (e[1] = gT(Math.ceil(e[1] / o) * o)) + } + }); + mT.create = function () { + return new mT + }; + var vT = "__ec_stack_", yT = "undefined" != typeof Float32Array ? Float32Array : Array, xT = { + seriesType: "bar", plan: QM(), reset: function (t) { + if (dl(t) && fl(t)) { + var e = t.getData(), i = t.coordinateSystem, n = i.getBaseAxis(), o = i.getOtherAxis(n), + a = e.mapDimension(o.dim), r = e.mapDimension(n.dim), s = o.isHorizontal(), l = s ? 0 : 1, + u = hl(ll([t]), n, t).width; + return u > .5 || (u = .5), { + progress: function (t, e) { + for (var h, c = new yT(2 * t.count), d = [], f = [], p = 0; null != (h = t.next());) f[l] = e.get(a, h), f[1 - l] = e.get(r, h), d = i.dataToPoint(f, null, d), c[p++] = d[0], c[p++] = d[1]; + e.setLayout({ + largePoints: c, + barWidth: u, + valueAxisStart: pl(n, o, !1), + valueAxisHorizontal: s + }) + } + } + } + } + }, _T = mT.prototype, wT = Math.ceil, bT = Math.floor, ST = function (t, e, i, n) { + for (; i < n;) { + var o = i + n >>> 1; + t[o][1] < e ? i = o + 1 : n = o + } + return i + }, MT = mT.extend({ + type: "time", getLabel: function (t) { + var e = this._stepLvl, i = new Date(t); + return qo(e[0], i, this.getSetting("useUTC")) + }, niceExtent: function (t) { + var e = this._extent; + if (e[0] === e[1] && (e[0] -= 864e5, e[1] += 864e5), 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] - 864e5 + } + this.niceTicks(t.splitNumber, t.minInterval, t.maxInterval); + var n = this._interval; + t.fixMin || (e[0] = Ao(bT(e[0] / n) * n)), t.fixMax || (e[1] = Ao(wT(e[1] / n) * n)) + }, niceTicks: function (t, e, i) { + t = t || 10; + var n = this._extent, o = n[1] - n[0], a = o / t; + null != e && a < e && (a = e), null != i && a > i && (a = i); + var r = IT.length, s = ST(IT, a, 0, r), l = IT[Math.min(s, r - 1)], u = l[1]; + "year" === l[0] && (u *= Vo(o / u / t, !0)); + var h = this.getSetting("useUTC") ? 0 : 60 * new Date(+n[0] || +n[1]).getTimezoneOffset() * 1e3, + c = [Math.round(wT((n[0] - h) / u) * u + h), Math.round(bT((n[1] - h) / u) * u + h)]; + il(c, n), this._stepLvl = l, this._interval = u, this._niceExtent = c + }, parse: function (t) { + return +Ro(t) + } + }); + d(["contain", "normalize"], function (t) { + MT.prototype[t] = function (e) { + return _T[t].call(this, this.parse(e)) + } + }); + var IT = [["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", 864e5], ["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]]; + MT.create = function (t) { + return new MT({useUTC: t.ecModel.get("useUTC")}) + }; + var TT = qs.prototype, DT = mT.prototype, AT = ko, CT = Ao, LT = Math.floor, kT = Math.ceil, PT = Math.pow, + NT = Math.log, OT = qs.extend({ + type: "log", base: 10, $constructor: function () { + qs.apply(this, arguments), this._originalScale = new mT + }, getTicks: function () { + var t = this._originalScale, e = this._extent, i = t.getExtent(); + return f(DT.getTicks.call(this), function (n) { + var o = Ao(PT(this.base, n)); + return o = n === e[0] && t.__fixMin ? gl(o, i[0]) : o, o = n === e[1] && t.__fixMax ? gl(o, i[1]) : o + }, this) + }, getLabel: DT.getLabel, scale: function (t) { + return t = TT.scale.call(this, t), PT(this.base, t) + }, setExtent: function (t, e) { + var i = this.base; + t = NT(t) / NT(i), e = NT(e) / NT(i), DT.setExtent.call(this, t, e) + }, getExtent: function () { + var t = this.base, e = TT.getExtent.call(this); + e[0] = PT(t, e[0]), e[1] = PT(t, e[1]); + var i = this._originalScale, n = i.getExtent(); + return i.__fixMin && (e[0] = gl(e[0], n[0])), i.__fixMax && (e[1] = gl(e[1], n[1])), e + }, unionExtent: function (t) { + this._originalScale.unionExtent(t); + var e = this.base; + t[0] = NT(t[0]) / NT(e), t[1] = NT(t[1]) / NT(e), TT.unionExtent.call(this, t) + }, unionExtentFromData: function (t, e) { + this.unionExtent(t.getApproximateExtent(e)) + }, niceTicks: function (t) { + t = t || 10; + var e = this._extent, i = e[1] - e[0]; + if (!(i === 1 / 0 || i <= 0)) { + var n = zo(i); + for (t / i * n <= .5 && (n *= 10); !isNaN(n) && Math.abs(n) < 1 && Math.abs(n) > 0;) n *= 10; + var o = [Ao(kT(e[0] / n) * n), Ao(LT(e[1] / n) * n)]; + this._interval = n, this._niceExtent = o + } + }, niceExtent: function (t) { + DT.niceExtent.call(this, t); + var e = this._originalScale; + e.__fixMin = t.fixMin, e.__fixMax = t.fixMax + } + }); + d(["contain", "normalize"], function (t) { + OT.prototype[t] = function (e) { + return e = NT(e) / NT(this.base), TT[t].call(this, e) + } + }), OT.create = function () { + return new OT + }; + var ET = { + 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 && !I(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 && !I(i) && (i = this.axis.scale.parse(i)), i + }, getNeedCrossZero: function () { + var t = this.option; + return null == t.rangeStart && null == t.rangeEnd && !t.scale + }, getCoordSysModel: B, setRange: function (t, e) { + this.option.rangeStart = t, this.option.rangeEnd = e + }, resetRange: function () { + this.option.rangeStart = this.option.rangeEnd = null + } + }, RT = En({ + type: "triangle", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = e.width / 2, a = e.height / 2; + t.moveTo(i, n - a), t.lineTo(i + o, n + a), t.lineTo(i - o, n + a), t.closePath() + } + }), zT = En({ + type: "diamond", shape: {cx: 0, cy: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.cx, n = e.cy, o = e.width / 2, a = e.height / 2; + t.moveTo(i, n - a), t.lineTo(i + o, n), t.lineTo(i, n + a), t.lineTo(i - o, n), t.closePath() + } + }), BT = En({ + type: "pin", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.x, n = e.y, o = e.width / 5 * 3, a = Math.max(o, e.height), r = o / 2, s = r * r / (a - r), + l = n - a + r + s, u = Math.asin(s / r), h = Math.cos(u) * r, c = Math.sin(u), d = Math.cos(u), + f = .6 * r, p = .7 * r; + t.moveTo(i - h, l + s), t.arc(i, l, r, Math.PI - u, 2 * Math.PI + u), t.bezierCurveTo(i + h - c * f, l + s + d * f, i, n - p, i, n), t.bezierCurveTo(i, n - p, i - h + c * f, l + s + d * f, i - h, l + s), t.closePath() + } + }), VT = En({ + type: "arrow", shape: {x: 0, y: 0, width: 0, height: 0}, buildPath: function (t, e) { + var i = e.height, n = e.width, o = e.x, a = e.y, r = n / 3 * 2; + t.moveTo(o, a), t.lineTo(o + r, a + i), t.lineTo(o, a + i / 4 * 3), t.lineTo(o - r, a + i), t.lineTo(o, a), t.closePath() + } + }), GT = { + line: function (t, e, i, n, o) { + o.x1 = t, o.y1 = e + n / 2, o.x2 = t + i, o.y2 = e + n / 2 + }, rect: function (t, e, i, n, o) { + o.x = t, o.y = e, o.width = i, o.height = n + }, roundRect: function (t, e, i, n, o) { + o.x = t, o.y = e, o.width = i, o.height = n, o.r = Math.min(i, n) / 4 + }, square: function (t, e, i, n, o) { + var a = Math.min(i, n); + o.x = t, o.y = e, o.width = a, o.height = a + }, circle: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.r = Math.min(i, n) / 2 + }, diamond: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n + }, pin: function (t, e, i, n, o) { + o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n + }, arrow: function (t, e, i, n, o) { + o.x = t + i / 2, o.y = e + n / 2, o.width = i, o.height = n + }, triangle: function (t, e, i, n, o) { + o.cx = t + i / 2, o.cy = e + n / 2, o.width = i, o.height = n + } + }, WT = {}; + d({ + line: MS, + rect: SS, + roundRect: SS, + square: SS, + circle: pS, + diamond: zT, + pin: BT, + arrow: VT, + triangle: RT + }, function (t, e) { + WT[e] = new t + }); + var FT = En({ + 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, o = WT[n]; + "none" !== e.symbolType && (o || (o = WT[n = "rect"]), GT[n](e.x, e.y, e.width, e.height, o.shape), o.buildPath(t, o.shape, i)) + } + }), HT = {isDimensionStacked: Zs, enableDataStack: Hs, getStackedDimension: Us}, ZT = (Object.freeze || Object)({ + createList: function (t) { + return Xs(t.getSource(), t) + }, getLayoutRect: Qo, dataStack: HT, createScale: function (t, e) { + var i = e; + wo.isInstance(e) || h(i = new wo(e), ET); + var n = xl(i); + return n.setExtent(t[0], t[1]), yl(n, i), n + }, mixinAxisModelCommonMethods: function (t) { + h(t, ET) + }, completeDimensions: Gs, createDimensions: hT, createSymbol: Tl + }), UT = 1e-8; + Cl.prototype = { + constructor: Cl, properties: null, getBoundingRect: function () { + var t = this._rect; + if (t) return t; + for (var e = Number.MAX_VALUE, i = [e, e], n = [-e, -e], o = [], a = [], r = this.geometries, s = 0; s < r.length; s++) "polygon" === r[s].type && (rn(r[s].exterior, o, a), tt(i, i, o), et(n, n, a)); + return 0 === s && (i[0] = i[1] = n[0] = n[1] = 0), this._rect = new $t(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, o = i.length; n < o; n++) if ("polygon" === i[n].type) { + var a = i[n].exterior, r = i[n].interiors; + if (Al(a, t[0], t[1])) { + for (var s = 0; s < (r ? r.length : 0); s++) if (Al(r[s])) continue t; + return !0 + } + } + return !1 + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(), a = o.width / o.height; + i ? n || (n = i / a) : i = a * n; + for (var r = new $t(t, e, i, n), s = o.calculateTransform(r), l = this.geometries, u = 0; u < l.length; u++) if ("polygon" === l[u].type) { + for (var h = l[u].exterior, c = l[u].interiors, d = 0; d < h.length; d++) Q(h[d], h[d], s); + for (var f = 0; f < (c ? c.length : 0); f++) for (d = 0; d < c[f].length; d++) Q(c[f][d], c[f][d], s) + } + (o = this._rect).copy(r), this.center = [o.x + o.width / 2, o.y + o.height / 2] + } + }; + var XT = function (t) { + return Ll(t), f(g(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, o = []; + "Polygon" === i.type && o.push({ + type: "polygon", + exterior: n[0], + interiors: n.slice(1) + }), "MultiPolygon" === i.type && d(n, function (t) { + t[0] && o.push({type: "polygon", exterior: t[0], interiors: t.slice(1)}) + }); + var a = new Cl(e.name, o, e.cp); + return a.properties = e, a + }) + }, jT = Ni(), YT = [0, 1], qT = function (t, e, i) { + this.dim = t, this.scale = e, this._extent = i || [0, 0], this.inverse = !1, this.onBand = !1 + }; + qT.prototype = { + constructor: qT, 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 Po(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 && jl(i = i.slice(), n.count()), To(t, YT, i, e) + }, coordToData: function (t, e) { + var i = this._extent, n = this.scale; + this.onBand && "ordinal" === n.type && jl(i = i.slice(), n.count()); + var o = To(t, i, YT, e); + return this.scale.scale(o) + }, pointToData: function (t, e) { + }, getTicksCoords: function (t) { + var e = (t = t || {}).tickModel || this.getTickModel(), i = Nl(this, e), n = f(i.ticks, function (t) { + return {coord: this.dataToCoord(t), tickValue: t} + }, this), o = e.get("alignWithLabel"); + return Yl(this, n, i.tickCategoryInterval, o, t.clamp), n + }, getViewLabels: function () { + return Pl(this).labels + }, getLabelModel: function () { + return this.model.getModel("axisLabel") + }, getTickModel: function () { + return this.model.getModel("axisTick") + }, 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, calculateCategoryInterval: function () { + return Fl(this) + } + }; + var KT = XT, $T = {}; + d(["map", "each", "filter", "indexOf", "inherits", "reduce", "filter", "bind", "curry", "isArray", "isString", "isObject", "isFunction", "extend", "defaults", "clone", "merge"], function (t) { + $T[t] = x_[t] + }), KM.extend({ + type: "series.line", + dependencies: ["grid", "polar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + clipOverflow: !0, + label: {position: "top"}, + lineStyle: {width: 2, type: "solid"}, + step: !1, + smooth: !1, + smoothMonotone: null, + symbol: "emptyCircle", + symbolSize: 4, + symbolRotate: null, + showSymbol: !0, + showAllSymbol: "auto", + connectNulls: !1, + sampling: "none", + animationEasing: "linear", + progressive: 0, + hoverLayerThreshold: 1 / 0 + } + }); + var JT = Kl.prototype, QT = Kl.getSymbolSize = function (t, e) { + var i = t.getItemVisual(e, "symbolSize"); + return i instanceof Array ? i.slice() : [+i, +i] + }; + JT._createSymbol = function (t, e, i, n, o) { + this.removeAll(); + var a = Tl(t, -1, -1, 2, 2, e.getItemVisual(i, "color"), o); + a.attr({z2: 100, culling: !0, scale: $l(n)}), a.drift = Jl, this._symbolType = t, this.add(a) + }, JT.stopSymbolAnimation = function (t) { + this.childAt(0).stopAnimation(t) + }, JT.getSymbolPath = function () { + return this.childAt(0) + }, JT.getScale = function () { + return this.childAt(0).scale + }, JT.highlight = function () { + this.childAt(0).trigger("emphasis") + }, JT.downplay = function () { + this.childAt(0).trigger("normal") + }, JT.setZ = function (t, e) { + var i = this.childAt(0); + i.zlevel = t, i.z = e + }, JT.setDraggable = function (t) { + var e = this.childAt(0); + e.draggable = t, e.cursor = t ? "move" : "pointer" + }, JT.updateData = function (t, e, i) { + this.silent = !1; + var n = t.getItemVisual(e, "symbol") || "circle", o = t.hostModel, a = QT(t, e), r = n !== this._symbolType; + if (r) { + var s = t.getItemVisual(e, "symbolKeepAspect"); + this._createSymbol(n, t, e, a, s) + } else (l = this.childAt(0)).silent = !1, fo(l, {scale: $l(a)}, o, e); + if (this._updateCommon(t, e, a, i), r) { + var l = this.childAt(0), u = i && i.fadeIn, h = {scale: l.scale.slice()}; + u && (h.style = {opacity: l.style.opacity}), l.scale = [0, 0], u && (l.style.opacity = 0), po(l, h, o, e) + } + this._seriesModel = o + }; + var tD = ["itemStyle"], eD = ["emphasis", "itemStyle"], iD = ["label"], nD = ["emphasis", "label"]; + JT._updateCommon = function (t, e, i, n) { + var o = this.childAt(0), r = t.hostModel, s = t.getItemVisual(e, "color"); + "image" !== o.type && o.useStyle({strokeNoScale: !0}); + var l = n && n.itemStyle, u = n && n.hoverItemStyle, h = n && n.symbolRotate, c = n && n.symbolOffset, + d = n && n.labelModel, f = n && n.hoverLabelModel, p = n && n.hoverAnimation, g = n && n.cursorStyle; + if (!n || t.hasItemOption) { + var m = n && n.itemModel ? n.itemModel : t.getItemModel(e); + l = m.getModel(tD).getItemStyle(["color"]), u = m.getModel(eD).getItemStyle(), h = m.getShallow("symbolRotate"), c = m.getShallow("symbolOffset"), d = m.getModel(iD), f = m.getModel(nD), p = m.getShallow("hoverAnimation"), g = m.getShallow("cursor") + } else u = a({}, u); + var v = o.style; + o.attr("rotation", (h || 0) * Math.PI / 180 || 0), c && o.attr("position", [Do(c[0], i[0]), Do(c[1], i[1])]), g && o.attr("cursor", g), o.setColor(s, n && n.symbolInnerColor), o.setStyle(l); + var y = t.getItemVisual(e, "opacity"); + null != y && (v.opacity = y); + var x = t.getItemVisual(e, "liftZ"), _ = o.__z2Origin; + null != x ? null == _ && (o.__z2Origin = o.z2, o.z2 += x) : null != _ && (o.z2 = _, o.__z2Origin = null); + var w = n && n.useNameLabel; + io(v, u, d, f, { + labelFetcher: r, labelDataIndex: e, defaultText: function (e, i) { + return w ? t.getName(e) : ql(t, e) + }, isRectText: !0, autoColor: s + }), o.off("mouseover").off("mouseout").off("emphasis").off("normal"), o.hoverStyle = u, eo(o); + var b = $l(i); + if (p && r.isAnimationEnabled()) { + var S = function () { + if (!this.incremental) { + var t = b[1] / b[0]; + this.animateTo({scale: [Math.max(1.1 * b[0], b[0] + 3), Math.max(1.1 * b[1], b[1] + 3 * t)]}, 400, "elasticOut") + } + }, M = function () { + this.incremental || this.animateTo({scale: b}, 400, "elasticOut") + }; + o.on("mouseover", S).on("mouseout", M).on("emphasis", S).on("normal", M) + } + }, JT.fadeOut = function (t, e) { + var i = this.childAt(0); + this.silent = i.silent = !0, !(e && e.keepLabel) && (i.style.text = null), fo(i, { + style: {opacity: 0}, + scale: [0, 0] + }, this._seriesModel, this.dataIndex, t) + }, u(Kl, sw); + var oD = Ql.prototype; + oD.updateData = function (t, e) { + e = eu(e); + var i = this.group, n = t.hostModel, o = this._data, a = this._symbolCtor, r = iu(t); + o || i.removeAll(), t.diff(o).add(function (n) { + var o = t.getItemLayout(n); + if (tu(t, o, n, e)) { + var s = new a(t, n, r); + s.attr("position", o), t.setItemGraphicEl(n, s), i.add(s) + } + }).update(function (s, l) { + var u = o.getItemGraphicEl(l), h = t.getItemLayout(s); + tu(t, h, s, e) ? (u ? (u.updateData(t, s, r), fo(u, {position: h}, n)) : (u = new a(t, s)).attr("position", h), i.add(u), t.setItemGraphicEl(s, u)) : i.remove(u) + }).remove(function (t) { + var e = o.getItemGraphicEl(t); + e && e.fadeOut(function () { + i.remove(e) + }) + }).execute(), this._data = t + }, oD.isPersistent = function () { + return !0 + }, oD.updateLayout = function () { + var t = this._data; + t && t.eachItemGraphicEl(function (e, i) { + var n = t.getItemLayout(i); + e.attr("position", n) + }) + }, oD.incrementalPrepareUpdate = function (t) { + this._seriesScope = iu(t), this._data = null, this.group.removeAll() + }, oD.incrementalUpdate = function (t, e, i) { + i = eu(i); + for (var n = t.start; n < t.end; n++) { + var o = e.getItemLayout(n); + if (tu(e, o, n, i)) { + var a = new this._symbolCtor(e, n, this._seriesScope); + a.traverse(function (t) { + t.isGroup || (t.incremental = t.useHoverLayer = !0) + }), a.attr("position", o), this.group.add(a), e.setItemGraphicEl(n, a) + } + } + }, oD.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 aD = function (t, e, i, n, o, a, r, s) { + for (var l = ru(t, e), u = [], h = [], c = [], d = [], f = [], p = [], g = [], m = nu(o, e, r), v = nu(a, t, s), y = 0; y < l.length; y++) { + var x = l[y], _ = !0; + switch (x.cmd) { + case"=": + var w = t.getItemLayout(x.idx), b = e.getItemLayout(x.idx1); + (isNaN(w[0]) || isNaN(w[1])) && (w = b.slice()), u.push(w), h.push(b), c.push(i[x.idx]), d.push(n[x.idx1]), g.push(e.getRawIndex(x.idx1)); + break; + case"+": + S = x.idx; + u.push(o.dataToPoint([e.get(m.dataDimsForPoint[0], S), e.get(m.dataDimsForPoint[1], S)])), h.push(e.getItemLayout(S).slice()), c.push(au(m, o, e, S)), d.push(n[S]), g.push(e.getRawIndex(S)); + break; + case"-": + var S = x.idx, M = t.getRawIndex(S); + M !== S ? (u.push(t.getItemLayout(S)), h.push(a.dataToPoint([t.get(v.dataDimsForPoint[0], S), t.get(v.dataDimsForPoint[1], S)])), c.push(i[S]), d.push(au(v, a, t, S)), g.push(M)) : _ = !1 + } + _ && (f.push(x), p.push(p.length)) + } + p.sort(function (t, e) { + return g[t] - g[e] + }); + for (var I = [], T = [], D = [], A = [], C = [], y = 0; y < p.length; y++) { + S = p[y]; + I[y] = u[S], T[y] = h[S], D[y] = c[S], A[y] = d[S], C[y] = f[S] + } + return {current: I, next: T, stackedOnCurrent: D, stackedOnNext: A, status: C} + }, rD = tt, sD = et, lD = Z, uD = G, hD = [], cD = [], dD = [], fD = In.extend({ + type: "ec-polyline", + shape: {points: [], smooth: 0, smoothConstraint: !0, smoothMonotone: null, connectNulls: !1}, + style: {fill: null, stroke: "#000"}, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.points, n = 0, o = i.length, a = cu(i, e.smoothConstraint); + if (e.connectNulls) { + for (; o > 0 && su(i[o - 1]); o--) ; + for (; n < o && su(i[n]); n++) ; + } + for (; n < o;) n += lu(t, i, n, o, o, 1, a.min, a.max, e.smooth, e.smoothMonotone, e.connectNulls) + 1 + } + }), pD = In.extend({ + type: "ec-polygon", + shape: { + points: [], + stackedOnPoints: [], + smooth: 0, + stackedOnSmooth: 0, + smoothConstraint: !0, + smoothMonotone: null, + connectNulls: !1 + }, + brush: mS(In.prototype.brush), + buildPath: function (t, e) { + var i = e.points, n = e.stackedOnPoints, o = 0, a = i.length, r = e.smoothMonotone, + s = cu(i, e.smoothConstraint), l = cu(n, e.smoothConstraint); + if (e.connectNulls) { + for (; a > 0 && su(i[a - 1]); a--) ; + for (; o < a && su(i[o]); o++) ; + } + for (; o < a;) { + var u = lu(t, i, o, a, a, 1, s.min, s.max, e.smooth, r, e.connectNulls); + lu(t, n, o + u - 1, u, a, -1, l.min, l.max, e.stackedOnSmooth, r, e.connectNulls), o += u + 1, t.closePath() + } + } + }); + gr.extend({ + type: "line", init: function () { + var t = new sw, e = new Ql; + this.group.add(e.group), this._symbolDraw = e, this._lineGroup = t + }, render: function (t, e, i) { + var n = t.coordinateSystem, o = this.group, a = t.getData(), s = t.getModel("lineStyle"), + l = t.getModel("areaStyle"), u = a.mapArray(a.getItemLayout), h = "polar" === n.type, + c = this._coordSys, d = this._symbolDraw, f = this._polyline, p = this._polygon, g = this._lineGroup, + m = t.get("animation"), v = !l.isEmpty(), y = l.get("origin"), x = gu(n, a, nu(n, a, y)), + _ = t.get("showSymbol"), w = _ && !h && wu(t, a, n), b = this._data; + b && b.eachItemGraphicEl(function (t, e) { + t.__temp && (o.remove(t), b.setItemGraphicEl(e, null)) + }), _ || d.remove(), o.add(g); + var S = !h && t.get("step"); + f && c.type === n.type && S === this._step ? (v && !p ? p = this._newPolygon(u, x, n, m) : p && !v && (g.remove(p), p = this._polygon = null), g.setClipPath(yu(n, !1, !1, t)), _ && d.updateData(a, { + isIgnore: w, + clipShape: yu(n, !1, !0, t) + }), a.eachItemGraphicEl(function (t) { + t.stopAnimation(!0) + }), du(this._stackedOnPoints, x) && du(this._points, u) || (m ? this._updateAnimation(a, x, n, i, S, y) : (S && (u = xu(u, n, S), x = xu(x, n, S)), f.setShape({points: u}), p && p.setShape({ + points: u, + stackedOnPoints: x + })))) : (_ && d.updateData(a, { + isIgnore: w, + clipShape: yu(n, !1, !0, t) + }), S && (u = xu(u, n, S), x = xu(x, n, S)), f = this._newPolyline(u, n, m), v && (p = this._newPolygon(u, x, n, m)), g.setClipPath(yu(n, !0, !1, t))); + var M = _u(a, n) || a.getVisual("color"); + f.useStyle(r(s.getLineStyle(), {fill: "none", stroke: M, lineJoin: "bevel"})); + var I = t.get("smooth"); + if (I = fu(t.get("smooth")), f.setShape({ + smooth: I, + smoothMonotone: t.get("smoothMonotone"), + connectNulls: t.get("connectNulls") + }), p) { + var T = a.getCalculationInfo("stackedOnSeries"), D = 0; + p.useStyle(r(l.getAreaStyle(), { + fill: M, + opacity: .7, + lineJoin: "bevel" + })), T && (D = fu(T.get("smooth"))), p.setShape({ + smooth: I, + stackedOnSmooth: D, + smoothMonotone: t.get("smoothMonotone"), + connectNulls: t.get("connectNulls") + }) + } + this._data = a, this._coordSys = n, this._stackedOnPoints = x, this._points = u, this._step = S, this._valueOrigin = y + }, dispose: function () { + }, highlight: function (t, e, i, n) { + var o = t.getData(), a = Pi(o, n); + if (!(a instanceof Array) && null != a && a >= 0) { + var r = o.getItemGraphicEl(a); + if (!r) { + var s = o.getItemLayout(a); + if (!s) return; + (r = new Kl(o, a)).position = s, r.setZ(t.get("zlevel"), t.get("z")), r.ignore = isNaN(s[0]) || isNaN(s[1]), r.__temp = !0, o.setItemGraphicEl(a, r), r.stopSymbolAnimation(!0), this.group.add(r) + } + r.highlight() + } else gr.prototype.highlight.call(this, t, e, i, n) + }, downplay: function (t, e, i, n) { + var o = t.getData(), a = Pi(o, n); + if (null != a && a >= 0) { + var r = o.getItemGraphicEl(a); + r && (r.__temp ? (o.setItemGraphicEl(a, null), this.group.remove(r)) : r.downplay()) + } else gr.prototype.downplay.call(this, t, e, i, n) + }, _newPolyline: function (t) { + var e = this._polyline; + return e && this._lineGroup.remove(e), e = new fD({ + 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 pD({ + shape: {points: t, stackedOnPoints: e}, + silent: !0 + }), this._lineGroup.add(i), this._polygon = i, i + }, _updateAnimation: function (t, e, i, n, o, a) { + var r = this._polyline, s = this._polygon, l = t.hostModel, + u = aD(this._data, t, this._stackedOnPoints, e, this._coordSys, i, this._valueOrigin, a), h = u.current, + c = u.stackedOnCurrent, d = u.next, f = u.stackedOnNext; + o && (h = xu(u.current, i, o), c = xu(u.stackedOnCurrent, i, o), d = xu(u.next, i, o), f = xu(u.stackedOnNext, i, o)), r.shape.__points = u.current, r.shape.points = h, fo(r, {shape: {points: d}}, l), s && (s.setShape({ + points: h, + stackedOnPoints: c + }), fo(s, {shape: {points: d, stackedOnPoints: f}}, l)); + for (var p = [], g = u.status, m = 0; m < g.length; m++) if ("=" === g[m].cmd) { + var v = t.getItemGraphicEl(g[m].idx1); + v && p.push({el: v, ptIdx: m}) + } + r.animators && r.animators.length && r.animators[0].during(function () { + for (var t = 0; t < p.length; t++) p[t].el.attr("position", r.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 gD = function (t, e, i) { + return { + seriesType: t, performRawSeries: !0, reset: function (t, n, o) { + var a = t.getData(), r = t.get("symbol") || e, s = t.get("symbolSize"), l = t.get("symbolKeepAspect"); + if (a.setVisual({ + legendSymbol: i || r, + symbol: r, + symbolSize: s, + symbolKeepAspect: l + }), !n.isSeriesFiltered(t)) { + var u = "function" == typeof s; + return { + dataEach: a.hasItemOption || u ? function (e, i) { + if ("function" == typeof s) { + var n = t.getRawValue(i), o = t.getDataParams(i); + e.setItemVisual(i, "symbolSize", s(n, o)) + } + if (e.hasItemOption) { + var a = e.getItemModel(i), r = a.getShallow("symbol", !0), + l = a.getShallow("symbolSize", !0), u = a.getShallow("symbolKeepAspect", !0); + null != r && e.setItemVisual(i, "symbol", r), null != l && e.setItemVisual(i, "symbolSize", l), null != u && e.setItemVisual(i, "symbolKeepAspect", u) + } + } : null + } + } + } + } + }, mD = function (t) { + return { + seriesType: t, plan: QM(), reset: function (t) { + var e = t.getData(), i = t.coordinateSystem, n = t.pipelineContext.large; + if (i) { + var o = f(i.dimensions, function (t) { + return e.mapDimension(t) + }).slice(0, 2), a = o.length, r = e.getCalculationInfo("stackResultDimension"); + return Zs(e, o[0]) && (o[0] = r), Zs(e, o[1]) && (o[1] = r), a && { + progress: function (t, e) { + for (var r = t.end - t.start, s = n && new Float32Array(r * a), l = t.start, u = 0, h = [], c = []; l < t.end; l++) { + var d; + if (1 === a) f = e.get(o[0], l), d = !isNaN(f) && i.dataToPoint(f, null, c); else { + var f = h[0] = e.get(o[0], l), p = h[1] = e.get(o[1], l); + d = !isNaN(f) && !isNaN(p) && i.dataToPoint(h, null, c) + } + n ? (s[u++] = d ? d[0] : NaN, s[u++] = d ? d[1] : NaN) : e.setItemLayout(l, d && d.slice() || [NaN, NaN]) + } + n && e.setLayout("symbolPoints", s) + } + } + } + } + } + }, vD = { + 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 isFinite(e) ? e : NaN + }, min: function (t) { + for (var e = 1 / 0, i = 0; i < t.length; i++) t[i] < e && (e = t[i]); + return isFinite(e) ? e : NaN + }, nearest: function (t) { + return t[0] + } + }, yD = function (t, e) { + return Math.round(t.length / 2) + }, xD = function (t) { + this._axes = {}, this._dimList = [], this.name = t || "" + }; + xD.prototype = { + constructor: xD, type: "cartesian", getAxis: function (t) { + return this._axes[t] + }, getAxes: function () { + return f(this._dimList, Su, this) + }, getAxesByScale: function (t) { + return t = t.toLowerCase(), g(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 ? [] : {}, o = 0; o < i.length; o++) { + var a = i[o], r = this._axes[a]; + n[a] = r[e](t[a]) + } + return n + } + }, Mu.prototype = { + constructor: Mu, 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, i) { + var n = this.getAxis("x"), o = this.getAxis("y"); + return i = i || [], i[0] = n.toGlobalCoord(n.dataToCoord(t[0])), i[1] = o.toGlobalCoord(o.dataToCoord(t[1])), i + }, clampData: function (t, e) { + var i = this.getAxis("x").scale, n = this.getAxis("y").scale, o = i.getExtent(), a = n.getExtent(), + r = i.parse(t[0]), s = n.parse(t[1]); + return e = e || [], e[0] = Math.min(Math.max(Math.min(o[0], o[1]), r), Math.max(o[0], o[1])), e[1] = Math.min(Math.max(Math.min(a[0], a[1]), s), Math.max(a[0], a[1])), e + }, pointToData: function (t, e) { + var i = this.getAxis("x"), n = this.getAxis("y"); + return e = e || [], e[0] = i.coordToData(i.toLocalCoord(t[0])), e[1] = n.coordToData(n.toLocalCoord(t[1])), e + }, getOtherAxis: function (t) { + return this.getAxis("x" === t.dim ? "y" : "x") + } + }, u(Mu, xD); + var _D = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom" + }; + _D.prototype = { + constructor: _D, index: 0, getAxesOnZeroOf: null, 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() + }, pointToData: function (t, e) { + return this.coordToData(this.toLocalCoord(t["x" === this.dim ? 0 : 1]), e) + }, toLocalCoord: null, toGlobalCoord: null + }, u(_D, qT); + var wD = { + 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)"]}} + }, bD = {}; + bD.categoryAxis = n({ + boundaryGap: !0, + deduplication: null, + splitLine: {show: !1}, + axisTick: {alignWithLabel: !1, interval: "auto"}, + axisLabel: {interval: "auto"} + }, wD), bD.valueAxis = n({boundaryGap: [0, 0], splitNumber: 5}, wD), bD.timeAxis = r({ + scale: !0, + min: "dataMin", + max: "dataMax" + }, bD.valueAxis), bD.logAxis = r({scale: !0, logBase: 10}, bD.valueAxis); + var SD = ["value", "category", "time", "log"], MD = function (t, e, i, a) { + d(SD, function (r) { + e.extend({ + type: t + "Axis." + r, mergeDefaultAndTheme: function (e, o) { + var a = this.layoutMode, s = a ? na(e) : {}; + n(e, o.getTheme().get(r + "Axis")), n(e, this.getDefaultOption()), e.type = i(t, e), a && ia(e, s, a) + }, optionUpdated: function () { + "category" === this.option.type && (this.__ordinalMeta = Ks.createByAxisModel(this)) + }, getCategories: function (t) { + var e = this.option; + if ("category" === e.type) return t ? e.data : this.__ordinalMeta.categories + }, getOrdinalMeta: function () { + return this.__ordinalMeta + }, defaultOption: o([{}, bD[r + "Axis"], a], !0) + }) + }), hM.registerSubTypeDefaulter(t + "Axis", v(i, t)) + }, ID = hM.extend({ + type: "cartesian2dAxis", axis: null, init: function () { + ID.superApply(this, "init", arguments), this.resetRange() + }, mergeOption: function () { + ID.superApply(this, "mergeOption", arguments), this.resetRange() + }, restoreData: function () { + ID.superApply(this, "restoreData", arguments), this.resetRange() + }, getCoordSysModel: function () { + return this.ecModel.queryComponents({ + mainType: "grid", + index: this.option.gridIndex, + id: this.option.gridId + })[0] + } + }); + n(ID.prototype, ET); + var TD = {offset: 0}; + MD("x", ID, Iu, TD), MD("y", ID, Iu, TD), hM.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 DD = Du.prototype; + DD.type = "grid", DD.axisPointerEnabled = !0, DD.getRect = function () { + return this._rect + }, DD.update = function (t, e) { + var i = this._axesMap; + this._updateScale(t, this.model), d(i.x, function (t) { + yl(t.scale, t.model) + }), d(i.y, function (t) { + yl(t.scale, t.model) + }), d(i.x, function (t) { + Au(i, "y", t) + }), d(i.y, function (t) { + Au(i, "x", t) + }), this.resize(this.model, e) + }, DD.resize = function (t, e, i) { + function n() { + d(a, function (t) { + var e = t.isHorizontal(), i = e ? [0, o.width] : [0, o.height], n = t.inverse ? 1 : 0; + t.setExtent(i[n], i[1 - n]), Lu(t, e ? o.x : o.y) + }) + } + + var o = Qo(t.getBoxLayoutParams(), {width: e.getWidth(), height: e.getHeight()}); + this._rect = o; + var a = this._axesList; + n(), !i && t.get("containLabel") && (d(a, function (t) { + if (!t.model.get("axisLabel.inside")) { + var e = Sl(t); + if (e) { + var i = t.isHorizontal() ? "height" : "width", n = t.model.get("axisLabel.margin"); + o[i] -= e[i] + n, "top" === t.position ? o.y += e.height + n : "left" === t.position && (o.x += e.width + n) + } + } + }), n()) + }, DD.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] + } + }, DD.getAxes = function () { + return this._axesList.slice() + }, DD.getCartesian = function (t, e) { + if (null != t && null != e) { + var i = "x" + t + "y" + e; + return this._coordsMap[i] + } + w(t) && (e = t.yAxisIndex, t = t.xAxisIndex); + for (var n = 0, o = this._coordsList; n < o.length; n++) if (o[n].getAxis("x").index === t || o[n].getAxis("y").index === e) return o[n] + }, DD.getCartesians = function () { + return this._coordsList.slice() + }, DD.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 + }, DD.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 + }, DD._findConvertTarget = function (t, e) { + var i, n, o = e.seriesModel, a = e.xAxisModel || o && o.getReferringComponents("xAxis")[0], + r = e.yAxisModel || o && o.getReferringComponents("yAxis")[0], s = e.gridModel, u = this._coordsList; + return o ? l(u, i = o.coordinateSystem) < 0 && (i = null) : a && r ? i = this.getCartesian(a.componentIndex, r.componentIndex) : a ? n = this.getAxis("x", a.componentIndex) : r ? n = this.getAxis("y", r.componentIndex) : s && s.coordinateSystem === this && (i = this._coordsList[0]), { + cartesian: i, + axis: n + } + }, DD.containPoint = function (t) { + var e = this._coordsList[0]; + if (e) return e.containPoint(t) + }, DD._initCartesian = function (t, e, i) { + function n(i) { + return function (n, s) { + if (Tu(n, t, e)) { + var l = n.get("position"); + "x" === i ? "top" !== l && "bottom" !== l && o[l = "bottom"] && (l = "top" === l ? "bottom" : "top") : "left" !== l && "right" !== l && o[l = "left"] && (l = "left" === l ? "right" : "left"), o[l] = !0; + var u = new _D(i, xl(n), [0, 0], n.get("type"), l), h = "category" === u.type; + u.onBand = h && n.get("boundaryGap"), u.inverse = n.get("inverse"), n.axis = u, u.model = n, u.grid = this, u.index = s, this._axesList.push(u), a[i][s] = u, r[i]++ + } + } + } + + var o = {left: !1, right: !1, top: !1, bottom: !1}, a = {x: {}, y: {}}, r = {x: 0, y: 0}; + if (e.eachComponent("xAxis", n("x"), this), e.eachComponent("yAxis", n("y"), this), !r.x || !r.y) return this._axesMap = {}, void (this._axesList = []); + this._axesMap = a, d(a.x, function (e, i) { + d(a.y, function (n, o) { + var a = "x" + i + "y" + o, r = new Mu(a); + r.grid = this, r.model = t, this._coordsMap[a] = r, this._coordsList.push(r), r.addAxis(e), r.addAxis(n) + }, this) + }, this) + }, DD._updateScale = function (t, e) { + function i(t, e, i) { + d(t.mapDimension(e.dim, !0), function (i) { + e.scale.unionExtentFromData(t, Us(t, i)) + }) + } + + d(this._axesList, function (t) { + t.scale.setExtent(1 / 0, -1 / 0) + }), t.eachSeries(function (n) { + if (Pu(n)) { + var o = ku(n), a = o[0], r = o[1]; + if (!Tu(a, e, t) || !Tu(r, e, t)) return; + var s = this.getCartesian(a.componentIndex, r.componentIndex), l = n.getData(), u = s.getAxis("x"), + h = s.getAxis("y"); + "list" === l.type && (i(l, u), i(l, h)) + } + }, this) + }, DD.getTooltipAxes = function (t) { + var e = [], i = []; + return d(this.getCartesians(), function (n) { + var o = null != t && "auto" !== t ? n.getAxis(t) : n.getBaseAxis(), a = n.getOtherAxis(o); + l(e, o) < 0 && e.push(o), l(i, a) < 0 && i.push(a) + }), {baseAxes: e, otherAxes: i} + }; + var AD = ["xAxis", "yAxis"]; + Du.create = function (t, e) { + var i = []; + return t.eachComponent("grid", function (n, o) { + var a = new Du(n, t, e); + a.name = "grid_" + o, a.resize(n, e, !0), n.coordinateSystem = a, i.push(a) + }), t.eachSeries(function (t) { + if (Pu(t)) { + var e = ku(t), i = e[0], n = e[1], o = i.getCoordSysModel().coordinateSystem; + t.coordinateSystem = o.getCartesian(i.componentIndex, n.componentIndex) + } + }), i + }, Du.dimensions = Du.prototype.dimensions = Mu.prototype.dimensions, Ca.register("cartesian2d", Du); + var CD = Math.PI, LD = function (t, e) { + this.opt = e, this.axisModel = t, r(e, { + labelOffset: 0, + nameDirection: 1, + tickDirection: 1, + labelDirection: 1, + silent: !0 + }), this.group = new sw; + var i = new sw({position: e.position.slice(), rotation: e.rotation}); + i.updateTransform(), this._transform = i.transform, this._dumbGroup = i + }; + LD.prototype = { + constructor: LD, hasBuilder: function (t) { + return !!kD[t] + }, add: function (t) { + kD[t].call(this) + }, getGroup: function () { + return this.group + } + }; + var kD = { + axisLine: function () { + var t = this.opt, e = this.axisModel; + if (e.get("axisLine.show")) { + var i = this.axisModel.axis.getExtent(), n = this._transform, o = [i[0], 0], r = [i[1], 0]; + n && (Q(o, o, n), Q(r, r, n)); + var s = a({lineCap: "round"}, e.getModel("axisLine.lineStyle").getLineStyle()); + this.group.add(new MS(Gn({ + anid: "line", + shape: {x1: o[0], y1: o[1], x2: r[0], y2: r[1]}, + style: s, + strokeContainThreshold: t.strokeContainThreshold || 5, + silent: !0, + z2: 1 + }))); + var l = e.get("axisLine.symbol"), u = e.get("axisLine.symbolSize"), + h = e.get("axisLine.symbolOffset") || 0; + if ("number" == typeof h && (h = [h, h]), null != l) { + "string" == typeof l && (l = [l, l]), "string" != typeof u && "number" != typeof u || (u = [u, u]); + var c = u[0], f = u[1]; + d([{rotate: t.rotation + Math.PI / 2, offset: h[0], r: 0}, { + rotate: t.rotation - Math.PI / 2, + offset: h[1], + r: Math.sqrt((o[0] - r[0]) * (o[0] - r[0]) + (o[1] - r[1]) * (o[1] - r[1])) + }], function (e, i) { + if ("none" !== l[i] && null != l[i]) { + var n = Tl(l[i], -c / 2, -f / 2, c, f, s.stroke, !0), a = e.r + e.offset, + r = [o[0] + a * Math.cos(t.rotation), o[1] - a * Math.sin(t.rotation)]; + n.attr({rotation: e.rotate, position: r, silent: !0}), this.group.add(n) + } + }, this) + } + } + }, axisTickLabel: function () { + var t = this.axisModel, e = this.opt, i = Gu(this, t, e); + Ru(t, Wu(this, t, e), i) + }, axisName: function () { + var t = this.opt, e = this.axisModel, i = T(t.axisName, e.get("name")); + if (i) { + var n, o = e.get("nameLocation"), r = t.nameDirection, s = e.getModel("nameTextStyle"), + l = e.get("nameGap") || 0, u = this.axisModel.axis.getExtent(), h = u[0] > u[1] ? -1 : 1, + c = ["start" === o ? u[0] - h * l : "end" === o ? u[1] + h * l : (u[0] + u[1]) / 2, Vu(o) ? t.labelOffset + r * l : 0], + d = e.get("nameRotate"); + null != d && (d = d * CD / 180); + var f; + Vu(o) ? n = PD(t.rotation, null != d ? d : t.rotation, r) : (n = Ou(t, o, d || 0, u), null != (f = t.axisNameAvailableWidth) && (f = Math.abs(f / Math.sin(n.rotation)), !isFinite(f) && (f = null))); + var p = s.getFont(), g = e.get("nameTruncate", !0) || {}, m = g.ellipsis, + v = T(t.nameTruncateMaxWidth, g.maxWidth, f), + y = null != m && null != v ? eM(i, v, p, m, {minChar: 2, placeholder: g.placeholder}) : i, + x = e.get("tooltip", !0), _ = e.mainType, w = {componentType: _, name: i, $vars: ["name"]}; + w[_ + "Index"] = e.componentIndex; + var b = new fS({ + anid: "name", + __fullText: i, + __truncatedText: y, + position: c, + rotation: n.rotation, + silent: Eu(e), + z2: 1, + tooltip: x && x.show ? a({ + content: i, formatter: function () { + return i + }, formatterParams: w + }, x) : null + }); + no(b.style, s, { + text: y, + textFont: p, + textFill: s.getTextColor() || e.get("axisLine.lineStyle.color"), + textAlign: n.textAlign, + textVerticalAlign: n.textVerticalAlign + }), e.get("triggerEvent") && (b.eventData = Nu(e), b.eventData.targetType = "axisName", b.eventData.name = i), this._dumbGroup.add(b), b.updateTransform(), this.group.add(b), b.decomposeTransform() + } + } + }, PD = LD.innerTextLayout = function (t, e, i) { + var n, o, a = Oo(e - t); + return Eo(a) ? (o = i > 0 ? "top" : "bottom", n = "center") : Eo(a - CD) ? (o = i > 0 ? "bottom" : "top", n = "center") : (o = "middle", n = a > 0 && a < CD ? i > 0 ? "right" : "left" : i > 0 ? "left" : "right"), { + rotation: a, + textAlign: n, + textVerticalAlign: o + } + }, ND = d, OD = v, ED = ys({ + type: "axis", _axisPointer: null, axisPointerClass: null, render: function (t, e, i, n) { + this.axisPointerClass && Yu(t), ED.superApply(this, "render", arguments), Qu(this, t, 0, i, 0, !0) + }, updateAxisPointer: function (t, e, i, n, o) { + Qu(this, t, 0, i, 0, !1) + }, remove: function (t, e) { + var i = this._axisPointer; + i && i.remove(e), ED.superApply(this, "remove", arguments) + }, dispose: function (t, e) { + th(this, e), ED.superApply(this, "dispose", arguments) + } + }), RD = []; + ED.registerAxisPointerClass = function (t, e) { + RD[t] = e + }, ED.getAxisPointerClass = function (t) { + return t && RD[t] + }; + var zD = ["axisLine", "axisTickLabel", "axisName"], BD = ["splitArea", "splitLine"], VD = ED.extend({ + type: "cartesianAxis", axisPointerClass: "CartesianAxisPointer", render: function (t, e, i, n) { + this.group.removeAll(); + var o = this._axisGroup; + if (this._axisGroup = new sw, this.group.add(this._axisGroup), t.get("show")) { + var a = t.getCoordSysModel(), r = eh(a, t), s = new LD(t, r); + d(zD, s.add, s), this._axisGroup.add(s.getGroup()), d(BD, function (e) { + t.get(e + ".show") && this["_" + e](t, a) + }, this), yo(o, this._axisGroup, t), VD.superCall(this, "render", t, e, i, n) + } + }, remove: function () { + this._splitAreaColors = null + }, _splitLine: function (t, e) { + var i = t.axis; + if (!i.scale.isBlank()) { + var n = t.getModel("splitLine"), o = n.getModel("lineStyle"), a = o.get("color"); + a = y(a) ? a : [a]; + for (var s = e.coordinateSystem.getRect(), l = i.isHorizontal(), u = 0, h = i.getTicksCoords({tickModel: n}), c = [], d = [], f = o.getLineStyle(), p = 0; p < h.length; p++) { + var g = i.toGlobalCoord(h[p].coord); + l ? (c[0] = g, c[1] = s.y, d[0] = g, d[1] = s.y + s.height) : (c[0] = s.x, c[1] = g, d[0] = s.x + s.width, d[1] = g); + var m = u++ % a.length, v = h[p].tickValue; + this._axisGroup.add(new MS(Gn({ + anid: null != v ? "line_" + h[p].tickValue : null, + shape: {x1: c[0], y1: c[1], x2: d[0], y2: d[1]}, + style: r({stroke: a[m]}, f), + silent: !0 + }))) + } + } + }, _splitArea: function (t, e) { + var i = t.axis; + if (!i.scale.isBlank()) { + var n = t.getModel("splitArea"), o = n.getModel("areaStyle"), a = o.get("color"), + s = e.coordinateSystem.getRect(), l = i.getTicksCoords({tickModel: n, clamp: !0}); + if (l.length) { + var u = a.length, h = this._splitAreaColors, c = R(), d = 0; + if (h) for (m = 0; m < l.length; m++) { + var f = h.get(l[m].tickValue); + if (null != f) { + d = (f + (u - 1) * m) % u; + break + } + } + var p = i.toGlobalCoord(l[0].coord), g = o.getAreaStyle(); + a = y(a) ? a : [a]; + for (var m = 1; m < l.length; m++) { + var v, x, _, w, b = i.toGlobalCoord(l[m].coord); + i.isHorizontal() ? (v = p, x = s.y, _ = b - v, w = s.height, p = v + _) : (v = s.x, x = p, _ = s.width, p = x + (w = b - x)); + var S = l[m - 1].tickValue; + null != S && c.set(S, d), this._axisGroup.add(new SS({ + anid: null != S ? "area_" + S : null, + shape: {x: v, y: x, width: _, height: w}, + style: r({fill: a[d]}, g), + silent: !0 + })), d = (d + 1) % u + } + this._splitAreaColors = c + } + } + } + }); + VD.extend({type: "xAxis"}), VD.extend({type: "yAxis"}), ys({ + type: "grid", render: function (t, e) { + this.group.removeAll(), t.get("show") && this.group.add(new SS({ + shape: t.coordinateSystem.getRect(), + style: r({fill: t.get("backgroundColor")}, t.getItemStyle()), + silent: !0, + z2: -1 + })) + } + }), us(function (t) { + t.xAxis && t.yAxis && !t.grid && (t.grid = {}) + }), ps(gD("line", "circle", "line")), fs(mD("line")), hs(LI.PROCESSOR.STATISTIC, function (t) { + return { + seriesType: t, modifyOutputEnd: !0, reset: function (t, e, i) { + var n = t.getData(), o = t.get("sampling"), a = t.coordinateSystem; + if ("cartesian2d" === a.type && o) { + var r = a.getBaseAxis(), s = a.getOtherAxis(r), l = r.getExtent(), u = l[1] - l[0], + h = Math.round(n.count() / u); + if (h > 1) { + var c; + "string" == typeof o ? c = vD[o] : "function" == typeof o && (c = o), c && t.setData(n.downSample(n.mapDimension(s.dim), 1 / h, c, yD)) + } + } + } + } + }("line")); + var GD = KM.extend({ + type: "series.__base_bar__", + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + getMarkerPosition: function (t) { + var e = this.coordinateSystem; + if (e) { + var i = e.dataToPoint(e.clampData(t)), n = this.getData(), o = n.getLayout("offset"), + a = n.getLayout("size"); + return i[e.getBaseAxis().isHorizontal() ? 0 : 1] += o + a / 2, i + } + return [NaN, NaN] + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + barMinHeight: 0, + barMinAngle: 0, + large: !1, + largeThreshold: 400, + progressive: 3e3, + progressiveChunkMode: "mod", + itemStyle: {}, + emphasis: {} + } + }); + GD.extend({ + type: "series.bar", dependencies: ["grid", "polar"], brushSelector: "rect", getProgressive: function () { + return !!this.get("large") && this.get("progressive") + }, getProgressiveThreshold: function () { + var t = this.get("progressiveThreshold"), e = this.get("largeThreshold"); + return e > t && (t = e), t + } + }); + var WD = sb([["fill", "color"], ["stroke", "borderColor"], ["lineWidth", "borderWidth"], ["stroke", "barBorderColor"], ["lineWidth", "barBorderWidth"], ["opacity"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + FD = { + getBarItemStyle: function (t) { + var e = WD(this, t); + if (this.getBorderLineDash) { + var i = this.getBorderLineDash(); + i && (e.lineDash = i) + } + return e + } + }, HD = ["itemStyle", "barBorderWidth"]; + a(wo.prototype, FD), _s({ + type: "bar", render: function (t, e, i) { + this._updateDrawMode(t); + var n = t.get("coordinateSystem"); + return "cartesian2d" !== n && "polar" !== n || (this._isLargeDraw ? this._renderLarge(t, e, i) : this._renderNormal(t, e, i)), this.group + }, incrementalPrepareRender: function (t, e, i) { + this._clear(), this._updateDrawMode(t) + }, incrementalRender: function (t, e, i, n) { + this._incrementalRenderLarge(t, e) + }, _updateDrawMode: function (t) { + var e = t.pipelineContext.large; + (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear()) + }, _renderNormal: function (t, e, i) { + var n, o = this.group, a = 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 u = t.isAnimationEnabled() ? t : null; + a.diff(r).add(function (e) { + if (a.hasValue(e)) { + var i = a.getItemModel(e), r = UD[s.type](a, e, i), l = ZD[s.type](a, e, i, r, n, u); + a.setItemGraphicEl(e, l), o.add(l), rh(l, a, e, i, r, t, n, "polar" === s.type) + } + }).update(function (e, i) { + var l = r.getItemGraphicEl(i); + if (a.hasValue(e)) { + var h = a.getItemModel(e), c = UD[s.type](a, e, h); + l ? fo(l, {shape: c}, u, e) : l = ZD[s.type](a, e, h, c, n, u, !0), a.setItemGraphicEl(e, l), o.add(l), rh(l, a, e, h, c, t, n, "polar" === s.type) + } else o.remove(l) + }).remove(function (t) { + var e = r.getItemGraphicEl(t); + "cartesian2d" === s.type ? e && oh(t, u, e) : e && ah(t, u, e) + }).execute(), this._data = a + }, _renderLarge: function (t, e, i) { + this._clear(), lh(t, this.group) + }, _incrementalRenderLarge: function (t, e) { + lh(e, this.group, !0) + }, dispose: B, remove: function (t) { + this._clear(t) + }, _clear: function (t) { + var e = this.group, i = this._data; + t && t.get("animation") && i && !this._isLargeDraw ? i.eachItemGraphicEl(function (e) { + "sector" === e.type ? ah(e.dataIndex, t, e) : oh(e.dataIndex, t, e) + }) : e.removeAll(), this._data = null + } + }); + var ZD = { + cartesian2d: function (t, e, i, n, o, r, s) { + var l = new SS({shape: a({}, n)}); + if (r) { + var u = l.shape, h = o ? "height" : "width", c = {}; + u[h] = 0, c[h] = n[h], BS[s ? "updateProps" : "initProps"](l, {shape: c}, r, e) + } + return l + }, polar: function (t, e, i, n, o, a, s) { + var l = n.startAngle < n.endAngle, u = new vS({shape: r({clockwise: l}, n)}); + if (a) { + var h = u.shape, c = o ? "r" : "endAngle", d = {}; + h[c] = o ? 0 : n.startAngle, d[c] = n[c], BS[s ? "updateProps" : "initProps"](u, {shape: d}, a, e) + } + return u + } + }, UD = { + cartesian2d: function (t, e, i) { + var n = t.getItemLayout(e), o = sh(i, n), a = n.width > 0 ? 1 : -1, r = n.height > 0 ? 1 : -1; + return {x: n.x + a * o / 2, y: n.y + r * o / 2, width: n.width - a * o, height: n.height - r * o} + }, 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} + } + }, XD = In.extend({ + type: "largeBar", shape: {points: []}, buildPath: function (t, e) { + for (var i = e.points, n = this.__startPoint, o = this.__valueIdx, a = 0; a < i.length; a += 2) n[this.__valueIdx] = i[a + o], t.moveTo(n[0], n[1]), t.lineTo(i[a], i[a + 1]) + } + }); + fs(v(cl, "bar")), fs(xT), ps({ + seriesType: "bar", reset: function (t) { + t.getData().setVisual("legendSymbol", "roundRect") + } + }); + var jD = function (t, e, i) { + e = y(e) && {coordDimensions: e} || a({}, e); + var n = t.getSource(), o = hT(n, e), r = new sT(o, t); + return r.initData(n, i), r + }, YD = { + updateSelectedMap: function (t) { + this._targetList = y(t) ? t.slice() : [], this._selectTargetMap = p(t || [], function (t, e) { + return t.set(e.name, e), t + }, R()) + }, 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 + } + }, qD = xs({ + type: "series.pie", + init: function (t) { + qD.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + }, this.updateSelectedMap(this._createSelectableList()), this._defaultLabelLine(t) + }, + mergeOption: function (t) { + qD.superCall(this, "mergeOption", t), this.updateSelectedMap(this._createSelectableList()) + }, + getInitialData: function (t, e) { + return jD(this, ["value"]) + }, + _createSelectableList: function () { + for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({ + name: t.getName(n), + value: t.get(e, n), + selected: ir(t, n, "selected") + }); + return i + }, + getDataParams: function (t) { + var e = this.getData(), i = qD.superCall(this, "getDataParams", t), n = []; + return e.each(e.mapDimension("value"), function (t) { + n.push(t) + }), i.percent = No(n, t, e.hostModel.get("percentPrecision")), i.$vars.push("percent"), i + }, + _defaultLabelLine: function (t) { + Mi(t, "labelLine", ["show"]); + var e = t.labelLine, i = t.emphasis.labelLine; + e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.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: {rotate: !1, show: !0, position: "outer"}, + labelLine: {show: !0, length: 15, length2: 15, smooth: !1, lineStyle: {width: 1, type: "solid"}}, + itemStyle: {borderWidth: 1}, + animationType: "expansion", + animationEasing: "cubicOut" + } + }); + h(qD, YD); + var KD = dh.prototype; + KD.updateData = function (t, e, i) { + function n() { + s.stopAnimation(!0), s.animateTo({shape: {r: h.r + l.get("hoverOffset")}}, 300, "elasticOut") + } + + function o() { + s.stopAnimation(!0), s.animateTo({shape: {r: h.r}}, 300, "elasticOut") + } + + var s = this.childAt(0), l = t.hostModel, u = t.getItemModel(e), h = t.getItemLayout(e), c = a({}, h); + c.label = null, i ? (s.setShape(c), "scale" === l.getShallow("animationType") ? (s.shape.r = h.r0, po(s, {shape: {r: h.r}}, l, e)) : (s.shape.endAngle = h.startAngle, fo(s, {shape: {endAngle: h.endAngle}}, l, e))) : fo(s, {shape: c}, l, e); + var d = t.getItemVisual(e, "color"); + s.useStyle(r({ + lineJoin: "bevel", + fill: d + }, u.getModel("itemStyle").getItemStyle())), s.hoverStyle = u.getModel("emphasis.itemStyle").getItemStyle(); + var f = u.getShallow("cursor"); + f && s.attr("cursor", f), ch(this, t.getItemLayout(e), l.isSelected(null, e), l.get("selectedOffset"), l.get("animation")), s.off("mouseover").off("mouseout").off("emphasis").off("normal"), u.get("hoverAnimation") && l.isAnimationEnabled() && s.on("mouseover", n).on("mouseout", o).on("emphasis", n).on("normal", o), this._updateLabel(t, e), eo(this) + }, KD._updateLabel = function (t, e) { + var i = this.childAt(1), n = this.childAt(2), o = t.hostModel, a = t.getItemModel(e), + r = t.getItemLayout(e).label, s = t.getItemVisual(e, "color"); + fo(i, {shape: {points: r.linePoints || [[r.x, r.y], [r.x, r.y], [r.x, r.y]]}}, o, e), fo(n, { + style: { + x: r.x, + y: r.y + } + }, o, e), n.attr({rotation: r.rotation, origin: [r.x, r.y], z2: 10}); + var l = a.getModel("label"), u = a.getModel("emphasis.label"), h = a.getModel("labelLine"), + c = a.getModel("emphasis.labelLine"), s = t.getItemVisual(e, "color"); + io(n.style, n.hoverStyle = {}, l, u, { + 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 = !u.get("show"), i.ignore = i.normalIgnore = !h.get("show"), i.hoverIgnore = !c.get("show"), i.setStyle({ + stroke: s, + opacity: t.getItemVisual(e, "opacity") + }), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle(); + var d = h.get("smooth"); + d && !0 === d && (d = .4), i.setShape({smooth: d}) + }, u(dh, sw); + gr.extend({ + type: "pie", init: function () { + var t = new sw; + this._sectorGroup = t + }, render: function (t, e, i, n) { + if (!n || n.from !== this.uid) { + var o = t.getData(), a = this._data, r = this.group, s = e.get("animation"), l = !a, + u = t.get("animationType"), h = v(hh, this.uid, t, s, i), c = t.get("selectedMode"); + if (o.diff(a).add(function (t) { + var e = new dh(o, t); + l && "scale" !== u && e.eachChild(function (t) { + t.stopAnimation(!0) + }), c && e.on("click", h), o.setItemGraphicEl(t, e), r.add(e) + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + i.updateData(o, t), i.off("click"), c && i.on("click", h), r.add(i), o.setItemGraphicEl(t, i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + r.remove(e) + }).execute(), s && l && o.count() > 0 && "scale" !== u) { + var d = o.getItemLayout(0), f = Math.max(i.getWidth(), i.getHeight()) / 2, + p = m(r.removeClipPath, r); + r.setClipPath(this._createClipPath(d.cx, d.cy, f, d.startAngle, d.clockwise, p, t)) + } + this._data = o + } + }, dispose: function () { + }, _createClipPath: function (t, e, i, n, o, a, r) { + var s = new vS({shape: {cx: t, cy: e, r0: 0, r: i, startAngle: n, endAngle: n, clockwise: o}}); + return po(s, {shape: {endAngle: n + (o ? 1 : -1) * Math.PI * 2}}, r, a), s + }, containPoint: function (t, e) { + var i = e.getData().getItemLayout(0); + if (i) { + var n = t[0] - i.cx, o = t[1] - i.cy, a = Math.sqrt(n * n + o * o); + return a <= i.r && a >= i.r0 + } + } + }); + var $D = function (t, e) { + d(e, function (e) { + e.update = "updateView", cs(e, function (i, n) { + var o = {}; + 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); + o[i] = t.isSelected(i) || !1 + }) + }), {name: i.name, selected: o} + }) + }) + }, JD = function (t) { + return { + getTargetSeries: function (e) { + var i = {}, n = R(); + return e.eachSeriesByType(t, function (t) { + t.__paletteScope = i, n.set(t.uid, t) + }), n + }, reset: function (t, e) { + var i = t.getRawData(), n = {}, o = t.getData(); + o.each(function (t) { + var e = o.getRawIndex(t); + n[e] = t + }), i.each(function (e) { + var a = n[e], r = null != a && o.getItemVisual(a, "color", !0); + if (r) i.setItemVisual(e, "color", r); else { + var s = i.getItemModel(e).get("itemStyle.color") || t.getColorFromPalette(i.getName(e) || e + "", t.__paletteScope, i.count()); + i.setItemVisual(e, "color", s), null != a && o.setItemVisual(a, "color", s) + } + }) + } + } + }, QD = function (t, e, i, n) { + var o, a, r = t.getData(), s = [], l = !1; + r.each(function (i) { + var n, u, h, c, d = r.getItemLayout(i), f = r.getItemModel(i), p = f.getModel("label"), + g = p.get("position") || f.get("emphasis.label.position"), m = f.getModel("labelLine"), + v = m.get("length"), y = m.get("length2"), x = (d.startAngle + d.endAngle) / 2, _ = Math.cos(x), + w = Math.sin(x); + o = d.cx, a = d.cy; + var b = "inside" === g || "inner" === g; + if ("center" === g) n = d.cx, u = d.cy, c = "center"; else { + var S = (b ? (d.r + d.r0) / 2 * _ : d.r * _) + o, M = (b ? (d.r + d.r0) / 2 * w : d.r * w) + a; + if (n = S + 3 * _, u = M + 3 * w, !b) { + var I = S + _ * (v + e - d.r), T = M + w * (v + e - d.r), D = I + (_ < 0 ? -1 : 1) * y, A = T; + n = D + (_ < 0 ? -5 : 5), u = A, h = [[S, M], [I, T], [D, A]] + } + c = b ? "center" : _ > 0 ? "left" : "right" + } + var C = p.getFont(), L = p.get("rotate") ? _ < 0 ? -x + Math.PI : -x : 0, + k = me(t.getFormattedLabel(i, "normal") || r.getName(i), C, c, "top"); + l = !!L, d.label = { + x: n, + y: u, + position: g, + height: k.height, + len: v, + len2: y, + linePoints: h, + textAlign: c, + verticalAlign: "middle", + rotation: L, + inside: b + }, b || s.push(d.label) + }), !l && t.get("avoidLabelOverlap") && ph(s, o, a, e, i, n) + }, tA = 2 * Math.PI, eA = Math.PI / 180, iA = function (t) { + return { + seriesType: t, reset: function (t, e) { + var i = e.findComponents({mainType: "legend"}); + if (i && i.length) { + var n = t.getData(); + n.filterSelf(function (t) { + for (var e = n.getName(t), o = 0; o < i.length; o++) if (!i[o].isSelected(e)) return !1; + return !0 + }) + } + } + } + }; + $D("pie", [{type: "pieToggleSelect", event: "pieselectchanged", method: "toggleSelected"}, { + type: "pieSelect", + event: "pieselected", + method: "select" + }, {type: "pieUnSelect", event: "pieunselected", method: "unSelect"}]), ps(JD("pie")), fs(v(function (t, e, i, n) { + e.eachSeriesByType(t, function (t) { + var e = t.getData(), n = e.mapDimension("value"), o = t.get("center"), a = t.get("radius"); + y(a) || (a = [0, a]), y(o) || (o = [o, o]); + var r = i.getWidth(), s = i.getHeight(), l = Math.min(r, s), u = Do(o[0], r), h = Do(o[1], s), + c = Do(a[0], l / 2), d = Do(a[1], l / 2), f = -t.get("startAngle") * eA, p = t.get("minAngle") * eA, + g = 0; + e.each(n, function (t) { + !isNaN(t) && g++ + }); + var m = e.getSum(n), v = Math.PI / (m || g) * 2, x = t.get("clockwise"), _ = t.get("roseType"), + w = t.get("stillShowZeroSum"), b = e.getDataExtent(n); + b[0] = 0; + var S = tA, M = 0, I = f, T = x ? 1 : -1; + if (e.each(n, function (t, i) { + var n; + if (isNaN(t)) e.setItemLayout(i, { + angle: NaN, + startAngle: NaN, + endAngle: NaN, + clockwise: x, + cx: u, + cy: h, + r0: c, + r: _ ? NaN : d + }); else { + (n = "area" !== _ ? 0 === m && w ? v : t * v : tA / g) < p ? (n = p, S -= p) : M += t; + var o = I + T * n; + e.setItemLayout(i, { + angle: n, + startAngle: I, + endAngle: o, + clockwise: x, + cx: u, + cy: h, + r0: c, + r: _ ? To(t, b, [c, d]) : d + }), I = o + } + }), S < tA && g) if (S <= .001) { + var D = tA / g; + e.each(n, function (t, i) { + if (!isNaN(t)) { + var n = e.getItemLayout(i); + n.angle = D, n.startAngle = f + T * i * D, n.endAngle = f + T * (i + 1) * D + } + }) + } else v = S / M, I = f, e.each(n, function (t, i) { + if (!isNaN(t)) { + var n = e.getItemLayout(i), o = n.angle === p ? p : t * v; + n.startAngle = I, n.endAngle = I + T * o, I += T * o + } + }); + QD(t, d, r, s) + }) + }, "pie")), hs(iA("pie")), KM.extend({ + type: "series.scatter", + dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + brushSelector: "point", + getProgressive: function () { + var t = this.option.progressive; + return null == t ? this.option.large ? 5e3 : this.get("progressive") : t + }, + getProgressiveThreshold: function () { + var t = this.option.progressiveThreshold; + return null == t ? this.option.large ? 1e4 : this.get("progressiveThreshold") : t + }, + defaultOption: { + coordinateSystem: "cartesian2d", + zlevel: 0, + z: 2, + legendHoverLink: !0, + hoverAnimation: !0, + symbolSize: 10, + large: !1, + largeThreshold: 2e3, + itemStyle: {opacity: .8} + } + }); + var nA = En({ + shape: {points: null}, symbolProxy: null, buildPath: function (t, e) { + var i = e.points, n = e.size, o = this.symbolProxy, a = o.shape; + if (!((t.getContext ? t.getContext() : t) && n[0] < 4)) for (var r = 0; r < i.length;) { + var s = i[r++], l = i[r++]; + isNaN(s) || isNaN(l) || (a.x = s - n[0] / 2, a.y = l - n[1] / 2, a.width = n[0], a.height = n[1], o.buildPath(t, a, !0)) + } + }, afterBrush: function (t) { + var e = this.shape, i = e.points, n = e.size; + if (n[0] < 4) { + this.setTransform(t); + for (var o = 0; o < i.length;) { + var a = i[o++], r = i[o++]; + isNaN(a) || isNaN(r) || t.fillRect(a - n[0] / 2, r - n[1] / 2, n[0], n[1]) + } + this.restoreTransform(t) + } + }, findDataIndex: function (t, e) { + for (var i = this.shape, n = i.points, o = i.size, a = Math.max(o[0], 4), r = Math.max(o[1], 4), s = n.length / 2 - 1; s >= 0; s--) { + var l = 2 * s, u = n[l] - a / 2, h = n[l + 1] - r / 2; + if (t >= u && e >= h && t <= u + a && e <= h + r) return s + } + return -1 + } + }), oA = gh.prototype; + oA.isPersistent = function () { + return !this._incremental + }, oA.updateData = function (t) { + this.group.removeAll(); + var e = new nA({rectHover: !0, cursor: "default"}); + e.setShape({points: t.getLayout("symbolPoints")}), this._setCommon(e, t), this.group.add(e), this._incremental = null + }, oA.updateLayout = function (t) { + if (!this._incremental) { + var e = t.getLayout("symbolPoints"); + this.group.eachChild(function (t) { + if (null != t.startIndex) { + var i = 2 * (t.endIndex - t.startIndex), n = 4 * t.startIndex * 2; + e = new Float32Array(e.buffer, n, i) + } + t.setShape("points", e) + }) + } + }, oA.incrementalPrepareUpdate = function (t) { + this.group.removeAll(), this._clearIncremental(), t.count() > 2e6 ? (this._incremental || (this._incremental = new On({silent: !0})), this.group.add(this._incremental)) : this._incremental = null + }, oA.incrementalUpdate = function (t, e) { + var i; + this._incremental ? (i = new nA, this._incremental.addDisplayable(i, !0)) : ((i = new nA({ + rectHover: !0, + cursor: "default", + startIndex: t.start, + endIndex: t.end + })).incremental = !0, this.group.add(i)), i.setShape({points: e.getLayout("symbolPoints")}), this._setCommon(i, e, !!this._incremental) + }, oA._setCommon = function (t, e, i) { + var n = e.hostModel, o = e.getVisual("symbolSize"); + t.setShape("size", o instanceof Array ? o : [o, o]), t.symbolProxy = Tl(e.getVisual("symbol"), 0, 0, 0, 0), t.setColor = t.symbolProxy.setColor; + var a = t.shape.size[0] < 4; + t.useStyle(n.getModel("itemStyle").getItemStyle(a ? ["color", "shadowBlur", "shadowColor"] : ["color"])); + var r = e.getVisual("color"); + r && t.setColor(r), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function (e) { + t.dataIndex = null; + var i = t.findDataIndex(e.offsetX, e.offsetY); + i >= 0 && (t.dataIndex = i + (t.startIndex || 0)) + })) + }, oA.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, oA._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }, _s({ + type: "scatter", render: function (t, e, i) { + var n = t.getData(); + this._updateSymbolDraw(n, t).updateData(n), this._finished = !0 + }, incrementalPrepareRender: function (t, e, i) { + var n = t.getData(); + this._updateSymbolDraw(n, t).incrementalPrepareUpdate(n), this._finished = !1 + }, incrementalRender: function (t, e, i) { + this._symbolDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count() + }, updateTransform: function (t, e, i) { + var n = t.getData(); + if (this.group.dirty(), !this._finished || n.count() > 1e4 || !this._symbolDraw.isPersistent()) return {update: !0}; + var o = mD().reset(t); + o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n) + }, _updateSymbolDraw: function (t, e) { + var i = this._symbolDraw, n = e.pipelineContext.large; + return i && n === this._isLargeDraw || (i && i.remove(), i = this._symbolDraw = n ? new gh : new Ql, this._isLargeDraw = n, this.group.removeAll()), this.group.add(i.group), i + }, remove: function (t, e) { + this._symbolDraw && this._symbolDraw.remove(!0), this._symbolDraw = null + }, dispose: function () { + } + }), ps(gD("scatter", "circle")), fs(mD("scatter")), u(mh, qT), vh.prototype.getIndicatorAxes = function () { + return this._indicatorAxes + }, vh.prototype.dataToPoint = function (t, e) { + var i = this._indicatorAxes[e]; + return this.coordToPoint(i.dataToCoord(t), e) + }, vh.prototype.coordToPoint = function (t, e) { + var i = this._indicatorAxes[e].angle; + return [this.cx + t * Math.cos(i), this.cy - t * Math.sin(i)] + }, vh.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 o, a = Math.atan2(-i, e), r = 1 / 0, s = -1, l = 0; l < this._indicatorAxes.length; l++) { + var u = this._indicatorAxes[l], h = Math.abs(a - u.angle); + h < r && (o = u, s = l, r = h) + } + return [s, +(o && o.coodToData(n))] + }, vh.prototype.resize = function (t, e) { + var i = t.get("center"), n = e.getWidth(), o = e.getHeight(), a = Math.min(n, o) / 2; + this.cx = Do(i[0], n), this.cy = Do(i[1], o), this.startAngle = t.get("startAngle") * Math.PI / 180, this.r = Do(t.get("radius"), a), d(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) + }, vh.prototype.update = function (t, e) { + function i(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 + } + + var n = this._indicatorAxes, o = this._model; + d(n, function (t) { + t.scale.setExtent(1 / 0, -1 / 0) + }), t.eachSeriesByType("radar", function (e, i) { + if ("radar" === e.get("coordinateSystem") && t.getComponent("radar", e.get("radarIndex")) === o) { + var a = e.getData(); + d(n, function (t) { + t.scale.unionExtentFromData(a, a.mapDimension(t.dim)) + }) + } + }, this); + var a = o.get("splitNumber"); + d(n, function (t, e) { + var n = ml(t.scale, t.model); + yl(t.scale, t.model); + var o = t.model, r = t.scale, s = o.getMin(), l = o.getMax(), u = r.getInterval(); + if (null != s && null != l) r.setExtent(+s, +l), r.setInterval((l - s) / a); else if (null != s) { + var h; + do { + h = s + u * a, r.setExtent(+s, h), r.setInterval(u), u = i(u) + } while (h < n[1] && isFinite(h) && isFinite(n[1])) + } else if (null != l) { + var c; + do { + c = l - u * a, r.setExtent(c, +l), r.setInterval(u), u = i(u) + } while (c > n[0] && isFinite(c) && isFinite(n[0])) + } else { + r.getTicks().length - 1 > a && (u = i(u)); + var d = Math.round((n[0] + n[1]) / 2 / u) * u, f = Math.round(a / 2); + r.setExtent(Ao(d - f * u), Ao(d + (a - f) * u)), r.setInterval(u) + } + }) + }, vh.dimensions = [], vh.create = function (t, e) { + var i = []; + return t.eachComponent("radar", function (n) { + var o = new vh(n, t, e); + i.push(o), n.coordinateSystem = o + }), t.eachSeriesByType("radar", function (t) { + "radar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("radarIndex") || 0]) + }), i + }, Ca.register("radar", vh); + var aA = bD.valueAxis, rA = (vs({ + type: "radar", + optionUpdated: function () { + var t = this.get("boundaryGap"), e = this.get("splitNumber"), o = this.get("scale"), + s = this.get("axisLine"), l = this.get("axisTick"), u = this.get("axisLabel"), h = this.get("name"), + c = this.get("name.show"), d = this.get("name.formatter"), p = this.get("nameGap"), + g = this.get("triggerEvent"), m = f(this.get("indicator") || [], function (f) { + null != f.max && f.max > 0 && !f.min ? f.min = 0 : null != f.min && f.min < 0 && !f.max && (f.max = 0); + var m = h; + if (null != f.color && (m = r({color: f.color}, h)), f = n(i(f), { + boundaryGap: t, + splitNumber: e, + scale: o, + axisLine: s, + axisTick: l, + axisLabel: u, + name: f.text, + nameLocation: "end", + nameGap: p, + nameTextStyle: m, + triggerEvent: g + }, !1), c || (f.name = ""), "string" == typeof d) { + var v = f.name; + f.name = d.replace("{value}", null != v ? v : "") + } else "function" == typeof d && (f.name = d(f.name, f)); + var y = a(new wo(f, null, this.ecModel), ET); + return y.mainType = "radar", y.componentIndex = this.componentIndex, y + }, this); + this.getIndicatorModels = function () { + return m + } + }, + 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: n({lineStyle: {color: "#bbb"}}, aA.axisLine), + axisLabel: yh(aA.axisLabel, !1), + axisTick: yh(aA.axisTick, !1), + splitLine: yh(aA.splitLine, !0), + splitArea: yh(aA.splitArea, !0), + indicator: [] + } + }), ["axisLine", "axisTickLabel", "axisName"]); + ys({ + type: "radar", render: function (t, e, i) { + this.group.removeAll(), this._buildAxes(t), this._buildSplitLineAndArea(t) + }, _buildAxes: function (t) { + var e = t.coordinateSystem; + d(f(e.getIndicatorAxes(), function (t) { + return new LD(t.model, { + position: [e.cx, e.cy], + rotation: t.angle, + labelDirection: -1, + tickDirection: -1, + nameDirection: 1 + }) + }), function (t) { + d(rA, t.add, t), this.group.add(t.getGroup()) + }, this) + }, _buildSplitLineAndArea: function (t) { + function e(t, e, i) { + var n = i % e.length; + return t[n] = t[n] || [], n + } + + var i = t.coordinateSystem, n = i.getIndicatorAxes(); + if (n.length) { + var o = t.get("shape"), a = t.getModel("splitLine"), s = t.getModel("splitArea"), + l = a.getModel("lineStyle"), u = s.getModel("areaStyle"), h = a.get("show"), c = s.get("show"), + p = l.get("color"), g = u.get("color"); + p = y(p) ? p : [p], g = y(g) ? g : [g]; + var m = [], v = []; + if ("circle" === o) for (var x = n[0].getTicksCoords(), _ = i.cx, w = i.cy, b = 0; b < x.length; b++) h && m[A = e(m, p, b)].push(new pS({ + shape: { + cx: _, + cy: w, + r: x[b].coord + } + })), c && b < x.length - 1 && v[A = e(v, g, b)].push(new yS({ + shape: { + cx: _, + cy: w, + r0: x[b].coord, + r: x[b + 1].coord + } + })); else for (var S, M = f(n, function (t, e) { + var n = t.getTicksCoords(); + return S = null == S ? n.length - 1 : Math.min(n.length - 1, S), f(n, function (t) { + return i.coordToPoint(t.coord, e) + }) + }), I = [], b = 0; b <= S; b++) { + for (var T = [], D = 0; D < n.length; D++) T.push(M[D][b]); + if (T[0] && T.push(T[0].slice()), h && m[A = e(m, p, b)].push(new bS({shape: {points: T}})), c && I) { + var A = e(v, g, b - 1); + v[A].push(new wS({shape: {points: T.concat(I)}})) + } + I = T.slice().reverse() + } + var C = l.getLineStyle(), L = u.getAreaStyle(); + d(v, function (t, e) { + this.group.add(zS(t, {style: r({stroke: "none", fill: g[e % g.length]}, L), silent: !0})) + }, this), d(m, function (t, e) { + this.group.add(zS(t, {style: r({fill: "none", stroke: p[e % p.length]}, C), silent: !0})) + }, this) + } + } + }); + var sA = KM.extend({ + type: "series.radar", + dependencies: ["radar"], + init: function (t) { + sA.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + } + }, + getInitialData: function (t, e) { + return jD(this, {generateCoord: "indicator_", generateCoordCount: 1 / 0}) + }, + formatTooltip: function (t) { + var e = this.getData(), i = this.coordinateSystem.getIndicatorAxes(), n = this.getData().getName(t); + return Zo("" === n ? this.name : n) + "
    " + f(i, function (i, n) { + var o = e.get(e.mapDimension(i.dim), t); + return Zo(i.name + " : " + o) + }).join("
    ") + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "radar", + legendHoverLink: !0, + radarIndex: 0, + lineStyle: {width: 2, type: "solid"}, + label: {position: "top"}, + symbol: "emptyCircle", + symbolSize: 4 + } + }); + _s({ + type: "radar", render: function (t, e, n) { + function o(t, e) { + var i = t.getItemVisual(e, "symbol") || "circle", n = t.getItemVisual(e, "color"); + if ("none" !== i) { + var o = xh(t.getItemVisual(e, "symbolSize")), a = Tl(i, -1, -1, 2, 2, n); + return a.attr({style: {strokeNoScale: !0}, z2: 100, scale: [o[0] / 2, o[1] / 2]}), a + } + } + + function a(e, i, n, a, r, s) { + n.removeAll(); + for (var l = 0; l < i.length - 1; l++) { + var u = o(a, r); + u && (u.__dimIdx = l, e[l] ? (u.attr("position", e[l]), BS[s ? "initProps" : "updateProps"](u, {position: i[l]}, t, r)) : u.attr("position", i[l]), n.add(u)) + } + } + + function s(t) { + return f(t, function (t) { + return [l.cx, l.cy] + }) + } + + var l = t.coordinateSystem, u = this.group, h = t.getData(), c = this._data; + h.diff(c).add(function (e) { + var i = h.getItemLayout(e); + if (i) { + var n = new wS, o = new bS, r = {shape: {points: i}}; + n.shape.points = s(i), o.shape.points = s(i), po(n, r, t, e), po(o, r, t, e); + var l = new sw, u = new sw; + l.add(o), l.add(n), l.add(u), a(o.shape.points, i, u, h, e, !0), h.setItemGraphicEl(e, l) + } + }).update(function (e, i) { + var n = c.getItemGraphicEl(i), o = n.childAt(0), r = n.childAt(1), s = n.childAt(2), + l = {shape: {points: h.getItemLayout(e)}}; + l.shape.points && (a(o.shape.points, l.shape.points, s, h, e, !1), fo(o, l, t), fo(r, l, t), h.setItemGraphicEl(e, n)) + }).remove(function (t) { + u.remove(c.getItemGraphicEl(t)) + }).execute(), h.eachItemGraphicEl(function (t, e) { + function n() { + l.attr("ignore", m) + } + + function o() { + l.attr("ignore", g) + } + + var a = h.getItemModel(e), s = t.childAt(0), l = t.childAt(1), c = t.childAt(2), + d = h.getItemVisual(e, "color"); + u.add(t), s.useStyle(r(a.getModel("lineStyle").getLineStyle(), { + fill: "none", + stroke: d + })), s.hoverStyle = a.getModel("emphasis.lineStyle").getLineStyle(); + var f = a.getModel("areaStyle"), p = a.getModel("emphasis.areaStyle"), + g = f.isEmpty() && f.parentModel.isEmpty(), m = p.isEmpty() && p.parentModel.isEmpty(); + m = m && g, l.ignore = g, l.useStyle(r(f.getAreaStyle(), { + fill: d, + opacity: .7 + })), l.hoverStyle = p.getAreaStyle(); + var v = a.getModel("itemStyle").getItemStyle(["color"]), + y = a.getModel("emphasis.itemStyle").getItemStyle(), x = a.getModel("label"), + _ = a.getModel("emphasis.label"); + c.eachChild(function (t) { + t.setStyle(v), t.hoverStyle = i(y), io(t.style, t.hoverStyle, x, _, { + labelFetcher: h.hostModel, + labelDataIndex: e, + labelDimIndex: t.__dimIdx, + defaultText: h.get(h.dimensions[t.__dimIdx], e), + autoColor: d, + isRectText: !0 + }) + }), t.off("mouseover").off("mouseout").off("normal").off("emphasis"), t.on("emphasis", n).on("mouseover", n).on("normal", o).on("mouseout", o), eo(t) + }), this._data = h + }, remove: function () { + this.group.removeAll(), this._data = null + }, dispose: function () { + } + }); + ps(JD("radar")), ps(gD("radar", "circle")), fs(function (t) { + t.eachSeriesByType("radar", function (t) { + var e = t.getData(), i = [], n = t.coordinateSystem; + if (n) { + for (var o = n.getIndicatorAxes(), a = 0; a < o.length; a++) e.each(e.mapDimension(o[a].dim), function (t, e) { + i[e] = i[e] || [], i[e][a] = n.dataToPoint(t, a) + }); + e.each(function (t) { + i[t][0] && i[t].push(i[t][0].slice()), e.setItemLayout(t, i[t]) + }) + } + }) + }), hs(iA("radar")), us(function (t) { + var e = t.polar; + if (e) { + y(e) || (e = [e]); + var i = []; + d(e, function (e, n) { + e.indicator ? (e.type && !e.shape && (e.shape = e.type), t.radar = t.radar || [], y(t.radar) || (t.radar = [t.radar]), t.radar.push(e)) : i.push(e) + }), t.polar = i + } + d(t.series, function (t) { + t && "radar" === t.type && t.polarIndex && (t.radarIndex = t.polarIndex) + }) + }); + var lA = Q; + h(_h, E_), wh.prototype = { + constructor: wh, type: "view", dimensions: ["x", "y"], setBoundingRect: function (t, e, i, n) { + return this._rect = new $t(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 $t(t, e, i, n) + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(), a = this._rawTransformable; + a.transform = o.calculateTransform(new $t(t, e, i, n)), a.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._roamTransformable.getLocalTransform() + }, _updateCenterAndZoom: function () { + var t = this._rawTransformable.getLocalTransform(), e = this._roamTransformable, + i = this.getDefaultCenter(), n = this.getCenter(), o = this.getZoom(); + n = Q([], n, t), i = Q([], i, t), e.origin = n, e.position = [i[0] - n[0], i[1] - n[1]], e.scale = [o, o], this._updateTransform() + }, _updateTransform: function () { + var t = this._roamTransformable, e = this._rawTransformable; + e.parent = t, t.updateTransform(), e.updateTransform(), ut(this.transform || (this.transform = []), e.transform || st()), this._rawTransform = e.getLocalTransform(), this.invTransform = this.invTransform || [], pt(this.invTransform, this.transform), this.decomposeTransform() + }, getViewRect: function () { + return this._viewRect + }, getViewRectAfterRoam: function () { + var t = this.getBoundingRect().clone(); + return t.applyTransform(this.transform), t + }, dataToPoint: function (t, e, i) { + var n = e ? this._rawTransform : this.transform; + return i = i || [], n ? lA(i, t, n) : G(i, t) + }, pointToData: function (t) { + var e = this.invTransform; + return e ? lA([], t, e) : [t[0], t[1]] + }, convertToPixel: v(bh, "dataToPoint"), convertFromPixel: v(bh, "pointToData"), containPoint: function (t) { + return this.getViewRectAfterRoam().contain(t[0], t[1]) + } + }, h(wh, E_); + for (var uA = [126, 25], hA = [[[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]]], cA = 0; cA < hA.length; cA++) for (var dA = 0; dA < hA[cA].length; dA++) hA[cA][dA][0] /= 10.5, hA[cA][dA][1] /= -14, hA[cA][dA][0] += uA[0], hA[cA][dA][1] += uA[1]; + var fA = {"南海诸岛": [32, 80], "广东": [0, -10], "香港": [10, 5], "澳门": [-10, 10], "天津": [5, 5]}, + pA = {Russia: [100, 60], "United States": [-99, 38], "United States of America": [-99, 38]}, + gA = [[[123.45165252685547, 25.73527164402261], [123.49731445312499, 25.73527164402261], [123.49731445312499, 25.750734064600884], [123.45165252685547, 25.750734064600884], [123.45165252685547, 25.73527164402261]]], + mA = [function (t) { + "china" === t.map && t.regions.push(new Cl("南海诸岛", f(hA, function (t) { + return {type: "polygon", exterior: t} + }), uA)) + }, function (t) { + d(t.regions, function (t) { + var e = fA[t.name]; + if (e) { + var i = t.center; + i[0] += e[0] / 10.5, i[1] += -e[1] / 14 + } + }) + }, function (t) { + d(t.regions, function (t) { + var e = pA[t.name]; + if (e) { + var i = t.center; + i[0] = e[0], i[1] = e[1] + } + }) + }, 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: gA[0] + }) + }]; + Sh.prototype = { + constructor: Sh, 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 ? XT(t) : [] + } catch (t) { + throw"Invalid geoJson format\n" + t.message + } + e = e || {}, i = i || {}; + for (var n = this.regions, o = R(), a = 0; a < n.length; a++) { + var r = n[a].name; + r = i.hasOwnProperty(r) ? i[r] : r, n[a].name = r, o.set(r, n[a]), this.addGeoCoord(r, n[a].center); + var s = e[r]; + s && n[a].transformTo(s.left, s.top, s.width, s.height) + } + this._regionsMap = o, this._rect = null, d(mA, function (t) { + t(this) + }, this) + }, transformTo: function (t, e, i, n) { + var o = this.getBoundingRect(); + (o = o.clone()).y = -o.y - o.height; + var a = this._rawTransformable; + a.transform = o.calculateTransform(new $t(t, e, i, n)), a.decomposeTransform(); + var r = a.scale; + r[1] = -r[1], a.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 $t(0, 0, 0, 0) + }, dataToPoint: function (t, e, i) { + if ("string" == typeof t && (t = this.getGeoCoord(t)), t) return wh.prototype.dataToPoint.call(this, t, e, i) + }, convertToPixel: v(Mh, "dataToPoint"), convertFromPixel: v(Mh, "pointToData") + }, h(Sh, wh); + var vA = { + dimensions: Sh.prototype.dimensions, create: function (t, e) { + var i = []; + t.eachComponent("geo", function (t, n) { + var o = t.get("map"), a = ws(o), + r = new Sh(o + n, o, a && a.geoJson, a && a.specialAreas, t.get("nameMap")); + r.zoomLimit = t.get("scaleLimit"), i.push(r), Th(r, t), t.coordinateSystem = r, r.model = t, r.resize = Ih, 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) + } + }), d(n, function (t, n) { + var a = ws(n), r = f(t, function (t) { + return t.get("nameMap") + }), s = new Sh(n, n, a && a.geoJson, a && a.specialAreas, o(r)); + s.zoomLimit = T.apply(null, f(t, function (t) { + return t.get("scaleLimit") + })), i.push(s), s.resize = Ih, s.resize(t[0], e), d(t, function (t) { + t.coordinateSystem = s, Th(s, t) + }) + }), i + }, getFilledRegions: function (t, e, i) { + var n = (t || []).slice(); + i = i || {}; + var o = ws(e), a = o && o.geoJson; + if (!a) return t; + for (var r = R(), s = a.features, l = 0; l < n.length; l++) r.set(n[l].name, n[l]); + for (l = 0; l < s.length; l++) { + var u = s[l].properties.name; + r.get(u) || (i.hasOwnProperty(u) && (u = i[u]), n.push({name: u})) + } + return n + } + }; + ds("geo", vA); + var yA = KM.extend({ + type: "series.map", + dependencies: ["geo"], + layoutMode: "box", + needsDrawMap: !1, + seriesGroup: [], + init: function (t) { + yA.superApply(this, "init", arguments), this.updateSelectedMap(this._createSelectableList()) + }, + getInitialData: function (t) { + return jD(this, ["value"]) + }, + mergeOption: function (t) { + yA.superApply(this, "mergeOption", arguments), this.updateSelectedMap(this._createSelectableList()) + }, + _createSelectableList: function () { + for (var t = this.getRawData(), e = t.mapDimension("value"), i = [], n = 0, o = t.count(); n < o; n++) i.push({ + name: t.getName(n), + value: t.get(e, n), + selected: ir(t, n, "selected") + }); + return i = vA.getFilledRegions(i, this.getMapType(), this.option.nameMap) + }, + 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) { + }, + getRawValue: function (t) { + var e = this.getData(); + return e.get(e.mapDimension("value"), t) + }, + getRegionModel: function (t) { + var e = this.getData(); + return e.getItemModel(e.indexOfName(t)) + }, + formatTooltip: function (t) { + for (var e = this.getData(), i = Fo(this.getRawValue(t)), n = e.getName(t), o = this.seriesGroup, a = [], r = 0; r < o.length; r++) { + var s = o[r].originalData.indexOfName(n), l = e.mapDimension("value"); + isNaN(o[r].originalData.get(l, s)) || a.push(Zo(o[r].name)) + } + return a.join(", ") + "
    " + Zo(n + " : " + i) + }, + getTooltipPosition: function (t) { + if (null != t) { + var e = this.getData().getName(t), i = this.coordinateSystem, n = i.getRegion(e); + return n && i.dataToPoint(n.center) + } + }, + setZoom: function (t) { + this.option.zoom = t + }, + setCenter: function (t) { + this.option.center = t + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "geo", + map: "", + left: "center", + top: "center", + aspectScale: .75, + showLegendSymbol: !0, + dataRangeHoverLink: !0, + boundingCoords: null, + center: null, + zoom: 1, + scaleLimit: null, + label: {show: !1, color: "#000"}, + itemStyle: {borderWidth: .5, borderColor: "#444", areaColor: "#eee"}, + emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {areaColor: "rgba(255,215,0,0.8)"}} + } + }); + h(yA, YD); + var xA = "\0_ec_interaction_mutex"; + cs({type: "takeGlobalCursor", event: "globalCursorTaken", update: "update"}, function () { + }), h(kh, D_); + var _A = {axisPointer: 1, tooltip: 1, brush: 1}; + Uh.prototype = { + constructor: Uh, draw: function (t, e, i, n, o) { + var a = "geo" === t.mainType, r = t.getData && t.getData(); + a && e.eachComponent({mainType: "series", subType: "map"}, function (e) { + r || e.getHostGeoModel() !== t || (r = e.getData()) + }); + var s = t.coordinateSystem, l = this.group, u = s.scale, h = {position: s.position, scale: u}; + !l.childAt(0) || o ? l.attr(h) : fo(l, h, t), l.removeAll(); + var c = ["itemStyle"], f = ["emphasis", "itemStyle"], p = ["label"], g = ["emphasis", "label"], m = R(); + d(s.regions, function (e) { + var i = m.get(e.name) || m.set(e.name, new sw), n = new AS({shape: {paths: []}}); + i.add(n); + var o, s = (C = t.getRegionModel(e.name) || t).getModel(c), h = C.getModel(f), v = Fh(s), y = Fh(h), + x = C.getModel(p), _ = C.getModel(g); + if (r) { + o = r.indexOfName(e.name); + var w = r.getItemVisual(o, "color", !0); + w && (v.fill = w) + } + d(e.geometries, function (t) { + if ("polygon" === t.type) { + n.shape.paths.push(new wS({shape: {points: t.exterior}})); + for (var e = 0; e < (t.interiors ? t.interiors.length : 0); e++) n.shape.paths.push(new wS({shape: {points: t.interiors[e]}})) + } + }), n.setStyle(v), n.style.strokeNoScale = !0, n.culling = !0; + var b = x.get("show"), S = _.get("show"), M = r && isNaN(r.get(r.mapDimension("value"), o)), + I = r && r.getItemLayout(o); + if (a || M && (b || S) || I && I.showLabel) { + var T, D = a ? e.name : o; + (!r || o >= 0) && (T = t); + var A = new fS({position: e.center.slice(), scale: [1 / u[0], 1 / u[1]], z2: 10, silent: !0}); + io(A.style, A.hoverStyle = {}, x, _, { + labelFetcher: T, + labelDataIndex: D, + defaultText: e.name, + useInsideStyle: !1 + }, {textAlign: "center", textVerticalAlign: "middle"}), i.add(A) + } + if (r) r.setItemGraphicEl(o, 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), eo(i, y, {hoverSilentOnTouch: !!t.get("selectedMode")}), l.add(i) + }), this._updateController(t, e, i), Hh(this, t, l, i, n), Zh(t, l) + }, remove: function () { + this.group.removeAll(), this._controller.dispose(), this._controllerHost = {} + }, _updateController: function (t, e, i) { + function n() { + var e = {type: "geoRoam", componentType: l}; + return e[l + "Id"] = t.id, e + } + + var o = t.coordinateSystem, r = this._controller, s = this._controllerHost; + s.zoomLimit = t.get("scaleLimit"), s.zoom = o.getZoom(), r.enable(t.get("roam") || !1); + var l = t.mainType; + r.off("pan").on("pan", function (t, e) { + this._mouseDownFlag = !1, Vh(s, t, e), i.dispatchAction(a(n(), {dx: t, dy: e})) + }, this), r.off("zoom").on("zoom", function (t, e, o) { + if (this._mouseDownFlag = !1, Gh(s, t, e, o), i.dispatchAction(a(n(), { + zoom: t, + originX: e, + originY: o + })), this._updateGroup) { + var r = this.group, l = r.scale; + r.traverse(function (t) { + "text" === t.type && t.attr("scale", [1 / l[0], 1 / l[1]]) + }) + } + }, this), r.setPointerChecker(function (e, n, a) { + return o.getViewRectAfterRoam().contain(n, a) && !Wh(e, i, t) + }) + } + }, _s({ + type: "map", render: function (t, e, i, n) { + if (!n || "mapToggleSelect" !== n.type || n.from !== this.uid) { + var o = this.group; + if (o.removeAll(), !t.getHostGeoModel()) { + if (n && "geoRoam" === n.type && "series" === n.componentType && n.seriesId === t.id) (a = this._mapDraw) && o.add(a.group); else if (t.needsDrawMap) { + var a = this._mapDraw || new Uh(i, !0); + o.add(a.group), a.draw(t, e, i, this, n), this._mapDraw = a + } 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, o = this.group; + n.each(n.mapDimension("value"), function (e, i) { + if (!isNaN(e)) { + var a = n.getItemLayout(i); + if (a && a.point) { + var r = a.point, s = a.offset, l = new pS({ + 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 u = t.mainSeries.getData(), h = n.getName(i), c = u.indexOfName(h), + d = n.getItemModel(i), f = d.getModel("label"), p = d.getModel("emphasis.label"), + g = u.getItemGraphicEl(c), m = D(t.getFormattedLabel(i, "normal"), h), + v = D(t.getFormattedLabel(i, "emphasis"), m), y = function () { + var t = no({}, p, {text: p.get("show") ? v : null}, { + isRectText: !0, + useInsideStyle: !1 + }, !0); + l.style.extendFrom(t), l.__mapOriginalZ2 = l.z2, l.z2 += 1 + }, x = function () { + no(l.style, f, { + text: f.get("show") ? m : null, + textPosition: f.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() + } + o.add(l) + } + } + }) + } + }), cs({type: "geoRoam", event: "geoRoam", update: "updateTransform"}, 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 o = Xh(n, t, e.get("scaleLimit")); + e.setCenter && e.setCenter(o.center), e.setZoom && e.setZoom(o.zoom), "series" === i && d(e.seriesGroup, function (t) { + t.setCenter(o.center), t.setZoom(o.zoom) + }) + } + }) + }); + fs(function (t) { + var e = {}; + t.eachSeriesByType("map", function (i) { + var n = i.getMapType(); + if (!i.getHostGeoModel() && !e[n]) { + var o = {}; + d(i.seriesGroup, function (e) { + var i = e.coordinateSystem, n = e.originalData; + e.get("showLegendSymbol") && t.getComponent("legend") && n.each(n.mapDimension("value"), function (t, e) { + var a = n.getName(e), r = i.getRegion(a); + if (r && !isNaN(t)) { + var s = o[a] || 0, l = i.dataToPoint(r.center); + o[a] = s + 1, n.setItemLayout(e, {point: l, offset: s}) + } + }) + }); + var a = i.getData(); + a.each(function (t) { + var e = a.getName(t), i = a.getItemLayout(t) || {}; + i.showLabel = !o[e], a.setItemLayout(t, i) + }), e[n] = !0 + } + }) + }), ps(function (t) { + t.eachSeriesByType("map", function (t) { + var e = t.get("color"), i = t.getModel("itemStyle"), n = i.get("areaColor"), + o = i.get("color") || e[t.seriesIndex % e.length]; + t.getData().setVisual({areaColor: n, color: o}) + }) + }), hs(LI.PROCESSOR.STATISTIC, 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) + }), d(e, function (t, e) { + for (var i = jh(f(t, function (t) { + return t.getData() + }), t[0].get("mapValueCalculation")), n = 0; n < t.length; n++) t[n].originalData = t[n].getData(); + for (n = 0; n < t.length; n++) t[n].seriesGroup = t, t[n].needsDrawMap = 0 === n && !t[n].getHostGeoModel(), t[n].setData(i.cloneShallow()), t[n].mainSeries = t[0] + }) + }), us(function (t) { + var e = []; + d(t.series, function (t) { + t && "map" === t.type && (e.push(t), t.map = t.map || t.mapType, r(t, t.mapLocation)) + }) + }), $D("map", [{type: "mapToggleSelect", event: "mapselectchanged", method: "toggleSelected"}, { + type: "mapSelect", + event: "mapselected", + method: "select" + }, {type: "mapUnSelect", event: "mapunselected", method: "unSelect"}]); + var wA = d, bA = "\0__link_datas", SA = "\0__link_mainData", MA = 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 + }; + MA.prototype = { + constructor: MA, isRemoved: function () { + return this.dataIndex < 0 + }, eachNode: function (t, e, i) { + "function" == typeof t && (i = e, e = t, t = null), _(t = t || {}) && (t = {order: t}); + var n, o = t.order || "preorder", a = this[t.attr || "children"]; + "preorder" === o && (n = e.call(i, this)); + for (var r = 0; !n && r < a.length; r++) a[r].eachNode(t, e, i); + "postorder" === o && 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 o = i[e].getNodeById(t); + if (o) return o + } + }, contains: function (t) { + if (t === this) return !0; + for (var e = 0, i = this.children, n = i.length; e < n; e++) { + var o = i[e].contains(t); + if (o) return o + } + }, 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), o = this.getLevelModel(); + return o || 0 !== this.children.length && (0 === this.children.length || !1 !== this.isExpand) || (e = this.getLeavesModel()), n.getModel(t, (o || 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) + }, isAncestorOf: function (t) { + for (var e = t.parentNode; e;) { + if (e === this) return !0; + e = e.parentNode + } + return !1 + }, isDescendantOf: function (t) { + return t !== this && t.isAncestorOf(this) + } + }, ic.prototype = { + constructor: ic, 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 (var i = 0, n = t.count(); i < n; i++) e[t.getRawIndex(i)].dataIndex = i + }, clearLayouts: function () { + this.data.clearItemLayouts() + } + }, ic.createTree = function (t, e, i) { + function n(t, e) { + var i = t.value; + r = Math.max(r, y(i) ? i.length : 1), a.push(t); + var s = new MA(t.name, o); + e ? nc(s, e) : o.root = s, o._nodes.push(s); + var l = t.children; + if (l) for (var u = 0; u < l.length; u++) n(l[u], s) + } + + var o = new ic(e, i.levels, i.leaves), a = [], r = 1; + n(t), o.root.updateDepthAndHeight(0); + var s = hT(a, {coordDimensions: ["value"], dimensionsCount: r}), l = new sT(s, e); + return l.initData(a), Yh({mainData: l, struct: o, structAttr: "tree"}), o.update(), o + }, KM.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 o = ic.createTree(e, this, n), a = 0; + o.eachNode("preorder", function (t) { + t.depth > a && (a = t.depth) + }); + var r = t.expandAndCollapse && t.initialTreeDepth >= 0 ? t.initialTreeDepth : a; + return o.root.eachNode("preorder", function (t) { + var e = t.hostTree.data.getRawDataItem(t.dataIndex); + t.isExpand = e && null != e.collapsed ? !e.collapsed : t.depth <= r + }), o.data + }, + getOrient: function () { + var t = this.get("orient"); + return "horizontal" === t ? t = "LR" : "vertical" === t && (t = "TB"), t + }, + formatTooltip: function (t) { + for (var e = this.getData().tree, i = e.root.children[0], n = e.getNodeByDataIndex(t), o = n.getValue(), a = n.name; n && n !== i;) a = n.parentNode.name + "." + a, n = n.parentNode; + return Zo(a + (isNaN(o) || null == o ? "" : " : " + o)) + }, + defaultOption: { + zlevel: 0, + z: 2, + left: "12%", + top: "12%", + right: "12%", + bottom: "12%", + layout: "orthogonal", + orient: "LR", + symbol: "emptyCircle", + symbolSize: 7, + expandAndCollapse: !0, + initialTreeDepth: 2, + lineStyle: {color: "#ccc", width: 1.5, curveness: .5}, + itemStyle: {color: "lightsteelblue", borderColor: "#c23531", borderWidth: 1.5}, + label: {show: !0, color: "#555"}, + leaves: {label: {show: !0}}, + animationEasing: "linear", + animationDuration: 700, + animationDurationUpdate: 1e3 + } + }), _s({ + type: "tree", init: function (t, e) { + this._oldTree, this._mainGroup = new sw, this.group.add(this._mainGroup) + }, render: function (t, e, i, n) { + var o = t.getData(), a = t.layoutInfo, r = this._mainGroup, s = t.get("layout"); + "radial" === s ? r.attr("position", [a.x + a.width / 2, a.y + a.height / 2]) : r.attr("position", [a.x, a.y]); + var l = this._data, u = { + expandAndCollapse: t.get("expandAndCollapse"), + layout: s, + orient: t.getOrient(), + curvature: t.get("lineStyle.curveness"), + symbolRotate: t.get("symbolRotate"), + symbolOffset: t.get("symbolOffset"), + hoverAnimation: t.get("hoverAnimation"), + useNameLabel: !0, + fadeIn: !0 + }; + o.diff(l).add(function (e) { + vc(o, e) && xc(o, e, null, r, t, u) + }).update(function (e, i) { + var n = l.getItemGraphicEl(i); + vc(o, e) ? xc(o, e, n, r, t, u) : n && _c(l, i, n, r, t, u) + }).remove(function (e) { + var i = l.getItemGraphicEl(e); + i && _c(l, e, i, r, t, u) + }).execute(), !0 === u.expandAndCollapse && o.eachItemGraphicEl(function (e, n) { + e.off("click").on("click", function () { + i.dispatchAction({type: "treeExpandAndCollapse", seriesId: t.id, dataIndex: n}) + }) + }), this._data = o + }, dispose: function () { + }, remove: function () { + this._mainGroup.removeAll(), this._data = null + } + }), cs({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 + }) + }); + ps(gD("tree", "circle")), fs(function (t, e) { + t.eachSeriesByType("tree", function (t) { + Mc(t, e) + }) + }), KM.extend({ + type: "series.treemap", layoutMode: "box", dependencies: ["grid", "polar"], _viewRoot: null, defaultOption: { + progressive: 0, + hoverLayerThreshold: 1 / 0, + left: "center", + top: "middle", + right: null, + bottom: null, + width: "80%", + height: "80%", + sort: !0, + clipWindow: "origin", + squareRatio: .5 * (1 + Math.sqrt(5)), + leafDepth: null, + drillDownIcon: "▶", + zoomToNodeRatio: .1024, + roam: !0, + nodeClick: "zoomToNode", + animation: !0, + animationDurationUpdate: 900, + animationEasing: "quinticInOut", + breadcrumb: { + show: !0, + height: 22, + left: "center", + top: "bottom", + emptyItemWidth: 25, + itemStyle: { + color: "rgba(0,0,0,0.7)", + borderColor: "rgba(255,255,255,0.7)", + borderWidth: 1, + shadowColor: "rgba(150,150,150,1)", + shadowBlur: 3, + shadowOffsetX: 0, + shadowOffsetY: 0, + textStyle: {color: "#fff"} + }, + emphasis: {textStyle: {}} + }, + label: {show: !0, distance: 0, padding: 5, position: "inside", color: "#fff", ellipsis: !0}, + upperLabel: { + show: !1, + position: [0, "50%"], + height: 20, + color: "#fff", + ellipsis: !0, + verticalAlign: "middle" + }, + itemStyle: { + color: null, + colorAlpha: null, + colorSaturation: null, + borderWidth: 0, + gapWidth: 0, + borderColor: "#fff", + borderColorSaturation: null + }, + emphasis: { + upperLabel: { + show: !0, + position: [0, "50%"], + color: "#fff", + ellipsis: !0, + verticalAlign: "middle" + } + }, + visualDimension: 0, + visualMin: null, + visualMax: null, + color: [], + colorAlpha: null, + colorSaturation: null, + colorMappingBy: "index", + visibleMin: 10, + childrenVisibleMin: null, + levels: [] + }, getInitialData: function (t, e) { + var i = {name: t.name, children: t.data}; + Cc(i); + var n = t.levels || []; + n = t.levels = Lc(n, e); + var o = {}; + return o.levels = n, ic.createTree(i, this, o).data + }, optionUpdated: function () { + this.resetViewRoot() + }, formatTooltip: function (t) { + var e = this.getData(), i = this.getRawValue(t), n = Fo(y(i) ? i[0] : i); + return Zo(e.getName(t) + ": " + n) + }, getDataParams: function (t) { + var e = KM.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); + return e.treePathInfo = Ac(i, this), e + }, setLayoutInfo: function (t) { + this.layoutInfo = this.layoutInfo || {}, a(this.layoutInfo, t) + }, mapIdToIndex: function (t) { + var e = this._idIndexMap; + e || (e = this._idIndexMap = R(), this._idIndexMapCount = 0); + var i = e.get(t); + return null == i && e.set(t, i = this._idIndexMapCount++), i + }, getViewRoot: function () { + return this._viewRoot + }, resetViewRoot: function (t) { + t ? this._viewRoot = t : t = this._viewRoot; + var e = this.getRawData().tree.root; + t && (t === e || e.contains(t)) || (this._viewRoot = e) + } + }); + var IA = 5; + kc.prototype = { + constructor: kc, render: function (t, e, i, n) { + var o = t.getModel("breadcrumb"), a = this.group; + if (a.removeAll(), o.get("show") && i) { + var r = o.getModel("itemStyle"), s = r.getModel("textStyle"), l = { + pos: {left: o.get("left"), right: o.get("right"), top: o.get("top"), bottom: o.get("bottom")}, + box: {width: e.getWidth(), height: e.getHeight()}, + emptyItemWidth: o.get("emptyItemWidth"), + totalWidth: 0, + renderList: [] + }; + this._prepare(i, l, s), this._renderContent(t, l, r, s, n), ta(a, l.pos, l.box) + } + }, _prepare: function (t, e, i) { + for (var n = t; n; n = n.parentNode) { + var o = n.getModel().get("name"), a = i.getTextRect(o), r = Math.max(a.width + 16, e.emptyItemWidth); + e.totalWidth += r + 8, e.renderList.push({node: n, text: o, width: r}) + } + }, _renderContent: function (t, e, i, n, o) { + for (var a = 0, s = e.emptyItemWidth, l = t.get("breadcrumb.height"), u = Jo(e.pos, e.box), h = e.totalWidth, c = e.renderList, d = c.length - 1; d >= 0; d--) { + var f = c[d], p = f.node, g = f.width, m = f.text; + h > u.width && (h -= g - s, g = s, m = null); + var y = new wS({ + shape: {points: Pc(a, 0, g, l, d === c.length - 1, 0 === d)}, + style: r(i.getItemStyle(), { + lineJoin: "bevel", + text: m, + textFill: n.getTextColor(), + textFont: n.getFont() + }), + z: 10, + onclick: v(o, p) + }); + this.group.add(y), Nc(y, t, p), a += g + 8 + } + }, remove: function () { + this.group.removeAll() + } + }; + var TA = m, DA = sw, AA = SS, CA = d, LA = ["label"], kA = ["emphasis", "label"], PA = ["upperLabel"], + NA = ["emphasis", "upperLabel"], OA = 10, EA = 1, RA = 2, + zA = sb([["fill", "color"], ["stroke", "strokeColor"], ["lineWidth", "strokeWidth"], ["shadowBlur"], ["shadowOffsetX"], ["shadowOffsetY"], ["shadowColor"]]), + BA = function (t) { + var e = zA(t); + return e.stroke = e.fill = e.lineWidth = null, e + }; + _s({ + type: "treemap", init: function (t, e) { + this._containerGroup, this._storage = { + nodeGroup: [], + background: [], + content: [] + }, this._oldTree, this._breadcrumb, this._controller, this._state = "ready" + }, render: function (t, e, i, n) { + if (!(l(e.findComponents({mainType: "series", subType: "treemap", query: n}), t) < 0)) { + this.seriesModel = t, this.api = i, this.ecModel = e; + var o = Ic(n, ["treemapZoomToNode", "treemapRootToNode"], t), a = n && n.type, r = t.layoutInfo, + s = !this._oldTree, u = this._storage, h = "treemapRootToNode" === a && o && u ? { + rootNodeGroup: u.nodeGroup[o.node.getRawIndex()], + direction: n.direction + } : null, c = this._giveContainerGroup(r), d = this._doRender(c, t, h); + s || a && "treemapZoomToNode" !== a && "treemapRootToNode" !== a ? d.renderFinally() : this._doAnimation(c, d, t, h), this._resetController(i), this._renderBreadcrumb(t, i, o) + } + }, _giveContainerGroup: function (t) { + var e = this._containerGroup; + return e || (e = this._containerGroup = new DA, this._initEvents(e), this.group.add(e)), e.attr("position", [t.x, t.y]), e + }, _doRender: function (t, e, i) { + function n(t, e, i, o, a) { + function r(t) { + return t.getId() + } + + function s(r, s) { + var l = null != r ? t[r] : null, u = null != s ? e[s] : null, c = h(l, u, i, a); + c && n(l && l.viewChildren || [], u && u.viewChildren || [], c, o, a + 1) + } + + o ? (e = t, CA(t, function (t, e) { + !t.isRemoved() && s(e, e) + })) : new Ss(e, t, r, r).add(s).update(s).remove(v(s, null)).execute() + } + + var o = e.getData().tree, a = this._oldTree, r = {nodeGroup: [], background: [], content: []}, + s = {nodeGroup: [], background: [], content: []}, l = this._storage, u = [], + h = v(Ec, e, s, l, i, r, u); + n(o.root ? [o.root] : [], a && a.root ? [a.root] : [], t, o === a || !a, 0); + var c = function (t) { + var e = {nodeGroup: [], background: [], content: []}; + return t && CA(t, function (t, i) { + var n = e[i]; + CA(t, function (t) { + t && (n.push(t), t.__tmWillDelete = 1) + }) + }), e + }(l); + return this._oldTree = o, this._storage = s, { + lastsForAnimation: r, + willDeleteEls: c, + renderFinally: function () { + CA(c, function (t) { + CA(t, function (t) { + t.parent && t.parent.remove(t) + }) + }), CA(u, function (t) { + t.invisible = !0, t.dirty() + }) + } + } + }, _doAnimation: function (t, e, i, n) { + if (i.get("animation")) { + var o = i.get("animationDurationUpdate"), r = i.get("animationEasing"), s = Oc(); + CA(e.willDeleteEls, function (t, e) { + CA(t, function (t, i) { + if (!t.invisible) { + var a, l = t.parent; + if (n && "drillDown" === n.direction) a = l === n.rootNodeGroup ? { + shape: { + x: 0, + y: 0, + width: l.__tmNodeWidth, + height: l.__tmNodeHeight + }, style: {opacity: 0} + } : {style: {opacity: 0}}; else { + var u = 0, h = 0; + l.__tmWillDelete || (u = l.__tmNodeWidth / 2, h = l.__tmNodeHeight / 2), a = "nodeGroup" === e ? { + position: [u, h], + style: {opacity: 0} + } : {shape: {x: u, y: h, width: 0, height: 0}, style: {opacity: 0}} + } + a && s.add(t, a, o, r) + } + }) + }), CA(this._storage, function (t, i) { + CA(t, function (t, n) { + var l = e.lastsForAnimation[i][n], u = {}; + l && ("nodeGroup" === i ? l.old && (u.position = t.position.slice(), t.attr("position", l.old)) : (l.old && (u.shape = a({}, t.shape), t.setShape(l.old)), l.fadein ? (t.setStyle("opacity", 0), u.style = {opacity: 1}) : 1 !== t.style.opacity && (u.style = {opacity: 1})), s.add(t, u, o, r)) + }) + }, this), this._state = "animating", s.done(TA(function () { + this._state = "ready", e.renderFinally() + }, this)).start() + } + }, _resetController: function (t) { + var e = this._controller; + e || ((e = this._controller = new kh(t.getZr())).enable(this.seriesModel.get("roam")), e.on("pan", TA(this._onPan, this)), e.on("zoom", TA(this._onZoom, this))); + var i = new $t(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 o = n.getLayout(); + if (!o) return; + var a = new $t(o.x, o.y, o.width, o.height), r = this.seriesModel.layoutInfo; + e -= r.x, i -= r.y; + var s = st(); + ct(s, s, [-e, -i]), ft(s, s, [t, t]), ct(s, s, [e, i]), a.applyTransform(s), this.api.dispatchAction({ + type: "treemapRender", + from: this.uid, + seriesId: this.seriesModel.id, + rootRect: {x: a.x, y: a.y, width: a.width, height: a.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 o = n.hostTree.data.getItemModel(n.dataIndex), a = o.get("link", !0), + r = o.get("target", !0) || "blank"; + a && window.open(a, 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 kc(this.group))).render(t, e, i.node, TA(function (e) { + "animating" !== this._state && (Dc(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 o = this._storage.background[n.getRawIndex()]; + if (o) { + var a = o.transformCoordToLocal(t, e), r = o.shape; + if (!(r.x <= a[0] && a[0] <= r.x + r.width && r.y <= a[1] && a[1] <= r.y + r.height)) return !1; + i = {node: n, offsetX: a[0], offsetY: a[1]} + } + }, this), i + } + }); + for (var VA = ["treemapZoomToNode", "treemapRender", "treemapMove"], GA = 0; GA < VA.length; GA++) cs({ + type: VA[GA], + update: "updateView" + }, function () { + }); + cs({type: "treemapRootToNode", update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "treemap", query: t}, function (e, i) { + var n = Ic(t, ["treemapZoomToNode", "treemapRootToNode"], e); + if (n) { + var o = e.getViewRoot(); + o && (t.direction = Dc(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node) + } + }) + }); + var WA = d, FA = w, HA = -1, ZA = function (t) { + var e = t.mappingMethod, n = t.type, o = this.option = i(t); + this.type = n, this.mappingMethod = e, this._normalizeData = XA[e]; + var a = UA[n]; + this.applyVisual = a.applyVisual, this.getColorMapper = a.getColorMapper, this._doMap = a._doMap[e], "piecewise" === e ? (Vc(o), zc(o)) : "category" === e ? o.categories ? Bc(o) : Vc(o, !0) : (k("linear" !== e || o.dataExtent), Vc(o)) + }; + ZA.prototype = { + constructor: ZA, mapValueToVisual: function (t) { + var e = this._normalizeData(t); + return this._doMap(e, t) + }, getNormalizer: function () { + return m(this._normalizeData, this) + } + }; + var UA = ZA.visualHandlers = { + color: { + applyVisual: Fc("color"), getColorMapper: function () { + var t = this.option; + return m("category" === t.mappingMethod ? function (t, e) { + return !e && (t = this._normalizeData(t)), Hc.call(this, t) + } : function (e, i, n) { + var o = !!n; + return !i && (e = this._normalizeData(e)), n = Nt(e, t.parsedVisual, n), o ? n : zt(n, "rgba") + }, this) + }, _doMap: { + linear: function (t) { + return zt(Nt(t, this.option.parsedVisual), "rgba") + }, category: Hc, piecewise: function (t, e) { + var i = Xc.call(this, e); + return null == i && (i = zt(Nt(t, this.option.parsedVisual), "rgba")), i + }, fixed: Zc + } + }, + colorHue: Gc(function (t, e) { + return Et(t, e) + }), + colorSaturation: Gc(function (t, e) { + return Et(t, null, e) + }), + colorLightness: Gc(function (t, e) { + return Et(t, null, null, e) + }), + colorAlpha: Gc(function (t, e) { + return Rt(t, e) + }), + opacity: {applyVisual: Fc("opacity"), _doMap: Uc([0, 1])}, + liftZ: {applyVisual: Fc("liftZ"), _doMap: {linear: Zc, category: Zc, piecewise: Zc, fixed: Zc}}, + symbol: { + applyVisual: function (t, e, i) { + var n = this.mapValueToVisual(t); + if (_(n)) i("symbol", n); else if (FA(n)) for (var o in n) n.hasOwnProperty(o) && i(o, n[o]) + }, _doMap: { + linear: Wc, category: Hc, piecewise: function (t, e) { + var i = Xc.call(this, e); + return null == i && (i = Wc.call(this, t)), i + }, fixed: Zc + } + }, + symbolSize: {applyVisual: Fc("symbolSize"), _doMap: Uc([0, 1])} + }, XA = { + linear: function (t) { + return To(t, this.option.dataExtent, [0, 1], !0) + }, piecewise: function (t) { + var e = this.option.pieceList, i = ZA.findPieceIndex(t, e, !0); + if (null != i) return To(i, [0, e.length - 1], [0, 1], !0) + }, category: function (t) { + var e = this.option.categories ? this.option.categoryMap[t] : t; + return null == e ? HA : e + }, fixed: B + }; + ZA.listVisualTypes = function () { + var t = []; + return d(UA, function (e, i) { + t.push(i) + }), t + }, ZA.addVisualHandler = function (t, e) { + UA[t] = e + }, ZA.isValidType = function (t) { + return UA.hasOwnProperty(t) + }, ZA.eachVisual = function (t, e, i) { + w(t) ? d(t, e, i) : e.call(i, t) + }, ZA.mapVisual = function (t, e, i) { + var n, o = y(t) ? [] : w(t) ? {} : (n = !0, null); + return ZA.eachVisual(t, function (t, a) { + var r = e.call(i, t, a); + n ? o = r : o[a] = r + }), o + }, ZA.retrieveVisuals = function (t) { + var e, i = {}; + return t && WA(UA, function (n, o) { + t.hasOwnProperty(o) && (i[o] = t[o], e = !0) + }), e ? i : null + }, ZA.prepareVisualTypes = function (t) { + if (FA(t)) { + var e = []; + WA(t, function (t, i) { + e.push(i) + }), t = e + } else { + if (!y(t)) return []; + t = t.slice() + } + return t.sort(function (t, e) { + return "color" === e && "color" !== t && 0 === t.indexOf("color") ? 1 : -1 + }), t + }, ZA.dependsOn = function (t, e) { + return "color" === e ? !(!t || 0 !== t.indexOf(e)) : t === e + }, ZA.findPieceIndex = function (t, e, i) { + function n(e, i) { + var n = Math.abs(e - t); + n < a && (a = n, o = i) + } + + for (var o, a = 1 / 0, r = 0, s = e.length; r < s; r++) { + var l = e[r].value; + if (null != l) { + if (l === t || "string" == typeof l && l === t + "") return r; + i && n(l, r) + } + } + for (var r = 0, s = e.length; r < s; r++) { + var u = e[r], h = u.interval, c = u.close; + if (h) { + if (h[0] === -1 / 0) { + if (Yc(c[1], t, h[1])) return r + } else if (h[1] === 1 / 0) { + if (Yc(c[0], h[0], t)) return r + } else if (Yc(c[0], h[0], t) && Yc(c[1], t, h[1])) return r; + i && n(h[0], r), i && n(h[1], r) + } + } + if (i) return t === 1 / 0 ? e.length - 1 : t === -1 / 0 ? 0 : o + }; + var jA = y, YA = "itemStyle", qA = { + seriesType: "treemap", reset: function (t, e, i, n) { + var o = t.getData().tree, a = o.root, r = t.getModel(YA); + a.isRemoved() || qc(a, {}, f(o.levelModels, function (t) { + return t ? t.get(YA) : null + }), r, t.getViewRoot().getAncestors(), t) + } + }, KA = Math.max, $A = Math.min, JA = T, QA = d, tC = ["itemStyle", "borderWidth"], eC = ["itemStyle", "gapWidth"], + iC = ["upperLabel", "show"], nC = ["upperLabel", "height"], oC = { + seriesType: "treemap", reset: function (t, e, i, n) { + var o = i.getWidth(), r = i.getHeight(), s = t.option, + l = Qo(t.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}), u = s.size || [], + h = Do(JA(l.width, u[0]), o), c = Do(JA(l.height, u[1]), r), d = n && n.type, + f = Ic(n, ["treemapZoomToNode", "treemapRootToNode"], t), + p = "treemapRender" === d || "treemapMove" === d ? n.rootRect : null, g = t.getViewRoot(), m = Tc(g); + if ("treemapMove" !== d) { + var v = "treemapZoomToNode" === d ? hd(t, f, g, h, c) : p ? [p.width, p.height] : [h, c], y = s.sort; + y && "asc" !== y && "desc" !== y && (y = "desc"); + var x = {squareRatio: s.squareRatio, sort: y, leafDepth: s.leafDepth}; + g.hostTree.clearLayouts(); + _ = {x: 0, y: 0, width: v[0], height: v[1], area: v[0] * v[1]}; + g.setLayout(_), nd(g, x, !1, 0); + var _ = g.getLayout(); + QA(m, function (t, e) { + var i = (m[e + 1] || g).getValue(); + t.setLayout(a({dataExtent: [i, i], borderWidth: 0, upperHeight: 0}, _)) + }) + } + var w = t.getData().tree.root; + w.setLayout(cd(l, p, f), !0), t.setLayoutInfo(l), dd(w, new $t(-l.x, -l.y, o, r), m, g, 0) + } + }; + ps(qA), fs(oC); + var aC = function (t) { + this._directed = t || !1, this.nodes = [], this.edges = [], this._nodesMap = {}, this._edgesMap = {}, this.data, this.edgeData + }, rC = aC.prototype; + rC.type = "graph", rC.isDirected = function () { + return this._directed + }, rC.addNode = function (t, e) { + t = t || "" + e; + var i = this._nodesMap; + if (!i[pd(t)]) { + var n = new gd(t, e); + return n.hostGraph = this, this.nodes.push(n), i[pd(t)] = n, n + } + }, rC.getNodeByIndex = function (t) { + var e = this.data.getRawIndex(t); + return this.nodes[e] + }, rC.getNodeById = function (t) { + return this._nodesMap[pd(t)] + }, rC.addEdge = function (t, e, i) { + var n = this._nodesMap, o = this._edgesMap; + if ("number" == typeof t && (t = this.nodes[t]), "number" == typeof e && (e = this.nodes[e]), gd.isInstance(t) || (t = n[pd(t)]), gd.isInstance(e) || (e = n[pd(e)]), t && e) { + var a = t.id + "-" + e.id; + if (!o[a]) { + var r = new md(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), o[a] = r, r + } + } + }, rC.getEdgeByIndex = function (t) { + var e = this.edgeData.getRawIndex(t); + return this.edges[e] + }, rC.getEdge = function (t, e) { + gd.isInstance(t) && (t = t.id), gd.isInstance(e) && (e = e.id); + var i = this._edgesMap; + return this._directed ? i[t + "-" + e] : i[t + "-" + e] || i[e + "-" + t] + }, rC.eachNode = function (t, e) { + for (var i = this.nodes, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && t.call(e, i[o], o) + }, rC.eachEdge = function (t, e) { + for (var i = this.edges, n = i.length, o = 0; o < n; o++) i[o].dataIndex >= 0 && i[o].node1.dataIndex >= 0 && i[o].node2.dataIndex >= 0 && t.call(e, i[o], o) + }, rC.breadthFirstTraverse = function (t, e, i, n) { + if (gd.isInstance(e) || (e = this._nodesMap[pd(e)]), e) { + for (var o = "out" === i ? "outEdges" : "in" === i ? "inEdges" : "edges", a = 0; a < this.nodes.length; a++) this.nodes[a].__visited = !1; + if (!t.call(n, e, null)) for (var r = [e]; r.length;) for (var s = r.shift(), l = s[o], a = 0; a < l.length; a++) { + var u = l[a], h = u.node1 === s ? u.node2 : u.node1; + if (!h.__visited) { + if (t.call(n, h, s)) return; + r.push(h), h.__visited = !0 + } + } + } + }, rC.update = function () { + for (var t = this.data, e = this.edgeData, i = this.nodes, n = this.edges, o = 0, a = i.length; o < a; o++) i[o].dataIndex = -1; + for (var o = 0, a = t.count(); o < a; o++) i[t.getRawIndex(o)].dataIndex = o; + e.filterSelf(function (t) { + var i = n[e.getRawIndex(t)]; + return i.node1.dataIndex >= 0 && i.node2.dataIndex >= 0 + }); + for (var o = 0, a = n.length; o < a; o++) n[o].dataIndex = -1; + for (var o = 0, a = e.count(); o < a; o++) n[e.getRawIndex(o)].dataIndex = o + }, rC.clone = function () { + for (var t = new aC(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 o = i[n]; + t.addEdge(o.node1.id, o.node2.id, o.dataIndex) + } + return t + }, gd.prototype = { + constructor: gd, 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) + } + }, md.prototype.getModel = function (t) { + if (!(this.dataIndex < 0)) return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(t) + }; + var sC = 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) + } + } + }; + h(gd, sC("hostGraph", "data")), h(md, sC("hostGraph", "edgeData")), aC.Node = gd, aC.Edge = md, Wi(gd), Wi(md); + var lC = function (t, e, i, n, o) { + for (var a = new aC(n), r = 0; r < t.length; r++) a.addNode(T(t[r].id, t[r].name, r), r); + for (var s = [], u = [], h = 0, r = 0; r < e.length; r++) { + var c = e[r], d = c.source, f = c.target; + a.addEdge(d, f, h) && (u.push(c), s.push(T(c.id, d + " > " + f)), h++) + } + var p, g = i.get("coordinateSystem"); + if ("cartesian2d" === g || "polar" === g) p = Xs(t, i); else { + var m = Ca.get(g), v = m && "view" !== m.type ? m.dimensions || [] : []; + l(v, "value") < 0 && v.concat(["value"]); + var y = hT(t, {coordDimensions: v}); + (p = new sT(y, i)).initData(t) + } + var x = new sT(["value"], i); + return x.initData(u, s), o && o(p, x), Yh({ + mainData: p, + struct: a, + structAttr: "graph", + datas: {node: p, edge: x}, + datasAttr: {node: "data", edge: "edgeData"} + }), a.update(), a + }, uC = xs({ + type: "series.graph", + init: function (t) { + uC.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this._categoriesData + }, this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData() + }, + mergeOption: function (t) { + uC.superApply(this, "mergeOption", arguments), this.fillDataTextStyle(t.edges || t.links), this._updateCategoriesData() + }, + mergeDefaultAndTheme: function (t) { + uC.superApply(this, "mergeDefaultAndTheme", arguments), Mi(t, ["edgeLabel"], ["show"]) + }, + getInitialData: function (t, e) { + var i = t.edges || t.links || [], n = t.data || t.nodes || [], o = this; + if (n && i) return lC(n, i, this, !0, function (t, i) { + function n(t) { + return (t = this.parsePath(t)) && "label" === t[0] ? r : t && "emphasis" === t[0] && "label" === t[1] ? l : this.parentModel + } + + t.wrapMethod("getItemModel", function (t) { + var e = o._categoriesModels[t.getShallow("category")]; + return e && (e.parentModel = t.parentModel, t.parentModel = e), t + }); + var a = o.getModel("edgeLabel"), r = new wo({label: a.option}, a.parentModel, e), + s = o.getModel("emphasis.edgeLabel"), l = new wo({emphasis: {label: s.option}}, s.parentModel, e); + i.wrapMethod("getItemModel", function (t) { + return t.customizeGetParent(n), 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(), o = this.getDataParams(t, i), a = n.graph.getEdgeByIndex(t), + r = n.getName(a.node1.dataIndex), s = n.getName(a.node2.dataIndex), l = []; + return null != r && l.push(r), null != s && l.push(s), l = Zo(l.join(" > ")), o.value && (l += " : " + Zo(o.value)), l + } + return uC.superApply(this, "formatTooltip", arguments) + }, + _updateCategoriesData: function () { + var t = f(this.option.categories || [], function (t) { + return null != t.value ? t : a({value: 0}, t) + }), e = new sT(["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 uC.superCall(this, "isAnimationEnabled") && !("force" === this.get("layout") && this.get("force.layoutAnimation")) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "view", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + focusNodeAdjacency: !1, + circular: {rotateLabel: !1}, + force: {initLayout: null, repulsion: [0, 50], gravity: .1, edgeLength: 30, layoutAnimation: !0}, + left: "center", + top: "center", + symbol: "circle", + symbolSize: 10, + edgeSymbol: ["none", "none"], + edgeSymbolSize: 10, + edgeLabel: {position: "middle"}, + draggable: !1, + roam: !1, + center: null, + zoom: 1, + nodeScaleRatio: .6, + label: {show: !1, formatter: "{b}"}, + itemStyle: {}, + lineStyle: {color: "#aaa", width: 1, curveness: 0, opacity: .5}, + emphasis: {label: {show: !0}} + } + }), hC = MS.prototype, cC = TS.prototype, dC = En({ + 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) { + (vd(e) ? hC : cC).buildPath(t, e) + }, + pointAt: function (t) { + return vd(this.shape) ? hC.pointAt.call(this, t) : cC.pointAt.call(this, t) + }, + tangentAt: function (t) { + var e = this.shape, i = vd(e) ? [e.x2 - e.x1, e.y2 - e.y1] : cC.tangentAt.call(this, t); + return q(i, i) + } + }), fC = ["fromSymbol", "toSymbol"], pC = bd.prototype; + pC.beforeUpdate = function () { + var t = this, e = t.childOfName("fromSymbol"), i = t.childOfName("toSymbol"), n = t.childOfName("label"); + if (e || i || !n.ignore) { + for (var o = 1, a = this.parent; a;) a.scale && (o /= a.scale[0]), a = a.parent; + var r = t.childOfName("line"); + if (this.__dirty || r.__dirty) { + var s = r.shape.percent, l = r.pointAt(0), u = r.pointAt(s), h = U([], u, l); + if (q(h, h), e && (e.attr("position", l), c = r.tangentAt(0), e.attr("rotation", Math.PI / 2 - Math.atan2(c[1], c[0])), e.attr("scale", [o * s, o * s])), i) { + i.attr("position", u); + var c = r.tangentAt(1); + i.attr("rotation", -Math.PI / 2 - Math.atan2(c[1], c[0])), i.attr("scale", [o * s, o * s]) + } + if (!n.ignore) { + n.attr("position", u); + var d, f, p, g = 5 * o; + if ("end" === n.__position) d = [h[0] * g + u[0], h[1] * g + u[1]], f = h[0] > .8 ? "left" : h[0] < -.8 ? "right" : "center", p = h[1] > .8 ? "top" : h[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], f = "center", p = "bottom"; + var x = -Math.atan2(c[1], c[0]); + u[0] < l[0] && (x = Math.PI + x), n.attr("rotation", x) + } else d = [-h[0] * g + l[0], -h[1] * g + l[1]], f = h[0] > .8 ? "right" : h[0] < -.8 ? "left" : "center", p = h[1] > .8 ? "bottom" : h[1] < -.8 ? "top" : "middle"; + n.attr({ + style: {textVerticalAlign: n.__verticalAlign || p, textAlign: n.__textAlign || f}, + position: d, + scale: [o, o] + }) + } + } + } + }, pC._createLine = function (t, e, i) { + var n = t.hostModel, o = _d(t.getItemLayout(e)); + o.shape.percent = 0, po(o, {shape: {percent: 1}}, n, e), this.add(o); + var a = new fS({name: "label"}); + this.add(a), d(fC, function (i) { + var n = xd(i, t, e); + this.add(n), this[yd(i)] = t.getItemVisual(e, i) + }, this), this._updateCommonStl(t, e, i) + }, pC.updateData = function (t, e, i) { + var n = t.hostModel, o = this.childOfName("line"), a = t.getItemLayout(e), r = {shape: {}}; + wd(r.shape, a), fo(o, r, n, e), d(fC, function (i) { + var n = t.getItemVisual(e, i), o = yd(i); + if (this[o] !== n) { + this.remove(this.childOfName(i)); + var a = xd(i, t, e); + this.add(a) + } + this[o] = n + }, this), this._updateCommonStl(t, e, i) + }, pC._updateCommonStl = function (t, e, i) { + var n = t.hostModel, o = this.childOfName("line"), a = i && i.lineStyle, s = i && i.hoverLineStyle, + l = i && i.labelModel, u = i && i.hoverLabelModel; + if (!i || t.hasItemOption) { + var h = t.getItemModel(e); + a = h.getModel("lineStyle").getLineStyle(), s = h.getModel("emphasis.lineStyle").getLineStyle(), l = h.getModel("label"), u = h.getModel("emphasis.label") + } + var c = t.getItemVisual(e, "color"), f = A(t.getItemVisual(e, "opacity"), a.opacity, 1); + o.useStyle(r({ + strokeNoScale: !0, + fill: "none", + stroke: c, + opacity: f + }, a)), o.hoverStyle = s, d(fC, function (t) { + var e = this.childOfName(t); + e && (e.setColor(c), e.setStyle({opacity: f})) + }, this); + var p, g, m = l.getShallow("show"), v = u.getShallow("show"), y = this.childOfName("label"); + if ((m || v) && (p = c || "#000", null == (g = n.getFormattedLabel(e, "normal", t.dataType)))) { + var x = n.getRawValue(e); + g = null == x ? t.getName(e) : isFinite(x) ? Ao(x) : x + } + var _ = m ? g : null, w = v ? D(n.getFormattedLabel(e, "emphasis", t.dataType), g) : null, b = y.style; + null == _ && null == w || (no(y.style, l, {text: _}, {autoColor: p}), y.__textAlign = b.textAlign, y.__verticalAlign = b.textVerticalAlign, y.__position = l.get("position") || "middle"), y.hoverStyle = null != w ? { + text: w, + textFill: u.getTextColor(!0), + fontStyle: u.getShallow("fontStyle"), + fontWeight: u.getShallow("fontWeight"), + fontSize: u.getShallow("fontSize"), + fontFamily: u.getShallow("fontFamily") + } : {text: null}, y.ignore = !m && !v, eo(this) + }, pC.highlight = function () { + this.trigger("emphasis") + }, pC.downplay = function () { + this.trigger("normal") + }, pC.updateLayout = function (t, e) { + this.setLinePoints(t.getItemLayout(e)) + }, pC.setLinePoints = function (t) { + var e = this.childOfName("line"); + wd(e.shape, t), e.dirty() + }, u(bd, sw); + var gC = Sd.prototype; + gC.isPersistent = function () { + return !0 + }, gC.updateData = function (t) { + var e = this, i = e.group, n = e._lineData; + e._lineData = t, n || i.removeAll(); + var o = Td(t); + t.diff(n).add(function (i) { + Md(e, t, i, o) + }).update(function (i, a) { + Id(e, n, t, a, i, o) + }).remove(function (t) { + i.remove(n.getItemGraphicEl(t)) + }).execute() + }, gC.updateLayout = function () { + var t = this._lineData; + t && t.eachItemGraphicEl(function (e, i) { + e.updateLayout(t, i) + }, this) + }, gC.incrementalPrepareUpdate = function (t) { + this._seriesScope = Td(t), this._lineData = null, this.group.removeAll() + }, gC.incrementalUpdate = function (t, e) { + for (var i = t.start; i < t.end; i++) if (Ad(e.getItemLayout(i))) { + var n = new this._ctor(e, i, this._seriesScope); + n.traverse(function (t) { + t.isGroup || (t.incremental = t.useHoverLayer = !0) + }), this.group.add(n), e.setItemGraphicEl(i, n) + } + }, gC.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, gC._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }; + var mC = [], vC = [], yC = [], xC = Qi, _C = M_, wC = Math.abs, bC = function (t, e) { + function i(t) { + var e = t.getVisual("symbolSize"); + return e instanceof Array && (e = (e[0] + e[1]) / 2), e + } + + var n = [], o = on, a = [[], [], []], r = [[], []], s = []; + e /= 2, t.eachEdge(function (t, l) { + var u = t.getLayout(), h = t.getVisual("fromSymbol"), c = t.getVisual("toSymbol"); + u.__original || (u.__original = [W(u[0]), W(u[1])], u[2] && u.__original.push(W(u[2]))); + var d = u.__original; + if (null != u[2]) { + if (G(a[0], d[0]), G(a[1], d[2]), G(a[2], d[1]), h && "none" != h) { + var f = i(t.node1), p = Cd(a, d[0], f * e); + o(a[0][0], a[1][0], a[2][0], p, n), a[0][0] = n[3], a[1][0] = n[4], o(a[0][1], a[1][1], a[2][1], p, n), a[0][1] = n[3], a[1][1] = n[4] + } + if (c && "none" != c) { + var f = i(t.node2), p = Cd(a, d[1], f * e); + o(a[0][0], a[1][0], a[2][0], p, n), a[1][0] = n[1], a[2][0] = n[2], o(a[0][1], a[1][1], a[2][1], p, n), a[1][1] = n[1], a[2][1] = n[2] + } + G(u[0], a[0]), G(u[1], a[2]), G(u[2], a[1]) + } else { + if (G(r[0], d[0]), G(r[1], d[1]), U(s, r[1], r[0]), q(s, s), h && "none" != h) { + f = i(t.node1); + Z(r[0], r[0], s, f * e) + } + if (c && "none" != c) { + f = i(t.node2); + Z(r[1], r[1], s, -f * e) + } + G(u[0], r[0]), G(u[1], r[1]) + } + }) + }, SC = ["itemStyle", "opacity"], MC = ["lineStyle", "opacity"]; + _s({ + type: "graph", init: function (t, e) { + var i = new Ql, n = new Sd, o = this.group; + this._controller = new kh(e.getZr()), this._controllerHost = {target: o}, o.add(i.group), o.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 o = this._symbolDraw, a = this._lineDraw, r = this.group; + if ("view" === n.type) { + var s = {position: n.position, scale: n.scale}; + this._firstRender ? r.attr(s) : fo(r, s, t) + } + bC(t.getGraph(), this._getNodeGlobalScale(t)); + var l = t.getData(); + o.updateData(l); + var u = t.getEdgeData(); + a.updateData(u), this._updateNodeAndLinkScale(), this._updateController(t, e, i), clearTimeout(this._layoutTimeout); + var h = t.forceLayout, c = t.get("force.layoutAnimation"); + h && this._startForceLayoutIteration(h, c), l.eachItemGraphicEl(function (e, n) { + var o = l.getItemModel(n); + e.off("drag").off("dragend"); + var a = l.getItemModel(n).get("draggable"); + a && e.on("drag", function () { + h && (h.warmUp(), !this._layouting && this._startForceLayoutIteration(h, c), h.setFixed(n), l.setItemLayout(n, e.position)) + }, this).on("dragend", function () { + h && h.setUnfixed(n) + }, this), e.setDraggable(a && h), e.off("mouseover", e.__focusNodeAdjacency), e.off("mouseout", e.__unfocusNodeAdjacency), o.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"), f = l.getLayout("cx"), + p = l.getLayout("cy"); + l.eachItemGraphicEl(function (t, e) { + var i = t.getSymbolPath(); + if (d) { + var n = l.getItemLayout(e), o = Math.atan2(n[1] - p, n[0] - f); + o < 0 && (o = 2 * Math.PI + o); + var a = n[0] < f; + a && (o -= Math.PI); + var r = a ? "left" : "right"; + i.setStyle({ + textRotation: -o, + 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 o = this._model.getData().graph, a = n.dataIndex, r = n.edgeDataIndex, s = o.getNodeByIndex(a), + l = o.getEdgeByIndex(r); + (s || l) && (o.eachNode(function (t) { + kd(t, SC, .1) + }), o.eachEdge(function (t) { + kd(t, MC, .1) + }), s && (Pd(s, SC), d(s.edges, function (t) { + t.dataIndex < 0 || (Pd(t, MC), Pd(t.node1, SC), Pd(t.node2, SC)) + })), l && (Pd(l, MC), Pd(l.node1, SC), Pd(l.node2, SC))) + }, unfocusNodeAdjacency: function (t, e, i, n) { + var o = this._model.getData().graph; + o.eachNode(function (t) { + kd(t, SC) + }), o.eachEdge(function (t) { + kd(t, MC) + }) + }, _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, o = this._controllerHost, a = this.group; + n.setPointerChecker(function (e, n, o) { + var r = a.getBoundingRect(); + return r.applyTransform(a.transform), r.contain(n, o) && !Wh(e, i, t) + }), "view" === t.coordinateSystem.type ? (n.enable(t.get("roam")), o.zoomLimit = t.get("scaleLimit"), o.zoom = t.coordinateSystem.getZoom(), n.off("pan").off("zoom").on("pan", function (e, n) { + Vh(o, e, n), i.dispatchAction({seriesId: t.id, type: "graphRoam", dx: e, dy: n}) + }).on("zoom", function (e, n, a) { + Gh(o, e, n, a), i.dispatchAction({ + seriesId: t.id, + type: "graphRoam", + zoom: e, + originX: n, + originY: a + }), this._updateNodeAndLinkScale(), bC(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, o = n && n[0] || 1; + return ((e.getZoom() - 1) * i + 1) / o + }, updateLayout: function (t) { + bC(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() + } + }), cs({type: "graphRoam", event: "graphRoam", update: "none"}, function (t, e) { + e.eachComponent({mainType: "series", query: t}, function (e) { + var i = Xh(e.coordinateSystem, t); + e.setCenter && e.setCenter(i.center), e.setZoom && e.setZoom(i.zoom) + }) + }), cs({ + type: "focusNodeAdjacency", + event: "focusNodeAdjacency", + update: "series.graph:focusNodeAdjacency" + }, function () { + }), cs({ + type: "unfocusNodeAdjacency", + event: "unfocusNodeAdjacency", + update: "series.graph:unfocusNodeAdjacency" + }, function () { + }); + var IC = Z; + hs(function (t) { + var e = t.findComponents({mainType: "legend"}); + e && e.length && t.eachSeriesByType("graph", function (t) { + var i = t.getCategoriesData(), n = t.getGraph().data, o = i.mapArray(i.getName); + n.filterSelf(function (t) { + var i = n.getItemModel(t).getShallow("category"); + if (null != i) { + "number" == typeof i && (i = o[i]); + for (var a = 0; a < e.length; a++) if (!e[a].isSelected(i)) return !1 + } + return !0 + }) + }, this) + }), ps(gD("graph", "circle", null)), ps(function (t) { + var e = {}; + t.eachSeriesByType("graph", function (t) { + var i = t.getCategoriesData(), n = t.getData(), o = {}; + i.each(function (n) { + var a = i.getName(n); + o["ec-" + a] = n; + var r = i.getItemModel(n).get("itemStyle.color") || t.getColorFromPalette(a, 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 = o["ec-" + e]), n.getItemVisual(t, "color", !0) || n.setItemVisual(t, "color", i.getItemVisual(e, "color"))) + }) + }) + }), ps(function (t) { + t.eachSeriesByType("graph", function (t) { + var e = t.getGraph(), i = t.getEdgeData(), n = Nd(t.get("edgeSymbol")), o = Nd(t.get("edgeSymbolSize")), + a = "lineStyle.color".split("."), r = "lineStyle.opacity".split("."); + i.setVisual("fromSymbol", n && n[0]), i.setVisual("toSymbol", n && n[1]), i.setVisual("fromSymbolSize", o && o[0]), i.setVisual("toSymbolSize", o && o[1]), i.setVisual("color", t.get(a)), i.setVisual("opacity", t.get(r)), i.each(function (t) { + var n = i.getItemModel(t), o = e.getEdgeByIndex(t), s = Nd(n.getShallow("symbol", !0)), + l = Nd(n.getShallow("symbolSize", !0)), u = n.get(a), h = n.get(r); + switch (u) { + case"source": + u = o.node1.getVisual("color"); + break; + case"target": + u = o.node2.getVisual("color") + } + s[0] && o.setVisual("fromSymbol", s[0]), s[1] && o.setVisual("toSymbol", s[1]), l[0] && o.setVisual("fromSymbolSize", l[0]), l[1] && o.setVisual("toSymbolSize", l[1]), o.setVisual("color", u), o.setVisual("opacity", h) + }) + }) + }), fs(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(), o = []; + d(i.dimensions, function (t) { + o = o.concat(n.mapDimension(t, !0)) + }); + for (var a = 0; a < n.count(); a++) { + for (var r = [], s = !1, l = 0; l < o.length; l++) { + var u = n.get(o[l], a); + isNaN(u) || (s = !0), r.push(u) + } + s ? n.setItemLayout(a, i.dataToPoint(r)) : n.setItemLayout(a, [NaN, NaN]) + } + Ed(n.graph) + } else e && "none" !== e || Od(t) + }) + }), fs(function (t) { + t.eachSeriesByType("graph", function (t) { + "circular" === t.get("layout") && Rd(t) + }) + }), fs(function (t) { + t.eachSeriesByType("graph", function (t) { + var e = t.coordinateSystem; + if (!e || "view" === e.type) if ("force" === t.get("layout")) { + var i = t.preservedPoints || {}, n = t.getGraph(), o = n.data, a = n.edgeData, r = t.getModel("force"), + s = r.get("initLayout"); + t.preservedPoints ? o.each(function (t) { + var e = o.getId(t); + o.setItemLayout(t, i[e] || [NaN, NaN]) + }) : s && "none" !== s ? "circular" === s && Rd(t) : Od(t); + var l = o.getDataExtent("value"), u = a.getDataExtent("value"), h = r.get("repulsion"), + c = r.get("edgeLength"); + y(h) || (h = [h, h]), y(c) || (c = [c, c]), c = [c[1], c[0]]; + var d = o.mapArray("value", function (t, e) { + var i = o.getItemLayout(e), n = To(t, l, h); + return isNaN(n) && (n = (h[0] + h[1]) / 2), { + w: n, + rep: n, + fixed: o.getItemModel(e).get("fixed"), + p: !i || isNaN(i[0]) || isNaN(i[1]) ? null : i + } + }), f = a.mapArray("value", function (t, e) { + var i = n.getEdgeByIndex(e), o = To(t, u, c); + return isNaN(o) && (o = (c[0] + c[1]) / 2), { + n1: d[i.node1.dataIndex], + n2: d[i.node2.dataIndex], + d: o, + curveness: i.getModel().get("lineStyle.curveness") || 0 + } + }), p = (e = t.coordinateSystem).getBoundingRect(), g = zd(d, f, {rect: p, gravity: r.get("gravity")}), + m = g.step; + g.step = function (t) { + for (var e = 0, a = d.length; e < a; e++) d[e].fixed && G(d[e].p, n.getNodeByIndex(e).getLayout()); + m(function (e, a, r) { + for (var s = 0, l = e.length; s < l; s++) e[s].fixed || n.getNodeByIndex(s).setLayout(e[s].p), i[o.getId(s)] = e[s].p; + for (var s = 0, l = a.length; s < l; s++) { + var u = a[s], h = n.getEdgeByIndex(s), c = u.n1.p, d = u.n2.p, f = h.getLayout(); + (f = f ? f.slice() : [])[0] = f[0] || [], f[1] = f[1] || [], G(f[0], c), G(f[1], d), +u.curveness && (f[2] = [(c[0] + d[0]) / 2 - (c[1] - d[1]) * u.curveness, (c[1] + d[1]) / 2 - (d[0] - c[0]) * u.curveness]), h.setLayout(f) + } + t && t(r) + }) + }, t.forceLayout = g, t.preservedPoints = i, g.step() + } else t.forceLayout = null + }) + }), ds("graphView", { + create: function (t, e) { + var i = []; + return t.eachSeriesByType("graph", function (t) { + var n = t.get("coordinateSystem"); + if (!n || "view" === n) { + var o = t.getData(), a = [], r = []; + rn(o.mapArray(function (t) { + var e = o.getItemModel(t); + return [+e.get("x"), +e.get("y")] + }), a, r), r[0] - a[0] == 0 && (r[0] += 1, a[0] -= 1), r[1] - a[1] == 0 && (r[1] += 1, a[1] -= 1); + var s = (r[0] - a[0]) / (r[1] - a[1]), l = Bd(t, e, s); + isNaN(s) && (a = [l.x, l.y], r = [l.x + l.width, l.y + l.height]); + var u = r[0] - a[0], h = r[1] - a[1], c = l.width, d = l.height, f = t.coordinateSystem = new wh; + f.zoomLimit = t.get("scaleLimit"), f.setBoundingRect(a[0], a[1], u, h), f.setViewRect(l.x, l.y, c, d), f.setCenter(t.get("center")), f.setZoom(t.get("zoom")), i.push(f) + } + }), i + } + }); + KM.extend({ + type: "series.gauge", + getInitialData: function (t, e) { + var i = t.data || []; + return y(i) || (i = [i]), t.data = i, jD(this, ["value"]) + }, + 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: {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 TC = In.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, o = e.r, a = e.width, r = e.angle, + s = e.x - i(r) * a * (a >= o / 3 ? 1 : 2), l = e.y - n(r) * a * (a >= o / 3 ? 1 : 2); + r = e.angle - Math.PI / 2, t.moveTo(s, l), t.lineTo(e.x + i(r) * a, e.y + n(r) * a), t.lineTo(e.x + i(e.angle) * o, e.y + n(e.angle) * o), t.lineTo(e.x - i(r) * a, e.y - n(r) * a), t.lineTo(s, l) + } + }), DC = 2 * Math.PI, AC = (gr.extend({ + type: "gauge", render: function (t, e, i) { + this.group.removeAll(); + var n = t.get("axisLine.lineStyle.color"), o = Vd(t, i); + this._renderMain(t, e, i, n, o) + }, dispose: function () { + }, _renderMain: function (t, e, i, n, o) { + for (var a = this.group, r = t.getModel("axisLine").getModel("lineStyle"), s = t.get("clockwise"), l = -t.get("startAngle") / 180 * Math.PI, u = -t.get("endAngle") / 180 * Math.PI, h = (u - l) % DC, c = l, d = r.get("width"), f = 0; f < n.length; f++) { + var p = Math.min(Math.max(n[f][0], 0), 1), g = new vS({ + shape: { + startAngle: c, + endAngle: u = l + h * p, + cx: o.cx, + cy: o.cy, + clockwise: s, + r0: o.r - d, + r: o.r + }, silent: !0 + }); + g.setStyle({fill: n[f][1]}), g.setStyle(r.getLineStyle(["color", "borderWidth", "borderColor"])), a.add(g), c = u + } + var m = 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 v = l; + l = u, u = v + } + this._renderTicks(t, e, i, m, o, l, u, s), this._renderPointer(t, e, i, m, o, l, u, s), this._renderTitle(t, e, i, m, o), this._renderDetail(t, e, i, m, o) + }, _renderTicks: function (t, e, i, n, o, a, r, s) { + for (var l = this.group, u = o.cx, h = o.cy, c = o.r, d = +t.get("min"), f = +t.get("max"), p = t.getModel("splitLine"), g = t.getModel("axisTick"), m = t.getModel("axisLabel"), v = t.get("splitNumber"), y = g.get("splitNumber"), x = Do(p.get("length"), c), _ = Do(g.get("length"), c), w = a, b = (r - a) / v, S = b / y, M = p.getModel("lineStyle").getLineStyle(), I = g.getModel("lineStyle").getLineStyle(), T = 0; T <= v; T++) { + var D = Math.cos(w), A = Math.sin(w); + if (p.get("show")) { + var C = new MS({ + shape: {x1: D * c + u, y1: A * c + h, x2: D * (c - x) + u, y2: A * (c - x) + h}, + style: M, + silent: !0 + }); + "auto" === M.stroke && C.setStyle({stroke: n(T / v)}), l.add(C) + } + if (m.get("show")) { + var L = Gd(Ao(T / v * (f - d) + d), m.get("formatter")), k = m.get("distance"), P = n(T / v); + l.add(new fS({ + style: no({}, m, { + text: L, + x: D * (c - x - k) + u, + y: A * (c - x - k) + h, + textVerticalAlign: A < -.4 ? "top" : A > .4 ? "bottom" : "middle", + textAlign: D < -.4 ? "left" : D > .4 ? "right" : "center" + }, {autoColor: P}), silent: !0 + })) + } + if (g.get("show") && T !== v) { + for (var N = 0; N <= y; N++) { + var D = Math.cos(w), A = Math.sin(w), O = new MS({ + shape: {x1: D * c + u, y1: A * c + h, x2: D * (c - _) + u, y2: A * (c - _) + h}, + silent: !0, + style: I + }); + "auto" === I.stroke && O.setStyle({stroke: n((T + N / y) / v)}), l.add(O), w += S + } + w -= S + } else w += b + } + }, _renderPointer: function (t, e, i, n, o, a, r, s) { + var l = this.group, u = this._data; + if (t.get("pointer.show")) { + var h = [+t.get("min"), +t.get("max")], c = [a, r], d = t.getData(), f = d.mapDimension("value"); + d.diff(u).add(function (e) { + var i = new TC({shape: {angle: a}}); + po(i, {shape: {angle: To(d.get(f, e), h, c, !0)}}, t), l.add(i), d.setItemGraphicEl(e, i) + }).update(function (e, i) { + var n = u.getItemGraphicEl(i); + fo(n, {shape: {angle: To(d.get(f, e), h, c, !0)}}, t), l.add(n), d.setItemGraphicEl(e, n) + }).remove(function (t) { + var e = u.getItemGraphicEl(t); + l.remove(e) + }).execute(), d.eachItemGraphicEl(function (t, e) { + var i = d.getItemModel(e), a = i.getModel("pointer"); + t.setShape({ + x: o.cx, + y: o.cy, + width: Do(a.get("width"), o.r), + r: Do(a.get("length"), o.r) + }), t.useStyle(i.getModel("itemStyle").getItemStyle()), "auto" === t.style.fill && t.setStyle("fill", n(To(d.get(f, e), h, [0, 1], !0))), eo(t, i.getModel("emphasis.itemStyle").getItemStyle()) + }), this._data = d + } else u && u.eachItemGraphicEl(function (t) { + l.remove(t) + }) + }, _renderTitle: function (t, e, i, n, o) { + var a = t.getData(), r = a.mapDimension("value"), s = t.getModel("title"); + if (s.get("show")) { + var l = s.get("offsetCenter"), u = o.cx + Do(l[0], o.r), h = o.cy + Do(l[1], o.r), c = +t.get("min"), + d = +t.get("max"), f = n(To(t.getData().get(r, 0), [c, d], [0, 1], !0)); + this.group.add(new fS({ + silent: !0, + style: no({}, s, { + x: u, + y: h, + text: a.getName(0), + textAlign: "center", + textVerticalAlign: "middle" + }, {autoColor: f, forceRich: !0}) + })) + } + }, _renderDetail: function (t, e, i, n, o) { + var a = t.getModel("detail"), r = +t.get("min"), s = +t.get("max"); + if (a.get("show")) { + var l = a.get("offsetCenter"), u = o.cx + Do(l[0], o.r), h = o.cy + Do(l[1], o.r), + c = Do(a.get("width"), o.r), d = Do(a.get("height"), o.r), f = t.getData(), + p = f.get(f.mapDimension("value"), 0), g = n(To(p, [r, s], [0, 1], !0)); + this.group.add(new fS({ + silent: !0, + style: no({}, a, { + x: u, + y: h, + text: Gd(p, a.get("formatter")), + textWidth: isNaN(c) ? null : c, + textHeight: isNaN(d) ? null : d, + textAlign: "center", + textVerticalAlign: "middle" + }, {autoColor: g, forceRich: !0}) + })) + } + } + }), xs({ + type: "series.funnel", + init: function (t) { + AC.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + }, this._defaultLabelLine(t) + }, + getInitialData: function (t, e) { + return jD(this, ["value"]) + }, + _defaultLabelLine: function (t) { + Mi(t, "labelLine", ["show"]); + var e = t.labelLine, i = t.emphasis.labelLine; + e.show = e.show && t.label.show, i.show = i.show && t.emphasis.label.show + }, + getDataParams: function (t) { + var e = this.getData(), i = AC.superCall(this, "getDataParams", t), n = e.mapDimension("value"), + o = e.getSum(n); + return i.percent = o ? +(e.get(n, t) / o * 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: {show: !0, position: "outer"}, + labelLine: {show: !0, length: 20, lineStyle: {width: 1, type: "solid"}}, + itemStyle: {borderColor: "#fff", borderWidth: 1}, + emphasis: {label: {show: !0}} + } + })), CC = Wd.prototype, LC = ["itemStyle", "opacity"]; + CC.updateData = function (t, e, i) { + var n = this.childAt(0), o = t.hostModel, a = t.getItemModel(e), s = t.getItemLayout(e), + l = t.getItemModel(e).get(LC); + l = null == l ? 1 : l, n.useStyle({}), i ? (n.setShape({points: s.points}), n.setStyle({opacity: 0}), po(n, {style: {opacity: l}}, o, e)) : fo(n, { + style: {opacity: l}, + shape: {points: s.points} + }, o, e); + var u = a.getModel("itemStyle"), h = t.getItemVisual(e, "color"); + n.setStyle(r({ + lineJoin: "round", + fill: h + }, u.getItemStyle(["opacity"]))), n.hoverStyle = u.getModel("emphasis").getItemStyle(), this._updateLabel(t, e), eo(this) + }, CC._updateLabel = function (t, e) { + var i = this.childAt(1), n = this.childAt(2), o = t.hostModel, a = t.getItemModel(e), + r = t.getItemLayout(e).label, s = t.getItemVisual(e, "color"); + fo(i, {shape: {points: r.linePoints || r.linePoints}}, o, e), fo(n, { + style: { + x: r.x, + y: r.y + } + }, o, e), n.attr({rotation: r.rotation, origin: [r.x, r.y], z2: 10}); + var l = a.getModel("label"), u = a.getModel("emphasis.label"), h = a.getModel("labelLine"), + c = a.getModel("emphasis.labelLine"), s = t.getItemVisual(e, "color"); + io(n.style, n.hoverStyle = {}, l, u, { + 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 = !u.get("show"), i.ignore = i.normalIgnore = !h.get("show"), i.hoverIgnore = !c.get("show"), i.setStyle({stroke: s}), i.setStyle(h.getModel("lineStyle").getLineStyle()), i.hoverStyle = c.getModel("lineStyle").getLineStyle() + }, u(Wd, sw); + gr.extend({ + type: "funnel", render: function (t, e, i) { + var n = t.getData(), o = this._data, a = this.group; + n.diff(o).add(function (t) { + var e = new Wd(n, t); + n.setItemGraphicEl(t, e), a.add(e) + }).update(function (t, e) { + var i = o.getItemGraphicEl(e); + i.updateData(n, t), a.add(i), n.setItemGraphicEl(t, i) + }).remove(function (t) { + var e = o.getItemGraphicEl(t); + a.remove(e) + }).execute(), this._data = n + }, remove: function () { + this.group.removeAll(), this._data = null + }, dispose: function () { + } + }); + ps(JD("funnel")), fs(function (t, e, i) { + t.eachSeriesByType("funnel", function (t) { + var i = t.getData(), n = i.mapDimension("value"), o = t.get("sort"), a = Fd(t, e), r = Hd(i, o), + s = [Do(t.get("minSize"), a.width), Do(t.get("maxSize"), a.width)], l = i.getDataExtent(n), + u = t.get("min"), h = t.get("max"); + null == u && (u = Math.min(l[0], 0)), null == h && (h = l[1]); + var c = t.get("funnelAlign"), d = t.get("gap"), f = (a.height - d * (i.count() - 1)) / i.count(), p = a.y, + g = function (t, e) { + var o, r = To(i.get(n, t) || 0, [u, h], s, !0); + switch (c) { + case"left": + o = a.x; + break; + case"center": + o = a.x + (a.width - r) / 2; + break; + case"right": + o = a.x + a.width - r + } + return [[o, e], [o + r, e]] + }; + "ascending" === o && (f = -f, d = -d, p += a.height, r = r.reverse()); + for (var m = 0; m < r.length; m++) { + var v = r[m], y = r[m + 1], x = i.getItemModel(v).get("itemStyle.height"); + null == x ? x = f : (x = Do(x, a.height), "ascending" === o && (x = -x)); + var _ = g(v, p), w = g(y, p + x); + p += x + d, i.setItemLayout(v, {points: _.concat(w.slice().reverse())}) + } + Zd(i) + }) + }), hs(iA("funnel")); + var kC = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.axisIndex = o + }; + kC.prototype = { + constructor: kC, model: null, isHorizontal: function () { + return "horizontal" !== this.coordinateSystem.getModel().get("layout") + } + }, u(kC, qT); + var PC = function (t, e, i, n, o, a) { + e[0] = Yd(e[0], i), e[1] = Yd(e[1], i), t = t || 0; + var r = i[1] - i[0]; + null != o && (o = Yd(o, [0, r])), null != a && (a = Math.max(a, null != o ? o : 0)), "all" === n && (o = a = Math.abs(e[1] - e[0]), n = 0); + var s = jd(e, n); + e[n] += t; + var l = o || 0, u = i.slice(); + s.sign < 0 ? u[0] += l : u[1] -= l, e[n] = Yd(e[n], u); + h = jd(e, n); + null != o && (h.sign !== s.sign || h.span < o) && (e[1 - n] = e[n] + s.sign * o); + var h = jd(e, n); + return null != a && h.span > a && (e[1 - n] = e[n] + h.sign * a), e + }, NC = d, OC = Math.min, EC = Math.max, RC = Math.floor, zC = Math.ceil, BC = Ao, VC = Math.PI; + qd.prototype = { + type: "parallel", constructor: qd, _init: function (t, e, i) { + var n = t.dimensions, o = t.parallelAxisIndex; + NC(n, function (t, i) { + var n = o[i], a = e.getComponent("parallelAxis", n), + r = this._axesMap.set(t, new kC(t, xl(a), [0, 0], a.get("type"), n)), s = "category" === r.type; + r.onBand = s && a.get("boundaryGap"), r.inverse = a.get("inverse"), a.axis = r, r.model = a, r.coordinateSystem = a.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, o = e.pixelDimIndex, a = t[1 - o], + r = t[o]; + return a >= i && a <= 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(); + NC(this.dimensions, function (t) { + var e = this._axesMap.get(t); + e.scale.unionExtentFromData(n, n.mapDimension(t)), yl(e.scale, e.model) + }, this) + } + }, this) + }, resize: function (t, e) { + this._rect = Qo(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"], o = ["width", "height"], a = e.get("layout"), + r = "horizontal" === a ? 0 : 1, s = i[o[r]], l = [0, s], u = this.dimensions.length, + h = Kd(e.get("axisExpandWidth"), l), c = Kd(e.get("axisExpandCount") || 0, [0, u]), + d = e.get("axisExpandable") && u > 3 && u > c && c > 1 && h > 0 && s > 0, f = e.get("axisExpandWindow"); + f ? (t = Kd(f[1] - f[0], l), f[1] = f[0] + t) : (t = Kd(h * (c - 1), l), (f = [h * (e.get("axisExpandCenter") || RC(u / 2)) - t / 2])[1] = f[0] + t); + var p = (s - t) / (u - c); + p < 3 && (p = 0); + var g = [RC(BC(f[0] / h, 1)) + 1, zC(BC(f[1] / h, 1)) - 1], m = p / h * f[0]; + return { + layout: a, + pixelDimIndex: r, + layoutBase: i[n[r]], + layoutLength: s, + axisBase: i[n[1 - r]], + axisLength: i[o[1 - r]], + axisExpandable: d, + axisExpandWidth: h, + axisCollapseWidth: p, + axisExpandWindow: f, + axisCount: u, + winInnerIndices: g, + axisExpandWindow0Pos: m + } + }, _layoutAxes: function () { + var t = this._rect, e = this._axesMap, i = this.dimensions, n = this._makeLayoutInfo(), o = n.layout; + e.each(function (t) { + var e = [0, n.axisLength], i = t.inverse ? 1 : 0; + t.setExtent(e[i], e[1 - i]) + }), NC(i, function (e, i) { + var a = (n.axisExpandable ? Jd : $d)(i, n), + r = {horizontal: {x: a.position, y: n.axisLength}, vertical: {x: 0, y: a.position}}, + s = {horizontal: VC / 2, vertical: 0}, l = [r[o].x + t.x, r[o].y + t.y], u = s[o], h = st(); + dt(h, h, u), ct(h, h, l), this._axesLayout[e] = { + position: l, + rotation: u, + transform: h, + axisNameAvailableWidth: a.axisNameAvailableWidth, + axisLabelShow: a.axisLabelShow, + nameTruncateMaxWidth: a.nameTruncateMaxWidth, + tickDirection: 1, + labelDirection: 1 + } + }, 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, n) { + null == i && (i = 0), null == n && (n = t.count()); + var o = this._axesMap, a = this.dimensions, r = [], s = []; + d(a, function (e) { + r.push(t.mapDimension(e)), s.push(o.get(e).model) + }); + for (var l = this.hasAxisBrushed(), u = i; u < n; u++) { + var h; + if (l) { + h = "active"; + for (var c = t.getValues(r, u), f = 0, p = a.length; f < p; f++) if ("inactive" === s[f].getActiveState(c[f])) { + h = "inactive"; + break + } + } else h = "normal"; + e(h, u) + } + }, hasAxisBrushed: function () { + for (var t = this.dimensions, e = this._axesMap, i = !1, n = 0, o = t.length; n < o; n++) "normal" !== e.get(t[n]).model.getActiveState() && (i = !0); + return i + }, axisCoordToPoint: function (t, e) { + return mo([t, 0], this._axesLayout[e].transform) + }, getAxisLayout: function (t) { + return i(this._axesLayout[t]) + }, getSlidedAxisExpandWindow: function (t) { + var e = this._makeLayoutInfo(), i = e.pixelDimIndex, n = e.axisExpandWindow.slice(), o = n[1] - n[0], + a = [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", u = e.axisCollapseWidth, + h = this._model.get("axisExpandSlideTriggerArea"), c = null != h[0]; + if (u) c && u && s < o * h[0] ? (l = "jump", r = s - o * h[2]) : c && u && s > o * (1 - h[0]) ? (l = "jump", r = s - o * (1 - h[2])) : (r = s - o * h[1]) >= 0 && (r = s - o * (1 - h[1])) <= 0 && (r = 0), (r *= e.axisExpandWidth / u) ? PC(r, n, a, "all") : l = "none"; else { + o = n[1] - n[0]; + (n = [EC(0, a[1] * s / o - o / 2)])[1] = OC(a[1], n[0] + o), n[0] = n[1] - o + } + return {axisExpandWindow: n, behavior: l} + } + }, Ca.register("parallel", { + create: function (t, e) { + var i = []; + return t.eachComponent("parallel", function (n, o) { + var a = new qd(n, t, e); + a.name = "parallel_" + o, a.resize(n, e), n.coordinateSystem = a, a.model = n, i.push(a) + }), 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 GC = hM.extend({ + type: "baseParallelAxis", axis: null, activeIntervals: [], getAreaSelectStyle: function () { + return sb([["fill", "color"], ["lineWidth", "borderWidth"], ["stroke", "borderColor"], ["width", "width"], ["opacity", "opacity"]])(this.getModel("areaSelectStyle")) + }, setActiveIntervals: function (t) { + var e = this.activeIntervals = i(t); + if (e) for (var n = e.length - 1; n >= 0; n--) Co(e[n]) + }, getActiveState: function (t) { + var e = this.activeIntervals; + if (!e.length) return "normal"; + if (null == t || isNaN(t)) return "inactive"; + if (1 === e.length) { + var i = e[0]; + if (i[0] <= t && t <= i[1]) return "active" + } else for (var n = 0, o = e.length; n < o; n++) if (e[n][0] <= t && t <= e[n][1]) return "active"; + return "inactive" + } + }), WC = { + 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 + }; + n(GC.prototype, ET), MD("parallel", GC, function (t, e) { + return e.type || (e.data ? "category" : "value") + }, WC), hM.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 () { + hM.prototype.init.apply(this, arguments), this.mergeOption({}) + }, + mergeOption: function (t) { + var e = this.option; + t && n(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) { + d(["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 = []; + d(g(this.dependentModels.parallelAxis, function (t) { + return (t.get("parallelIndex") || 0) === this.componentIndex + }, this), function (i) { + t.push("dim" + i.get("dim")), e.push(i.componentIndex) + }) + } + }), cs({type: "axisAreaSelect", event: "axisAreaSelected"}, function (t, e) { + e.eachComponent({mainType: "parallelAxis", query: t}, function (e) { + e.axis.model.setActiveIntervals(t.intervals) + }) + }), cs("parallelAxisExpand", function (t, e) { + e.eachComponent({mainType: "parallel", query: t}, function (e) { + e.setAxisExpand(t) + }) + }); + var FC = v, HC = d, ZC = f, UC = Math.min, XC = Math.max, jC = Math.pow, YC = 1e4, qC = 6, KC = 6, $C = "globalPan", + JC = {w: [0, 0], e: [0, 1], n: [1, 0], s: [1, 1]}, + QC = {w: "ew", e: "ew", n: "ns", s: "ns", ne: "nesw", sw: "nesw", nw: "nwse", se: "nwse"}, tL = { + brushStyle: {lineWidth: 2, stroke: "rgba(0,0,0,0.3)", fill: "rgba(0,0,0,0.1)"}, + transformable: !0, + brushMode: "single", + removeOnClick: !1 + }, eL = 0; + Qd.prototype = { + constructor: Qd, enableBrush: function (t) { + return this._brushType && ef(this), t.brushType && tf(this, t), this + }, setPanels: function (t) { + if (t && t.length) { + var e = this._panels = {}; + d(t, function (t) { + e[t.panelId] = i(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) { + HC(this._covers, t, e) + }, updateCovers: function (t) { + function e(t, e) { + return (null != t.id ? t.id : a + e) + "-" + t.brushType + } + + function o(e, i) { + var n = t[e]; + if (null != i && r[i] === u) s[e] = r[i]; else { + var o = s[e] = null != i ? (r[i].__brushOption = n, r[i]) : of(l, nf(l, n)); + sf(l, o) + } + } + + t = f(t, function (t) { + return n(i(tL), t, !0) + }); + var a = "\0-brush-index-", r = this._covers, s = this._covers = [], l = this, u = this._creatingCover; + return new Ss(r, t, function (t, i) { + return e(t.__brushOption, i) + }, e).add(o).update(o).remove(function (t) { + r[t] !== u && l.group.remove(r[t]) + }).execute(), this + }, unmount: function () { + return this.enableBrush(!1), cf(this), this._zr.remove(this.group), this + }, dispose: function () { + this.unmount(), this.off() + } + }, h(Qd, D_); + var iL = { + mousedown: function (t) { + if (this._dragging) Nf.call(this, t); else if (!t.target || !t.target.draggable) { + Cf(t); + var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY); + this._creatingCover = null, (this._creatingPanel = uf(this, t, e)) && (this._dragging = !0, this._track = [e.slice()]) + } + }, mousemove: function (t) { + var e = this.group.transformCoordToLocal(t.offsetX, t.offsetY); + if (Af(this, t, e), this._dragging) { + Cf(t); + var i = kf(this, t, e, !1); + i && df(this, i) + } + }, mouseup: Nf + }, nL = { + lineX: Of(0), lineY: Of(1), rect: { + createCover: function (t, e) { + return gf(FC(Sf, function (t) { + return t + }, function (t) { + return t + }), t, e, ["w", "e", "n", "s", "se", "sw", "ne", "nw"]) + }, getCreatingRange: function (t) { + var e = pf(t); + return _f(e[1][0], e[1][1], e[0][0], e[0][1]) + }, updateCoverShape: function (t, e, i, n) { + mf(t, e, i, n) + }, updateCommon: vf, contain: Lf + }, polygon: { + createCover: function (t, e) { + var i = new sw; + return i.add(new bS({name: "main", style: xf(e), silent: !0})), i + }, getCreatingRange: function (t) { + return t + }, endCreating: function (t, e) { + e.remove(e.childAt(0)), e.add(new wS({ + name: "main", + draggable: !0, + drift: FC(Mf, t, e), + ondragend: FC(df, t, {isEnd: !0}) + })) + }, updateCoverShape: function (t, e, i, n) { + e.childAt(0).setShape({points: Tf(t, e, i)}) + }, updateCommon: vf, contain: Lf + } + }, oL = ["axisLine", "axisTickLabel", "axisName"], aL = ys({ + type: "parallelAxis", init: function (t, e) { + aL.superApply(this, "init", arguments), (this._brushController = new Qd(e.getZr())).on("brush", m(this._onBrush, this)) + }, render: function (t, e, i, n) { + if (!Vf(t, e, n)) { + this.axisModel = t, this.api = i, this.group.removeAll(); + var o = this._axisGroup; + if (this._axisGroup = new sw, this.group.add(this._axisGroup), t.get("show")) { + var r = Wf(t, e), s = r.coordinateSystem, l = t.getAreaSelectStyle(), u = l.width, h = t.axis.dim, + c = a({strokeContainThreshold: u}, s.getAxisLayout(h)), f = new LD(t, c); + d(oL, f.add, f), this._axisGroup.add(f.getGroup()), this._refreshBrushController(c, l, t, r, u, i); + var p = n && !1 === n.animation ? null : t; + yo(o, this._axisGroup, p) + } + } + }, _refreshBrushController: function (t, e, i, n, o, a) { + var r = i.axis.getExtent(), s = r[1] - r[0], l = Math.min(30, .1 * Math.abs(s)), + u = $t.create({x: r[0], y: -o / 2, width: s, height: o}); + u.x -= l, u.width += 2 * l, this._brushController.mount({ + enableGlobalPan: !0, + rotation: t.rotation, + position: t.position + }).setPanels([{ + panelId: "pl", + clipPath: Ef(u), + isTargetByCursor: zf(u, a, n), + getLinearBrushOtherExtent: Rf(u, 0) + }]).enableBrush({brushType: "lineX", brushStyle: e, removeOnClick: !0}).updateCovers(Gf(i)) + }, _onBrush: function (t, e) { + var i = this.axisModel, n = i.axis, o = f(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: o + }) + }, dispose: function () { + this._brushController.dispose() + } + }); + ys({ + type: "parallel", render: function (t, e, i) { + this._model = t, this._api = i, this._handlers || (this._handlers = {}, d(rL, function (t, e) { + i.getZr().on(e, this._handlers[e] = m(t, this)) + }, this)), wr(this, "_throttledDispatchExpand", t.get("axisExpandRate"), "fixRate") + }, dispose: function (t, e) { + d(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(a({type: "parallelAxisExpand"}, t)) + } + }); + var rL = { + mousedown: function (t) { + Ff(this, "click") && (this._mouseDownPoint = [t.offsetX, t.offsetY]) + }, mouseup: function (t) { + var e = this._mouseDownPoint; + if (Ff(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 && Ff(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 + }) + } + } + }; + us(function (t) { + Ud(t), Xd(t) + }), KM.extend({ + type: "series.parallel", + dependencies: ["parallel"], + visualColorAccessPath: "lineStyle.color", + getInitialData: function (t, e) { + var i = this.getSource(); + return Hf(i, this), Xs(i, this) + }, + getRawIndicesByActiveState: function (t) { + var e = this.coordinateSystem, i = this.getData(), n = []; + return e.eachActiveState(i, function (e, o) { + t === e && n.push(i.getRawIndex(o)) + }), n + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "parallel", + parallelIndex: 0, + label: {show: !1}, + inactiveOpacity: .05, + activeOpacity: 1, + lineStyle: {width: 1, opacity: .45, type: "solid"}, + emphasis: {label: {show: !1}}, + progressive: 500, + smooth: !1, + animationEasing: "linear" + } + }); + var sL = .3, lL = (gr.extend({ + type: "parallel", init: function () { + this._dataGroup = new sw, this.group.add(this._dataGroup), this._data, this._initialized + }, render: function (t, e, i, n) { + var o = this._dataGroup, a = t.getData(), r = this._data, s = t.coordinateSystem, l = s.dimensions, + u = Yf(t); + if (a.diff(r).add(function (t) { + qf(jf(a, o, t, l, s), a, t, u) + }).update(function (e, i) { + var o = r.getItemGraphicEl(i), h = Xf(a, e, l, s); + a.setItemGraphicEl(e, o), fo(o, {shape: {points: h}}, n && !1 === n.animation ? null : t, e), qf(o, a, e, u) + }).remove(function (t) { + var e = r.getItemGraphicEl(t); + o.remove(e) + }).execute(), !this._initialized) { + this._initialized = !0; + var h = Uf(s, t, function () { + setTimeout(function () { + o.removeClipPath() + }) + }); + o.setClipPath(h) + } + this._data = a + }, incrementalPrepareRender: function (t, e, i) { + this._initialized = !0, this._data = null, this._dataGroup.removeAll() + }, incrementalRender: function (t, e, i) { + for (var n = e.getData(), o = e.coordinateSystem, a = o.dimensions, r = Yf(e), s = t.start; s < t.end; s++) { + var l = jf(n, this._dataGroup, s, a, o); + l.incremental = !0, qf(l, n, s, r) + } + }, dispose: function () { + }, remove: function () { + this._dataGroup && this._dataGroup.removeAll(), this._data = null + } + }), ["lineStyle", "normal", "opacity"]); + ps({ + seriesType: "parallel", reset: function (t, e, i) { + var n = t.getModel("itemStyle"), o = t.getModel("lineStyle"), a = e.get("color"), + r = o.get("color") || n.get("color") || a[t.seriesIndex % a.length], s = t.get("inactiveOpacity"), + l = t.get("activeOpacity"), u = t.getModel("lineStyle").getLineStyle(), h = t.coordinateSystem, + c = t.getData(), d = {normal: u.opacity, active: l, inactive: s}; + return c.setVisual("color", r), { + progress: function (t, e) { + h.eachActiveState(e, function (t, i) { + var n = d[t]; + if ("normal" === t && e.hasItemOption) { + var o = e.getItemModel(i).get(lL, !0); + null != o && (n = o) + } + e.setItemVisual(i, "opacity", n) + }, t.start, t.end) + } + } + } + }); + var uL = KM.extend({ + type: "series.sankey", + layoutInfo: null, + getInitialData: function (t) { + var e = t.edges || t.links, i = t.data || t.nodes; + if (i && e) return lC(i, e, this, !0).data + }, + setNodePosition: function (t, e) { + var i = this.option.data[t]; + i.localX = e[0], i.localY = e[1] + }, + 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), o = n.data, a = o.source + " -- " + o.target; + return n.value && (a += " : " + n.value), Zo(a) + } + return uL.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, + draggable: !0, + layoutIterations: 32, + label: {show: !0, position: "right", color: "#000", fontSize: 12}, + itemStyle: {borderWidth: 1, borderColor: "#333"}, + lineStyle: {color: "#314656", opacity: .2, curveness: .5}, + emphasis: {label: {show: !0}, lineStyle: {opacity: .6}}, + animationEasing: "linear", + animationDuration: 1e3 + } + }), hL = En({ + 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() + } + }); + _s({ + type: "sankey", _model: null, render: function (t, e, i) { + var n = t.getGraph(), o = this.group, a = t.layoutInfo, r = a.width, s = a.height, l = t.getData(), + u = t.getData("edge"); + this._model = t, o.removeAll(), o.attr("position", [a.x, a.y]), n.eachEdge(function (e) { + var i = new hL; + i.dataIndex = e.dataIndex, i.seriesIndex = t.seriesIndex, i.dataType = "edge"; + var n = e.getModel("lineStyle"), a = n.get("curveness"), l = e.node1.getLayout(), + h = e.node1.getModel(), c = h.get("localX"), d = h.get("localY"), f = e.node2.getLayout(), + p = e.node2.getModel(), g = p.get("localX"), m = p.get("localY"), v = e.getLayout(); + i.shape.extent = Math.max(1, v.dy); + var y = (null != c ? c * r : l.x) + l.dx, x = (null != d ? d * s : l.y) + v.sy + v.dy / 2, + _ = null != g ? g * r : f.x, w = (null != m ? m * s : f.y) + v.ty + v.dy / 2, + b = y * (1 - a) + _ * a, S = x, M = y * a + _ * (1 - a), I = w; + switch (i.setShape({ + x1: y, + y1: x, + x2: _, + y2: w, + cpx1: b, + cpy1: S, + cpx2: M, + cpy2: I + }), 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") + } + eo(i, e.getModel("emphasis.lineStyle").getItemStyle()), o.add(i), u.setItemGraphicEl(e.dataIndex, i) + }), n.eachNode(function (e) { + var i = e.getLayout(), n = e.getModel(), a = n.get("localX"), u = n.get("localY"), + h = n.getModel("label"), c = n.getModel("emphasis.label"), d = new SS({ + shape: { + x: null != a ? a * r : i.x, + y: null != u ? u * s : i.y, + width: i.dx, + height: i.dy + }, style: n.getModel("itemStyle").getItemStyle() + }), f = e.getModel("emphasis.itemStyle").getItemStyle(); + io(d.style, f, h, c, { + labelFetcher: t, + labelDataIndex: e.dataIndex, + defaultText: e.id, + isRectText: !0 + }), d.setStyle("fill", e.getVisual("color")), eo(d, f), o.add(d), l.setItemGraphicEl(e.dataIndex, d), d.dataType = "node" + }), t.get("draggable") && l.eachItemGraphicEl(function (e, n) { + e.drift = function (e, o) { + this.shape.x += e, this.shape.y += o, this.dirty(), i.dispatchAction({ + type: "dragNode", + seriesId: t.id, + dataIndex: l.getRawIndex(n), + localX: this.shape.x / r, + localY: this.shape.y / s + }) + }, e.draggable = !0, e.cursor = "move" + }), !this._data && t.get("animation") && o.setClipPath($f(o.getBoundingRect(), t, function () { + o.removeClipPath() + })), this._data = t.getData() + }, dispose: function () { + } + }), cs({type: "dragNode", event: "dragNode", update: "update"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sankey", query: t}, function (e) { + e.setNodePosition(t.dataIndex, [t.localX, t.localY]) + }) + }); + fs(function (t, e, i) { + t.eachSeriesByType("sankey", function (t) { + var i = t.get("nodeWidth"), n = t.get("nodeGap"), o = Qf(t, e); + t.layoutInfo = o; + var a = o.width, r = o.height, s = t.getGraph(), l = s.nodes, u = s.edges; + ep(l), tp(l, u, i, n, a, r, 0 !== g(l, function (t) { + return 0 === t.getLayout().value + }).length ? 0 : t.get("layoutIterations")) + }) + }), ps(function (t, e) { + t.eachSeriesByType("sankey", function (t) { + var e = t.getGraph().nodes; + if (e.length) { + var i = 1 / 0, n = -1 / 0; + d(e, function (t) { + var e = t.getLayout().value; + e < i && (i = e), e > n && (n = e) + }), d(e, function (e) { + var o = new ZA({ + type: "color", + mappingMethod: "linear", + dataExtent: [i, n], + visual: t.get("color") + }).mapValueToVisual(e.getLayout().value); + e.setVisual("color", o); + var a = e.getModel().get("itemStyle.color"); + null != a && e.setVisual("color", a) + }) + } + }) + }); + var cL = { + _baseAxisDim: null, getInitialData: function (t, e) { + var i, n, o = e.getComponent("xAxis", this.get("xAxisIndex")), + a = e.getComponent("yAxis", this.get("yAxisIndex")), r = o.get("type"), s = a.get("type"); + "category" === r ? (t.layout = "horizontal", i = o.getOrdinalMeta(), n = !0) : "category" === s ? (t.layout = "vertical", i = a.getOrdinalMeta(), n = !0) : t.layout = t.layout || "horizontal"; + var l = ["x", "y"], u = "horizontal" === t.layout ? 0 : 1, h = this._baseAxisDim = l[u], c = l[1 - u], + f = [o, a], p = f[u].get("type"), g = f[1 - u].get("type"), m = t.data; + if (m && n) { + var v = []; + d(m, function (t, e) { + var i; + t.value && y(t.value) ? (i = t.value.slice(), t.value.unshift(e)) : y(t) ? (i = t.slice(), t.unshift(e)) : i = t, v.push(i) + }), t.data = v + } + var x = this.defaultValueDimensions; + return jD(this, { + coordDimensions: [{ + name: h, + type: Ts(p), + ordinalMeta: i, + otherDims: {tooltip: !1, itemName: 0}, + dimsDef: ["base"] + }, {name: c, type: Ts(g), dimsDef: x.slice()}], dimensionsCount: x.length + 1 + }) + }, getBaseAxis: function () { + var t = this._baseAxisDim; + return this.ecModel.getComponent(t + "Axis", this.get(t + "AxisIndex")).axis + } + }; + h(KM.extend({ + type: "series.boxplot", + dependencies: ["xAxis", "yAxis", "grid"], + defaultValueDimensions: [{name: "min", defaultTooltip: !0}, {name: "Q1", defaultTooltip: !0}, { + name: "median", + defaultTooltip: !0 + }, {name: "Q3", defaultTooltip: !0}, {name: "max", defaultTooltip: !0}], + dimensions: null, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + boxWidth: [7, 50], + itemStyle: {color: "#fff", borderWidth: 1}, + emphasis: { + itemStyle: { + borderWidth: 2, + shadowBlur: 5, + shadowOffsetX: 2, + shadowOffsetY: 2, + shadowColor: "rgba(0,0,0,0.4)" + } + }, + animationEasing: "elasticOut", + animationDuration: 800 + } + }), cL, !0); + var dL = ["itemStyle"], fL = ["emphasis", "itemStyle"], pL = (gr.extend({ + type: "boxplot", render: function (t, e, i) { + var n = t.getData(), o = this.group, a = this._data; + this._data || o.removeAll(); + var r = "horizontal" === t.get("layout") ? 1 : 0; + n.diff(a).add(function (t) { + if (n.hasValue(t)) { + var e = _p(n.getItemLayout(t), n, t, r, !0); + n.setItemGraphicEl(t, e), o.add(e) + } + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + if (n.hasValue(t)) { + var s = n.getItemLayout(t); + i ? wp(s, i, n, t) : i = _p(s, n, t, r), o.add(i), n.setItemGraphicEl(t, i) + } else o.remove(i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + e && o.remove(e) + }).execute(), this._data = n + }, remove: function (t) { + var e = this.group, i = this._data; + this._data = null, i && i.eachItemGraphicEl(function (t) { + t && e.remove(t) + }) + }, dispose: B + }), In.extend({ + type: "boxplotBoxPath", shape: {}, buildPath: function (t, e) { + var i = e.points, n = 0; + for (t.moveTo(i[n][0], i[n][1]), n++; n < 4; n++) t.lineTo(i[n][0], i[n][1]); + for (t.closePath(); n < i.length; n++) t.moveTo(i[n][0], i[n][1]), n++, t.lineTo(i[n][0], i[n][1]) + } + })), gL = ["itemStyle", "borderColor"], mL = d; + ps(function (t, e) { + var i = t.get("color"); + t.eachRawSeriesByType("boxplot", function (e) { + var n = i[e.seriesIndex % i.length], o = e.getData(); + o.setVisual({ + legendSymbol: "roundRect", + color: e.get(gL) || n + }), t.isSeriesFiltered(e) || o.each(function (t) { + var e = o.getItemModel(t); + o.setItemVisual(t, {color: e.get(gL, !0)}) + }) + }) + }), fs(function (t) { + var e = Sp(t); + mL(e, function (t) { + var e = t.seriesModels; + e.length && (Mp(t), mL(e, function (e, i) { + Ip(e, t.boxOffsetList[i], t.boxWidthList[i]) + })) + }) + }), h(KM.extend({ + type: "series.candlestick", + dependencies: ["xAxis", "yAxis", "grid"], + defaultValueDimensions: [{name: "open", defaultTooltip: !0}, { + name: "close", + defaultTooltip: !0 + }, {name: "lowest", defaultTooltip: !0}, {name: "highest", defaultTooltip: !0}], + dimensions: null, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "cartesian2d", + legendHoverLink: !0, + hoverAnimation: !0, + layout: null, + itemStyle: { + color: "#c23531", + color0: "#314656", + borderWidth: 1, + borderColor: "#c23531", + borderColor0: "#314656" + }, + emphasis: {itemStyle: {borderWidth: 2}}, + barMaxWidth: null, + barMinWidth: null, + barWidth: null, + large: !0, + largeThreshold: 600, + progressive: 3e3, + progressiveThreshold: 1e4, + progressiveChunkMode: "mod", + animationUpdate: !1, + animationEasing: "linear", + animationDuration: 300 + }, + getShadowDim: function () { + return "open" + }, + brushSelector: function (t, e, i) { + var n = e.getItemLayout(t); + return n && i.rect(n.brushRect) + } + }), cL, !0); + var vL = ["itemStyle"], yL = ["emphasis", "itemStyle"], xL = ["color", "color0", "borderColor", "borderColor0"], + _L = (gr.extend({ + type: "candlestick", render: function (t, e, i) { + this._updateDrawMode(t), this._isLargeDraw ? this._renderLarge(t) : this._renderNormal(t) + }, incrementalPrepareRender: function (t, e, i) { + this._clear(), this._updateDrawMode(t) + }, incrementalRender: function (t, e, i, n) { + this._isLargeDraw ? this._incrementalRenderLarge(t, e) : this._incrementalRenderNormal(t, e) + }, _updateDrawMode: function (t) { + var e = t.pipelineContext.large; + (null == this._isLargeDraw || e ^ this._isLargeDraw) && (this._isLargeDraw = e, this._clear()) + }, _renderNormal: function (t) { + var e = t.getData(), i = this._data, n = this.group, o = e.getLayout("isSimpleBox"); + this._data || n.removeAll(), e.diff(i).add(function (i) { + if (e.hasValue(i)) { + var a, r = e.getItemLayout(i); + po(a = Tp(r, 0, !0), {shape: {points: r.ends}}, t, i), Dp(a, e, i, o), n.add(a), e.setItemGraphicEl(i, a) + } + }).update(function (a, r) { + var s = i.getItemGraphicEl(r); + if (e.hasValue(a)) { + var l = e.getItemLayout(a); + s ? fo(s, {shape: {points: l.ends}}, t, a) : s = Tp(l), Dp(s, e, a, o), n.add(s), e.setItemGraphicEl(a, s) + } else n.remove(s) + }).remove(function (t) { + var e = i.getItemGraphicEl(t); + e && n.remove(e) + }).execute(), this._data = e + }, _renderLarge: function (t) { + this._clear(), Cp(t, this.group) + }, _incrementalRenderNormal: function (t, e) { + for (var i, n = e.getData(), o = n.getLayout("isSimpleBox"); null != (i = t.next());) { + var a; + Dp(a = Tp(n.getItemLayout(i)), n, i, o), a.incremental = !0, this.group.add(a) + } + }, _incrementalRenderLarge: function (t, e) { + Cp(e, this.group, !0) + }, remove: function (t) { + this._clear() + }, _clear: function () { + this.group.removeAll(), this._data = null + }, dispose: B + }), In.extend({ + type: "normalCandlestickBox", shape: {}, buildPath: function (t, e) { + var i = e.points; + this.__simpleBox ? (t.moveTo(i[4][0], i[4][1]), t.lineTo(i[6][0], i[6][1])) : (t.moveTo(i[0][0], i[0][1]), t.lineTo(i[1][0], i[1][1]), t.lineTo(i[2][0], i[2][1]), t.lineTo(i[3][0], i[3][1]), t.closePath(), t.moveTo(i[4][0], i[4][1]), t.lineTo(i[5][0], i[5][1]), t.moveTo(i[6][0], i[6][1]), t.lineTo(i[7][0], i[7][1])) + } + })), wL = In.extend({ + type: "largeCandlestickBox", shape: {}, buildPath: function (t, e) { + for (var i = e.points, n = 0; n < i.length;) if (this.__sign === i[n++]) { + var o = i[n++]; + t.moveTo(o, i[n++]), t.lineTo(o, i[n++]) + } else n += 3 + } + }), bL = ["itemStyle", "borderColor"], SL = ["itemStyle", "borderColor0"], ML = ["itemStyle", "color"], + IL = ["itemStyle", "color0"], TL = { + seriesType: "candlestick", plan: QM(), performRawSeries: !0, reset: function (t, e) { + function i(t, e) { + return e.get(t > 0 ? ML : IL) + } + + function n(t, e) { + return e.get(t > 0 ? bL : SL) + } + + var o = t.getData(), a = t.pipelineContext.large; + if (o.setVisual({ + legendSymbol: "roundRect", + colorP: i(1, t), + colorN: i(-1, t), + borderColorP: n(1, t), + borderColorN: n(-1, t) + }), !e.isSeriesFiltered(t)) return !a && { + progress: function (t, e) { + for (var o; null != (o = t.next());) { + var a = e.getItemModel(o), r = e.getItemLayout(o).sign; + e.setItemVisual(o, {color: i(r, a), borderColor: n(r, a)}) + } + } + } + } + }, DL = "undefined" != typeof Float32Array ? Float32Array : Array, AL = { + seriesType: "candlestick", plan: QM(), reset: function (t) { + var e = t.coordinateSystem, i = t.getData(), n = Pp(t, i), o = 0, a = 1, r = ["x", "y"], + s = i.mapDimension(r[o]), l = i.mapDimension(r[a], !0), u = l[0], h = l[1], c = l[2], d = l[3]; + if (i.setLayout({candleWidth: n, isSimpleBox: n <= 1.3}), !(null == s || l.length < 4)) return { + progress: t.pipelineContext.large ? function (t, i) { + for (var n, r, l = new DL(5 * t.count), f = 0, p = [], g = []; null != (r = t.next());) { + var m = i.get(s, r), v = i.get(u, r), y = i.get(h, r), x = i.get(c, r), _ = i.get(d, r); + isNaN(m) || isNaN(x) || isNaN(_) ? (l[f++] = NaN, f += 4) : (l[f++] = kp(i, r, v, y, h), p[o] = m, p[a] = x, n = e.dataToPoint(p, null, g), l[f++] = n ? n[0] : NaN, l[f++] = n ? n[1] : NaN, p[a] = _, n = e.dataToPoint(p, null, g), l[f++] = n ? n[1] : NaN) + } + i.setLayout("largePoints", l) + } : function (t, i) { + function r(t, i) { + var n = []; + return n[o] = i, n[a] = t, isNaN(i) || isNaN(t) ? [NaN, NaN] : e.dataToPoint(n) + } + + function l(t, e, i) { + var a = e.slice(), r = e.slice(); + a[o] = Fn(a[o] + n / 2, 1, !1), r[o] = Fn(r[o] - n / 2, 1, !0), i ? t.push(a, r) : t.push(r, a) + } + + function f(t) { + return t[o] = Fn(t[o], 1), t + } + + for (var p; null != (p = t.next());) { + var g = i.get(s, p), m = i.get(u, p), v = i.get(h, p), y = i.get(c, p), x = i.get(d, p), + _ = Math.min(m, v), w = Math.max(m, v), b = r(_, g), S = r(w, g), M = r(y, g), I = r(x, g), + T = []; + l(T, S, 0), l(T, b, 1), T.push(f(I), f(S), f(M), f(b)), i.setItemLayout(p, { + sign: kp(i, p, m, v, h), + initBaseline: m > v ? S[a] : b[a], + ends: T, + brushRect: function (t, e, i) { + var s = r(t, i), l = r(e, i); + return s[o] -= n / 2, l[o] -= n / 2, { + x: s[0], + y: s[1], + width: a ? n : l[0] - s[0], + height: a ? l[1] - s[1] : n + } + }(y, x, g) + }) + } + } + } + } + }; + us(function (t) { + t && y(t.series) && d(t.series, function (t) { + w(t) && "k" === t.type && (t.type = "candlestick") + }) + }), ps(TL), fs(AL), KM.extend({ + type: "series.effectScatter", + dependencies: ["grid", "polar"], + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + }, + 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 CL = Ep.prototype; + CL.stopEffectAnimation = function () { + this.childAt(1).removeAll() + }, CL.startEffectAnimation = function (t) { + for (var e = t.symbolType, i = t.color, n = this.childAt(1), o = 0; o < 3; o++) { + var a = Tl(e, -1, -1, 2, 2, i); + a.attr({style: {strokeNoScale: !0}, z2: 99, silent: !0, scale: [.5, .5]}); + var r = -o / 3 * t.period + t.effectOffset; + a.animate("", !0).when(t.period, {scale: [t.rippleScale / 2, t.rippleScale / 2]}).delay(r).start(), a.animateStyle(!0).when(t.period, {opacity: 0}).delay(r).start(), n.add(a) + } + Op(n, t) + }, CL.updateEffectAnimation = function (t) { + for (var e = this._effectCfg, i = this.childAt(1), n = ["symbolType", "period", "rippleScale"], o = 0; o < n.length; o++) { + var a = n[o]; + if (e[a] !== t[a]) return this.stopEffectAnimation(), void this.startEffectAnimation(t) + } + Op(i, t) + }, CL.highlight = function () { + this.trigger("emphasis") + }, CL.downplay = function () { + this.trigger("normal") + }, CL.updateData = function (t, e) { + var i = t.hostModel; + this.childAt(0).updateData(t, e); + var n = this.childAt(1), o = t.getItemModel(e), a = t.getItemVisual(e, "symbol"), + r = Np(t.getItemVisual(e, "symbolSize")), s = t.getItemVisual(e, "color"); + n.attr("scale", r), n.traverse(function (t) { + t.attr({fill: s}) + }); + var l = o.getShallow("symbolOffset"); + if (l) { + var u = n.position; + u[0] = Do(l[0], r[0]), u[1] = Do(l[1], r[1]) + } + n.rotation = (o.getShallow("symbolRotate") || 0) * Math.PI / 180 || 0; + var h = {}; + if (h.showEffectOn = i.get("showEffectOn"), h.rippleScale = o.get("rippleEffect.scale"), h.brushType = o.get("rippleEffect.brushType"), h.period = 1e3 * o.get("rippleEffect.period"), h.effectOffset = e / t.count(), h.z = o.getShallow("z") || 0, h.zlevel = o.getShallow("zlevel") || 0, h.symbolType = a, h.color = s, this.off("mouseover").off("mouseout").off("emphasis").off("normal"), "render" === h.showEffectOn) this._effectCfg ? this.updateEffectAnimation(h) : this.startEffectAnimation(h), this._effectCfg = h; else { + this._effectCfg = null, this.stopEffectAnimation(); + var c = this.childAt(0), d = function () { + c.highlight(), "render" !== h.showEffectOn && this.startEffectAnimation(h) + }, f = function () { + c.downplay(), "render" !== h.showEffectOn && this.stopEffectAnimation() + }; + this.on("mouseover", d, this).on("mouseout", f, this).on("emphasis", d, this).on("normal", f, this) + } + this._effectCfg = h + }, CL.fadeOut = function (t) { + this.off("mouseover").off("mouseout").off("emphasis").off("normal"), t && t() + }, u(Ep, sw), _s({ + type: "effectScatter", init: function () { + this._symbolDraw = new Ql(Ep) + }, render: function (t, e, i) { + var n = t.getData(), o = this._symbolDraw; + o.updateData(n), this.group.add(o.group) + }, updateTransform: function (t, e, i) { + var n = t.getData(); + this.group.dirty(); + var o = mD().reset(t); + o.progress && o.progress({start: 0, end: n.count()}, n), this._symbolDraw.updateLayout(n) + }, _updateGroupTransform: function (t) { + var e = t.coordinateSystem; + e && e.getRoamTransform && (this.group.transform = gt(e.getRoamTransform()), this.group.decomposeTransform()) + }, remove: function (t, e) { + this._symbolDraw && this._symbolDraw.remove(e) + }, dispose: function () { + } + }), ps(gD("effectScatter", "circle")), fs(mD("effectScatter")); + var LL = "undefined" == typeof Uint32Array ? Array : Uint32Array, + kL = "undefined" == typeof Float64Array ? Array : Float64Array, PL = KM.extend({ + type: "series.lines", + dependencies: ["grid", "polar"], + visualColorAccessPath: "lineStyle.color", + init: function (t) { + t.data = t.data || [], Rp(t); + var e = this._processFlatCoordsArray(t.data); + this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(e.count)), PL.superApply(this, "init", arguments) + }, + mergeOption: function (t) { + if (t.data = t.data || [], Rp(t), t.data) { + var e = this._processFlatCoordsArray(t.data); + this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset, e.flatCoords && (t.data = new Float32Array(e.count)) + } + PL.superApply(this, "mergeOption", arguments) + }, + appendData: function (t) { + var e = this._processFlatCoordsArray(t.data); + e.flatCoords && (this._flatCoords ? (this._flatCoords = z(this._flatCoords, e.flatCoords), this._flatCoordsOffset = z(this._flatCoordsOffset, e.flatCoordsOffset)) : (this._flatCoords = e.flatCoords, this._flatCoordsOffset = e.flatCoordsOffset), t.data = new Float32Array(e.count)), this.getRawData().appendData(t.data) + }, + _getCoordsFromItemModel: function (t) { + var e = this.getData().getItemModel(t); + return e.option instanceof Array ? e.option : e.getShallow("coords") + }, + getLineCoordsCount: function (t) { + return this._flatCoordsOffset ? this._flatCoordsOffset[2 * t + 1] : this._getCoordsFromItemModel(t).length + }, + getLineCoords: function (t, e) { + if (this._flatCoordsOffset) { + for (var i = this._flatCoordsOffset[2 * t], n = this._flatCoordsOffset[2 * t + 1], o = 0; o < n; o++) e[o] = e[o] || [], e[o][0] = this._flatCoords[i + 2 * o], e[o][1] = this._flatCoords[i + 2 * o + 1]; + return n + } + for (var a = this._getCoordsFromItemModel(t), o = 0; o < a.length; o++) e[o] = e[o] || [], e[o][0] = a[o][0], e[o][1] = a[o][1]; + return a.length + }, + _processFlatCoordsArray: function (t) { + var e = 0; + if (this._flatCoords && (e = this._flatCoords.length), "number" == typeof t[0]) { + for (var i = t.length, n = new LL(i), o = new kL(i), a = 0, r = 0, s = 0, l = 0; l < i;) { + s++; + var u = t[l++]; + n[r++] = a + e, n[r++] = u; + for (var h = 0; h < u; h++) { + var c = t[l++], d = t[l++]; + o[a++] = c, o[a++] = d + } + } + return {flatCoordsOffset: new Uint32Array(n.buffer, 0, r), flatCoords: o, count: s} + } + return {flatCoordsOffset: null, flatCoords: null, count: t.length} + }, + getInitialData: function (t, e) { + var i = new sT(["value"], this); + return i.hasItemOption = !1, i.initData(t.data, [], function (t, e, n, o) { + if (t instanceof Array) return NaN; + i.hasItemOption = !0; + var a = t.value; + return null != a ? a instanceof Array ? a[o] : a : 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"), o = e.get("toName"), a = []; + return null != n && a.push(n), null != o && a.push(o), Zo(a.join(" > ")) + }, + preventIncremental: function () { + return !!this.get("effect.show") + }, + getProgressive: function () { + var t = this.option.progressive; + return null == t ? this.option.large ? 1e4 : this.get("progressive") : t + }, + getProgressiveThreshold: function () { + var t = this.option.progressiveThreshold; + return null == t ? this.option.large ? 2e4 : this.get("progressiveThreshold") : t + }, + defaultOption: { + coordinateSystem: "geo", + zlevel: 0, + z: 2, + legendHoverLink: !0, + hoverAnimation: !0, + xAxisIndex: 0, + yAxisIndex: 0, + symbol: ["none", "none"], + symbolSize: [10, 10], + geoIndex: 0, + effect: {show: !1, period: 4, constantSpeed: 0, symbol: "circle", symbolSize: 3, loop: !0, trailLength: .2}, + large: !1, + largeThreshold: 2e3, + polyline: !1, + label: {show: !1, position: "end"}, + lineStyle: {opacity: .5} + } + }), NL = zp.prototype; + NL.createLine = function (t, e, i) { + return new bd(t, e, i) + }, NL._updateEffectSymbol = function (t, e) { + var i = t.getItemModel(e).getModel("effect"), n = i.get("symbolSize"), o = i.get("symbol"); + y(n) || (n = [n, n]); + var a = i.get("color") || t.getItemVisual(e, "color"), r = this.childAt(1); + this._symbolType !== o && (this.remove(r), (r = Tl(o, -.5, -.5, 1, 1, a)).z2 = 100, r.culling = !0, this.add(r)), r && (r.setStyle("shadowColor", a), r.setStyle(i.getItemStyle(["color"])), r.attr("scale", n), r.setColor(a), r.attr("scale", n), this._symbolType = o, this._updateEffectAnimation(t, i, e)) + }, NL._updateEffectAnimation = function (t, e, i) { + var n = this.childAt(1); + if (n) { + var o = this, a = t.getItemLayout(i), r = 1e3 * e.get("period"), s = e.get("loop"), + l = e.get("constantSpeed"), u = T(e.get("delay"), function (e) { + return e / t.count() * r / 3 + }), h = "function" == typeof u; + if (n.ignore = !0, this.updateAnimationPoints(n, a), l > 0 && (r = this.getLineLength(n) / l * 1e3), r !== this._period || s !== this._loop) { + n.stopAnimation(); + var c = u; + h && (c = u(i)), n.__t > 0 && (c = -r * n.__t), n.__t = 0; + var d = n.animate("", s).when(r, {__t: 1}).delay(c).during(function () { + o.updateSymbolPosition(n) + }); + s || d.done(function () { + o.remove(n) + }), d.start() + } + this._period = r, this._loop = s + } + }, NL.getLineLength = function (t) { + return S_(t.__p1, t.__cp1) + S_(t.__cp1, t.__p2) + }, NL.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] + }, NL.updateData = function (t, e, i) { + this.childAt(0).updateData(t, e, i), this._updateEffectSymbol(t, e) + }, NL.updateSymbolPosition = function (t) { + var e = t.__p1, i = t.__p2, n = t.__cp1, o = t.__t, a = t.position, r = Qi, s = tn; + a[0] = r(e[0], n[0], i[0], o), a[1] = r(e[1], n[1], i[1], o); + var l = s(e[0], n[0], i[0], o), u = s(e[1], n[1], i[1], o); + t.rotation = -Math.atan2(u, l) - Math.PI / 2, t.ignore = !1 + }, NL.updateLayout = function (t, e) { + this.childAt(0).updateLayout(t, e); + var i = t.getItemModel(e).getModel("effect"); + this._updateEffectAnimation(t, i, e) + }, u(zp, sw); + var OL = Bp.prototype; + OL._createPolyline = function (t, e, i) { + var n = t.getItemLayout(e), o = new bS({shape: {points: n}}); + this.add(o), this._updateCommonStl(t, e, i) + }, OL.updateData = function (t, e, i) { + var n = t.hostModel; + fo(this.childAt(0), {shape: {points: t.getItemLayout(e)}}, n, e), this._updateCommonStl(t, e, i) + }, OL._updateCommonStl = function (t, e, i) { + var n = this.childAt(0), o = t.getItemModel(e), a = t.getItemVisual(e, "color"), s = i && i.lineStyle, + l = i && i.hoverLineStyle; + i && !t.hasItemOption || (s = o.getModel("lineStyle").getLineStyle(), l = o.getModel("emphasis.lineStyle").getLineStyle()), n.useStyle(r({ + strokeNoScale: !0, + fill: "none", + stroke: a + }, s)), n.hoverStyle = l, eo(this) + }, OL.updateLayout = function (t, e) { + this.childAt(0).setShape("points", t.getItemLayout(e)) + }, u(Bp, sw); + var EL = Vp.prototype; + EL.createLine = function (t, e, i) { + return new Bp(t, e, i) + }, EL.updateAnimationPoints = function (t, e) { + this._points = e; + for (var i = [0], n = 0, o = 1; o < e.length; o++) { + var a = e[o - 1], r = e[o]; + n += S_(a, r), i.push(n) + } + if (0 !== n) { + for (o = 0; o < i.length; o++) i[o] /= n; + this._offsets = i, this._length = n + } + }, EL.getLineLength = function (t) { + return this._length + }, EL.updateSymbolPosition = function (t) { + var e = t.__t, i = this._points, n = this._offsets, o = i.length; + if (n) { + var a = this._lastFrame; + if (e < this._lastFramePercent) { + for (r = Math.min(a + 1, o - 1); r >= 0 && !(n[r] <= e); r--) ; + r = Math.min(r, o - 2) + } else { + for (var r = a; r < o && !(n[r] > e); r++) ; + r = Math.min(r - 1, o - 2) + } + J(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 + } + }, u(Vp, zp); + var RL = En({ + shape: {polyline: !1, curveness: 0, segs: []}, buildPath: function (t, e) { + var i = e.segs, n = e.curveness; + if (e.polyline) for (r = 0; r < i.length;) { + var o = i[r++]; + if (o > 0) { + t.moveTo(i[r++], i[r++]); + for (var a = 1; a < o; a++) t.lineTo(i[r++], i[r++]) + } + } else for (var r = 0; r < i.length;) { + var s = i[r++], l = i[r++], u = i[r++], h = i[r++]; + if (t.moveTo(s, l), n > 0) { + var c = (s + u) / 2 - (l - h) * n, d = (l + h) / 2 - (u - s) * n; + t.quadraticCurveTo(c, d, u, h) + } else t.lineTo(u, h) + } + }, findDataIndex: function (t, e) { + var i = this.shape, n = i.segs, o = i.curveness; + if (i.polyline) for (var a = 0, r = 0; r < n.length;) { + var s = n[r++]; + if (s > 0) for (var l = n[r++], u = n[r++], h = 1; h < s; h++) if (cn(l, u, c = n[r++], d = n[r++])) return a; + a++ + } else for (var a = 0, r = 0; r < n.length;) { + var l = n[r++], u = n[r++], c = n[r++], d = n[r++]; + if (o > 0) { + if (fn(l, u, (l + c) / 2 - (u - d) * o, (u + d) / 2 - (c - l) * o, c, d)) return a + } else if (cn(l, u, c, d)) return a; + a++ + } + return -1 + } + }), zL = Gp.prototype; + zL.isPersistent = function () { + return !this._incremental + }, zL.updateData = function (t) { + this.group.removeAll(); + var e = new RL({rectHover: !0, cursor: "default"}); + e.setShape({segs: t.getLayout("linesPoints")}), this._setCommon(e, t), this.group.add(e), this._incremental = null + }, zL.incrementalPrepareUpdate = function (t) { + this.group.removeAll(), this._clearIncremental(), t.count() > 5e5 ? (this._incremental || (this._incremental = new On({silent: !0})), this.group.add(this._incremental)) : this._incremental = null + }, zL.incrementalUpdate = function (t, e) { + var i = new RL; + i.setShape({segs: e.getLayout("linesPoints")}), this._setCommon(i, e, !!this._incremental), this._incremental ? this._incremental.addDisplayable(i, !0) : (i.rectHover = !0, i.cursor = "default", i.__startIndex = t.start, this.group.add(i)) + }, zL.remove = function () { + this._clearIncremental(), this._incremental = null, this.group.removeAll() + }, zL._setCommon = function (t, e, i) { + var n = e.hostModel; + t.setShape({ + polyline: n.get("polyline"), + curveness: n.get("lineStyle.curveness") + }), t.useStyle(n.getModel("lineStyle").getLineStyle()), t.style.strokeNoScale = !0; + var o = e.getVisual("color"); + o && t.setStyle("stroke", o), t.setStyle("fill"), i || (t.seriesIndex = n.seriesIndex, t.on("mousemove", function (e) { + t.dataIndex = null; + var i = t.findDataIndex(e.offsetX, e.offsetY); + i > 0 && (t.dataIndex = i + t.__startIndex) + })) + }, zL._clearIncremental = function () { + var t = this._incremental; + t && t.clearDisplaybles() + }; + var BL = { + seriesType: "lines", plan: QM(), reset: function (t) { + var e = t.coordinateSystem, i = t.get("polyline"), n = t.pipelineContext.large; + return { + progress: function (o, a) { + var r = []; + if (n) { + var s, l = o.end - o.start; + if (i) { + for (var u = 0, h = o.start; h < o.end; h++) u += t.getLineCoordsCount(h); + s = new Float32Array(l + 2 * u) + } else s = new Float32Array(4 * l); + for (var c = 0, d = [], h = o.start; h < o.end; h++) { + g = t.getLineCoords(h, r), i && (s[c++] = g); + for (var f = 0; f < g; f++) d = e.dataToPoint(r[f], !1, d), s[c++] = d[0], s[c++] = d[1] + } + a.setLayout("linesPoints", s) + } else for (h = o.start; h < o.end; h++) { + var p = a.getItemModel(h), g = t.getLineCoords(h, r), m = []; + if (i) for (var v = 0; v < g; v++) m.push(e.dataToPoint(r[v])); else { + m[0] = e.dataToPoint(r[0]), m[1] = e.dataToPoint(r[1]); + var y = p.get("lineStyle.curveness"); + +y && (m[2] = [(m[0][0] + m[1][0]) / 2 - (m[0][1] - m[1][1]) * y, (m[0][1] + m[1][1]) / 2 - (m[1][0] - m[0][0]) * y]) + } + a.setItemLayout(h, m) + } + } + } + } + }; + _s({ + type: "lines", init: function () { + }, render: function (t, e, i) { + var n = t.getData(), o = this._updateLineDraw(n, t), a = t.get("zlevel"), r = t.get("effect.trailLength"), + s = i.getZr(), l = "svg" === s.painter.getType(); + l || s.painter.getLayer(a).clear(!0), null == this._lastZlevel || l || s.configLayer(this._lastZlevel, {motionBlur: !1}), this._showEffect(t) && r && (l || s.configLayer(a, { + motionBlur: !0, + lastFrameAlpha: Math.max(Math.min(r / 10 + .9, 1), 0) + })), o.updateData(n), this._lastZlevel = a, this._finished = !0 + }, incrementalPrepareRender: function (t, e, i) { + var n = t.getData(); + this._updateLineDraw(n, t).incrementalPrepareUpdate(n), this._clearLayer(i), this._finished = !1 + }, incrementalRender: function (t, e, i) { + this._lineDraw.incrementalUpdate(t, e.getData()), this._finished = t.end === e.getData().count() + }, updateTransform: function (t, e, i) { + var n = t.getData(), o = t.pipelineContext; + if (!this._finished || o.large || o.progressiveRender) return {update: !0}; + var a = BL.reset(t); + a.progress && a.progress({start: 0, end: n.count()}, n), this._lineDraw.updateLayout(), this._clearLayer(i) + }, _updateLineDraw: function (t, e) { + var i = this._lineDraw, n = this._showEffect(e), o = !!e.get("polyline"), a = e.pipelineContext.large; + return i && n === this._hasEffet && o === this._isPolyline && a === this._isLargeDraw || (i && i.remove(), i = this._lineDraw = a ? new Gp : new Sd(o ? n ? Vp : Bp : n ? zp : bd), this._hasEffet = n, this._isPolyline = o, this._isLargeDraw = a, this.group.removeAll()), this.group.add(i.group), i + }, _showEffect: function (t) { + return !!t.get("effect.show") + }, _clearLayer: function (t) { + var e = t.getZr(); + "svg" === e.painter.getType() || null == this._lastZlevel || e.painter.getLayer(this._lastZlevel).clear(!0) + }, remove: function (t, e) { + this._lineDraw && this._lineDraw.remove(), this._lineDraw = null, this._clearLayer(e) + }, dispose: function () { + } + }); + var VL = "lineStyle.opacity".split("."), GL = { + seriesType: "lines", reset: function (t, e, i) { + var n = Wp(t.get("symbol")), o = Wp(t.get("symbolSize")), a = t.getData(); + return a.setVisual("fromSymbol", n && n[0]), a.setVisual("toSymbol", n && n[1]), a.setVisual("fromSymbolSize", o && o[0]), a.setVisual("toSymbolSize", o && o[1]), a.setVisual("opacity", t.get(VL)), { + dataEach: a.hasItemOption ? function (t, e) { + var i = t.getItemModel(e), n = Wp(i.getShallow("symbol", !0)), + o = Wp(i.getShallow("symbolSize", !0)), a = i.get(VL); + n[0] && t.setItemVisual(e, "fromSymbol", n[0]), n[1] && t.setItemVisual(e, "toSymbol", n[1]), o[0] && t.setItemVisual(e, "fromSymbolSize", o[0]), o[1] && t.setItemVisual(e, "toSymbolSize", o[1]), t.setItemVisual(e, "opacity", a) + } : null + } + } + }; + fs(BL), ps(GL), KM.extend({ + type: "series.heatmap", + getInitialData: function (t, e) { + return Xs(this.getSource(), this, {generateCoord: "value"}) + }, + preventIncremental: function () { + var t = Ca.get(this.get("coordinateSystem")); + if (t && t.dimensions) return "lng" === t.dimensions[0] && "lat" === t.dimensions[1] + }, + defaultOption: { + coordinateSystem: "cartesian2d", + zlevel: 0, + z: 2, + geoIndex: 0, + blurSize: 30, + pointSize: 20, + maxOpacity: 1, + minOpacity: 0 + } + }); + Fp.prototype = { + update: function (t, e, i, n, o, a) { + var r = this._getBrush(), s = this._getGradient(t, o, "inRange"), l = this._getGradient(t, o, "outOfRange"), + u = this.pointSize + this.blurSize, h = this.canvas, c = h.getContext("2d"), d = t.length; + h.width = e, h.height = i; + for (var f = 0; f < d; ++f) { + var p = t[f], g = p[0], m = p[1], v = n(p[2]); + c.globalAlpha = v, c.drawImage(r, g - u, m - u) + } + if (!h.width || !h.height) return h; + for (var y = c.getImageData(0, 0, h.width, h.height), x = y.data, _ = 0, w = x.length, b = this.minOpacity, S = this.maxOpacity - b; _ < w;) { + var v = x[_ + 3] / 256, M = 4 * Math.floor(255 * v); + if (v > 0) { + var I = a(v) ? s : l; + v > 0 && (v = v * S + b), 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), h + }, _getBrush: function () { + var t = this._brushCanvas || (this._brushCanvas = m_()), 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, o = n[i] || (n[i] = new Uint8ClampedArray(1024)), a = [0, 0, 0, 0], r = 0, s = 0; s < 256; s++) e[i](s / 255, !0, a), o[r++] = a[0], o[r++] = a[1], o[r++] = a[2], o[r++] = a[3]; + return o + } + }, _s({ + 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(), this._incrementalDisplayable = null; + var o = t.coordinateSystem; + "cartesian2d" === o.type || "calendar" === o.type ? this._renderOnCartesianAndCalendar(t, i, 0, t.getData().count()) : Up(o) && this._renderOnGeo(o, t, n, i) + }, incrementalPrepareRender: function (t, e, i) { + this.group.removeAll() + }, incrementalRender: function (t, e, i, n) { + e.coordinateSystem && this._renderOnCartesianAndCalendar(e, n, t.start, t.end, !0) + }, _renderOnCartesianAndCalendar: function (t, e, i, n, o) { + var r, s, l = t.coordinateSystem; + if ("cartesian2d" === l.type) { + var u = l.getAxis("x"), h = l.getAxis("y"); + r = u.getBandWidth(), s = h.getBandWidth() + } + for (var c = this.group, d = t.getData(), f = t.getModel("itemStyle").getItemStyle(["color"]), p = t.getModel("emphasis.itemStyle").getItemStyle(), g = t.getModel("label"), m = t.getModel("emphasis.label"), v = l.type, y = "cartesian2d" === v ? [d.mapDimension("x"), d.mapDimension("y"), d.mapDimension("value")] : [d.mapDimension("time"), d.mapDimension("value")], x = i; x < n; x++) { + var _; + if ("cartesian2d" === v) { + if (isNaN(d.get(y[2], x))) continue; + var w = l.dataToPoint([d.get(y[0], x), d.get(y[1], x)]); + _ = new SS({ + shape: {x: w[0] - r / 2, y: w[1] - s / 2, width: r, height: s}, + style: {fill: d.getItemVisual(x, "color"), opacity: d.getItemVisual(x, "opacity")} + }) + } else { + if (isNaN(d.get(y[1], x))) continue; + _ = new SS({ + z2: 1, + shape: l.dataToRect([d.get(y[0], x)]).contentShape, + style: {fill: d.getItemVisual(x, "color"), opacity: d.getItemVisual(x, "opacity")} + }) + } + var b = d.getItemModel(x); + d.hasItemOption && (f = b.getModel("itemStyle").getItemStyle(["color"]), p = b.getModel("emphasis.itemStyle").getItemStyle(), g = b.getModel("label"), m = b.getModel("emphasis.label")); + var S = t.getRawValue(x), M = "-"; + S && null != S[2] && (M = S[2]), io(f, p, g, m, { + labelFetcher: t, + labelDataIndex: x, + defaultText: M, + isRectText: !0 + }), _.setStyle(f), eo(_, d.hasItemOption ? p : a({}, p)), _.incremental = o, o && (_.useHoverLayer = !0), c.add(_), d.setItemGraphicEl(x, _) + } + }, _renderOnGeo: function (t, e, i, n) { + var o = i.targetVisuals.inRange, a = i.targetVisuals.outOfRange, r = e.getData(), + s = this._hmLayer || this._hmLayer || new Fp; + 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(), u = t.getRoamTransform(); + l.applyTransform(u); + var h = Math.max(l.x, 0), c = Math.max(l.y, 0), d = Math.min(l.width + l.x, n.getWidth()), + f = Math.min(l.height + l.y, n.getHeight()), p = d - h, g = f - c, + m = [r.mapDimension("lng"), r.mapDimension("lat"), r.mapDimension("value")], + v = r.mapArray(m, function (e, i, n) { + var o = t.dataToPoint([e, i]); + return o[0] -= h, o[1] -= c, o.push(n), o + }), y = i.getExtent(), + x = "visualMap.continuous" === i.type ? Zp(y, i.option.range) : Hp(y, i.getPieceList(), i.option.selected); + s.update(v, p, g, o.color.getNormalizer(), { + inRange: o.color.getColorMapper(), + outOfRange: a.color.getColorMapper() + }, x); + var _ = new Je({style: {width: p, height: g, x: h, y: c, image: s.canvas}, silent: !0}); + this.group.add(_) + }, dispose: function () { + } + }); + var WL = GD.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, WL.superApply(this, "getInitialData", arguments) + } + }), FL = ["itemStyle", "borderWidth"], HL = [{xy: "x", wh: "width", index: 0, posDesc: ["left", "right"]}, { + xy: "y", + wh: "height", + index: 1, + posDesc: ["top", "bottom"] + }], ZL = new pS; + _s({ + type: "pictorialBar", render: function (t, e, i) { + var n = this.group, o = t.getData(), a = this._data, r = t.coordinateSystem, + s = !!r.getBaseAxis().isHorizontal(), l = r.grid.getRect(), u = { + 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: HL[+s], + categoryDim: HL[1 - s] + }; + return o.diff(a).add(function (t) { + if (o.hasValue(t)) { + var e = ng(o, t), i = Xp(o, t, e, u), a = sg(o, u, i); + o.setItemGraphicEl(t, a), n.add(a), fg(a, u, i) + } + }).update(function (t, e) { + var i = a.getItemGraphicEl(e); + if (o.hasValue(t)) { + var r = ng(o, t), s = Xp(o, t, r, u), l = hg(o, s); + i && l !== i.__pictorialShapeStr && (n.remove(i), o.setItemGraphicEl(t, null), i = null), i ? lg(i, u, s) : i = sg(o, u, s, !0), o.setItemGraphicEl(t, i), i.__pictorialSymbolMeta = s, n.add(i), fg(i, u, s) + } else n.remove(i) + }).remove(function (t) { + var e = a.getItemGraphicEl(t); + e && ug(a, t, e.__pictorialSymbolMeta.animationModel, e) + }).execute(), this._data = o, this.group + }, dispose: B, remove: function (t, e) { + var i = this.group, n = this._data; + t.get("animation") ? n && n.eachItemGraphicEl(function (e) { + ug(n, e.dataIndex, t, e) + }) : i.removeAll() + } + }); + fs(v(cl, "pictorialBar")), ps(gD("pictorialBar", "roundRect")); + var UL = function (t, e, i, n, o) { + qT.call(this, t, e, i), this.type = n || "value", this.position = o || "bottom", this.orient = null + }; + UL.prototype = { + constructor: UL, 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 + }, u(UL, qT), gg.prototype = { + type: "singleAxis", axisPointerEnabled: !0, constructor: gg, _init: function (t, e, i) { + var n = this.dimension, o = new UL(n, xl(t), [0, 0], t.get("type"), t.get("position")), + a = "category" === o.type; + o.onBand = a && t.get("boundaryGap"), o.inverse = t.get("inverse"), o.orient = t.get("orient"), t.axis = o, o.model = t, o.coordinateSystem = this, this._axis = o + }, update: function (t, e) { + t.eachSeries(function (t) { + if (t.coordinateSystem === this) { + var e = t.getData(); + d(e.mapDimension(this.dimension, !0), function (t) { + this._axis.scale.unionExtentFromData(e, t) + }, this), yl(this._axis.scale, this._axis.model) + } + }, this) + }, resize: function (t, e) { + this._rect = Qo({ + 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], + o = e.reverse ? 1 : 0; + e.setExtent(n[o], n[1 - o]), this._updateAxisTransform(e, i ? t.x : t.y) + }, _updateAxisTransform: function (t, e) { + var i = t.getExtent(), n = i[0] + i[1], o = t.isHorizontal(); + t.toGlobalCoord = o ? function (t) { + return t + e + } : function (t) { + return n - t + e + }, t.toLocalCoord = o ? 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 = [], o = "horizontal" === e.orient ? 0 : 1; + return t instanceof Array && (t = t[0]), n[o] = e.toGlobalCoord(e.dataToCoord(+t)), n[1 - o] = 0 === o ? i.y + i.height / 2 : i.x + i.width / 2, n + } + }, Ca.register("single", { + create: function (t, e) { + var i = []; + return t.eachComponent("singleAxis", function (n, o) { + var a = new gg(n, t, e); + a.name = "single_" + o, a.resize(n, e), n.coordinateSystem = a, i.push(a) + }), 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: gg.prototype.dimensions + }); + var XL = ["axisLine", "axisTickLabel", "axisName"], jL = ED.extend({ + type: "singleAxis", axisPointerClass: "SingleAxisPointer", render: function (t, e, i, n) { + var o = this.group; + o.removeAll(); + var a = mg(t), r = new LD(t, a); + d(XL, r.add, r), o.add(r.getGroup()), t.get("splitLine.show") && this._splitLine(t), jL.superCall(this, "render", t, e, i, n) + }, _splitLine: function (t) { + var e = t.axis; + if (!e.scale.isBlank()) { + var i = t.getModel("splitLine"), n = i.getModel("lineStyle"), o = n.get("width"), a = n.get("color"); + a = a instanceof Array ? a : [a]; + for (var r = t.coordinateSystem.getRect(), s = e.isHorizontal(), l = [], u = 0, h = e.getTicksCoords({tickModel: i}), c = [], d = [], f = 0; f < h.length; ++f) { + var p = e.toGlobalCoord(h[f].coord); + s ? (c[0] = p, c[1] = r.y, d[0] = p, d[1] = r.y + r.height) : (c[0] = r.x, c[1] = p, d[0] = r.x + r.width, d[1] = p); + var g = u++ % a.length; + l[g] = l[g] || [], l[g].push(new MS(Gn({ + shape: {x1: c[0], y1: c[1], x2: d[0], y2: d[1]}, + style: {lineWidth: o}, + silent: !0 + }))) + } + for (f = 0; f < l.length; ++f) this.group.add(zS(l[f], { + style: { + stroke: a[f % a.length], + lineDash: n.getLineDash(o), + lineWidth: o + }, silent: !0 + })) + } + } + }), YL = hM.extend({ + type: "singleAxis", + layoutMode: "box", + axis: null, + coordinateSystem: null, + getCoordSysModel: function () { + return this + } + }), qL = { + 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}} + }; + n(YL.prototype, ET), MD("single", YL, function (t, e) { + return e.type || (e.data ? "category" : "value") + }, qL); + var KL = function (t, e) { + var i, n = [], o = t.seriesIndex; + if (null == o || !(i = e.getSeriesByIndex(o))) return {point: []}; + var a = i.getData(), r = Pi(a, t); + if (null == r || r < 0 || y(r)) return {point: []}; + var s = a.getItemGraphicEl(r), l = i.coordinateSystem; + if (i.getTooltipPosition) n = i.getTooltipPosition(r) || []; else if (l && l.dataToPoint) n = l.dataToPoint(a.getValues(f(l.dimensions, function (t) { + return a.mapDimension(t) + }), r, !0)) || []; else if (s) { + var u = s.getBoundingRect().clone(); + u.applyTransform(s.transform), n = [u.x + u.width / 2, u.y + u.height / 2] + } + return {point: n, el: s} + }, $L = d, JL = v, QL = Ni(), tk = (vs({ + 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 + } + } + }), Ni()), ek = d, ik = ys({ + type: "axisPointer", render: function (t, e, i) { + var n = e.getComponent("tooltip"), o = t.get("triggerOn") || n && n.get("triggerOn") || "mousemove|click"; + Dg("axisPointer", i, function (t, e, i) { + "none" !== o && ("leave" === t || o.indexOf(t) >= 0) && i({ + type: "updateAxisPointer", + currTrigger: t, + x: e && e.offsetX, + y: e && e.offsetY + }) + }) + }, remove: function (t, e) { + Ng(e.getZr(), "axisPointer"), ik.superApply(this._model, "remove", arguments) + }, dispose: function (t, e) { + Ng("axisPointer", e), ik.superApply(this._model, "dispose", arguments) + } + }), nk = Ni(), ok = i, ak = m; + (Og.prototype = { + _group: null, + _lastGraphicKey: null, + _handle: null, + _dragging: !1, + _lastValue: null, + _lastStatus: null, + _payloadInfo: null, + animationThreshold: 15, + render: function (t, e, i, n) { + var o = e.get("value"), a = e.get("status"); + if (this._axisModel = t, this._axisPointerModel = e, this._api = i, n || this._lastValue !== o || this._lastStatus !== a) { + this._lastValue = o, this._lastStatus = a; + var r = this._group, s = this._handle; + if (!a || "hide" === a) return r && r.hide(), void (s && s.hide()); + r && r.show(), s && s.show(); + var l = {}; + this.makeElOption(l, o, t, e, i); + var u = l.graphicKey; + u !== this._lastGraphicKey && this.clear(i), this._lastGraphicKey = u; + var h = this._moveAnimation = this.determineAnimation(t, e); + if (r) { + var c = v(Eg, e, h); + this.updatePointerEl(r, l, c, e), this.updateLabelEl(r, l, c, e) + } else r = this._group = new sw, this.createPointerEl(r, l, t, e), this.createLabelEl(r, l, t, e), i.getZr().add(r); + Vg(r, e, !0), this._renderHandle(o) + } + }, + remove: function (t) { + this.clear(t) + }, + dispose: function (t) { + this.clear(t) + }, + determineAnimation: function (t, e) { + var i = e.get("animation"), n = t.axis, o = "category" === n.type, a = e.get("snap"); + if (!a && !o) return !1; + if ("auto" === i || null == i) { + var r = this.animationThreshold; + if (o && n.getBandWidth() > r) return !0; + if (a) { + var s = qu(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, o) { + }, + createPointerEl: function (t, e, i, n) { + var o = e.pointer; + if (o) { + var a = nk(t).pointerEl = new BS[o.type](ok(e.pointer)); + t.add(a) + } + }, + createLabelEl: function (t, e, i, n) { + if (e.label) { + var o = nk(t).labelEl = new SS(ok(e.label)); + t.add(o), zg(o, n) + } + }, + updatePointerEl: function (t, e, i) { + var n = nk(t).pointerEl; + n && (n.setStyle(e.pointer.style), i(n, {shape: e.pointer.shape})) + }, + updateLabelEl: function (t, e, i, n) { + var o = nk(t).labelEl; + o && (o.setStyle(e.label.style), i(o, {shape: e.label.shape, position: e.label.position}), zg(o, n)) + }, + _renderHandle: function (t) { + if (!this._dragging && this.updateHandleTransform) { + var e = this._axisPointerModel, i = this._api.getZr(), n = this._handle, o = e.getModel("handle"), + a = e.get("status"); + if (!o.get("show") || !a || "hide" === a) return n && i.remove(n), void (this._handle = null); + var r; + this._handle || (r = !0, n = this._handle = _o(o.get("icon"), { + cursor: "move", + draggable: !0, + onmousemove: function (t) { + zw(t.event) + }, + onmousedown: ak(this._onHandleDragMove, this, 0, 0), + drift: ak(this._onHandleDragMove, this), + ondragend: ak(this._onHandleDragEnd, this) + }), i.add(n)), Vg(n, e, !1); + var s = ["color", "borderColor", "borderWidth", "opacity", "shadowColor", "shadowBlur", "shadowOffsetX", "shadowOffsetY"]; + n.setStyle(o.getItemStyle(null, s)); + var l = o.get("size"); + y(l) || (l = [l, l]), n.attr("scale", [l[0] / 2, l[1] / 2]), wr(this, "_doDispatchAxisPointer", o.get("throttle") || 0, "fixRate"), this._moveHandleToValue(t, r) + } + }, + _moveHandleToValue: function (t, e) { + Eg(this._axisPointerModel, !e && this._moveAnimation, this._handle, Bg(this.getHandleTransform(t, this._axisModel, this._axisPointerModel))) + }, + _onHandleDragMove: function (t, e) { + var i = this._handle; + if (i) { + this._dragging = !0; + var n = this.updateHandleTransform(Bg(i), [t, e], this._axisModel, this._axisPointerModel); + this._payloadInfo = n, i.stopAnimation(), i.attr(Bg(n)), nk(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 i = i || 0, {x: t[i], y: t[1 - i], width: e[i], height: e[1 - i]} + } + }).constructor = Og, Gi(Og); + var rk = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis, r = a.grid, s = n.get("type"), l = qg(r, a).getOtherAxis(a).getGlobalExtent(), + u = a.toGlobalCoord(a.dataToCoord(e, !0)); + if (s && "none" !== s) { + var h = Gg(n), c = sk[s](a, u, l, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Ug(e, t, eh(r.model, i), i, n, o) + }, getHandleTransform: function (t, e, i) { + var n = eh(e.axis.grid.model, e, {labelInside: !1}); + return n.labelMargin = i.get("handle.margin"), { + position: Zg(e.axis, t, n), + rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0) + } + }, updateHandleTransform: function (t, e, i, n) { + var o = i.axis, a = o.grid, r = o.getGlobalExtent(!0), s = qg(a, o).getOtherAxis(o).getGlobalExtent(), + l = "x" === o.dim ? 0 : 1, u = t.position; + u[l] += e[l], u[l] = Math.min(r[1], u[l]), u[l] = Math.max(r[0], u[l]); + var h = (s[1] + s[0]) / 2, c = [h, h]; + c[l] = u[l]; + var d = [{verticalAlign: "middle"}, {align: "center"}]; + return {position: u, rotation: t.rotation, cursorPoint: c, tooltipOption: d[l]} + } + }), sk = { + line: function (t, e, i, n) { + var o = Xg([e, i[0]], [e, i[1]], Kg(t)); + return Gn({shape: o, style: n}), {type: "Line", shape: o} + }, shadow: function (t, e, i, n) { + var o = Math.max(1, t.getBandWidth()), a = i[1] - i[0]; + return {type: "Rect", shape: jg([e - o / 2, i[0]], [o, a], Kg(t))} + } + }; + ED.registerAxisPointerClass("CartesianAxisPointer", rk), us(function (t) { + if (t) { + (!t.axisPointer || 0 === t.axisPointer.length) && (t.axisPointer = {}); + var e = t.axisPointer.link; + e && !y(e) && (t.axisPointer.link = [e]) + } + }), hs(LI.PROCESSOR.STATISTIC, function (t, e) { + t.getComponent("axisPointer").coordSysAxesInfo = Fu(t, e) + }), cs({type: "updateAxisPointer", event: "updateAxisPointer", update: ":updateAxisPointer"}, function (t, e, i) { + var n = t.currTrigger, o = [t.x, t.y], a = t, r = t.dispatchAction || m(i.dispatchAction, i), + s = e.getComponent("axisPointer").coordSysAxesInfo; + if (s) { + Tg(o) && (o = KL({seriesIndex: a.seriesIndex, dataIndex: a.dataIndex}, e).point); + var l = Tg(o), u = a.axesInfo, h = s.axesInfo, c = "leave" === n || Tg(o), d = {}, f = {}, + p = {list: [], map: {}}, g = {showPointer: JL(xg, f), showTooltip: JL(_g, p)}; + $L(s.coordSysMap, function (t, e) { + var i = l || t.containPoint(o); + $L(s.coordSysAxesInfo[e], function (t, e) { + var n = t.axis, a = Mg(u, t); + if (!c && i && (!u || a)) { + var r = a && a.value; + null != r || l || (r = n.pointToData(o)), null != r && vg(t, r, g, !1, d) + } + }) + }); + var v = {}; + return $L(h, function (t, e) { + var i = t.linkGroup; + i && !f[e] && $L(i.axesInfo, function (e, n) { + var o = f[n]; + if (e !== t && o) { + var a = o.value; + i.mapper && (a = t.axis.scale.parse(i.mapper(a, Ig(e), Ig(t)))), v[t.key] = a + } + }) + }), $L(v, function (t, e) { + vg(h[e], t, g, !0, d) + }), wg(f, h, d), bg(p, o, t, r), Sg(h, 0, i), d + } + }); + var lk = ["x", "y"], uk = ["width", "height"], hk = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis, r = a.coordinateSystem, s = Jg(r, 1 - $g(a)), l = r.dataToPoint(e)[0], u = n.get("type"); + if (u && "none" !== u) { + var h = Gg(n), c = ck[u](a, l, s, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Ug(e, t, mg(i), i, n, o) + }, getHandleTransform: function (t, e, i) { + var n = mg(e, {labelInside: !1}); + return n.labelMargin = i.get("handle.margin"), { + position: Zg(e.axis, t, n), + rotation: n.rotation + (n.labelDirection < 0 ? Math.PI : 0) + } + }, updateHandleTransform: function (t, e, i, n) { + var o = i.axis, a = o.coordinateSystem, r = $g(o), s = Jg(a, r), l = t.position; + l[r] += e[r], l[r] = Math.min(s[1], l[r]), l[r] = Math.max(s[0], l[r]); + var u = Jg(a, 1 - r), h = (u[1] + u[0]) / 2, c = [h, h]; + return c[r] = l[r], { + position: l, + rotation: t.rotation, + cursorPoint: c, + tooltipOption: {verticalAlign: "middle"} + } + } + }), ck = { + line: function (t, e, i, n) { + var o = Xg([e, i[0]], [e, i[1]], $g(t)); + return Gn({shape: o, style: n}), {type: "Line", shape: o} + }, shadow: function (t, e, i, n) { + var o = t.getBandWidth(), a = i[1] - i[0]; + return {type: "Rect", shape: jg([e - o / 2, i[0]], [o, a], $g(t))} + } + }; + ED.registerAxisPointerClass("SingleAxisPointer", hk), ys({type: "single"}); + var dk = KM.extend({ + type: "series.themeRiver", + dependencies: ["singleAxis"], + nameMap: null, + init: function (t) { + dk.superApply(this, "init", arguments), this.legendDataProvider = function () { + return this.getRawData() + } + }, + fixData: function (t) { + for (var e = t.length, i = f(Jf().key(function (t) { + return t[2] + }).entries(t), function (t) { + return {name: t.key, dataList: t.values} + }), n = i.length, o = -1, a = -1, r = 0; r < n; ++r) { + var s = i[r].dataList.length; + s > o && (o = s, a = r) + } + for (var l = 0; l < n; ++l) if (l !== a) for (var u = i[l].name, h = 0; h < o; ++h) { + for (var c = i[a].dataList[h][0], d = i[l].dataList.length, p = -1, g = 0; g < d; ++g) if (i[l].dataList[g][0] === c) { + p = g; + break + } + -1 === p && (t[e] = [], t[e][0] = c, t[e][1] = 0, t[e][2] = u, e++) + } + return t + }, + getInitialData: function (t, e) { + for (var i = e.queryComponents({ + mainType: "singleAxis", + index: this.get("singleAxisIndex"), + id: this.get("singleAxisId") + })[0].get("type"), n = g(t.data, function (t) { + return void 0 !== t[2] + }), o = this.fixData(n || []), a = [], r = this.nameMap = R(), s = 0, l = 0; l < o.length; ++l) a.push(o[l][2]), r.get(o[l][2]) || (r.set(o[l][2], s), s++); + var u = hT(o, { + coordDimensions: ["single"], + dimensionsDefine: [{name: "time", type: Ts(i)}, {name: "value", type: "float"}, { + name: "name", + type: "ordinal" + }], + encodeDefine: {single: 0, value: 1, itemName: 2} + }), h = new sT(u, this); + return h.initData(o), h + }, + getLayerSeries: function () { + for (var t = this.getData(), e = t.count(), i = [], n = 0; n < e; ++n) i[n] = n; + for (var o = f(Jf().key(function (e) { + return t.get("name", e) + }).entries(i), function (t) { + return {name: t.key, indices: t.values} + }), a = t.mapDimension("single"), r = 0; r < o.length; ++r) o[r].indices.sort(function (e, i) { + return t.get(a, e) - t.get(a, i) + }); + return o + }, + getAxisTooltipData: function (t, e, i) { + y(t) || (t = t ? [t] : []); + for (var n, o = this.getData(), a = this.getLayerSeries(), r = [], s = a.length, l = 0; l < s; ++l) { + for (var u = Number.MAX_VALUE, h = -1, c = a[l].indices.length, d = 0; d < c; ++d) { + var f = o.get(t[0], a[l].indices[d]), p = Math.abs(f - e); + p <= u && (n = f, u = p, h = a[l].indices[d]) + } + r.push(h) + } + return {dataIndices: r, nestestValue: n} + }, + formatTooltip: function (t) { + var e = this.getData(), i = e.getName(t), n = e.get(e.mapDimension("value"), t); + return (isNaN(n) || null == n) && (n = "-"), Zo(i + " : " + n) + }, + defaultOption: { + zlevel: 0, + z: 2, + coordinateSystem: "singleAxis", + boundaryGap: ["10%", "10%"], + singleAxisIndex: 0, + animationEasing: "linear", + label: {margin: 4, show: !0, position: "left", color: "#000", fontSize: 11}, + emphasis: {label: {show: !0}} + } + }); + _s({ + type: "themeRiver", init: function () { + this._layers = [] + }, render: function (t, e, i) { + function n(t) { + return t.name + } + + function o(e, i, n) { + var o = this._layers; + if ("remove" !== e) { + for (var u, h = [], c = [], f = l[i].indices, p = 0; p < f.length; p++) { + var g = r.getItemLayout(f[p]), m = g.x, v = g.y0, y = g.y; + h.push([m, v]), c.push([m, v + y]), u = r.getItemVisual(f[p], "color") + } + var x, _, w = r.getItemLayout(f[0]), b = r.getItemModel(f[p - 1]), S = b.getModel("label"), + M = S.get("margin"); + if ("add" === e) { + I = d[i] = new sw; + x = new pD({ + shape: { + points: h, + stackedOnPoints: c, + smooth: .4, + stackedOnSmooth: .4, + smoothConstraint: !1 + }, z2: 0 + }), _ = new fS({ + style: { + x: w.x - M, + y: w.y0 + w.y / 2 + } + }), I.add(x), I.add(_), s.add(I), x.setClipPath(Qg(x.getBoundingRect(), t, function () { + x.removeClipPath() + })) + } else { + var I = o[n]; + x = I.childAt(0), _ = I.childAt(1), s.add(I), d[i] = I, fo(x, { + shape: { + points: h, + stackedOnPoints: c + } + }, t), fo(_, {style: {x: w.x - M, y: w.y0 + w.y / 2}}, t) + } + var T = b.getModel("emphasis.itemStyle"), D = b.getModel("itemStyle"); + no(_.style, S, { + text: S.get("show") ? t.getFormattedLabel(f[p - 1], "normal") || r.getName(f[p - 1]) : null, + textVerticalAlign: "middle" + }), x.setStyle(a({fill: u}, D.getItemStyle(["color"]))), eo(x, T.getItemStyle()) + } else s.remove(o[i]) + } + + var r = t.getData(), s = this.group, l = t.getLayerSeries(), u = r.getLayout("layoutInfo"), h = u.rect, + c = u.boundaryGap; + s.attr("position", [0, h.y + c[0]]); + var d = {}; + new Ss(this._layersSeries || [], l, n, n).add(m(o, this, "add")).update(m(o, this, "update")).remove(m(o, this, "remove")).execute(), this._layersSeries = l, this._layers = d + }, dispose: function () { + } + }); + fs(function (t, e) { + t.eachSeriesByType("themeRiver", function (t) { + var e = t.getData(), i = t.coordinateSystem, n = {}, o = i.getRect(); + n.rect = o; + var a = t.get("boundaryGap"), r = i.getAxis(); + n.boundaryGap = a, "horizontal" === r.orient ? (a[0] = Do(a[0], o.height), a[1] = Do(a[1], o.height), tm(e, t, o.height - a[0] - a[1])) : (a[0] = Do(a[0], o.width), a[1] = Do(a[1], o.width), tm(e, t, o.width - a[0] - a[1])), e.setLayout("layoutInfo", n) + }) + }), ps(function (t) { + t.eachSeriesByType("themeRiver", function (t) { + var e = t.getData(), i = t.getRawData(), n = t.get("color"), o = R(); + e.each(function (t) { + o.set(e.getRawIndex(t), t) + }), i.each(function (a) { + var r = i.getName(a), s = n[(t.nameMap.get(r) - 1) % n.length]; + i.setItemVisual(a, "color", s); + var l = o.get(a); + null != l && e.setItemVisual(l, "color", s) + }) + }) + }), hs(iA("themeRiver")), KM.extend({ + type: "series.sunburst", + _viewRoot: null, + getInitialData: function (t, e) { + var i = {name: t.name, children: t.data}; + im(i); + var n = t.levels || [], o = {}; + return o.levels = n, ic.createTree(i, this, o).data + }, + optionUpdated: function () { + this.resetViewRoot() + }, + getDataParams: function (t) { + var e = KM.prototype.getDataParams.apply(this, arguments), i = this.getData().tree.getNodeByDataIndex(t); + return e.treePathInfo = Ac(i, this), e + }, + defaultOption: { + zlevel: 0, + z: 2, + center: ["50%", "50%"], + radius: [0, "75%"], + clockwise: !0, + startAngle: 90, + minAngle: 0, + percentPrecision: 2, + stillShowZeroSum: !0, + highlightPolicy: "descendant", + nodeClick: "rootToNode", + renderLabelForZeroData: !1, + label: { + rotate: "radial", + show: !0, + opacity: 1, + align: "center", + position: "inside", + distance: 5, + silent: !0, + emphasis: {} + }, + itemStyle: { + borderWidth: 1, + borderColor: "white", + opacity: 1, + emphasis: {}, + highlight: {opacity: 1}, + downplay: {opacity: .9} + }, + animationType: "expansion", + animationDuration: 1e3, + animationDurationUpdate: 500, + animationEasing: "cubicOut", + data: [], + levels: [], + sort: "desc" + }, + getViewRoot: function () { + return this._viewRoot + }, + resetViewRoot: function (t) { + t ? this._viewRoot = t : t = this._viewRoot; + var e = this.getRawData().tree.root; + t && (t === e || e.contains(t)) || (this._viewRoot = e) + } + }); + var fk = {NONE: "none", DESCENDANT: "descendant", ANCESTOR: "ancestor", SELF: "self"}, pk = 2, gk = 4, + mk = nm.prototype; + mk.updateData = function (t, e, i, o, s) { + this.node = e, e.piece = this, o = o || this._seriesModel, s = s || this._ecModel; + var l = this.childAt(0); + l.dataIndex = e.dataIndex; + var u = e.getModel(), h = e.getLayout(); + h || console.log(e.getLayout()); + var c = a({}, h); + c.label = null; + var d, f = om(e, 0, s), p = u.getModel("itemStyle").getItemStyle(); + d = r({ + lineJoin: "bevel", + fill: (d = "normal" === i ? p : n(u.getModel(i + ".itemStyle").getItemStyle(), p)).fill || f + }, d), t ? (l.setShape(c), l.shape.r = h.r0, fo(l, {shape: {r: h.r}}, o, e.dataIndex), l.useStyle(d)) : "object" == typeof d.fill && d.fill.type || "object" == typeof l.style.fill && l.style.fill.type ? (fo(l, {shape: c}, o), l.useStyle(d)) : fo(l, { + shape: c, + style: d + }, o), this._updateLabel(o, f, i); + var g = u.getShallow("cursor"); + if (g && l.attr("cursor", g), t) { + var m = o.getShallow("highlightPolicy"); + this._initEvents(l, e, o, m) + } + this._seriesModel = o || this._seriesModel, this._ecModel = s || this._ecModel + }, mk.onEmphasis = function (t) { + var e = this; + this.node.hostTree.root.eachNode(function (i) { + i.piece && (e.node === i ? i.piece.updateData(!1, i, "emphasis") : rm(i, e.node, t) ? i.piece.childAt(0).trigger("highlight") : t !== fk.NONE && i.piece.childAt(0).trigger("downplay")) + }) + }, mk.onNormal = function () { + this.node.hostTree.root.eachNode(function (t) { + t.piece && t.piece.updateData(!1, t, "normal") + }) + }, mk.onHighlight = function () { + this.updateData(!1, this.node, "highlight") + }, mk.onDownplay = function () { + this.updateData(!1, this.node, "downplay") + }, mk._updateLabel = function (t, e, i) { + function n(t) { + var e = r.get(t); + return null == e ? a.get(t) : e + } + + var o = this.node.getModel(), a = o.getModel("label"), + r = "normal" === i || "emphasis" === i ? a : o.getModel(i + ".label"), s = o.getModel("emphasis.label"), + l = T(t.getFormattedLabel(this.node.dataIndex, "normal", null, null, "label"), this.node.name); + !1 === n("show") && (l = ""); + var u = this.node.getLayout(), h = r.get("minAngle"); + null == h && (h = a.get("minAngle")), h = h / 180 * Math.PI; + var c = u.endAngle - u.startAngle; + null != h && Math.abs(c) < h && (l = ""); + var d = this.childAt(1); + io(d.style, d.hoverStyle || {}, a, s, { + defaultText: r.getShallow("show") ? l : null, + autoColor: e, + useInsideStyle: !0 + }); + var f, p = (u.startAngle + u.endAngle) / 2, g = Math.cos(p), m = Math.sin(p), v = n("position"), + y = n("distance") || 0, x = n("align"); + "outside" === v ? (f = u.r + y, x = p > Math.PI / 2 ? "right" : "left") : x && "center" !== x ? "left" === x ? (f = u.r0 + y, p > Math.PI / 2 && (x = "right")) : "right" === x && (f = u.r - y, p > Math.PI / 2 && (x = "left")) : (f = (u.r + u.r0) / 2, x = "center"), d.attr("style", { + text: l, + textAlign: x, + textVerticalAlign: n("verticalAlign") || "middle", + opacity: n("opacity") + }); + var _ = f * g + u.cx, w = f * m + u.cy; + d.attr("position", [_, w]); + var b = n("rotate"), S = 0; + "radial" === b ? (S = -p) < -Math.PI / 2 && (S += Math.PI) : "tangential" === b ? (S = Math.PI / 2 - p) > Math.PI / 2 ? S -= Math.PI : S < -Math.PI / 2 && (S += Math.PI) : "number" == typeof b && (S = b * Math.PI / 180), d.attr("rotation", S) + }, mk._initEvents = function (t, e, i, n) { + t.off("mouseover").off("mouseout").off("emphasis").off("normal"); + var o = this, a = function () { + o.onEmphasis(n) + }, r = function () { + o.onNormal() + }; + i.isAnimationEnabled() && t.on("mouseover", a).on("mouseout", r).on("emphasis", a).on("normal", r).on("downplay", function () { + o.onDownplay() + }).on("highlight", function () { + o.onHighlight() + }) + }, u(nm, sw); + gr.extend({ + type: "sunburst", init: function () { + }, render: function (t, e, i, n) { + function o(i, n) { + if (c || !i || i.getValue() || (i = null), i !== l && n !== l) if (n && n.piece) i ? (n.piece.updateData(!1, i, "normal", t, e), s.setItemGraphicEl(i.dataIndex, n.piece)) : a(n); else if (i) { + var o = new nm(i, t, e); + h.add(o), s.setItemGraphicEl(i.dataIndex, o) + } + } + + function a(t) { + t && t.piece && (h.remove(t.piece), t.piece = null) + } + + var r = this; + this.seriesModel = t, this.api = i, this.ecModel = e; + var s = t.getData(), l = s.tree.root, u = t.getViewRoot(), h = this.group, + c = t.get("renderLabelForZeroData"), d = []; + u.eachNode(function (t) { + d.push(t) + }); + var f = this._oldChildren || []; + if (function (t, e) { + function i(t) { + return t.getId() + } + + function n(i, n) { + o(null == i ? null : t[i], null == n ? null : e[n]) + } + + 0 === t.length && 0 === e.length || new Ss(e, t, i, i).add(n).update(n).remove(v(n, null)).execute() + }(d, f), function (i, n) { + if (n.depth > 0) { + r.virtualPiece ? r.virtualPiece.updateData(!1, i, "normal", t, e) : (r.virtualPiece = new nm(i, t, e), h.add(r.virtualPiece)), n.piece._onclickEvent && n.piece.off("click", n.piece._onclickEvent); + var o = function (t) { + r._rootToNode(n.parentNode) + }; + n.piece._onclickEvent = o, r.virtualPiece.on("click", o) + } else r.virtualPiece && (h.remove(r.virtualPiece), r.virtualPiece = null) + }(l, u), n && n.highlight && n.highlight.piece) { + var p = t.getShallow("highlightPolicy"); + n.highlight.piece.onEmphasis(p) + } else if (n && n.unhighlight) { + var g = this.virtualPiece; + !g && l.children.length && (g = l.children[0].piece), g && g.onNormal() + } + this._initEvents(), this._oldChildren = d + }, dispose: function () { + }, _initEvents: function () { + var t = this, e = function (e) { + var i = !1; + t.seriesModel.getViewRoot().eachNode(function (n) { + if (!i && n.piece && n.piece.childAt(0) === e.target) { + var o = n.getModel().get("nodeClick"); + if ("rootToNode" === o) t._rootToNode(n); else if ("link" === o) { + var a = n.getModel(), r = a.get("link"); + if (r) { + var s = a.get("target", !0) || "_blank"; + window.open(r, s) + } + } + i = !0 + } + }) + }; + this.group._onclickEvent && this.group.off("click", this.group._onclickEvent), this.group.on("click", e), this.group._onclickEvent = e + }, _rootToNode: function (t) { + t !== this.seriesModel.getViewRoot() && this.api.dispatchAction({ + type: "sunburstRootToNode", + from: this.uid, + seriesId: this.seriesModel.id, + targetNode: t + }) + }, containPoint: function (t, e) { + var i = e.getData().getItemLayout(0); + if (i) { + var n = t[0] - i.cx, o = t[1] - i.cy, a = Math.sqrt(n * n + o * o); + return a <= i.r && a >= i.r0 + } + } + }); + var vk = "sunburstRootToNode"; + cs({type: vk, update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + var n = Ic(t, [vk], e); + if (n) { + var o = e.getViewRoot(); + o && (t.direction = Dc(o, n.node) ? "rollUp" : "drillDown"), e.resetViewRoot(n.node) + } + }) + }); + var yk = "sunburstHighlight"; + cs({type: yk, update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + var n = Ic(t, [yk], e); + n && (t.highlight = n.node) + }) + }); + cs({type: "sunburstUnhighlight", update: "updateView"}, function (t, e) { + e.eachComponent({mainType: "series", subType: "sunburst", query: t}, function (e, i) { + t.unhighlight = !0 + }) + }); + var xk = Math.PI / 180; + ps(v(JD, "sunburst")), fs(v(function (t, e, i, n) { + e.eachSeriesByType(t, function (t) { + var e = t.get("center"), n = t.get("radius"); + y(n) || (n = [0, n]), y(e) || (e = [e, e]); + var o = i.getWidth(), a = i.getHeight(), r = Math.min(o, a), s = Do(e[0], o), l = Do(e[1], a), + u = Do(n[0], r / 2), h = Do(n[1], r / 2), c = -t.get("startAngle") * xk, f = t.get("minAngle") * xk, + p = t.getData().tree.root, g = t.getViewRoot(), m = g.depth, v = t.get("sort"); + null != v && sm(g, v); + var x = 0; + d(g.children, function (t) { + !isNaN(t.getValue()) && x++ + }); + var _ = g.getValue(), w = Math.PI / (_ || x) * 2, b = g.depth > 0, S = g.height - (b ? -1 : 1), + M = (h - u) / (S || 1), I = t.get("clockwise"), T = t.get("stillShowZeroSum"), D = I ? 1 : -1, + A = function (t, e) { + if (t) { + var i = e; + if (t !== p) { + var n = t.getValue(), o = 0 === _ && T ? w : n * w; + o < f && (o = f), i = e + D * o; + var a = t.depth - m - (b ? -1 : 1), h = u + M * a, c = u + M * (a + 1), g = t.getModel(); + null != g.get("r0") && (h = Do(g.get("r0"), r / 2)), null != g.get("r") && (c = Do(g.get("r"), r / 2)), t.setLayout({ + angle: o, + startAngle: e, + endAngle: i, + clockwise: I, + cx: s, + cy: l, + r0: h, + r: c + }) + } + if (t.children && t.children.length) { + var v = 0; + d(t.children, function (t) { + v += A(t, e + v) + }) + } + return i - e + } + }; + if (b) { + var C = u, L = u + M, k = 2 * Math.PI; + p.setLayout({angle: k, startAngle: c, endAngle: c + k, clockwise: I, cx: s, cy: l, r0: C, r: L}) + } + A(g, c) + }) + }, "sunburst")), hs(v(iA, "sunburst")); + var _k = ["itemStyle"], wk = ["emphasis", "itemStyle"], bk = ["label"], Sk = ["emphasis", "label"], Mk = "e\0\0", + Ik = { + cartesian2d: 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: function (e) { + return t.dataToPoint(e) + }, size: m(um, t) + } + } + }, geo: function (t) { + var e = t.getBoundingRect(); + return { + coordSys: {type: "geo", x: e.x, y: e.y, width: e.width, height: e.height}, + api: { + coord: function (e) { + return t.dataToPoint(e) + }, size: m(hm, t) + } + } + }, singleAxis: function (t) { + var e = t.getRect(); + return { + coordSys: {type: "singleAxis", x: e.x, y: e.y, width: e.width, height: e.height}, + api: { + coord: function (e) { + return t.dataToPoint(e) + }, size: m(cm, t) + } + } + }, polar: 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: m(function (n) { + var o = e.dataToRadius(n[0]), a = i.dataToAngle(n[1]), r = t.coordToPoint([o, a]); + return r.push(o, a * Math.PI / 180), r + }), size: m(dm, t) + } + } + }, calendar: 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: function (e, i) { + return t.dataToPoint(e, i) + } + } + } + } + }; + xs({ + type: "series.custom", + dependencies: ["grid", "polar", "geo", "singleAxis", "calendar"], + defaultOption: {coordinateSystem: "cartesian2d", zlevel: 0, z: 2, legendHoverLink: !0}, + getInitialData: function (t, e) { + return Xs(this.getSource(), this) + } + }), _s({ + type: "custom", _data: null, render: function (t, e, i) { + var n = this._data, o = t.getData(), a = this.group, r = mm(t, o, e, i); + this.group.removeAll(), o.diff(n).add(function (e) { + ym(null, e, r(e), t, a, o) + }).update(function (e, i) { + ym(n.getItemGraphicEl(i), e, r(e), t, a, o) + }).remove(function (t) { + var e = n.getItemGraphicEl(t); + e && a.remove(e) + }).execute(), this._data = o + }, incrementalPrepareRender: function (t, e, i) { + this.group.removeAll(), this._data = null + }, incrementalRender: function (t, e, i, n) { + for (var o = e.getData(), a = mm(e, o, i, n), r = t.start; r < t.end; r++) ym(null, r, a(r), e, this.group, o).traverse(function (t) { + t.isGroup || (t.incremental = !0, t.useHoverLayer = !0) + }) + }, dispose: B + }), us(function (t) { + var e = t.graphic; + y(e) ? e[0] && e[0].elements ? t.graphic = [t.graphic[0]] : t.graphic = [{elements: e}] : e && !e.elements && (t.graphic = [{elements: [e]}]) + }); + var Tk = vs({ + type: "graphic", + defaultOption: {elements: [], parentId: null}, + _elOptionsToUpdate: null, + mergeOption: function (t) { + var e = this.option.elements; + this.option.elements = null, Tk.superApply(this, "mergeOption", arguments), this.option.elements = e + }, + optionUpdated: function (t, e) { + var i = this.option, n = (e ? i : t).elements, o = i.elements = e ? [] : i.elements, a = []; + this._flatten(n, a); + var r = Di(o, a); + Ai(r); + var s = this._elOptionsToUpdate = []; + d(r, function (t, e) { + var i = t.option; + i && (s.push(i), Am(t, i), Cm(o, e, i), Lm(o[e], i)) + }, this); + for (var l = o.length - 1; l >= 0; l--) null == o[l] ? o.splice(l, 1) : delete o[l].$action + }, + _flatten: function (t, e, i) { + d(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 + } + }); + ys({ + type: "graphic", init: function (t, e) { + this._elMap = R(), 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, o = this.group; + d(i, function (t) { + var e = t.$action, i = t.id, a = n.get(i), r = t.parentId, s = null != r ? n.get(r) : o; + 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 u = Tm(t); + e && "merge" !== e ? "replace" === e ? (Im(a, n), Mm(i, s, u, n)) : "remove" === e && Im(a, n) : a ? a.attr(u) : Mm(i, s, u, n); + var h = n.get(i); + h && (h.__ecGraphicWidth = t.width, h.__ecGraphicHeight = t.height) + }) + } + }, _relocate: function (t, e) { + for (var i = t.option.elements, n = this.group, o = this._elMap, a = i.length - 1; a >= 0; a--) { + var r = i[a], s = o.get(r.id); + if (s) { + var l = s.parent; + ta(s, r, l === n ? {width: e.getWidth(), height: e.getHeight()} : { + width: l.__ecGraphicWidth || 0, + height: l.__ecGraphicHeight || 0 + }, null, {hv: r.hv, boundingMode: r.bounding}) + } + } + }, _clear: function () { + var t = this._elMap; + t.each(function (e) { + Im(e, t) + }), this._elMap = R() + }, dispose: function () { + this._clear() + } + }); + var Dk = vs({ + 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) { + Dk.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 = [], i = []; + t.eachRawSeries(function (n) { + var o = n.name; + i.push(o); + var a; + if (n.legendDataProvider) { + var r = n.legendDataProvider(), s = r.mapArray(r.getName); + t.isSeriesFiltered(n) || (i = i.concat(s)), s.length ? e = e.concat(s) : a = !0 + } else a = !0; + a && Ci(n) && e.push(n.name) + }), this._availableNames = i; + var n = f(this.get("data") || e, function (t) { + return "string" != typeof t && "number" != typeof t || (t = {name: t}), new wo(t, this, this.ecModel) + }, this); + this._data = n + }, + getData: function () { + return this._data + }, + select: function (t) { + var e = this.option.selected; + "single" === this.get("selectedMode") && d(this._data, 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]) && l(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} + } + }); + cs("legendToggleSelect", "legendselectchanged", v(km, "toggleSelected")), cs("legendSelect", "legendselected", v(km, "select")), cs("legendUnSelect", "legendunselected", v(km, "unSelect")); + var Ak = v, Ck = d, Lk = sw, kk = ys({ + type: "legend.plain", newlineDisabled: !1, init: function () { + this.group.add(this._contentGroup = new Lk), 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 o = t.getBoxLayoutParams(), a = {width: i.getWidth(), height: i.getHeight()}, s = t.get("padding"), + l = Qo(o, a, s), u = this.layoutInner(t, n, l), + h = Qo(r({width: u.width, height: u.height}, o), a, s); + this.group.attr("position", [h.x - u.x, h.y - u.y]), this.group.add(this._backgroundEl = Nm(u, t)) + } + }, resetInner: function () { + this.getContentGroup().removeAll(), this._backgroundEl && this.group.remove(this._backgroundEl) + }, renderInner: function (t, e, i, n) { + var o = this.getContentGroup(), a = R(), r = e.get("selectedMode"), s = []; + i.eachRawSeries(function (t) { + !t.get("legendHoverLink") && s.push(t.id) + }), Ck(e.getData(), function (l, u) { + var h = l.get("name"); + if (this.newlineDisabled || "" !== h && "\n" !== h) { + var c = i.getSeriesByName(h)[0]; + if (!a.get(h)) if (c) { + var d = c.getData(), f = d.getVisual("color"); + "function" == typeof f && (f = f(c.getDataParams(0))); + var p = d.getVisual("legendSymbol") || "roundRect", g = d.getVisual("symbol"); + this._createItem(h, u, l, e, p, g, t, f, r).on("click", Ak(Om, h, n)).on("mouseover", Ak(Em, c, null, n, s)).on("mouseout", Ak(Rm, c, null, n, s)), a.set(h, !0) + } else i.eachRawSeries(function (i) { + if (!a.get(h) && i.legendDataProvider) { + var o = i.legendDataProvider(), c = o.indexOfName(h); + if (c < 0) return; + var d = o.getItemVisual(c, "color"); + this._createItem(h, u, l, e, "roundRect", null, t, d, r).on("click", Ak(Om, h, n)).on("mouseover", Ak(Em, i, h, n, s)).on("mouseout", Ak(Rm, i, h, n, s)), a.set(h, !0) + } + }, this) + } else o.add(new Lk({newline: !0})) + }, this) + }, _createItem: function (t, e, i, n, o, r, s, l, u) { + var h = n.get("itemWidth"), c = n.get("itemHeight"), d = n.get("inactiveColor"), + f = n.get("symbolKeepAspect"), p = n.isSelected(t), g = new Lk, m = i.getModel("textStyle"), + v = i.get("icon"), y = i.getModel("tooltip"), x = y.parentModel; + if (o = v || o, g.add(Tl(o, 0, 0, h, c, p ? l : d, null == f || f)), !v && r && (r !== o || "none" == r)) { + var _ = .8 * c; + "none" === r && (r = "circle"), g.add(Tl(r, (h - _) / 2, (c - _) / 2, _, _, p ? l : d, null == f || f)) + } + var w = "left" === s ? h + 5 : -5, b = s, S = n.get("formatter"), M = t; + "string" == typeof S && S ? M = S.replace("{name}", null != t ? t : "") : "function" == typeof S && (M = S(t)), g.add(new fS({ + style: no({}, m, { + text: M, + x: w, + y: c / 2, + textFill: p ? m.getTextColor() : d, + textAlign: b, + textVerticalAlign: "middle" + }) + })); + var I = new SS({ + shape: g.getBoundingRect(), + invisible: !0, + tooltip: y.get("show") ? a({ + content: t, + formatter: x.get("formatter", !0) || function () { + return t + }, + formatterParams: {componentType: "legend", legendIndex: n.componentIndex, name: t, $vars: ["name"]} + }, y.option) : null + }); + return g.add(I), g.eachChild(function (t) { + t.silent = !0 + }), I.silent = !u, this.getContentGroup().add(g), eo(g), g.__legendDataIndex = e, g + }, layoutInner: function (t, e, i) { + var n = this.getContentGroup(); + sM(t.get("orient"), n, t.get("itemGap"), i.width, i.height); + var o = n.getBoundingRect(); + return n.attr("position", [-o.x, -o.y]), this.group.getBoundingRect() + } + }); + hs(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 + }) + }), hM.registerSubTypeDefaulter("legend", function () { + return "plain" + }); + var Pk = Dk.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 o = na(t); + Pk.superCall(this, "init", t, e, i, n), zm(this, t, o) + }, + mergeOption: function (t, e) { + Pk.superCall(this, "mergeOption", t, e), zm(this, this.option, t) + }, + getOrient: function () { + return "vertical" === this.get("orient") ? {index: 1, name: "vertical"} : {index: 0, name: "horizontal"} + } + }), Nk = sw, Ok = ["width", "height"], Ek = ["x", "y"], Rk = kk.extend({ + type: "legend.scroll", newlineDisabled: !0, init: function () { + Rk.superCall(this, "init"), this._currentIndex = 0, this.group.add(this._containerGroup = new Nk), this._containerGroup.add(this.getContentGroup()), this.group.add(this._controllerGroup = new Nk), this._showController + }, resetInner: function () { + Rk.superCall(this, "resetInner"), this._controllerGroup.removeAll(), this._containerGroup.removeClipPath(), this._containerGroup.__rectSize = null + }, renderInner: function (t, e, i, n) { + function o(t, i) { + var o = t + "DataIndex", + l = _o(e.get("pageIcons", !0)[e.getOrient().name][i], {onclick: m(a._pageGo, a, o, e, n)}, { + x: -s[0] / 2, + y: -s[1] / 2, + width: s[0], + height: s[1] + }); + l.name = t, r.add(l) + } + + var a = this; + Rk.superCall(this, "renderInner", t, e, i, n); + var r = this._controllerGroup, s = e.get("pageIconSize", !0); + y(s) || (s = [s, s]), o("pagePrev", 0); + var l = e.getModel("pageTextStyle"); + r.add(new fS({ + name: "pageText", + style: { + textFill: l.getTextColor(), + font: l.getFont(), + textVerticalAlign: "middle", + textAlign: "center" + }, + silent: !0 + })), o("pageNext", 1) + }, layoutInner: function (t, e, i) { + var n = this.getContentGroup(), o = this._containerGroup, a = this._controllerGroup, + r = t.getOrient().index, s = Ok[r], l = Ok[1 - r], u = Ek[1 - r]; + sM(t.get("orient"), n, t.get("itemGap"), r ? i.width : null, r ? null : i.height), sM("horizontal", a, t.get("pageButtonItemGap", !0)); + var h = n.getBoundingRect(), c = a.getBoundingRect(), d = this._showController = h[s] > i[s], + f = [-h.x, -h.y]; + f[r] = n.position[r]; + var p = [0, 0], g = [-c.x, -c.y], m = D(t.get("pageButtonGap", !0), t.get("itemGap", !0)); + d && ("end" === t.get("pageButtonPosition", !0) ? g[r] += i[s] - c[s] : p[r] += c[s] + m), g[1 - r] += h[l] / 2 - c[l] / 2, n.attr("position", f), o.attr("position", p), a.attr("position", g); + var v = this.group.getBoundingRect(); + if ((v = { + x: 0, + y: 0 + })[s] = d ? i[s] : h[s], v[l] = Math.max(h[l], c[l]), v[u] = Math.min(0, c[u] + g[1 - r]), o.__rectSize = i[s], d) { + var y = {x: 0, y: 0}; + y[s] = Math.max(i[s] - c[s] - m, 0), y[l] = v[l], o.setClipPath(new SS({shape: y})), o.__rectSize = y[s] + } else a.eachChild(function (t) { + t.attr({invisible: !0, silent: !0}) + }); + var x = this._getPageInfo(t); + return null != x.pageIndex && fo(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; + d(["pagePrev", "pageNext"], function (n) { + var o = null != e[n + "DataIndex"], a = i.childOfName(n); + a && (a.setStyle("fill", o ? t.get("pageIconColor", !0) : t.get("pageIconInactiveColor", !0)), a.cursor = o ? "pointer" : "default") + }); + var n = i.childOfName("pageText"), o = t.get("pageFormatter"), a = e.pageIndex, r = null != a ? a + 1 : 0, + s = e.pageCount; + n && o && n.setStyle("text", _(o) ? o.replace("{current}", r).replace("{total}", s) : o({ + current: r, + total: s + })) + }, _getPageInfo: function (t) { + function e(t) { + var e = t.getBoundingRect().clone(); + return e[f] += t.position[h], e + } + + var i, n, o, a, r = t.get("scrollDataIndex", !0), s = this.getContentGroup(), l = s.getBoundingRect(), + u = this._containerGroup.__rectSize, h = t.getOrient().index, c = Ok[h], d = Ok[1 - h], f = Ek[h], + p = s.position.slice(); + this._showController ? s.eachChild(function (t) { + t.__legendDataIndex === r && (a = t) + }) : a = s.childAt(0); + var g = u ? Math.ceil(l[c] / u) : 0; + if (a) { + var m = a.getBoundingRect(), v = a.position[h] + m[f]; + p[h] = -v - l[f], i = Math.floor(g * (v + m[f] + u / 2) / l[c]), i = l[c] && g ? Math.max(0, Math.min(g - 1, i)) : -1; + var y = {x: 0, y: 0}; + y[c] = u, y[d] = l[d], y[f] = -p[h] - l[f]; + var x, _ = s.children(); + if (s.eachChild(function (t, i) { + var n = e(t); + n.intersect(y) && (null == x && (x = i), o = t.__legendDataIndex), i === _.length - 1 && n[f] + n[c] <= y[f] + y[c] && (o = null) + }), null != x) { + var w = e(_[x]); + if (y[f] = w[f] + w[c] - y[c], x <= 0 && w[f] >= y[f]) n = null; else { + for (; x > 0 && e(_[x - 1]).intersect(y);) x--; + n = _[x].__legendDataIndex + } + } + } + return {contentPosition: p, pageIndex: i, pageCount: g, pagePrevDataIndex: n, pageNextDataIndex: o} + } + }); + cs("legendScroll", "legendscroll", function (t, e) { + var i = t.scrollDataIndex; + null != i && e.eachComponent({mainType: "legend", subType: "scroll", query: t}, function (t) { + t.setScrollDataIndex(i) + }) + }), vs({ + 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 zk = d, Bk = Ho, Vk = ["", "-webkit-", "-moz-", "-o-"]; + Wm.prototype = { + constructor: Wm, _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;" + Gm(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 o = this.el.style; + o.left = t + "px", o.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(m(this.hide, this), t)) : this.hide()) + }, isShow: function () { + return this._show + } + }; + var Gk = m, Wk = d, Fk = Do, Hk = new SS({shape: {x: -1, y: -1, width: 2, height: 2}}); + ys({ + type: "tooltip", init: function (t, e) { + if (!a_.node) { + var i = new Wm(e.getDom(), e); + this._tooltipContent = i + } + }, render: function (t, e, i) { + if (!a_.node && !a_.wxa) { + 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"); + Dg("itemTooltip", this._api, Gk(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 && !a_.node) { + var o = Hm(n, i); + this._ticket = ""; + var a = n.dataByCoordSys; + if (n.tooltip && null != n.x && null != n.y) { + var r = Hk; + r.position = [n.x, n.y], r.update(), r.tooltip = n.tooltip, this._tryShow({ + offsetX: n.x, + offsetY: n.y, + target: r + }, o) + } else if (a) this._tryShow({ + offsetX: n.x, + offsetY: n.y, + position: n.position, + event: {}, + dataByCoordSys: n.dataByCoordSys, + tooltipOption: n.tooltipOption + }, o); else if (null != n.seriesIndex) { + if (this._manuallyAxisShowTip(t, e, i, n)) return; + var s = KL(n, e), l = s.point[0], u = s.point[1]; + null != l && null != u && this._tryShow({ + offsetX: l, + offsetY: u, + position: n.position, + target: s.el, + event: {} + }, o) + } 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: {} + }, o)) + } + }, manuallyHideTip: function (t, e, i, n) { + var o = this._tooltipContent; + !this._alwaysShowContent && this._tooltipModel && o.hideLater(this._tooltipModel.get("hideDelay")), this._lastX = this._lastY = null, n.from !== this.uid && this._hide(Hm(n, i)) + }, _manuallyAxisShowTip: function (t, e, i, n) { + var o = n.seriesIndex, a = n.dataIndex, r = e.getComponent("axisPointer").coordSysAxesInfo; + if (null != o && null != a && null != r) { + var s = e.getSeriesByIndex(o); + if (s && "axis" === (t = Fm([s.getData().getItemModel(a), s, (s.coordinateSystem || {}).model, t])).get("trigger")) return i.dispatchAction({ + type: "updateAxisPointer", + seriesIndex: o, + dataIndex: a, + 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 = m(e, this), clearTimeout(this._showTimout), i > 0 ? this._showTimout = setTimeout(e, i) : e() + }, _showAxisTooltip: function (t, e) { + var i = this._ecModel, n = this._tooltipModel, o = [e.offsetX, e.offsetY], a = [], r = [], + s = Fm([e.tooltipOption, n]); + Wk(t, function (t) { + Wk(t.dataByAxis, function (t) { + var e = i.getComponent(t.axisDim + "Axis", t.axisIndex), n = t.value, o = []; + if (e && null != n) { + var s = Hg(n, e.axis, i, t.seriesDataIndices, t.valueLabelOpt); + d(t.seriesDataIndices, function (a) { + var l = i.getSeriesByIndex(a.seriesIndex), u = a.dataIndexInside, + h = l && l.getDataParams(u); + h.axisDim = t.axisDim, h.axisIndex = t.axisIndex, h.axisType = t.axisType, h.axisId = t.axisId, h.axisValue = bl(e.axis, n), h.axisValueLabel = s, h && (r.push(h), o.push(l.formatTooltip(u, !0))) + }); + var l = s; + a.push((l ? Zo(l) + "
    " : "") + o.join("
    ")) + } + }) + }, this), a.reverse(), a = a.join("

    "); + var l = e.position; + this._showOrMove(s, function () { + this._updateContentNotChangedOnAxis(t) ? this._updatePosition(s, l, o[0], o[1], this._tooltipContent, r) : this._showTooltipContent(s, a, r, Math.random(), o[0], o[1], l) + }) + }, _showSeriesItemTooltip: function (t, e, i) { + var n = this._ecModel, o = e.seriesIndex, a = n.getSeriesByIndex(o), r = e.dataModel || a, s = e.dataIndex, + l = e.dataType, u = r.getData(), + h = Fm([u.getItemModel(s), r, a && (a.coordinateSystem || {}).model, this._tooltipModel]), + c = h.get("trigger"); + if (null == c || "item" === c) { + var d = r.getDataParams(s, l), f = r.formatTooltip(s, !1, l), p = "item_" + r.name + "_" + s; + this._showOrMove(h, function () { + this._showTooltipContent(h, f, d, p, t.offsetX, t.offsetY, t.position, t.target) + }), i({ + type: "showTip", + dataIndexInside: s, + dataIndex: u.getRawIndex(s), + seriesIndex: o, + from: this.uid + }) + } + }, _showComponentItemTooltip: function (t, e, i) { + var n = e.tooltip; + if ("string" == typeof n) { + var o = n; + n = {content: o, formatter: o} + } + var a = new wo(n, this._tooltipModel, this._ecModel), r = a.get("content"), s = Math.random(); + this._showOrMove(a, function () { + this._showTooltipContent(a, r, a.get("formatterParams") || {}, s, t.offsetX, t.offsetY, t.position, e) + }), i({type: "showTip", from: this.uid}) + }, _showTooltipContent: function (t, e, i, n, o, a, r, s) { + if (this._ticket = "", t.get("showContent") && t.get("show")) { + var l = this._tooltipContent, u = t.get("formatter"); + r = r || t.get("position"); + var h = e; + if (u && "string" == typeof u) h = Uo(u, i, !0); else if ("function" == typeof u) { + var c = Gk(function (e, n) { + e === this._ticket && (l.setContent(n), this._updatePosition(t, r, o, a, l, i, s)) + }, this); + this._ticket = n, h = u(i, n, c) + } + l.setContent(h), l.show(t), this._updatePosition(t, r, o, a, l, i, s) + } + }, _updatePosition: function (t, e, i, n, o, a, r) { + var s = this._api.getWidth(), l = this._api.getHeight(); + e = e || t.get("position"); + var u = o.getSize(), h = 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], a, o.el, d, { + viewSize: [s, l], + contentSize: u.slice() + })), y(e)) i = Fk(e[0], s), n = Fk(e[1], l); else if (w(e)) { + e.width = u[0], e.height = u[1]; + var f = Qo(e, {width: s, height: l}); + i = f.x, n = f.y, h = null, c = null + } else "string" == typeof e && r ? (i = (p = jm(e, d, u))[0], n = p[1]) : (i = (p = Zm(i, n, o.el, s, l, h ? null : 20, c ? null : 20))[0], n = p[1]); + if (h && (i -= Ym(h) ? u[0] / 2 : "right" === h ? u[0] : 0), c && (n -= Ym(c) ? u[1] / 2 : "bottom" === c ? u[1] : 0), t.get("confine")) { + var p = Um(i, n, o.el, s, l); + i = p[0], n = p[1] + } + o.moveTo(i, n) + }, _updateContentNotChangedOnAxis: function (t) { + var e = this._lastDataByCoordSys, i = !!e && e.length === t.length; + return i && Wk(e, function (e, n) { + var o = e.dataByAxis || {}, a = (t[n] || {}).dataByAxis || []; + (i &= o.length === a.length) && Wk(o, function (t, e) { + var n = a[e] || {}, o = t.seriesDataIndices || [], r = n.seriesDataIndices || []; + (i &= t.value === n.value && t.axisType === n.axisType && t.axisId === n.axisId && o.length === r.length) && Wk(o, 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) { + a_.node || a_.wxa || (this._tooltipContent.hide(), Ng("itemTooltip", e)) + } + }), cs({type: "showTip", event: "showTip", update: "tooltip:manuallyShowTip"}, function () { + }), cs({type: "hideTip", event: "hideTip", update: "tooltip:manuallyHideTip"}, function () { + }), Jm.prototype = { + constructor: Jm, pointToData: function (t, e) { + return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1] + }, dataToRadius: qT.prototype.dataToCoord, radiusToData: qT.prototype.coordToData + }, u(Jm, qT), Qm.prototype = { + constructor: Qm, pointToData: function (t, e) { + return this.polar.pointToData(t, e)["radius" === this.dim ? 0 : 1] + }, dataToAngle: qT.prototype.dataToCoord, angleToData: qT.prototype.coordToData + }, u(Qm, qT); + var Zk = function (t) { + this.name = t || "", this.cx = 0, this.cy = 0, this._radiusAxis = new Jm, this._angleAxis = new Qm, this._radiusAxis.polar = this._angleAxis.polar = this + }; + Zk.prototype = { + type: "polar", + axisPointerEnabled: !0, + constructor: Zk, + 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(), o = n.getExtent(), + a = Math.min(o[0], o[1]), r = Math.max(o[0], o[1]); + n.inverse ? a = r - 360 : r = a + 360; + var s = Math.sqrt(e * e + i * i); + e /= s, i /= s; + for (var l = Math.atan2(-i, e) / Math.PI * 180, u = l < a ? 1 : -1; l < a || l > r;) l += 360 * u; + 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 Uk = hM.extend({ + type: "polarAxis", axis: null, getCoordSysModel: function () { + return this.ecModel.queryComponents({ + mainType: "polar", + index: this.option.polarIndex, + id: this.option.polarId + })[0] + } + }); + n(Uk.prototype, ET); + var Xk = { + angle: {startAngle: 90, clockwise: !0, splitNumber: 12, axisLabel: {rotate: !1}}, + radius: {splitNumber: 5} + }; + MD("angle", Uk, tv, Xk.angle), MD("radius", Uk, tv, Xk.radius), vs({ + 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 jk = { + dimensions: Zk.prototype.dimensions, create: function (t, e) { + var i = []; + return t.eachComponent("polar", function (t, n) { + var o = new Zk(n); + o.update = iv; + var a = o.getRadiusAxis(), r = o.getAngleAxis(), s = t.findAxisModel("radiusAxis"), + l = t.findAxisModel("angleAxis"); + nv(a, s), nv(r, l), ev(o, t, e), i.push(o), t.coordinateSystem = o, o.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 + } + }; + Ca.register("polar", jk); + var Yk = ["axisLine", "axisLabel", "axisTick", "splitLine", "splitArea"]; + ED.extend({ + type: "angleAxis", axisPointerClass: "PolarAxisPointer", render: function (t, e) { + if (this.group.removeAll(), t.get("show")) { + var n = t.axis, o = n.polar, a = o.getRadiusAxis().getExtent(), r = n.getTicksCoords(), + s = f(n.getViewLabels(), function (t) { + return (t = i(t)).coord = n.dataToCoord(t.tickValue), t + }); + rv(s), rv(r), d(Yk, function (e) { + !t.get(e + ".show") || n.scale.isBlank() && "axisLine" !== e || this["_" + e](t, o, r, a, s) + }, this) + } + }, _axisLine: function (t, e, i, n) { + var o = t.getModel("axisLine.lineStyle"), + a = new pS({shape: {cx: e.cx, cy: e.cy, r: n[av(e)]}, style: o.getLineStyle(), z2: 1, silent: !0}); + a.style.fill = null, this.group.add(a) + }, _axisTick: function (t, e, i, n) { + var o = t.getModel("axisTick"), a = (o.get("inside") ? -1 : 1) * o.get("length"), s = n[av(e)], + l = f(i, function (t) { + return new MS({shape: ov(e, [s, s + a], t.coord)}) + }); + this.group.add(zS(l, {style: r(o.getModel("lineStyle").getLineStyle(), {stroke: t.get("axisLine.lineStyle.color")})})) + }, _axisLabel: function (t, e, i, n, o) { + var a = t.getCategories(!0), r = t.getModel("axisLabel"), s = r.get("margin"); + d(o, function (i, o) { + var l = r, u = i.tickValue, h = n[av(e)], c = e.coordToPoint([h + s, i.coord]), d = e.cx, f = e.cy, + p = Math.abs(c[0] - d) / h < .3 ? "center" : c[0] > d ? "left" : "right", + g = Math.abs(c[1] - f) / h < .3 ? "middle" : c[1] > f ? "top" : "bottom"; + a && a[u] && a[u].textStyle && (l = new wo(a[u].textStyle, r, r.ecModel)); + var m = new fS({silent: !0}); + this.group.add(m), no(m.style, l, { + x: c[0], + y: c[1], + textFill: l.getTextColor() || t.get("axisLine.lineStyle.color"), + text: i.formattedLabel, + textAlign: p, + textVerticalAlign: g + }) + }, this) + }, _splitLine: function (t, e, i, n) { + var o = t.getModel("splitLine").getModel("lineStyle"), a = o.get("color"), s = 0; + a = a instanceof Array ? a : [a]; + for (var l = [], u = 0; u < i.length; u++) { + var h = s++ % a.length; + l[h] = l[h] || [], l[h].push(new MS({shape: ov(e, n, i[u].coord)})) + } + for (u = 0; u < l.length; u++) this.group.add(zS(l[u], { + style: r({stroke: a[u % a.length]}, o.getLineStyle()), + silent: !0, + z: t.get("z") + })) + }, _splitArea: function (t, e, i, n) { + if (i.length) { + var o = t.getModel("splitArea").getModel("areaStyle"), a = o.get("color"), s = 0; + a = a instanceof Array ? a : [a]; + for (var l = [], u = Math.PI / 180, h = -i[0].coord * u, c = Math.min(n[0], n[1]), d = Math.max(n[0], n[1]), f = t.get("clockwise"), p = 1; p < i.length; p++) { + var g = s++ % a.length; + l[g] = l[g] || [], l[g].push(new vS({ + shape: { + cx: e.cx, + cy: e.cy, + r0: c, + r: d, + startAngle: h, + endAngle: -i[p].coord * u, + clockwise: f + }, silent: !0 + })), h = -i[p].coord * u + } + for (p = 0; p < l.length; p++) this.group.add(zS(l[p], { + style: r({fill: a[p % a.length]}, o.getAreaStyle()), + silent: !0 + })) + } + } + }); + var qk = ["axisLine", "axisTickLabel", "axisName"], Kk = ["splitLine", "splitArea"]; + ED.extend({ + type: "radiusAxis", axisPointerClass: "PolarAxisPointer", render: function (t, e) { + if (this.group.removeAll(), t.get("show")) { + var i = t.axis, n = i.polar, o = n.getAngleAxis(), a = i.getTicksCoords(), r = o.getExtent()[0], + s = i.getExtent(), l = sv(n, t, r), u = new LD(t, l); + d(qk, u.add, u), this.group.add(u.getGroup()), d(Kk, function (e) { + t.get(e + ".show") && !i.scale.isBlank() && this["_" + e](t, n, r, s, a) + }, this) + } + }, _splitLine: function (t, e, i, n, o) { + var a = t.getModel("splitLine").getModel("lineStyle"), s = a.get("color"), l = 0; + s = s instanceof Array ? s : [s]; + for (var u = [], h = 0; h < o.length; h++) { + var c = l++ % s.length; + u[c] = u[c] || [], u[c].push(new pS({shape: {cx: e.cx, cy: e.cy, r: o[h].coord}, silent: !0})) + } + for (h = 0; h < u.length; h++) this.group.add(zS(u[h], { + style: r({ + stroke: s[h % s.length], + fill: null + }, a.getLineStyle()), silent: !0 + })) + }, _splitArea: function (t, e, i, n, o) { + if (o.length) { + var a = t.getModel("splitArea").getModel("areaStyle"), s = a.get("color"), l = 0; + s = s instanceof Array ? s : [s]; + for (var u = [], h = o[0].coord, c = 1; c < o.length; c++) { + var d = l++ % s.length; + u[d] = u[d] || [], u[d].push(new vS({ + shape: { + cx: e.cx, + cy: e.cy, + r0: h, + r: o[c].coord, + startAngle: 0, + endAngle: 2 * Math.PI + }, silent: !0 + })), h = o[c].coord + } + for (c = 0; c < u.length; c++) this.group.add(zS(u[c], { + style: r({fill: s[c % s.length]}, a.getAreaStyle()), + silent: !0 + })) + } + } + }); + var $k = Og.extend({ + makeElOption: function (t, e, i, n, o) { + var a = i.axis; + "angle" === a.dim && (this.animationThreshold = Math.PI / 18); + var r, s = a.polar, l = s.getOtherAxis(a).getExtent(); + r = a["dataTo" + Ko(a.dim)](e); + var u = n.get("type"); + if (u && "none" !== u) { + var h = Gg(n), c = Jk[u](a, s, r, l, h); + c.style = h, t.graphicKey = c.type, t.pointer = c + } + Wg(t, i, n, o, lv(e, i, 0, s, n.get("label.margin"))) + } + }), Jk = { + line: function (t, e, i, n, o) { + return "angle" === t.dim ? { + type: "Line", + shape: Xg(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, o) { + var a = Math.max(1, t.getBandWidth()), r = Math.PI / 180; + return "angle" === t.dim ? { + type: "Sector", + shape: Yg(e.cx, e.cy, n[0], n[1], (-i - a / 2) * r, (a / 2 - i) * r) + } : {type: "Sector", shape: Yg(e.cx, e.cy, i - a / 2, i + a / 2, 0, 2 * Math.PI)} + } + }; + ED.registerAxisPointerClass("PolarAxisPointer", $k), fs(v(function (t, e, i) { + var n = i.getWidth(), o = i.getHeight(), a = {}, r = $m(g(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, s = i.getBaseAxis(), l = qm(t), u = r[Km(s)][l], + h = u.offset, c = u.width, d = i.getOtherAxis(s), f = t.get("center") || ["50%", "50%"], + p = Do(f[0], n), g = Do(f[1], o), m = t.get("barMinHeight") || 0, v = t.get("barMinAngle") || 0; + a[l] = a[l] || []; + for (var y = e.mapDimension(d.dim), x = e.mapDimension(s.dim), _ = Zs(e, y), w = d.getExtent()[0], b = 0, S = e.count(); b < S; b++) { + var M = e.get(y, b), I = e.get(x, b); + if (!isNaN(M)) { + var T = M >= 0 ? "p" : "n", D = w; + _ && (a[l][I] || (a[l][I] = {p: w, n: w}), D = a[l][I][T]); + var A, C, L, k; + if ("radius" === d.dim) { + var P = d.dataToRadius(M) - w, N = s.dataToAngle(I); + Math.abs(P) < m && (P = (P < 0 ? -1 : 1) * m), A = D, C = D + P, k = (L = N - h) - c, _ && (a[l][I][T] = C) + } else { + var O = d.dataToAngle(M, !0) - w, E = s.dataToRadius(I); + Math.abs(O) < v && (O = (O < 0 ? -1 : 1) * v), C = (A = E + h) + c, L = D, k = D + O, _ && (a[l][I][T] = k) + } + e.setItemLayout(b, { + cx: p, + cy: g, + r0: A, + r: C, + startAngle: -L * Math.PI / 180, + endAngle: -k * Math.PI / 180 + }) + } + } + } + }, this) + }, "bar")), ys({type: "polar"}), h(hM.extend({ + type: "geo", + coordinateSystem: null, + layoutMode: "box", + init: function (t) { + hM.prototype.init.apply(this, arguments), Mi(t, "label", ["show"]) + }, + optionUpdated: function () { + var t = this.option, e = this; + t.regions = vA.getFilledRegions(t.regions, t.map, t.nameMap), this._optionModelMap = p(t.regions || [], function (t, i) { + return i.name && t.set(i.name, new wo(i, e)), t + }, R()), 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: {show: !1, color: "#000"}, + itemStyle: {borderWidth: .5, borderColor: "#444", color: "#eee"}, + emphasis: {label: {show: !0, color: "rgb(100,0,0)"}, itemStyle: {color: "rgba(255,215,0,0.8)"}}, + regions: [] + }, + getRegionModel: function (t) { + return this._optionModelMap.get(t) || new wo(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 + } + }), YD), ys({ + type: "geo", init: function (t, e) { + var i = new Uh(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 o = this._mapDraw; + t.get("show") ? o.draw(t, e, i, this, n) : this._mapDraw.group.removeAll(), this.group.silent = t.get("silent") + } + }, dispose: function () { + this._mapDraw && this._mapDraw.remove() + } + }), uv("toggleSelected", {type: "geoToggleSelect", event: "geoselectchanged"}), uv("select", { + type: "geoSelect", + event: "geoselected" + }), uv("unSelect", {type: "geoUnSelect", event: "geounselected"}); + var Qk = ["rect", "polygon", "keep", "clear"], tP = d, eP = { + lineX: mv(0), lineY: mv(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]) && Al(i.range, t[0], t[1]) + }, rect: function (t, e, i) { + var n = i.range; + if (!t || n.length <= 1) return !1; + var o = t.x, a = t.y, r = t.width, s = t.height, l = n[0]; + return !!(Al(n, o, a) || Al(n, o + r, a) || Al(n, o, a + s) || Al(n, o + r, a + s) || $t.create(t).contain(l[0], l[1]) || yv(o, a, o + r, a, n) || yv(o, a, o, a + s, n) || yv(o + r, a, o + r, a + s, n) || yv(o, a + s, o + r, a + s, n)) || void 0 + } + } + }, iP = d, nP = l, oP = v, aP = ["dataToPoint", "pointToData"], + rP = ["grid", "xAxis", "yAxis", "geo", "graph", "polar", "radiusAxis", "angleAxis", "bmap"], sP = bv.prototype; + sP.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 = cP[t.brushType](0, i, e); + t.__rangeOffset = {offset: dP[t.brushType](n.values, t.range, [1, 1]), xyMinMax: n.xyMinMax} + } + }) + }, sP.matchOutputRanges = function (t, e, i) { + iP(t, function (t) { + var n = this.findTargetInfo(t, e); + n && !0 !== n && d(n.coordSyses, function (n) { + var o = cP[t.brushType](1, n, t.range); + i(t, o.values, n, e) + }) + }, this) + }, sP.setInputRanges = function (t, e) { + iP(t, function (t) { + var i = this.findTargetInfo(t, e); + if (t.range = t.range || [], i && !0 !== i) { + t.panelId = i.panelId; + var n = cP[t.brushType](0, i.coordSys, t.coordRange), o = t.__rangeOffset; + t.range = o ? dP[t.brushType](n.values, o.offset, Dv(n.xyMinMax, o.xyMinMax)) : n.values + } + }, this) + }, sP.makePanelOpts = function (t, e) { + return f(this._targetInfoList, function (i) { + var n = i.getPanelRect(); + return { + panelId: i.panelId, + defaultBrushType: e && e(i), + clipPath: Ef(n), + isTargetByCursor: zf(n, t, i.coordSysModel), + getLinearBrushOtherExtent: Rf(n) + } + }) + }, sP.controlSeries = function (t, e, i) { + var n = this.findTargetInfo(t, i); + return !0 === n || n && nP(n.coordSyses, e.coordinateSystem) >= 0 + }, sP.findTargetInfo = function (t, e) { + for (var i = this._targetInfoList, n = Mv(e, t), o = 0; o < i.length; o++) { + var a = i[o], r = t.panelId; + if (r) { + if (a.panelId === r) return a + } else for (o = 0; o < uP.length; o++) if (uP[o](n, a)) return a + } + return !0 + }; + var lP = { + grid: function (t, e) { + var i = t.xAxisModels, n = t.yAxisModels, o = t.gridModels, a = R(), r = {}, s = {}; + (i || n || o) && (iP(i, function (t) { + var e = t.axis.grid.model; + a.set(e.id, e), r[e.id] = !0 + }), iP(n, function (t) { + var e = t.axis.grid.model; + a.set(e.id, e), s[e.id] = !0 + }), iP(o, function (t) { + a.set(t.id, t), r[t.id] = !0, s[t.id] = !0 + }), a.each(function (t) { + var o = t.coordinateSystem, a = []; + iP(o.getCartesians(), function (t, e) { + (nP(i, t.getAxis("x").model) >= 0 || nP(n, t.getAxis("y").model) >= 0) && a.push(t) + }), e.push({ + panelId: "grid--" + t.id, + gridModel: t, + coordSysModel: t, + coordSys: a[0], + coordSyses: a, + getPanelRect: hP.grid, + xAxisDeclared: r[t.id], + yAxisDeclared: s[t.id] + }) + })) + }, geo: function (t, e) { + iP(t.geoModels, function (t) { + var i = t.coordinateSystem; + e.push({ + panelId: "geo--" + t.id, + geoModel: t, + coordSysModel: t, + coordSys: i, + coordSyses: [i], + getPanelRect: hP.geo + }) + }) + } + }, uP = [function (t, e) { + var i = t.xAxisModel, n = t.yAxisModel, o = t.gridModel; + return !o && i && (o = i.axis.grid.model), !o && n && (o = n.axis.grid.model), o && o === e.gridModel + }, function (t, e) { + var i = t.geoModel; + return i && i === e.geoModel + }], hP = { + grid: function () { + return this.coordSys.grid.getRect().clone() + }, geo: function () { + var t = this.coordSys, e = t.getBoundingRect().clone(); + return e.applyTransform(go(t)), e + } + }, cP = { + lineX: oP(Iv, 0), lineY: oP(Iv, 1), rect: function (t, e, i) { + var n = e[aP[t]]([i[0][0], i[1][0]]), o = e[aP[t]]([i[0][1], i[1][1]]), + a = [Sv([n[0], o[0]]), Sv([n[1], o[1]])]; + return {values: a, xyMinMax: a} + }, polygon: function (t, e, i) { + var n = [[1 / 0, -1 / 0], [1 / 0, -1 / 0]]; + return { + values: f(i, function (i) { + var o = e[aP[t]](i); + return n[0][0] = Math.min(n[0][0], o[0]), n[1][0] = Math.min(n[1][0], o[1]), n[0][1] = Math.max(n[0][1], o[0]), n[1][1] = Math.max(n[1][1], o[1]), o + }), xyMinMax: n + } + } + }, dP = { + lineX: oP(Tv, 0), lineY: oP(Tv, 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 f(t, function (t, n) { + return [t[0] - i[0] * e[n][0], t[1] - i[1] * e[n][1]] + }) + } + }, fP = ["inBrush", "outOfBrush"], pP = "__ecBrushSelect", gP = "__ecInBrushSelectEvent", mP = LI.VISUAL.BRUSH; + fs(mP, 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 bv(e.option, t)).setInputRanges(e.areas, t) + }) + }), ps(mP, function (t, e, n) { + var o, a, s = []; + t.eachComponent({mainType: "brush"}, function (e, n) { + function l(t) { + return "all" === m || v[t] + } + + function u(t) { + return !!t.length + } + + function h(t, e) { + var i = t.coordinateSystem; + w |= i.hasAxisBrushed(), l(e) && i.eachActiveState(t.getData(), function (t, e) { + "active" === t && (x[e] = 1) + }) + } + + function c(i, n, o) { + var a = Pv(i); + if (a && !Nv(e, n) && (d(b, function (n) { + a[n.brushType] && e.brushTargetManager.controlSeries(n, i, t) && o.push(n), w |= u(o) + }), l(n) && u(o))) { + var r = i.getData(); + r.each(function (t) { + kv(a, o, r, t) && (x[t] = 1) + }) + } + } + + var p = {brushId: e.id, brushIndex: n, brushName: e.name, areas: i(e.areas), selected: []}; + s.push(p); + var g = e.option, m = g.brushLink, v = [], x = [], _ = [], w = 0; + n || (o = g.throttleType, a = g.throttleDelay); + var b = f(e.areas, function (t) { + return Ov(r({boundingRect: vP[t.brushType](t)}, t)) + }), S = dv(e.option, fP, function (t) { + t.mappingMethod = "fixed" + }); + y(m) && d(m, function (t) { + v[t] = 1 + }), t.eachSeries(function (t, e) { + var i = _[e] = []; + "parallel" === t.subType ? h(t, e) : c(t, e, i) + }), t.eachSeries(function (t, e) { + var i = {seriesId: t.id, seriesIndex: e, seriesName: t.name, dataIndex: []}; + p.selected.push(i); + var n = Pv(t), o = _[e], a = t.getData(), r = l(e) ? function (t) { + return x[t] ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush" + } : function (t) { + return kv(n, o, a, t) ? (i.dataIndex.push(a.getRawIndex(t)), "inBrush") : "outOfBrush" + }; + (l(e) ? w : u(o)) && pv(fP, S, a, r) + }) + }), Cv(e, o, a, s, n) + }); + var vP = { + lineX: B, lineY: B, rect: function (t) { + return Ev(t.range) + }, polygon: function (t) { + for (var e, i = t.range, n = 0, o = i.length; n < o; n++) { + e = e || [[1 / 0, -1 / 0], [1 / 0, -1 / 0]]; + var a = i[n]; + a[0] < e[0][0] && (e[0][0] = a[0]), a[0] > e[0][1] && (e[0][1] = a[0]), a[1] < e[1][0] && (e[1][0] = a[1]), a[1] > e[1][1] && (e[1][1] = a[1]) + } + return e && Ev(e) + } + }, yP = ["#ddd"]; + vs({ + 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 && fv(i, t, ["inBrush", "outOfBrush"]); + var n = i.inBrush = i.inBrush || {}; + i.outOfBrush = i.outOfBrush || {color: yP}, n.hasOwnProperty("liftZ") || (n.liftZ = 5) + }, + setAreas: function (t) { + t && (this.areas = f(t, function (t) { + return Rv(this.option, t) + }, this)) + }, + setBrushOption: function (t) { + this.brushOption = Rv(this.option, t), this.brushType = this.brushOption.brushType + } + }); + ys({ + type: "brush", init: function (t, e) { + this.ecModel = t, this.api = e, this.model, (this._brushController = new Qd(e.getZr())).on("brush", m(this._onBrush, this)).mount() + }, render: function (t) { + return this.model = t, zv.apply(this, arguments) + }, updateTransform: zv, updateView: zv, dispose: function () { + this._brushController.dispose() + }, _onBrush: function (t, e) { + var n = this.model.id; + this.model.brushTargetManager.setOutputRanges(t, this.ecModel), (!e.isEnd || e.removeOnClick) && this.api.dispatchAction({ + type: "brush", + brushId: n, + areas: i(t), + $from: n + }) + } + }), cs({type: "brush", event: "brush"}, function (t, e) { + e.eachComponent({mainType: "brush", query: t}, function (e) { + e.setAreas(t.areas) + }) + }), cs({type: "brushSelect", event: "brushSelected", update: "none"}, function () { + }); + var xP = {}, _P = lI.toolbox.brush; + Gv.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: i(_P.title) + }; + var wP = Gv.prototype; + wP.render = wP.updateView = function (t, e, i) { + var n, o, a; + e.eachComponent({mainType: "brush"}, function (t) { + n = t.brushType, o = t.brushOption.brushMode || "single", a |= t.areas.length + }), this._brushType = n, this._brushMode = o, d(t.get("type", !0), function (e) { + t.setIconStatus(e, ("keep" === e ? "multiple" === o : "clear" === e ? a : e === n) ? "emphasis" : "normal") + }) + }, wP.getIcons = function () { + var t = this.model, e = t.get("icon", !0), i = {}; + return d(t.get("type", !0), function (t) { + e[t] && (i[t] = e[t]) + }), i + }, wP.onclick = function (t, e, i) { + var n = this._brushType, o = 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" === o ? "single" : "multiple" : o + } + }) + }, Bv("brush", Gv), us(function (t, e) { + var i = t && t.brush; + if (y(i) || (i = i ? [i] : []), i.length) { + var n = []; + d(i, function (t) { + var e = t.hasOwnProperty("toolbox") ? t.toolbox : []; + e instanceof Array && (n = n.concat(e)) + }); + var o = t && t.toolbox; + y(o) && (o = o[0]), o || (o = {feature: {}}, t.toolbox = [o]); + var a = o.feature || (o.feature = {}), r = a.brush || (a.brush = {}), s = r.type || (r.type = []); + s.push.apply(s, n), hv(s), e && !s.length && s.push.apply(s, Qk) + } + }); + Wv.prototype = { + constructor: Wv, type: "calendar", dimensions: ["time", "value"], getDimensionsInfo: function () { + return [{name: "time", type: "time"}, "value"] + }, getRangeInfo: function () { + return this._rangeInfo + }, getModel: function () { + return this._model + }, getRect: function () { + return this._rect + }, getCellWidth: function () { + return this._sw + }, getCellHeight: function () { + return this._sh + }, getOrient: function () { + return this._orient + }, getFirstDayOfWeek: function () { + return this._firstDayOfWeek + }, getDateInfo: function (t) { + var e = (t = Ro(t)).getFullYear(), i = t.getMonth() + 1; + i = i < 10 ? "0" + i : i; + var n = t.getDate(); + n = n < 10 ? "0" + n : n; + var o = t.getDay(); + return o = Math.abs((o + 7 - this.getFirstDayOfWeek()) % 7), { + y: e, + m: i, + d: n, + day: o, + time: t.getTime(), + formatedDate: e + "-" + i + "-" + n, + date: t + } + }, getNextNDay: function (t, e) { + return 0 === (e = e || 0) ? this.getDateInfo(t) : ((t = new Date(this.getDateInfo(t).time)).setDate(t.getDate() + e), this.getDateInfo(t)) + }, update: function (t, e) { + function i(t, e) { + return null != t[e] && "auto" !== t[e] + } + + this._firstDayOfWeek = +this._model.getModel("dayLabel").get("firstDay"), this._orient = this._model.get("orient"), this._lineWidth = this._model.getModel("itemStyle").getItemStyle().lineWidth || 0, this._rangeInfo = this._getRangeInfo(this._initRangeOption()); + var n = this._rangeInfo.weeks || 1, o = ["width", "height"], a = this._model.get("cellSize").slice(), + r = this._model.getBoxLayoutParams(), s = "horizontal" === this._orient ? [n, 7] : [7, n]; + d([0, 1], function (t) { + i(a, t) && (r[o[t]] = a[t] * s[t]) + }); + var l = {width: e.getWidth(), height: e.getHeight()}, u = this._rect = Qo(r, l); + d([0, 1], function (t) { + i(a, t) || (a[t] = u[o[t]] / s[t]) + }), this._sw = a[0], this._sh = a[1] + }, dataToPoint: function (t, e) { + y(t) && (t = t[0]), null == e && (e = !0); + var i = this.getDateInfo(t), n = this._rangeInfo, o = i.formatedDate; + if (e && !(i.time >= n.start.time && i.time < n.end.time + 864e5)) return [NaN, NaN]; + var a = i.day, r = this._getRangeInfo([n.start.time, o]).nthWeek; + return "vertical" === this._orient ? [this._rect.x + a * 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 + a * 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: v(Fv, "dataToPoint"), convertFromPixel: v(Fv, "pointToData"), _initRangeOption: function () { + var t = this._model.get("range"), e = t; + if (y(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 o = this.getNextNDay(n, -1); + t = [i.formatedDate, o.formatedDate] + } + /^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(e) && (t = [e, e]); + var a = this._getRangeInfo(t); + return a.start.time > a.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), + o = n.getDate(), a = t[1].date.getDate(); + if (n.setDate(o + i - 1), n.getDate() !== a) for (var r = n.getTime() - t[1].time > 0 ? 1 : -1; n.getDate() !== a && (n.getTime() - t[1].time) * r > 0;) i -= r, n.setDate(o + 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 o = 7 * (t - 1) - n.fweek + e, a = new Date(n.start.time); + return a.setDate(n.start.d + o), this.getDateInfo(a) + } + }, Wv.dimensions = Wv.prototype.dimensions, Wv.getDimensionsInfo = Wv.prototype.getDimensionsInfo, Wv.create = function (t, e) { + var i = []; + return t.eachComponent("calendar", function (n) { + var o = new Wv(n, t, e); + i.push(o), n.coordinateSystem = o + }), t.eachSeries(function (t) { + "calendar" === t.get("coordinateSystem") && (t.coordinateSystem = i[t.get("calendarIndex") || 0]) + }), i + }, Ca.register("calendar", Wv); + var bP = hM.extend({ + type: "calendar", + coordinateSystem: null, + defaultOption: { + zlevel: 0, + z: 2, + left: 80, + top: 60, + cellSize: 20, + orient: "horizontal", + splitLine: {show: !0, lineStyle: {color: "#000", width: 1, type: "solid"}}, + itemStyle: {color: "#fff", borderWidth: 1, borderColor: "#ccc"}, + dayLabel: {show: !0, firstDay: 0, position: "start", margin: "50%", nameMap: "en", color: "#000"}, + monthLabel: { + show: !0, + position: "start", + margin: 5, + align: "center", + nameMap: "en", + formatter: null, + color: "#000" + }, + yearLabel: { + show: !0, + position: null, + margin: 30, + formatter: null, + color: "#ccc", + fontFamily: "sans-serif", + fontWeight: "bolder", + fontSize: 20 + } + }, + init: function (t, e, i, n) { + var o = na(t); + bP.superApply(this, "init", arguments), Hv(t, o) + }, + mergeOption: function (t, e) { + bP.superApply(this, "mergeOption", arguments), Hv(this.option, t) + } + }), SP = { + EN: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], + CN: ["一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"] + }, MP = {EN: ["S", "M", "T", "W", "T", "F", "S"], CN: ["日", "一", "二", "三", "四", "五", "六"]}; + ys({ + type: "calendar", + _tlpoints: null, + _blpoints: null, + _firstDayOfMonth: null, + _firstDayPoints: null, + render: function (t, e, i) { + var n = this.group; + n.removeAll(); + var o = t.coordinateSystem, a = o.getRangeInfo(), r = o.getOrient(); + this._renderDayRect(t, a, n), this._renderLines(t, a, r, n), this._renderYearText(t, a, r, n), this._renderMonthText(t, r, n), this._renderWeekText(t, a, r, n) + }, + _renderDayRect: function (t, e, i) { + for (var n = t.coordinateSystem, o = t.getModel("itemStyle").getItemStyle(), a = n.getCellWidth(), r = n.getCellHeight(), s = e.start.time; s <= e.end.time; s = n.getNextNDay(s, 1).time) { + var l = n.dataToRect([s], !1).tl, + u = new SS({shape: {x: l[0], y: l[1], width: a, height: r}, cursor: "default", style: o}); + i.add(u) + } + }, + _renderLines: function (t, e, i, n) { + function o(e) { + a._firstDayOfMonth.push(r.getDateInfo(e)), a._firstDayPoints.push(r.dataToRect([e], !1).tl); + var o = a._getLinePointsOfOneWeek(t, e, i); + a._tlpoints.push(o[0]), a._blpoints.push(o[o.length - 1]), l && a._drawSplitline(o, s, n) + } + + var a = this, r = t.coordinateSystem, s = t.getModel("splitLine.lineStyle").getLineStyle(), + l = t.get("splitLine.show"), u = s.lineWidth; + this._tlpoints = [], this._blpoints = [], this._firstDayOfMonth = [], this._firstDayPoints = []; + for (var h = e.start, c = 0; h.time <= e.end.time; c++) { + o(h.formatedDate), 0 === c && (h = r.getDateInfo(e.start.y + "-" + e.start.m)); + var d = h.date; + d.setMonth(d.getMonth() + 1), h = r.getDateInfo(d) + } + o(r.getNextNDay(e.end.time, 1).formatedDate), l && this._drawSplitline(a._getEdgesPoints(a._tlpoints, u, i), s, n), l && this._drawSplitline(a._getEdgesPoints(a._blpoints, u, i), s, n) + }, + _getEdgesPoints: function (t, e, i) { + var n = [t[0].slice(), t[t.length - 1].slice()], o = "horizontal" === i ? 0 : 1; + return n[0][o] = n[0][o] - e / 2, n[1][o] = n[1][o] + e / 2, n + }, + _drawSplitline: function (t, e, i) { + var n = new bS({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 o = [], a = 0; a < 7; a++) { + var r = n.getNextNDay(e.time, a), s = n.dataToRect([r.time], !1); + o[2 * r.day] = s.tl, o[2 * r.day + 1] = s["horizontal" === i ? "bl" : "tr"] + } + return o + }, + _formatterLabel: function (t, e) { + return "string" == typeof t && t ? Xo(t, e) : "function" == typeof t ? t(e) : e.nameMap + }, + _yearTextPositionControl: function (t, e, i, n, o) { + e = e.slice(); + var a = ["center", "bottom"]; + "bottom" === n ? (e[1] += o, a = ["center", "top"]) : "left" === n ? e[0] -= o : "right" === n ? (e[0] += o, a = ["center", "top"]) : e[1] -= o; + var r = 0; + return "left" !== n && "right" !== n || (r = Math.PI / 2), { + rotation: r, + position: e, + style: {textAlign: a[0], textVerticalAlign: a[1]} + } + }, + _renderYearText: function (t, e, i, n) { + var o = t.getModel("yearLabel"); + if (o.get("show")) { + var a = o.get("margin"), r = o.get("position"); + r || (r = "horizontal" !== i ? "top" : "left"); + var s = [this._tlpoints[this._tlpoints.length - 1], this._blpoints[0]], l = (s[0][0] + s[1][0]) / 2, + u = (s[0][1] + s[1][1]) / 2, h = "horizontal" === i ? 0 : 1, + c = {top: [l, s[h][1]], bottom: [l, s[1 - h][1]], left: [s[1 - h][0], u], right: [s[h][0], u]}, + d = e.start.y; + +e.end.y > +e.start.y && (d = d + "-" + e.end.y); + var f = o.get("formatter"), p = {start: e.start.y, end: e.end.y, nameMap: d}, + g = this._formatterLabel(f, p), m = new fS({z2: 30}); + no(m.style, o, {text: g}), m.attr(this._yearTextPositionControl(m, c[r], i, r, a)), n.add(m) + } + }, + _monthTextPositionControl: function (t, e, i, n, o) { + var a = "left", r = "top", s = t[0], l = t[1]; + return "horizontal" === i ? (l += o, e && (a = "center"), "start" === n && (r = "bottom")) : (s += o, e && (r = "middle"), "start" === n && (a = "right")), { + x: s, + y: l, + textAlign: a, + textVerticalAlign: r + } + }, + _renderMonthText: function (t, e, i) { + var n = t.getModel("monthLabel"); + if (n.get("show")) { + var o = n.get("nameMap"), r = n.get("margin"), s = n.get("position"), l = n.get("align"), + u = [this._tlpoints, this._blpoints]; + _(o) && (o = SP[o.toUpperCase()] || []); + var h = "start" === s ? 0 : 1, c = "horizontal" === e ? 0 : 1; + r = "start" === s ? -r : r; + for (var d = "center" === l, f = 0; f < u[h].length - 1; f++) { + var p = u[h][f].slice(), g = this._firstDayOfMonth[f]; + if (d) { + var m = this._firstDayPoints[f]; + p[c] = (m[c] + u[0][f + 1][c]) / 2 + } + var v = n.get("formatter"), y = o[+g.m - 1], + x = {yyyy: g.y, yy: (g.y + "").slice(2), MM: g.m, M: +g.m, nameMap: y}, + w = this._formatterLabel(v, x), b = new fS({z2: 30}); + a(no(b.style, n, {text: w}), this._monthTextPositionControl(p, d, e, s, r)), i.add(b) + } + } + }, + _weekTextPositionControl: function (t, e, i, n, o) { + var a = "center", r = "middle", s = t[0], l = t[1], u = "start" === i; + return "horizontal" === e ? (s = s + n + (u ? 1 : -1) * o[0] / 2, a = u ? "right" : "left") : (l = l + n + (u ? 1 : -1) * o[1] / 2, r = u ? "bottom" : "top"), { + x: s, + y: l, + textAlign: a, + textVerticalAlign: r + } + }, + _renderWeekText: function (t, e, i, n) { + var o = t.getModel("dayLabel"); + if (o.get("show")) { + var r = t.coordinateSystem, s = o.get("position"), l = o.get("nameMap"), u = o.get("margin"), + h = r.getFirstDayOfWeek(); + _(l) && (l = MP[l.toUpperCase()] || []); + var c = r.getNextNDay(e.end.time, 7 - e.lweek).time, d = [r.getCellWidth(), r.getCellHeight()]; + u = Do(u, d["horizontal" === i ? 0 : 1]), "start" === s && (c = r.getNextNDay(e.start.time, -(7 + e.fweek)).time, u = -u); + for (var f = 0; f < 7; f++) { + var p = r.getNextNDay(c, f), g = r.dataToRect([p.time], !1).center, m = f; + m = Math.abs((f + h) % 7); + var v = new fS({z2: 30}); + a(no(v.style, o, {text: l[m]}), this._weekTextPositionControl(g, i, s, u, d)), n.add(v) + } + } + } + }), vs({ + 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"} + } + }), ys({ + type: "title", render: function (t, e, i) { + if (this.group.removeAll(), t.get("show")) { + var n = this.group, o = t.getModel("textStyle"), a = t.getModel("subtextStyle"), r = t.get("textAlign"), + s = t.get("textBaseline"), l = new fS({ + style: no({}, o, {text: t.get("text"), textFill: o.getTextColor()}, {disableBox: !0}), + z2: 10 + }), u = l.getBoundingRect(), h = t.get("subtext"), c = new fS({ + style: no({}, a, { + text: h, + textFill: a.getTextColor(), + y: u.height + t.get("itemGap"), + textVerticalAlign: "top" + }, {disableBox: !0}), z2: 10 + }), d = t.get("link"), f = t.get("sublink"); + l.silent = !d, c.silent = !f, d && l.on("click", function () { + window.open(d, "_" + t.get("target")) + }), f && c.on("click", function () { + window.open(f, "_" + t.get("subtarget")) + }), n.add(l), h && n.add(c); + var p = n.getBoundingRect(), g = t.getBoxLayoutParams(); + g.width = p.width, g.height = p.height; + var m = Qo(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), p = n.getBoundingRect(); + var y = m.margin, x = t.getItemStyle(["color", "opacity"]); + x.fill = t.get("backgroundColor"); + var _ = new SS({ + shape: { + x: p.x - y[3], + y: p.y - y[0], + width: p.width + y[1] + y[3], + height: p.height + y[0] + y[2], + r: t.get("borderRadius") + }, style: x, silent: !0 + }); + Wn(_), n.add(_) + } + } + }), hM.registerSubTypeDefaulter("dataZoom", function () { + return "slider" + }); + var IP = ["cartesian2d", "polar", "singleAxis"], TP = function (t, e) { + var i = f(t = t.slice(), Ko), n = f(e = (e || []).slice(), Ko); + return function (o, a) { + d(t, function (t, r) { + for (var s = {name: t, capital: i[r]}, l = 0; l < e.length; l++) s[e[l]] = t + n[l]; + o.call(a, s) + }) + } + }(["x", "y", "z", "radius", "angle", "single"], ["axisIndex", "axis", "index", "id"]), DP = d, AP = Co, + CP = 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 + }; + CP.prototype = { + constructor: CP, 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 (Zv(i.get("coordinateSystem"))) { + var n = this._dimName, o = e.queryComponents({ + mainType: n + "Axis", + index: i.get(n + "AxisIndex"), + id: i.get(n + "AxisId") + })[0]; + this._axisIndex === (o && o.componentIndex) && t.push(i) + } + }, this), t + }, getAxisModel: function () { + return this.ecModel.getComponent(this._dimName + "Axis", this._axisIndex) + }, getOtherAxisModel: function () { + var t, e, i = this._dimName, n = this.ecModel, o = this.getAxisModel(); + "x" === i || "y" === i ? (e = "gridIndex", t = "x" === i ? "y" : "x") : (e = "polarIndex", t = "angle" === i ? "radius" : "angle"); + var a; + return n.eachComponent(t + "Axis", function (t) { + (t.get(e) || 0) === (o.get(e) || 0) && (a = t) + }), a + }, getMinMaxSpan: function () { + return i(this._minMaxSpan) + }, calculateDataWindow: function (t) { + var e = this._dataExtent, i = this.getAxisModel().axis.scale, n = this._dataZoomModel.getRangePropMode(), + o = [0, 100], a = [t.start, t.end], r = []; + return DP(["startValue", "endValue"], function (e) { + r.push(null != t[e] ? i.parse(t[e]) : null) + }), DP([0, 1], function (t) { + var s = r[t], l = a[t]; + "percent" === n[t] ? (null == l && (l = o[t]), s = i.parse(To(l, o, e, !0))) : l = To(s, e, o, !0), r[t] = s, a[t] = l + }), {valueWindow: AP(r), percentWindow: AP(a)} + }, reset: function (t) { + if (t === this._dataZoomModel) { + var e = this.getTargetSeriesModels(); + this._dataExtent = Xv(this, this._dimName, e); + var i = this.calculateDataWindow(t.option); + this._valueWindow = i.valueWindow, this._percentWindow = i.percentWindow, qv(this), Yv(this) + } + }, restore: function (t) { + t === this._dataZoomModel && (this._valueWindow = this._percentWindow = null, Yv(this, !0)) + }, filterData: function (t, e) { + function i(t) { + return t >= r[0] && t <= r[1] + } + + if (t === this._dataZoomModel) { + var n = this._dimName, o = this.getTargetSeriesModels(), a = t.get("filterMode"), r = this._valueWindow; + "none" !== a && DP(o, function (t) { + var e = t.getData(), o = e.mapDimension(n, !0); + "weakFilter" === a ? e.filterSelf(function (t) { + for (var i, n, a, s = 0; s < o.length; s++) { + var l = e.get(o[s], t), u = !isNaN(l), h = l < r[0], c = l > r[1]; + if (u && !h && !c) return !0; + u && (a = !0), h && (i = !0), c && (n = !0) + } + return a && i && n + }) : DP(o, function (n) { + if ("empty" === a) t.setData(e.map(n, function (t) { + return i(t) ? t : NaN + })); else { + var o = {}; + o[n] = r, e.selectRange(o) + } + }), DP(o, function (t) { + e.setApproximateExtent(r, t) + }) + }) + } + } + }; + var LP = d, kP = TP, PP = vs({ + 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 = Kv(t); + this.mergeDefaultAndTheme(t, i), this.doInit(n) + }, + mergeOption: function (t) { + var e = Kv(t); + n(this.option, t, !0), this.doInit(e) + }, + doInit: function (t) { + var e = this.option; + a_.canvasSupported || (e.realtime = !1), this._setDefaultThrottle(t), $v(this, t), LP([["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, o) { + var a = this.dependentModels[e.axis][i], + r = a.__dzAxisProxy || (a.__dzAxisProxy = new CP(e.name, i, this, o)); + t[e.name + "_" + i] = r + }, this) + }, + _resetTarget: function () { + var t = this.option, e = this._judgeAutoMode(); + kP(function (e) { + var i = e.axisIndex; + t[i] = Si(t[i]) + }, this), "axisIndex" === e ? this._autoSetAxisIndex() : "orient" === e && this._autoSetOrient() + }, + _judgeAutoMode: function () { + var t = this.option, e = !1; + kP(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 o = "vertical" === e ? "y" : "x"; + n[o + "Axis"].length ? (i[o + "AxisIndex"] = [0], t = !1) : LP(n.singleAxis, function (n) { + t && n.get("orient", !0) === e && (i.singleAxisIndex = [n.componentIndex], t = !1) + }) + } + t && kP(function (e) { + if (t) { + var n = [], o = this.dependentModels[e.axis]; + if (o.length && !n.length) for (var a = 0, r = o.length; a < r; a++) "category" === o[a].get("type") && n.push(a); + i[e.axisIndex] = n, n.length && (t = !1) + } + }, this), t && this.ecModel.eachSeries(function (t) { + this._isSeriesHasAllAxesTypeOf(t, "value") && kP(function (e) { + var n = i[e.axisIndex], o = t.get(e.axisIndex), a = t.get(e.axisId); + l(n, o = t.ecModel.queryComponents({ + mainType: e.axis, + index: o, + id: a + })[0].componentIndex) < 0 && n.push(o) + }) + }, 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 kP(function (n) { + var o = t.get(n.axisIndex), a = this.dependentModels[n.axis][o]; + a && a.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 kP(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; + kP(function (n) { + LP(this.get(n.axisIndex), function (o) { + t.call(e, n, o, 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; + LP([["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 && $v(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() + } + }), NP = $M.extend({ + type: "dataZoom", render: function (t, e, i, n) { + this.dataZoomModel = t, this.ecModel = e, this.api = i + }, getTargetCoordInfo: function () { + function t(t, e, i, n) { + for (var o, a = 0; a < i.length; a++) if (i[a].model === t) { + o = i[a]; + break + } + o || i.push(o = {model: t, axisModels: [], coordIndex: n}), o.axisModels.push(e) + } + + var e = this.dataZoomModel, i = this.ecModel, n = {}; + return e.eachTargetAxis(function (e, o) { + var a = i.getComponent(e.axis, o); + if (a) { + var r = a.getCoordSysModel(); + r && t(r, a, n[r.mainType] || (n[r.mainType] = []), r.componentIndex) + } + }, this), n + } + }), OP = (PP.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"} + } + }), SS), EP = To, RP = Co, zP = m, BP = d, VP = "horizontal", GP = 5, + WP = ["line", "bar", "candlestick", "scatter"], FP = NP.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) { + FP.superApply(this, "render", arguments), wr(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 () { + FP.superApply(this, "remove", arguments), br(this, "_dispatchZoomAction") + }, dispose: function () { + FP.superApply(this, "dispose", arguments), br(this, "_dispatchZoomAction") + }, _buildView: function () { + var t = this.group; + t.removeAll(), this._resetLocation(), this._resetInterval(); + var e = this._displayables.barGroup = new sw; + 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()}, o = this._orient === VP ? { + 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}, a = na(t.option); + d(["right", "top", "width", "height"], function (t) { + "ph" === a[t] && (a[t] = o[t]) + }); + var r = Qo(a, 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(), + o = n && n.get("inverse"), a = this._displayables.barGroup, + r = (this._dataShadowInfo || {}).otherAxisInverse; + a.attr(i !== VP || o ? i === VP && o ? {scale: r ? [-1, 1] : [-1, -1]} : "vertical" !== i || o ? { + 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([a]); + 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 OP({ + silent: !0, + shape: {x: 0, y: 0, width: e[0], height: e[1]}, + style: {fill: t.get("backgroundColor")}, + z2: -40 + })), i.add(new OP({ + shape: {x: 0, y: 0, width: e[0], height: e[1]}, + style: {fill: "transparent"}, + z2: 0, + onclick: m(this._onClickPanelClick, this) + })) + }, _renderDataShadow: function () { + var t = this._dataShadowInfo = this._prepareDataShadowInfo(); + if (t) { + var e = this._size, i = t.series, n = i.getRawData(), + o = i.getShadowDim ? i.getShadowDim() : t.otherDim; + if (null != o) { + var a = n.getDataExtent(o), s = .3 * (a[1] - a[0]); + a = [a[0] - s, a[1] + s]; + var l, u = [0, e[1]], h = [0, e[0]], c = [[e[0], 0], [0, 0]], d = [], f = h[1] / (n.count() - 1), + p = 0, g = Math.round(n.count() / e[0]); + n.each([o], function (t, e) { + if (g > 0 && e % g) p += f; else { + var i = null == t || isNaN(t) || "" === t, n = i ? 0 : EP(t, a, u, !0); + i && !l && e ? (c.push([c[c.length - 1][0], 0]), d.push([d[d.length - 1][0], 0])) : !i && l && (c.push([p, 0]), d.push([p, 0])), c.push([p, n]), d.push([p, n]), p += f, l = i + } + }); + var m = this.dataZoomModel; + this._displayables.barGroup.add(new wS({ + shape: {points: c}, + style: r({fill: m.get("dataBackgroundColor")}, m.getModel("dataBackground.areaStyle").getAreaStyle()), + silent: !0, + z2: -20 + })), this._displayables.barGroup.add(new bS({ + shape: {points: d}, + style: m.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 (o, a) { + d(t.getAxisProxy(o.name, a).getTargetSeriesModels(), function (t) { + if (!(i || !0 !== e && l(WP, t.get("type")) < 0)) { + var r, s = n.getComponent(o.axis, a).axis, u = Jv(o.name), h = t.coordinateSystem; + null != u && h.getOtherAxis && (r = h.getOtherAxis(s).inverse), u = t.getData().mapDimension(u), i = { + thisAxis: s, + series: t, + thisDim: o.name, + otherDim: u, + otherAxisInverse: r + } + } + }, this) + }, this), i + } + }, _renderHandle: function () { + var t = this._displayables, e = t.handles = [], i = t.handleLabels = [], n = this._displayables.barGroup, + o = this._size, a = this.dataZoomModel; + n.add(t.filler = new OP({ + draggable: !0, + cursor: Qv(this._orient), + drift: zP(this._onDragMove, this, "all"), + onmousemove: function (t) { + zw(t.event) + }, + ondragstart: zP(this._showDataInfo, this, !0), + ondragend: zP(this._onDragEnd, this), + onmouseover: zP(this._showDataInfo, this, !0), + onmouseout: zP(this._showDataInfo, this, !1), + style: {fill: a.get("fillerColor"), textPosition: "inside"} + })), n.add(new OP(Wn({ + silent: !0, + shape: {x: 0, y: 0, width: o[0], height: o[1]}, + style: { + stroke: a.get("dataBackgroundColor") || a.get("borderColor"), + lineWidth: 1, + fill: "rgba(0,0,0,0)" + } + }))), BP([0, 1], function (t) { + var o = _o(a.get("handleIcon"), { + cursor: Qv(this._orient), + draggable: !0, + drift: zP(this._onDragMove, this, t), + onmousemove: function (t) { + zw(t.event) + }, + ondragend: zP(this._onDragEnd, this), + onmouseover: zP(this._showDataInfo, this, !0), + onmouseout: zP(this._showDataInfo, this, !1) + }, {x: -1, y: 0, width: 2, height: 2}), r = o.getBoundingRect(); + this._handleHeight = Do(a.get("handleSize"), this._size[1]), this._handleWidth = r.width / r.height * this._handleHeight, o.setStyle(a.getModel("handleStyle").getItemStyle()); + var s = a.get("handleColor"); + null != s && (o.style.fill = s), n.add(e[t] = o); + var l = a.textStyleModel; + this.group.add(i[t] = new fS({ + 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 = [EP(t[0], [0, 100], e, !0), EP(t[1], [0, 100], e, !0)] + }, _updateInterval: function (t, e) { + var i = this.dataZoomModel, n = this._handleEnds, o = this._getViewExtent(), + a = i.findRepresentativeAxisProxy().getMinMaxSpan(), r = [0, 100]; + PC(e, n, o, i.get("zoomLock") ? "all" : t, null != a.minSpan ? EP(a.minSpan, r, o, !0) : null, null != a.maxSpan ? EP(a.maxSpan, r, o, !0) : null); + var s = this._range, l = this._range = RP([EP(n[0], o, r, !0), EP(n[1], o, r, !0)]); + return !s || s[0] !== l[0] || s[1] !== l[1] + }, _updateView: function (t) { + var e = this._displayables, i = this._handleEnds, n = RP(i.slice()), o = this._size; + BP([0, 1], function (t) { + var n = e.handles[t], a = this._handleHeight; + n.attr({scale: [a / 2, a / 2], position: [i[t], o[1] / 2 - a / 2]}) + }, this), e.filler.setShape({x: n[0], y: 0, width: n[1] - n[0], height: o[1]}), this._updateDataInfo(t) + }, _updateDataInfo: function (t) { + function e(t) { + var e = go(n.handles[t].parent, this.group), i = vo(0 === t ? "right" : "left", e), + s = this._handleWidth / 2 + GP, l = mo([c[t] + (0 === t ? -s : s), this._size[1] / 2], e); + o[t].setStyle({ + x: l[0], + y: l[1], + textVerticalAlign: a === VP ? "middle" : i, + textAlign: a === VP ? i : "center", + text: r[t] + }) + } + + var i = this.dataZoomModel, n = this._displayables, o = n.handleLabels, a = this._orient, r = ["", ""]; + if (i.get("showDetail")) { + var s = i.findRepresentativeAxisProxy(); + if (s) { + var l = s.getAxisModel().axis, u = this._range, + h = t ? s.calculateDataWindow({start: u[0], end: u[1]}).valueWindow : s.getDataValueWindow(); + r = [this._formatLabel(h[0], l), this._formatLabel(h[1], l)] + } + } + var c = RP(this._handleEnds.slice()); + e.call(this, 0), e.call(this, 1) + }, _formatLabel: function (t, e) { + var i = this.dataZoomModel, n = i.get("labelFormatter"), o = i.get("labelPrecision"); + null != o && "auto" !== o || (o = e.getPixelPrecision()); + var a = null == t || isNaN(t) ? "" : "category" === e.type || "time" === e.type ? e.scale.getLabel(Math.round(t)) : t.toFixed(Math.min(o, 20)); + return x(n) ? n(t, a) : _(n) ? n.replace("{value}", a) : a + }, _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 = mo([e, i], this._displayables.barGroup.getLocalTransform(), !0), o = this._updateInterval(t, n[0]), + a = this.dataZoomModel.get("realtime"); + this._updateView(!a), o && a && this._dispatchZoomAction() + }, _onDragEnd: function () { + this._dragging = !1, this._showDataInfo(!1), !this.dataZoomModel.get("realtime") && 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, o = (n[0] + n[1]) / 2, a = this._updateInterval("all", i[0] - o); + this._updateView(), a && 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 (BP(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 + } + }); + PP.extend({ + type: "dataZoom.inside", + defaultOption: { + disabled: !1, + zoomLock: !1, + zoomOnMouseWheel: !0, + moveOnMouseMove: !0, + preventDefaultMouseMove: !0 + } + }); + var HP = v, ZP = "\0_ec_dataZoom_roams", UP = m, XP = NP.extend({ + type: "dataZoom.inside", init: function (t, e) { + this._range + }, render: function (t, e, i, n) { + XP.superApply(this, "render", arguments), this._range = t.getPercentRange(), d(this.getTargetCoordInfo(), function (e, n) { + var o = f(e, function (t) { + return iy(t.model) + }); + d(e, function (e) { + var a = e.model, r = t.option; + ty(i, { + coordId: iy(a), + allCoordIds: o, + containsPoint: function (t, e, i) { + return a.coordinateSystem.containPoint([e, i]) + }, + dataZoomId: t.id, + throttleRate: t.get("throttle", !0), + panGetRange: UP(this._onPan, this, e, n), + zoomGetRange: UP(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 () { + ey(this.api, this.dataZoomModel.id), XP.superApply(this, "dispose", arguments), this._range = null + }, _onPan: function (t, e, i, n, o, a, r, s, l) { + var u = this._range, h = u.slice(), c = t.axisModels[0]; + if (c) { + var d = jP[e]([a, r], [s, l], c, i, t), f = d.signal * (h[1] - h[0]) * d.pixel / d.pixelLength; + return PC(f, h, [0, 100], "all"), this._range = h, u[0] !== h[0] || u[1] !== h[1] ? h : void 0 + } + }, _onZoom: function (t, e, i, n, o, a) { + var r = this._range, s = r.slice(), l = t.axisModels[0]; + if (l) { + var u = jP[e](null, [o, a], l, i, t), + h = (u.signal > 0 ? u.pixelStart + u.pixelLength - u.pixel : u.pixel - u.pixelStart) / u.pixelLength * (s[1] - s[0]) + s[0]; + n = Math.max(1 / n, 0), s[0] = (s[0] - h) * n + h, s[1] = (s[1] - h) * n + h; + var c = this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan(); + return PC(0, s, [0, 100], 0, c.minSpan, c.maxSpan), this._range = s, r[0] !== s[0] || r[1] !== s[1] ? s : void 0 + } + } + }), jP = { + grid: function (t, e, i, n, o) { + var a = i.axis, r = {}, s = o.model.coordinateSystem.getRect(); + return t = t || [0, 0], "x" === a.dim ? (r.pixel = e[0] - t[0], r.pixelLength = s.width, r.pixelStart = s.x, r.signal = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixelLength = s.height, r.pixelStart = s.y, r.signal = a.inverse ? -1 : 1), r + }, polar: function (t, e, i, n, o) { + var a = i.axis, r = {}, s = o.model.coordinateSystem, l = s.getRadiusAxis().getExtent(), + u = 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 = a.inverse ? 1 : -1) : (r.pixel = e[1] - t[1], r.pixelLength = u[1] - u[0], r.pixelStart = u[0], r.signal = a.inverse ? -1 : 1), r + }, singleAxis: function (t, e, i, n, o) { + var a = i.axis, r = o.model.coordinateSystem.getRect(), s = {}; + return t = t || [0, 0], "horizontal" === a.orient ? (s.pixel = e[0] - t[0], s.pixelLength = r.width, s.pixelStart = r.x, s.signal = a.inverse ? 1 : -1) : (s.pixel = e[1] - t[1], s.pixelLength = r.height, s.pixelStart = r.y, s.signal = a.inverse ? -1 : 1), s + } + }; + hs({ + getTargetSeries: function (t) { + var e = R(); + return t.eachComponent("dataZoom", function (t) { + t.eachTargetAxis(function (t, i, n) { + d(n.getAxisProxy(t.name, i).getTargetSeriesModels(), function (t) { + e.set(t.uid, t) + }) + }) + }), e + }, modifyOutputEnd: !0, overallReset: function (t, e) { + t.eachComponent("dataZoom", function (t) { + t.eachTargetAxis(function (t, i, n) { + n.getAxisProxy(t.name, i).reset(n, e) + }), t.eachTargetAxis(function (t, i, n) { + n.getAxisProxy(t.name, i).filterData(n, e) + }) + }), 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) + }) + } + }), cs("dataZoom", function (t, e) { + var i = Uv(m(e.eachComponent, e, "dataZoom"), TP, 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) + }), d(n, function (e, i) { + e.setRawRange({start: t.start, end: t.end, startValue: t.startValue, endValue: t.endValue}) + }) + }); + var YP = d, qP = function (t) { + var e = t && t.visualMap; + y(e) || (e = e ? [e] : []), YP(e, function (t) { + if (t) { + cy(t, "splitList") && !cy(t, "pieces") && (t.pieces = t.splitList, delete t.splitList); + var e = t.pieces; + e && y(e) && YP(e, function (t) { + w(t) && (cy(t, "start") && !cy(t, "min") && (t.min = t.start), cy(t, "end") && !cy(t, "max") && (t.max = t.end)) + }) + } + }) + }; + hM.registerSubTypeDefaulter("visualMap", function (t) { + return t.categories || (t.pieces ? t.pieces.length > 0 : t.splitNumber > 0) && !t.calculable ? "piecewise" : "continuous" + }); + var KP = LI.VISUAL.COMPONENT; + ps(KP, { + createOnAllSeries: !0, reset: function (t, e) { + var i = []; + return e.eachComponent("visualMap", function (e) { + var n = t.pipelineContext; + !e.isTargetSeries(t) || n && n.large || i.push(gv(e.stateList, e.targetVisuals, m(e.getValueState, e), e.getDataDimension(t.getData()))) + }), i + } + }), ps(KP, { + createOnAllSeries: !0, reset: function (t, e) { + var i = t.getData(), n = []; + e.eachComponent("visualMap", function (e) { + if (e.isTargetSeries(t)) { + var o = e.getVisualMeta(m(dy, null, t, e)) || {stops: [], outerColors: []}, + a = e.getDataDimension(i), r = i.getDimensionInfo(a); + null != r && (o.dimension = r.index, n.push(o)) + } + }), t.getData().setVisual("visualMeta", n) + } + }); + var $P = { + get: function (t, e, n) { + var o = i((JP[t] || {})[e]); + return n && y(o) ? o[o.length - 1] : o + } + }, JP = { + 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]} + }, QP = ZA.mapVisual, tN = ZA.eachVisual, eN = y, iN = d, nN = Co, oN = To, aN = B, rN = vs({ + 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; + a_.canvasSupported || (i.realtime = !1), !e && fv(i, t, this.replacableOptionKeys), this.textStyleModel = this.getModel("textStyle"), this.resetItemSize(), this.completeVisualOption() + }, + resetVisual: function (t) { + var e = this.stateList; + t = m(t, this), this.controllerVisuals = dv(this.option.controller, e, t), this.targetVisuals = dv(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 = Si(t), e + }, + eachTargetSeries: function (t, e) { + d(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) { + function n(t) { + return t === l[0] ? "min" : t === l[1] ? "max" : (+t).toFixed(Math.min(s, 20)) + } + + var o, a, r = this.option, s = r.precision, l = this.dataBound, u = r.formatter; + return i = i || ["<", ">"], y(t) && (t = t.slice(), o = !0), a = e ? t : o ? [n(t[0]), n(t[1])] : n(t), _(u) ? u.replace("{value}", o ? a[0] : a).replace("{value2}", o ? a[1] : a) : x(u) ? o ? u(t[0], t[1]) : u(t) : o ? t[0] === l[0] ? i[0] + " " + a[1] : t[1] === l[1] ? i[1] + " " + a[0] : a[0] + " - " + a[1] : a + }, + resetExtent: function () { + var t = this.option, e = nN([t.min, t.max]); + this._dataExtent = e + }, + getDataDimension: function (t) { + var e = this.option.dimension, i = t.dimensions; + if (null != e || i.length) { + if (null != e) return t.getDimension(e); + for (var n = t.dimensions, o = n.length - 1; o >= 0; o--) { + var a = n[o]; + if (!t.getDimensionInfo(a).isCalculationCoord) return a + } + } + }, + getExtent: function () { + return this._dataExtent.slice() + }, + completeVisualOption: function () { + function t(t) { + eN(o.color) && !t.inRange && (t.inRange = {color: o.color.slice().reverse()}), t.inRange = t.inRange || {color: e.get("gradientColor")}, iN(this.stateList, function (e) { + var i = t[e]; + if (_(i)) { + var n = $P.get(i, "active", l); + n ? (t[e] = {}, t[e][i] = n) : delete t[e] + } + }, this) + } + + var e = this.ecModel, o = this.option, a = {inRange: o.inRange, outOfRange: o.outOfRange}, + r = o.target || (o.target = {}), s = o.controller || (o.controller = {}); + n(r, a), n(s, a); + var l = this.isCategory(); + t.call(this, r), t.call(this, s), function (t, e, i) { + var n = t[e], o = t[i]; + n && !o && (o = t[i] = {}, iN(n, function (t, e) { + if (ZA.isValidType(e)) { + var i = $P.get(e, "inactive", l); + null != i && (o[e] = i, "color" !== e || o.hasOwnProperty("opacity") || o.hasOwnProperty("colorAlpha") || (o.opacity = [0, 0])) + } + })) + }.call(this, r, "inRange", "outOfRange"), function (t) { + var e = (t.inRange || {}).symbol || (t.outOfRange || {}).symbol, + n = (t.inRange || {}).symbolSize || (t.outOfRange || {}).symbolSize, o = this.get("inactiveColor"); + iN(this.stateList, function (a) { + var r = this.itemSize, s = t[a]; + s || (s = t[a] = {color: l ? o : [o]}), null == s.symbol && (s.symbol = e && i(e) || (l ? "roundRect" : ["roundRect"])), null == s.symbolSize && (s.symbolSize = n && i(n) || (l ? r[0] : [r[0], r[0]])), s.symbol = QP(s.symbol, function (t) { + return "none" === t || "square" === t ? "roundRect" : t + }); + var u = s.symbolSize; + if (null != u) { + var h = -1 / 0; + tN(u, function (t) { + t > h && (h = t) + }), s.symbolSize = QP(u, function (t) { + return oN(t, [0, h], [0, r[0]], !0) + }) + } + }, this) + }.call(this, s) + }, + resetItemSize: function () { + this.itemSize = [parseFloat(this.get("itemWidth")), parseFloat(this.get("itemHeight"))] + }, + isCategory: function () { + return !!this.option.categories + }, + setSelected: aN, + getValueState: aN, + getVisualMeta: aN + }), sN = [20, 140], lN = rN.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) { + lN.superApply(this, "optionUpdated", arguments), this.resetExtent(), this.resetVisual(function (t) { + t.mappingMethod = "linear", t.dataExtent = this.getExtent() + }), this._resetRange() + }, + resetItemSize: function () { + lN.superApply(this, "resetItemSize", arguments); + var t = this.itemSize; + "horizontal" === this._orient && t.reverse(), (null == t[0] || isNaN(t[0])) && (t[0] = sN[0]), (null == t[1] || isNaN(t[1])) && (t[1] = sN[1]) + }, + _resetRange: function () { + var t = this.getExtent(), e = this.option.range; + !e || e.auto ? (t.auto = 1, this.option.range = t) : y(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 () { + rN.prototype.completeVisualOption.apply(this, arguments), d(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 = Co((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 = [], o = i.getData(); + o.each(this.getDataDimension(o), function (e, i) { + t[0] <= e && e <= t[1] && n.push(i) + }, this), e.push({seriesId: i.id, dataIndex: n}) + }, this), e + }, + getVisualMeta: function (t) { + function e(e, i) { + o.push({value: e, color: t(e, i)}) + } + + for (var i = fy(0, 0, this.getExtent()), n = fy(0, 0, this.option.range.slice()), o = [], a = 0, r = 0, s = n.length, l = i.length; r < l && (!n.length || i[r] <= n[0]); r++) i[r] < n[a] && e(i[r], "outOfRange"); + for (u = 1; a < s; a++, u = 0) u && o.length && e(n[a], "outOfRange"), e(n[a], "inRange"); + for (var u = 1; r < l; r++) (!n.length || n[n.length - 1] < i[r]) && (u && (o.length && e(o[o.length - 1].value, "outOfRange"), u = 0), e(i[r], "outOfRange")); + var h = o.length; + return {stops: o, outerColors: [h ? o[0].color : "transparent", h ? o[h - 1].color : "transparent"]} + } + }), uN = ys({ + 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 = KS(e.get("padding") || 0), n = t.getBoundingRect(); + t.add(new SS({ + 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) { + function n(t) { + return s[t] + } + + function o(t, e) { + s[t] = e + } + + var a = (i = i || {}).forceState, r = this.visualMapModel, s = {}; + if ("symbol" === e && (s.symbol = r.get("itemSymbol")), "color" === e) { + var l = r.get("contentColor"); + s.color = l + } + var u = r.controllerVisuals[a || r.getValueState(t)]; + return d(ZA.prepareVisualTypes(u), function (a) { + var r = u[a]; + i.convertOpacityToAlpha && "opacity" === a && (a = "colorAlpha", r = u.__alphaForOpacity), ZA.dependsOn(a, e) && r && r.applyVisual(t, n, o) + }), s[e] + }, positionGroup: function (t) { + var e = this.visualMapModel, i = this.api; + ta(t, e.getBoxLayoutParams(), {width: i.getWidth(), height: i.getHeight()}) + }, doRender: B + }), hN = To, cN = d, dN = Math.min, fN = Math.max, pN = 12, gN = 6, mN = uN.extend({ + type: "visualMap.continuous", init: function () { + mN.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 o = this.visualMapModel, a = o.get("textGap"), r = o.itemSize, s = this._shapes.barGroup, + l = this._applyTransform([r[0] / 2, 0 === i ? -a : r[1] + a], s), + u = this._applyTransform(0 === i ? "bottom" : "top", s), h = this._orient, + c = this.visualMapModel.textStyleModel; + this.group.add(new fS({ + style: { + x: l[0], + y: l[1], + textVerticalAlign: "horizontal" === h ? "middle" : u, + textAlign: "horizontal" === h ? u : "center", + text: n, + textFont: c.getFont(), + textFill: c.getTextColor() + } + })) + } + }, _renderBar: function (t) { + var e = this.visualMapModel, i = this._shapes, n = e.itemSize, o = this._orient, a = this._useHandle, + r = py(e, this.api, n), s = i.barGroup = this._createBarGroup(r); + s.add(i.outOfRange = my()), s.add(i.inRange = my(null, a ? wy(this._orient) : null, m(this._dragHandle, this, "all", !1), m(this._dragHandle, this, "all", !0))); + var l = e.textStyleModel.getTextRect("国"), u = fN(l.width, l.height); + a && (i.handleThumbs = [], i.handleLabels = [], i.handleLabelPoints = [], this._createHandle(s, 0, n, u, o, r), this._createHandle(s, 1, n, u, o, r)), this._createIndicator(s, n, u, o), t.add(s) + }, _createHandle: function (t, e, i, n, o) { + var a = m(this._dragHandle, this, e, !1), r = m(this._dragHandle, this, e, !0), + s = my(vy(e, n), wy(this._orient), a, r); + s.position[0] = i[0], t.add(s); + var l = this.visualMapModel.textStyleModel, u = new fS({ + draggable: !0, drift: a, onmousemove: function (t) { + zw(t.event) + }, ondragend: r, style: {x: 0, y: 0, text: "", textFont: l.getFont(), textFill: l.getTextColor()} + }); + this.group.add(u); + var h = ["horizontal" === o ? n / 2 : 1.5 * n, "horizontal" === o ? 0 === e ? -1.5 * n : 1.5 * n : 0 === e ? -n / 2 : n / 2], + c = this._shapes; + c.handleThumbs[e] = s, c.handleLabelPoints[e] = h, c.handleLabels[e] = u + }, _createIndicator: function (t, e, i, n) { + var o = my([[0, 0]], "move"); + o.position[0] = e[0], o.attr({invisible: !0, silent: !0}), t.add(o); + var a = this.visualMapModel.textStyleModel, r = new fS({ + silent: !0, + invisible: !0, + style: {x: 0, y: 0, text: "", textFont: a.getFont(), textFill: a.getTextColor()} + }); + this.group.add(r); + var s = ["horizontal" === n ? i / 2 : gN + 3, 0], l = this._shapes; + l.indicator = o, l.indicatorLabel = r, l.indicatorLabelPoint = s + }, _dragHandle: function (t, e, i, n) { + if (this._useHandle) { + if (this._dragging = !e, !e) { + var o = this._applyTransform([i, n], this._shapes.barGroup, !0); + this._updateInterval(t, o[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() : _y(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 = [hN(e[0], i, n, !0), hN(e[1], i, n, !0)] + }, _updateInterval: function (t, e) { + e = e || 0; + var i = this.visualMapModel, n = this._handleEnds, o = [0, i.itemSize[1]]; + PC(e, n, o, t, 0); + var a = i.getExtent(); + this._dataInterval = [hN(n[0], o, a, !0), hN(n[1], o, a, !0)] + }, _updateView: function (t) { + var e = this.visualMapModel, i = e.getExtent(), n = this._shapes, o = [0, e.itemSize[1]], + a = t ? o : this._handleEnds, r = this._createBarVisual(this._dataInterval, i, a, "inRange"), + s = this._createBarVisual(i, i, o, "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(a, r) + }, _createBarVisual: function (t, e, i, n) { + var o = {forceState: n, convertOpacityToAlpha: !0}, a = this._makeColorGradient(t, o), + r = [this.getControllerVisual(t[0], "symbolSize", o), this.getControllerVisual(t[1], "symbolSize", o)], + s = this._createBarPoints(i, r); + return {barColor: new LS(0, 0, 0, 1, a), barPoints: s, handlesColor: [a[0].color, a[a.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 o = 1; o < 100; o++) { + var a = t[0] + n * o; + if (a > t[1]) break; + i.push({color: this.getControllerVisual(a, "color", e), offset: o / 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 sw("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, o = i.handleThumbs, a = i.handleLabels; + cN([0, 1], function (r) { + var s = o[r]; + s.setStyle("fill", e.handlesColor[r]), s.position[1] = t[r]; + var l = mo(i.handleLabelPoints[r], go(s, this.group)); + a[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 o = this.visualMapModel, a = o.getExtent(), r = o.itemSize, s = [0, r[1]], l = hN(t, a, s, !0), + u = this._shapes, h = u.indicator; + if (h) { + h.position[1] = l, h.attr("invisible", !1), h.setShape("points", yy(!!i, n, l, r[1])); + var c = {convertOpacityToAlpha: !0}, d = this.getControllerVisual(t, "color", c); + h.setStyle("fill", d); + var f = mo(u.indicatorLabelPoint, go(h, this.group)), p = u.indicatorLabel; + p.attr("invisible", !1); + var g = this._applyTransform("left", u.barGroup), m = this._orient; + p.setStyle({ + text: (i || "") + o.formatValueText(e), + textVerticalAlign: "horizontal" === m ? g : "middle", + textAlign: "horizontal" === m ? "center" : g, + x: f[0], + y: f[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] = dN(fN(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 o = [0, n[1]], a = i.getExtent(); + t = dN(fN(o[0], t), o[1]); + var r = xy(i, a, o), s = [t - r, t + r], l = hN(t, o, a, !0), + u = [hN(s[0], o, a, !0), hN(s[1], o, a, !0)]; + s[0] < o[0] && (u[0] = -1 / 0), s[1] > o[1] && (u[1] = 1 / 0), e && (u[0] === -1 / 0 ? this._showIndicator(l, u[1], "< ", r) : u[1] === 1 / 0 ? this._showIndicator(l, u[0], "> ", r) : this._showIndicator(l, l, "≈ ", r)); + var h = this._hoverLinkDataIndices, c = []; + (e || _y(i)) && (c = this._hoverLinkDataIndices = i.findTargetDataIndices(u)); + var d = ki(h, c); + this._dispatchHighDown("downplay", gy(d[0])), this._dispatchHighDown("highlight", gy(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 o = n.getData(e.dataType), a = o.get(i.getDataDimension(o), e.dataIndex, !0); + isNaN(a) || this._showIndicator(a, a) + } + } + }, _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", gy(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 o = go(e, n ? null : this.group); + return BS[y(t) ? "applyTransform" : "transformDirection"](t, o, 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() + } + }); + cs({type: "selectDataRange", event: "dataRangeSelected", update: "update"}, function (t, e) { + e.eachComponent({mainType: "visualMap", query: t}, function (e) { + e.setSelected(t.selected) + }) + }), us(qP); + var vN = rN.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) { + vN.superApply(this, "optionUpdated", arguments), this._pieceList = [], this.resetExtent(); + var n = this._mode = this._determineMode(); + yN[this._mode].call(this), this._resetSelected(t, e); + var o = this.option.categories; + this.resetVisual(function (t, e) { + "categories" === n ? (t.mappingMethod = "category", t.categories = i(o)) : (t.dataExtent = this.getExtent(), t.mappingMethod = "piecewise", t.pieceList = f(this._pieceList, function (t) { + var t = i(t); + return "inRange" !== e && (t.visual = null), t + })) + }) + }, + completeVisualOption: function () { + function t(t, e, i) { + return t && t[e] && (w(t[e]) ? t[e].hasOwnProperty(i) : t[e] === i) + } + + var e = this.option, i = {}, n = ZA.listVisualTypes(), o = this.isCategory(); + d(e.pieces, function (t) { + d(n, function (e) { + t.hasOwnProperty(e) && (i[e] = 1) + }) + }), d(i, function (i, n) { + var a = 0; + d(this.stateList, function (i) { + a |= t(e, i, n) || t(e.target, i, n) + }, this), !a && d(this.stateList, function (t) { + (e[t] || (e[t] = {}))[n] = $P.get(n, "inRange" === t ? "active" : "inactive", o) + }) + }, this), rN.prototype.completeVisualOption.apply(this, arguments) + }, + _resetSelected: function (t, e) { + var i = this.option, n = this._pieceList, o = (e ? i : t).selected || {}; + if (i.selected = o, d(n, function (t, e) { + var i = this.getSelectedMapKey(t); + o.hasOwnProperty(i) || (o[i] = !0) + }, this), "single" === i.selectedMode) { + var a = !1; + d(n, function (t, e) { + var i = this.getSelectedMapKey(t); + o[i] && (a ? o[i] = !1 : a = !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 = i(t) + }, + getValueState: function (t) { + var e = ZA.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 = [], o = i.getData(); + o.each(this.getDataDimension(o), function (e, i) { + ZA.findPieceIndex(e, this._pieceList) === t && n.push(i) + }, 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) { + function e(e, a) { + var r = o.getRepresentValue({interval: e}); + a || (a = o.getValueState(r)); + var s = t(r, a); + e[0] === -1 / 0 ? n[0] = s : e[1] === 1 / 0 ? n[1] = s : i.push({value: e[0], color: s}, { + value: e[1], + color: s + }) + } + + if (!this.isCategory()) { + var i = [], n = [], o = this, a = this._pieceList.slice(); + if (a.length) { + var r = a[0].interval[0]; + r !== -1 / 0 && a.unshift({interval: [-1 / 0, r]}), (r = a[a.length - 1].interval[1]) !== 1 / 0 && a.push({interval: [r, 1 / 0]}) + } else a.push({interval: [-1 / 0, 1 / 0]}); + var s = -1 / 0; + return d(a, function (t) { + var i = t.interval; + i && (i[0] > s && e([s, i[0]], "outOfRange"), e(i.slice()), s = i[1]) + }, this), {stops: i, outerColors: n} + } + } + }), yN = { + splitNumber: function () { + var t = this.option, e = this._pieceList, i = Math.min(t.precision, 20), n = this.getExtent(), + o = t.splitNumber; + o = Math.max(parseInt(o, 10), 1), t.splitNumber = o; + for (var a = (n[1] - n[0]) / o; +a.toFixed(i) !== a && i < 5;) i++; + t.precision = i, a = +a.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 + o; r < l; s += a) { + var u = r === o - 1 ? n[1] : s + a; + e.push({index: r++, interval: [s, u], close: [1, 1]}) + } + t.maxOpen && e.push({index: r++, interval: [n[1], 1 / 0], close: [0, 0]}), Go(e), d(e, function (t) { + t.text = this.formatValueText(t.interval) + }, this) + }, categories: function () { + var t = this.option; + d(t.categories, function (t) { + this._pieceList.push({text: this.formatValueText(t, !0), value: t}) + }, this), by(t, this._pieceList) + }, pieces: function () { + var t = this.option, e = this._pieceList; + d(t.pieces, function (t, i) { + w(t) || (t = {value: t}); + var n = {text: "", index: i}; + if (null != t.label && (n.text = t.label), t.hasOwnProperty("value")) { + var o = n.value = t.value; + n.interval = [o, o], n.close = [1, 1] + } else { + for (var a = n.interval = [], r = n.close = [0, 0], s = [1, 0, 1], l = [-1 / 0, 1 / 0], u = [], h = 0; h < 2; h++) { + for (var c = [["gte", "gt", "min"], ["lte", "lt", "max"]][h], d = 0; d < 3 && null == a[h]; d++) a[h] = t[c[d]], r[h] = s[d], u[h] = 2 === d; + null == a[h] && (a[h] = l[h]) + } + u[0] && a[1] === 1 / 0 && (r[0] = 0), u[1] && a[0] === -1 / 0 && (r[1] = 0), a[0] === a[1] && r[0] && r[1] && (n.value = a[0]) + } + n.visual = ZA.retrieveVisuals(t), e.push(n) + }, this), by(t, e), Go(e), d(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) + } + }; + uN.extend({ + type: "visualMap.piecewise", doRender: function () { + var t = this.group; + t.removeAll(); + var e = this.visualMapModel, i = e.get("textGap"), n = e.textStyleModel, o = n.getFont(), + a = n.getTextColor(), r = this._getItemAlign(), s = e.itemSize, l = this._getViewData(), u = l.endsText, + h = T(e.get("showLabel", !0), !u); + u && this._renderEndsText(t, u[0], s, h, r), d(l.viewPieceList, function (n) { + var l = n.piece, u = new sw; + u.onclick = m(this._onItemClick, this, l), this._enableHoverLink(u, n.indexInModelPieceList); + var c = e.getRepresentValue(l); + if (this._createItemSymbol(u, c, [0, 0, s[0], s[1]]), h) { + var d = this.visualMapModel.getValueState(c); + u.add(new fS({ + style: { + x: "right" === r ? -i : s[0] + i, + y: s[1] / 2, + text: l.text, + textVerticalAlign: "middle", + textAlign: r, + textFont: o, + textFill: a, + opacity: "outOfRange" === d ? .5 : 1 + } + })) + } + t.add(u) + }, this), u && this._renderEndsText(t, u[1], s, h, r), sM(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: gy(i.findTargetDataIndices(e))}) + } + + t.on("mouseover", m(i, this, "highlight")).on("mouseout", m(i, this, "downplay")) + }, _getItemAlign: function () { + var t = this.visualMapModel, e = t.option; + if ("vertical" === e.orient) return py(t, this.api, t.itemSize); + var i = e.align; + return i && "auto" !== i || (i = "left"), i + }, _renderEndsText: function (t, e, i, n, o) { + if (e) { + var a = new sw, r = this.visualMapModel.textStyleModel; + a.add(new fS({ + style: { + x: n ? "right" === o ? i[0] : 0 : i[0] / 2, + y: i[1] / 2, + textVerticalAlign: "middle", + textAlign: n ? o : "center", + text: e, + textFont: r.getFont(), + textFill: r.getTextColor() + } + })), t.add(a) + } + }, _getViewData: function () { + var t = this.visualMapModel, e = f(t.getPieceList(), function (t, e) { + return {piece: t, indexInModelPieceList: e} + }), i = t.get("text"), n = t.get("orient"), o = t.get("inverse"); + return ("horizontal" === n ? o : !o) ? e.reverse() : i && (i = i.slice().reverse()), { + viewPieceList: e, + endsText: i + } + }, _createItemSymbol: function (t, e, i) { + t.add(Tl(this.getControllerVisual(e, "symbol"), i[0], i[1], i[2], i[3], this.getControllerVisual(e, "color"))) + }, _onItemClick: function (t) { + var e = this.visualMapModel, n = e.option, o = i(n.selected), a = e.getSelectedMapKey(t); + "single" === n.selectedMode ? (o[a] = !0, d(o, function (t, e) { + o[e] = e === a + })) : o[a] = !o[a], this.api.dispatchAction({ + type: "selectDataRange", + from: this.uid, + visualMapId: this.visualMapModel.id, + selected: o + }) + } + }); + us(qP); + var xN = Fo, _N = Zo, wN = vs({ + 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 (a_.node) return !1; + var t = this.__hostSeries; + return this.getShallow("animation") && t && t.isAnimationEnabled() + }, mergeOption: function (t, e, i, n) { + var o = this.constructor, r = this.mainType + "Model"; + i || e.eachSeries(function (t) { + var i = t.get(this.mainType, !0), s = t[r]; + i && i.data ? (s ? s.mergeOption(i, e, !0) : (n && Sy(i), d(i.data, function (t) { + t instanceof Array ? (Sy(t[0]), Sy(t[1])) : Sy(t) + }), a(s = new o(i, this, e), { + mainType: this.mainType, + seriesIndex: t.seriesIndex, + name: t.name, + createdBySelf: !0 + }), s.__hostSeries = t), t[r] = s) : t[r] = null + }, this) + }, formatTooltip: function (t) { + var e = this.getData(), i = this.getRawValue(t), n = y(i) ? f(i, xN).join(", ") : xN(i), o = e.getName(t), + a = _N(this.name); + return (null != i || o) && (a += "
    "), o && (a += _N(o), null != i && (a += " : ")), null != i && (a += _N(n)), a + }, getData: function () { + return this._data + }, setData: function (t) { + this._data = t + } + }); + h(wN, XM), wN.extend({ + type: "markPoint", + defaultOption: { + zlevel: 0, + z: 5, + symbol: "pin", + symbolSize: 50, + tooltip: {trigger: "item"}, + label: {show: !0, position: "inside"}, + itemStyle: {borderWidth: 2}, + emphasis: {label: {show: !0}} + } + }); + var bN = l, SN = v, MN = {min: SN(Ty, "min"), max: SN(Ty, "max"), average: SN(Ty, "average")}, IN = ys({ + type: "marker", init: function () { + this.markerGroupMap = R() + }, render: function (t, e, i) { + var n = this.markerGroupMap; + n.each(function (t) { + t.__keep = !1 + }); + var o = this.type + "Model"; + e.eachSeries(function (t) { + var n = t[o]; + n && this.renderSeries(t, n, e, i) + }, this), n.each(function (t) { + !t.__keep && this.group.remove(t.group) + }, this) + }, renderSeries: function () { + } + }); + IN.extend({ + type: "markPoint", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markPointModel; + e && (Ny(e.getData(), t, i), this.markerGroupMap.get(t.id).updateLayout(e)) + }, this) + }, renderSeries: function (t, e, i, n) { + var o = t.coordinateSystem, a = t.id, r = t.getData(), s = this.markerGroupMap, + l = s.get(a) || s.set(a, new Ql), u = Oy(o, t, e); + e.setData(u), Ny(e.getData(), t, n), u.each(function (t) { + var i = u.getItemModel(t), n = i.getShallow("symbolSize"); + "function" == typeof n && (n = n(e.getRawValue(t), e.getDataParams(t))), u.setItemVisual(t, { + symbolSize: n, + color: i.get("itemStyle.color") || r.getVisual("color"), + symbol: i.getShallow("symbol") + }) + }), l.updateData(u), this.group.add(l.group), u.eachItemGraphicEl(function (t) { + t.traverse(function (t) { + t.dataModel = e + }) + }), l.__keep = !0, l.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markPoint = t.markPoint || {} + }), wN.extend({ + type: "markLine", + defaultOption: { + zlevel: 0, + z: 5, + symbol: ["circle", "arrow"], + symbolSize: [8, 16], + precision: 2, + tooltip: {trigger: "item"}, + label: {show: !0, position: "end"}, + lineStyle: {type: "dashed"}, + emphasis: {label: {show: !0}, lineStyle: {width: 3}}, + animationEasing: "linear" + } + }); + var TN = function (t, e, o, r) { + var s = t.getData(), l = r.type; + if (!y(r) && ("min" === l || "max" === l || "average" === l || "median" === l || null != r.xAxis || null != r.yAxis)) { + var u, h; + if (null != r.yAxis || null != r.xAxis) u = null != r.yAxis ? "y" : "x", e.getAxis(u), h = T(r.yAxis, r.xAxis); else { + var c = Ay(r, s, e, t); + u = c.valueDataDim, c.valueAxis, h = Py(s, u, l) + } + var d = "x" === u ? 0 : 1, f = 1 - d, p = i(r), g = {}; + p.type = null, p.coord = [], g.coord = [], p.coord[f] = -1 / 0, g.coord[f] = 1 / 0; + var m = o.get("precision"); + m >= 0 && "number" == typeof h && (h = +h.toFixed(Math.min(m, 20))), p.coord[d] = g.coord[d] = h, r = [p, g, { + type: l, + valueIndex: r.valueIndex, + value: h + }] + } + return r = [Dy(t, r[0]), Dy(t, r[1]), a({}, r[2])], r[2].type = r[2].type || "", n(r[2], r[0]), n(r[2], r[1]), r + }; + IN.extend({ + type: "markLine", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markLineModel; + if (e) { + var n = e.getData(), o = e.__from, a = e.__to; + o.each(function (e) { + By(o, e, !0, t, i), By(a, e, !1, t, i) + }), n.each(function (t) { + n.setItemLayout(t, [o.getItemLayout(t), a.getItemLayout(t)]) + }), this.markerGroupMap.get(t.id).updateLayout() + } + }, this) + }, renderSeries: function (t, e, i, n) { + function o(e, i, o) { + var a = e.getItemModel(i); + By(e, i, o, t, n), e.setItemVisual(i, { + symbolSize: a.get("symbolSize") || g[o ? 0 : 1], + symbol: a.get("symbol", !0) || p[o ? 0 : 1], + color: a.get("itemStyle.color") || s.getVisual("color") + }) + } + + var a = t.coordinateSystem, r = t.id, s = t.getData(), l = this.markerGroupMap, + u = l.get(r) || l.set(r, new Sd); + this.group.add(u.group); + var h = Vy(a, t, e), c = h.from, d = h.to, f = h.line; + e.__from = c, e.__to = d, e.setData(f); + var p = e.get("symbol"), g = e.get("symbolSize"); + y(p) || (p = [p, p]), "number" == typeof g && (g = [g, g]), h.from.each(function (t) { + o(c, t, !0), o(d, t, !1) + }), f.each(function (t) { + var e = f.getItemModel(t).get("lineStyle.color"); + f.setItemVisual(t, {color: e || c.getItemVisual(t, "color")}), f.setItemLayout(t, [c.getItemLayout(t), d.getItemLayout(t)]), f.setItemVisual(t, { + fromSymbolSize: c.getItemVisual(t, "symbolSize"), + fromSymbol: c.getItemVisual(t, "symbol"), + toSymbolSize: d.getItemVisual(t, "symbolSize"), + toSymbol: d.getItemVisual(t, "symbol") + }) + }), u.updateData(f), h.line.eachItemGraphicEl(function (t, i) { + t.traverse(function (t) { + t.dataModel = e + }) + }), u.__keep = !0, u.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markLine = t.markLine || {} + }), wN.extend({ + type: "markArea", + defaultOption: { + zlevel: 0, + z: 1, + tooltip: {trigger: "item"}, + animation: !1, + label: {show: !0, position: "top"}, + itemStyle: {borderWidth: 0}, + emphasis: {label: {show: !0, position: "top"}} + } + }); + var DN = function (t, e, i, n) { + var a = Dy(t, n[0]), r = Dy(t, n[1]), s = T, l = a.coord, u = r.coord; + l[0] = s(l[0], -1 / 0), l[1] = s(l[1], -1 / 0), u[0] = s(u[0], 1 / 0), u[1] = s(u[1], 1 / 0); + var h = o([{}, a, r]); + return h.coord = [a.coord, r.coord], h.x0 = a.x, h.y0 = a.y, h.x1 = r.x, h.y1 = r.y, h + }, AN = [["x0", "y0"], ["x1", "y0"], ["x1", "y1"], ["x0", "y1"]]; + IN.extend({ + type: "markArea", updateTransform: function (t, e, i) { + e.eachSeries(function (t) { + var e = t.markAreaModel; + if (e) { + var n = e.getData(); + n.each(function (e) { + var o = f(AN, function (o) { + return Hy(n, e, o, t, i) + }); + n.setItemLayout(e, o), n.getItemGraphicEl(e).setShape("points", o) + }) + } + }, this) + }, renderSeries: function (t, e, i, n) { + var o = t.coordinateSystem, a = t.id, s = t.getData(), l = this.markerGroupMap, + u = l.get(a) || l.set(a, {group: new sw}); + this.group.add(u.group), u.__keep = !0; + var h = Zy(o, t, e); + e.setData(h), h.each(function (e) { + h.setItemLayout(e, f(AN, function (i) { + return Hy(h, e, i, t, n) + })), h.setItemVisual(e, {color: s.getVisual("color")}) + }), h.diff(u.__data).add(function (t) { + var e = new wS({shape: {points: h.getItemLayout(t)}}); + h.setItemGraphicEl(t, e), u.group.add(e) + }).update(function (t, i) { + var n = u.__data.getItemGraphicEl(i); + fo(n, {shape: {points: h.getItemLayout(t)}}, e, t), u.group.add(n), h.setItemGraphicEl(t, n) + }).remove(function (t) { + var e = u.__data.getItemGraphicEl(t); + u.group.remove(e) + }).execute(), h.eachItemGraphicEl(function (t, i) { + var n = h.getItemModel(i), o = n.getModel("label"), a = n.getModel("emphasis.label"), + s = h.getItemVisual(i, "color"); + t.useStyle(r(n.getModel("itemStyle").getItemStyle(), { + fill: Rt(s, .4), + stroke: s + })), t.hoverStyle = n.getModel("emphasis.itemStyle").getItemStyle(), io(t.style, t.hoverStyle, o, a, { + labelFetcher: e, + labelDataIndex: i, + defaultText: h.getName(i) || "", + isRectText: !0, + autoColor: s + }), eo(t, {}), t.dataModel = e + }), u.__data = h, u.group.silent = e.get("silent") || t.get("silent") + } + }), us(function (t) { + t.markArea = t.markArea || {} + }); + hM.registerSubTypeDefaulter("timeline", function () { + return "slider" + }), cs({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"), r({currentIndex: i.option.currentIndex}, t) + }), cs({type: "timelinePlayChange", event: "timelinePlayChanged", update: "update"}, function (t, e) { + var i = e.getComponent("timeline"); + i && null != t.playState && i.setPlayState(t.playState) + }); + var CN = hM.extend({ + type: "timeline", + layoutMode: "box", + defaultOption: { + zlevel: 0, + z: 4, + show: !0, + axisType: "time", + realtime: !0, + left: "20%", + top: null, + right: "20%", + bottom: 0, + width: null, + height: 40, + padding: 5, + controlPosition: "left", + autoPlay: !1, + rewind: !1, + loop: !0, + playInterval: 2e3, + currentIndex: 0, + itemStyle: {}, + label: {color: "#000"}, + data: [] + }, + init: function (t, e, i) { + this._data, this._names, this.mergeDefaultAndTheme(t, i), this._initData() + }, + mergeOption: function (t) { + CN.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 || [], n = t.axisType, o = this._names = []; + if ("category" === n) { + var a = []; + d(e, function (t, e) { + var n, r = Ii(t); + w(t) ? (n = i(t)).value = e : n = e, a.push(n), _(r) || null != r && !isNaN(r) || (r = ""), o.push(r + "") + }), e = a + } + var r = {category: "ordinal", time: "time"}[n] || "number"; + (this._data = new sT([{name: "value", type: r}], this)).initData(e, o) + }, + getData: function () { + return this._data + }, + getCategories: function () { + if ("category" === this.get("axisType")) return this._names.slice() + } + }); + h(CN.extend({ + type: "timeline.slider", defaultOption: { + backgroundColor: "rgba(0,0,0,0)", + borderColor: "#ccc", + borderWidth: 0, + orient: "horizontal", + inverse: !1, + tooltip: {trigger: "item"}, + symbol: "emptyCircle", + symbolSize: 10, + lineStyle: {show: !0, width: 2, color: "#304654"}, + label: {position: "auto", show: !0, interval: "auto", rotate: 0, color: "#304654"}, + itemStyle: {color: "#304654", borderWidth: 1}, + checkpointStyle: { + symbol: "circle", + symbolSize: 13, + color: "#c23531", + borderWidth: 5, + borderColor: "rgba(194,53,49, 0.5)", + animation: !0, + animationDuration: 300, + animationEasing: "quinticInOut" + }, + controlStyle: { + show: !0, + showPlayBtn: !0, + showPrevBtn: !0, + showNextBtn: !0, + itemSize: 22, + itemGap: 12, + position: "left", + playIcon: "path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z", + stopIcon: "path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z", + nextIcon: "path://M18.6,50.8l22.5-22.5c0.2-0.2,0.3-0.4,0.3-0.7c0-0.3-0.1-0.5-0.3-0.7L18.7,4.4c-0.1-0.1-0.2-0.3-0.2-0.5 c0-0.4,0.3-0.8,0.8-0.8c0.2,0,0.5,0.1,0.6,0.3l23.5,23.5l0,0c0.2,0.2,0.3,0.4,0.3,0.7c0,0.3-0.1,0.5-0.3,0.7l-0.1,0.1L19.7,52 c-0.1,0.1-0.3,0.2-0.5,0.2c-0.4,0-0.8-0.3-0.8-0.8C18.4,51.2,18.5,51,18.6,50.8z", + prevIcon: "path://M43,52.8L20.4,30.3c-0.2-0.2-0.3-0.4-0.3-0.7c0-0.3,0.1-0.5,0.3-0.7L42.9,6.4c0.1-0.1,0.2-0.3,0.2-0.5 c0-0.4-0.3-0.8-0.8-0.8c-0.2,0-0.5,0.1-0.6,0.3L18.3,28.8l0,0c-0.2,0.2-0.3,0.4-0.3,0.7c0,0.3,0.1,0.5,0.3,0.7l0.1,0.1L41.9,54 c0.1,0.1,0.3,0.2,0.5,0.2c0.4,0,0.8-0.3,0.8-0.8C43.2,53.2,43.1,53,43,52.8z", + color: "#304654", + borderColor: "#304654", + borderWidth: 1 + }, + emphasis: { + label: {show: !0, color: "#c23531"}, + itemStyle: {color: "#c23531"}, + controlStyle: {color: "#c23531", borderColor: "#c23531", borderWidth: 2} + }, + data: [] + } + }), XM); + var LN = $M.extend({type: "timeline"}), kN = function (t, e, i, n) { + qT.call(this, t, e, i), this.type = n || "value", this.model = null + }; + kN.prototype = { + constructor: kN, getLabelModel: function () { + return this.model.getModel("label") + }, isHorizontal: function () { + return "horizontal" === this.model.get("orient") + } + }, u(kN, qT); + var PN = m, NN = d, ON = Math.PI; + LN.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 o = this._layout(t, i), a = this._createGroup("mainGroup"), r = this._createGroup("labelGroup"), + s = this._axis = this._createAxis(o, t); + t.formatTooltip = function (t) { + return Zo(s.scale.getLabel(t)) + }, NN(["AxisLine", "AxisTick", "Control", "CurrentPointer"], function (e) { + this["_render" + e](o, a, s, t) + }, this), this._renderAxisLabel(o, r, s, t), this._position(o, t) + } + this._doPlayStop() + }, remove: function () { + this._clearTimer(), this.group.removeAll() + }, dispose: function () { + this._clearTimer() + }, _layout: function (t, e) { + var i = t.get("label.position"), n = t.get("orient"), o = Yy(t, e); + null == i || "auto" === i ? i = "horizontal" === n ? o.y + o.height / 2 < e.getHeight() / 2 ? "-" : "+" : o.x + o.width / 2 < e.getWidth() / 2 ? "+" : "-" : isNaN(i) && (i = { + horizontal: { + top: "-", + bottom: "+" + }, vertical: {left: "-", right: "+"} + }[n][i]); + var a = {horizontal: "center", vertical: i >= 0 || "+" === i ? "left" : "right"}, + r = {horizontal: i >= 0 || "+" === i ? "top" : "bottom", vertical: "middle"}, + s = {horizontal: 0, vertical: ON / 2}, l = "vertical" === n ? o.height : o.width, + u = t.getModel("controlStyle"), h = u.get("show", !0), c = h ? u.get("itemSize") : 0, + d = h ? u.get("itemGap") : 0, f = c + d, p = t.get("label.rotate") || 0; + p = p * ON / 180; + var g, m, v, y, x = u.get("position", !0), _ = h && u.get("showPlayBtn", !0), + w = h && u.get("showPrevBtn", !0), b = h && u.get("showNextBtn", !0), S = 0, M = l; + return "left" === x || "bottom" === x ? (_ && (g = [0, 0], S += f), w && (m = [S, 0], S += f), b && (v = [M - c, 0], M -= f)) : (_ && (g = [M - c, 0], M -= f), w && (m = [0, 0], S += f), b && (v = [M - c, 0], M -= f)), y = [S, M], t.get("inverse") && y.reverse(), { + viewRect: o, + mainLength: l, + orient: n, + rotation: s[n], + labelRotation: p, + labelPosOpt: i, + labelAlign: t.get("label.align") || a[n], + labelBaseline: t.get("label.verticalAlign") || t.get("label.baseline") || r[n], + playPosition: g, + prevBtnPosition: m, + nextBtnPosition: v, + axisExtent: y, + controlSize: c, + controlGap: d + } + }, _position: function (t, e) { + function i(t) { + var e = t.position; + t.origin = [c[0][0] - e[0], c[1][0] - e[1]] + } + + function n(t) { + return [[t.x, t.x + t.width], [t.y, t.y + t.height]] + } + + function o(t, e, i, n, o) { + t[n] += i[n][o] - e[n][o] + } + + var a = this._mainGroup, r = this._labelGroup, s = t.viewRect; + if ("vertical" === t.orient) { + var l = st(), u = s.x, h = s.y + s.height; + ct(l, l, [-u, -h]), dt(l, l, -ON / 2), ct(l, l, [u, h]), (s = s.clone()).applyTransform(l) + } + var c = n(s), d = n(a.getBoundingRect()), f = n(r.getBoundingRect()), p = a.position, g = r.position; + g[0] = p[0] = c[0][0]; + var m = t.labelPosOpt; + if (isNaN(m)) o(p, d, c, 1, v = "+" === m ? 0 : 1), o(g, f, c, 1, 1 - v); else { + var v = m >= 0 ? 0 : 1; + o(p, d, c, 1, v), g[1] = p[1] + m + } + a.attr("position", p), r.attr("position", g), a.rotation = r.rotation = t.rotation, i(a), i(r) + }, _createAxis: function (t, e) { + var i = e.getData(), n = e.get("axisType"), o = xl(e, n); + o.getTicks = function () { + return i.mapArray(["value"], function (t) { + return t + }) + }; + var a = i.getDataExtent("value"); + o.setExtent(a[0], a[1]), o.niceTicks(); + var r = new kN("value", o, t.axisExtent, n); + return r.model = e, r + }, _createGroup: function (t) { + var e = this["_" + t] = new sw; + return this.group.add(e), e + }, _renderAxisLine: function (t, e, i, n) { + var o = i.getExtent(); + n.get("lineStyle.show") && e.add(new MS({ + shape: {x1: o[0], y1: 0, x2: o[1], y2: 0}, + style: a({lineCap: "round"}, n.getModel("lineStyle").getLineStyle()), + silent: !0, + z2: 1 + })) + }, _renderAxisTick: function (t, e, i, n) { + var o = n.getData(), a = i.scale.getTicks(); + NN(a, function (t) { + var a = i.dataToCoord(t), r = o.getItemModel(t), s = r.getModel("itemStyle"), + l = r.getModel("emphasis.itemStyle"), + u = {position: [a, 0], onclick: PN(this._changeTimeline, this, t)}, h = Ky(r, s, e, u); + eo(h, l.getItemStyle()), r.get("tooltip") ? (h.dataIndex = t, h.dataModel = n) : h.dataIndex = h.dataModel = null + }, this) + }, _renderAxisLabel: function (t, e, i, n) { + if (i.getLabelModel().get("show")) { + var o = n.getData(), a = i.getViewLabels(); + NN(a, function (n) { + var a = n.tickValue, r = o.getItemModel(a), s = r.getModel("label"), + l = r.getModel("emphasis.label"), u = i.dataToCoord(n.tickValue), h = new fS({ + position: [u, 0], + rotation: t.labelRotation - t.rotation, + onclick: PN(this._changeTimeline, this, a), + silent: !1 + }); + no(h.style, s, { + text: n.formattedLabel, + textAlign: t.labelAlign, + textVerticalAlign: t.labelBaseline + }), e.add(h), eo(h, no({}, l)) + }, this) + } + }, _renderControl: function (t, e, i, n) { + function o(t, i, o, h) { + if (t) { + var c = qy(n, i, u, { + position: t, + origin: [a / 2, 0], + rotation: h ? -r : 0, + rectHover: !0, + style: s, + onclick: o + }); + e.add(c), eo(c, l) + } + } + + var a = t.controlSize, r = t.rotation, s = n.getModel("controlStyle").getItemStyle(), + l = n.getModel("emphasis.controlStyle").getItemStyle(), u = [0, -a / 2, a, a], h = n.getPlayState(), + c = n.get("inverse", !0); + o(t.nextBtnPosition, "controlStyle.nextIcon", PN(this._changeTimeline, this, c ? "-" : "+")), o(t.prevBtnPosition, "controlStyle.prevIcon", PN(this._changeTimeline, this, c ? "+" : "-")), o(t.playPosition, "controlStyle." + (h ? "stopIcon" : "playIcon"), PN(this._handlePlayClick, this, !h), !0) + }, _renderCurrentPointer: function (t, e, i, n) { + var o = n.getData(), a = n.getCurrentIndex(), r = o.getItemModel(a).getModel("checkpointStyle"), s = this, + l = { + onCreate: function (t) { + t.draggable = !0, t.drift = PN(s._handlePointerDrag, s), t.ondragend = PN(s._handlePointerDragend, s), $y(t, a, i, n, !0) + }, onUpdate: function (t) { + $y(t, a, i, n) + } + }; + this._currentPointer = Ky(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 = Co(this._axis.getExtent().slice()); + i > n[1] && (i = n[1]), i < n[0] && (i = n[0]), this._currentPointer.position[0] = i, this._currentPointer.dirty(); + var o = this._findNearestTick(i), a = this.model; + (e || o !== a.getCurrentIndex() && a.get("realtime")) && this._changeTimeline(o) + }, _doPlayStop: function () { + this._clearTimer(), this.model.getPlayState() && (this._timer = setTimeout(PN(function () { + var t = this.model; + this._changeTimeline(t.getCurrentIndex() + (t.get("rewind", !0) ? -1 : 1)) + }, this), this.model.get("playInterval"))) + }, _toAxisCoord: function (t) { + return mo(t, this._mainGroup.getLocalTransform(), !0) + }, _findNearestTick: function (t) { + var e, i = this.model.getData(), n = 1 / 0, o = this._axis; + return i.each(["value"], function (i, a) { + var r = o.dataToCoord(i), s = Math.abs(r - t); + s < n && (n = s, e = a) + }), 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 + }) + } + }), us(function (t) { + var e = t && t.timeline; + y(e) || (e = e ? [e] : []), d(e, function (t) { + t && Uy(t) + }) + }); + var EN = vs({ + type: "toolbox", + layoutMode: {type: "box", ignoreSize: !0}, + optionUpdated: function () { + EN.superApply(this, "optionUpdated", arguments), d(this.option.feature, function (t, e) { + var i = Vv(e); + i && n(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: {borderColor: "#666", color: "none"}, + emphasis: {iconStyle: {borderColor: "#3E98C5"}} + } + }); + ys({ + type: "toolbox", render: function (t, e, i, n) { + function o(o, r) { + var s, c = h[o], d = h[r], f = new wo(l[c], t, t.ecModel); + if (c && !d) { + if (Jy(c)) s = {model: f, onclick: f.option.onclick, featureName: c}; else { + var p = Vv(c); + if (!p) return; + s = new p(f, e, i) + } + u[c] = s + } else { + if (!(s = u[d])) return; + s.model = f, s.ecModel = e, s.api = i + } + c || !d ? f.get("show") && !s.unusable ? (a(f, s, c), f.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) + }, s.render && s.render(f, e, i, n)) : s.remove && s.remove(e, i) : s.dispose && s.dispose(e, i) + } + + function a(n, o, a) { + var l = n.getModel("iconStyle"), u = n.getModel("emphasis.iconStyle"), + h = o.getIcons ? o.getIcons() : n.get("icon"), c = n.get("title") || {}; + if ("string" == typeof h) { + var f = h, p = c; + c = {}, (h = {})[a] = f, c[a] = p + } + var g = n.iconPaths = {}; + d(h, function (a, h) { + var d = _o(a, {}, {x: -s / 2, y: -s / 2, width: s, height: s}); + d.setStyle(l.getItemStyle()), d.hoverStyle = u.getItemStyle(), eo(d), t.get("showTitle") && (d.__title = c[h], d.on("mouseover", function () { + var t = u.getItemStyle(); + d.setStyle({ + text: c[h], + textPosition: t.textPosition || "bottom", + textFill: t.fill || t.stroke || "#000", + textAlign: t.textAlign || "center" + }) + }).on("mouseout", function () { + d.setStyle({textFill: null}) + })), d.trigger(n.get("iconStatus." + h) || "normal"), r.add(d), d.on("click", m(o.onclick, o, e, i, h)), g[h] = d + }) + } + + var r = this.group; + if (r.removeAll(), t.get("show")) { + var s = +t.get("itemSize"), l = t.get("feature") || {}, u = this._features || (this._features = {}), + h = []; + d(l, function (t, e) { + h.push(e) + }), new Ss(this._featureNames || [], h).add(o).update(o).remove(v(o, null)).execute(), this._featureNames = h, Pm(r, t, i), r.add(Nm(r.getBoundingRect(), t)), r.eachChild(function (t) { + var e = t.__title, n = t.hoverStyle; + if (n && e) { + var o = me(e, ke(n)), a = t.position[0] + r.position[0], l = !1; + t.position[1] + r.position[1] + s + o.height > i.getHeight() && (n.textPosition = "top", l = !0); + var u = l ? -5 - o.height : s + 8; + a + o.width / 2 > i.getWidth() ? (n.textPosition = ["100%", u], n.textAlign = "right") : a - o.width / 2 < 0 && (n.textPosition = [0, u], n.textAlign = "left") + } + }) + } + }, updateView: function (t, e, i, n) { + d(this._features, function (t) { + t.updateView && t.updateView(t.model, e, i, n) + }) + }, remove: function (t, e) { + d(this._features, function (i) { + i.remove && i.remove(t, e) + }), this.group.removeAll() + }, dispose: function (t, e) { + d(this._features, function (i) { + i.dispose && i.dispose(t, e) + }) + } + }); + var RN = lI.toolbox.saveAsImage; + Qy.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: RN.title, + type: "png", + name: "", + excludeComponents: ["toolbox"], + pixelRatio: 1, + lang: RN.lang.slice() + }, Qy.prototype.unusable = !a_.canvasSupported, Qy.prototype.onclick = function (t, e) { + var i = this.model, n = i.get("name") || t.get("title.0.text") || "echarts", o = document.createElement("a"), + a = i.get("type", !0) || "png"; + o.download = n + "." + a, o.target = "_blank"; + var r = e.getConnectedDataURL({ + type: a, + backgroundColor: i.get("backgroundColor", !0) || t.get("backgroundColor") || "#fff", + excludeComponents: i.get("excludeComponents"), + pixelRatio: i.get("pixelRatio") + }); + if (o.href = r, "function" != typeof MouseEvent || a_.browser.ie || a_.browser.edge) if (window.navigator.msSaveOrOpenBlob) { + for (var s = atob(r.split(",")[1]), l = s.length, u = new Uint8Array(l); l--;) u[l] = s.charCodeAt(l); + var h = new Blob([u]); + window.navigator.msSaveOrOpenBlob(h, n + "." + a) + } else { + var c = i.get("lang"), + d = ''; + window.open().document.write(d) + } else { + var f = new MouseEvent("click", {view: window, bubbles: !0, cancelable: !1}); + o.dispatchEvent(f) + } + }, Bv("saveAsImage", Qy); + var zN = lI.toolbox.magicType; + tx.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: i(zN.title), + option: {}, + seriesIndex: {} + }; + var BN = tx.prototype; + BN.getIcons = function () { + var t = this.model, e = t.get("icon"), i = {}; + return d(t.get("type"), function (t) { + e[t] && (i[t] = e[t]) + }), i + }; + var VN = { + line: function (t, e, i, o) { + if ("bar" === t) return n({ + id: e, + type: "line", + data: i.get("data"), + stack: i.get("stack"), + markPoint: i.get("markPoint"), + markLine: i.get("markLine") + }, o.get("option.line") || {}, !0) + }, bar: function (t, e, i, o) { + if ("line" === t) return n({ + id: e, + type: "bar", + data: i.get("data"), + stack: i.get("stack"), + markPoint: i.get("markPoint"), + markLine: i.get("markLine") + }, o.get("option.bar") || {}, !0) + }, stack: function (t, e, i, o) { + if ("line" === t || "bar" === t) return n({ + id: e, + stack: "__ec_magicType_stack__" + }, o.get("option.stack") || {}, !0) + }, tiled: function (t, e, i, o) { + if ("line" === t || "bar" === t) return n({id: e, stack: ""}, o.get("option.tiled") || {}, !0) + } + }, GN = [["line", "bar"], ["stack", "tiled"]]; + BN.onclick = function (t, e, i) { + var n = this.model, o = n.get("seriesIndex." + i); + if (VN[i]) { + var a = {series: []}; + d(GN, function (t) { + l(t, i) >= 0 && d(t, function (t) { + n.setIconStatus(t, "normal") + }) + }), n.setIconStatus(i, "emphasis"), t.eachComponent({ + mainType: "series", + query: null == o ? null : {seriesIndex: o} + }, function (e) { + var o = e.subType, s = e.id, l = VN[i](o, s, e, n); + l && (r(l, e.option), a.series.push(l)); + var u = e.coordinateSystem; + if (u && "cartesian2d" === u.type && ("line" === i || "bar" === i)) { + var h = u.getAxesByScale("ordinal")[0]; + if (h) { + var c = h.dim + "Axis", d = t.queryComponents({ + mainType: c, + index: e.get(name + "Index"), + id: e.get(name + "Id") + })[0].componentIndex; + a[c] = a[c] || []; + for (var f = 0; f <= d; f++) a[c][d] = a[c][d] || {}; + a[c][d].boundaryGap = "bar" === i + } + } + }), e.dispatchAction({type: "changeMagicType", currentType: i, newOption: a}) + } + }, cs({type: "changeMagicType", event: "magicTypeChanged", update: "prepareAndUpdate"}, function (t, e) { + e.mergeOption(t.newOption) + }), Bv("magicType", tx); + var WN = lI.toolbox.dataView, FN = new Array(60).join("-"), HN = "\t", ZN = new RegExp("[" + HN + "]+", "g"); + hx.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: i(WN.title), + lang: i(WN.lang), + backgroundColor: "#fff", + textColor: "#000", + textareaColor: "#fff", + textareaBorderColor: "#333", + buttonColor: "#c23531", + buttonTextColor: "#fff" + }, hx.prototype.onclick = function (t, e) { + function i() { + n.removeChild(a), x._dom = null + } + + var n = e.getDom(), o = this.model; + this._dom && n.removeChild(this._dom); + var a = document.createElement("div"); + a.style.cssText = "position:absolute;left:5px;top:5px;bottom:5px;right:5px;", a.style.backgroundColor = o.get("backgroundColor") || "#fff"; + var r = document.createElement("h4"), s = o.get("lang") || []; + r.innerHTML = s[0] || o.get("title"), r.style.cssText = "margin: 10px 20px;", r.style.color = o.get("textColor"); + var l = document.createElement("div"), u = document.createElement("textarea"); + l.style.cssText = "display:block;width:100%;overflow:auto;"; + var h = o.get("optionToContent"), c = o.get("contentToOption"), d = ox(t); + if ("function" == typeof h) { + var f = h(e.getOption()); + "string" == typeof f ? l.innerHTML = f : M(f) && l.appendChild(f) + } else l.appendChild(u), u.readOnly = o.get("readOnly"), u.style.cssText = "width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;", u.style.color = o.get("textColor"), u.style.borderColor = o.get("textareaBorderColor"), u.style.backgroundColor = o.get("textareaColor"), u.value = d.value; + var p = d.meta, g = document.createElement("div"); + g.style.cssText = "position:absolute;bottom:0;left:0;right:0;"; + var m = "float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px", + v = document.createElement("div"), y = document.createElement("div"); + m += ";background-color:" + o.get("buttonColor"), m += ";color:" + o.get("buttonTextColor"); + var x = this; + ui(v, "click", i), ui(y, "click", function () { + var t; + try { + t = "function" == typeof c ? c(l, e.getOption()) : ux(u.value, p) + } catch (t) { + throw i(), new Error("Data view format error " + t) + } + t && e.dispatchAction({type: "changeDataView", newOption: t}), i() + }), v.innerHTML = s[1], y.innerHTML = s[2], y.style.cssText = m, v.style.cssText = m, !o.get("readOnly") && g.appendChild(y), g.appendChild(v), ui(u, "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) + HN + e.substring(n), this.selectionStart = this.selectionEnd = i + 1, zw(t) + } + }), a.appendChild(r), a.appendChild(l), a.appendChild(g), l.style.height = n.clientHeight - 80 + "px", n.appendChild(a), this._dom = a + }, hx.prototype.remove = function (t, e) { + this._dom && e.getDom().removeChild(this._dom) + }, hx.prototype.dispose = function (t, e) { + this.remove(t, e) + }, Bv("dataView", hx), cs({ + type: "changeDataView", + event: "dataViewChanged", + update: "prepareAndUpdate" + }, function (t, e) { + var i = []; + d(t.newOption.series, function (t) { + var n = e.getSeriesByName(t.name)[0]; + if (n) { + var o = n.get("data"); + i.push({name: t.name, data: cx(t.data, o)}) + } else i.push(a({type: "scatter"}, t)) + }), e.mergeOption(r({series: i}, t.newOption)) + }); + var UN = d, XN = "\0_ec_hist_store"; + PP.extend({type: "dataZoom.select"}), NP.extend({type: "dataZoom.select"}); + var jN = lI.toolbox.dataZoom, YN = d, qN = "\0_ec_\0toolbox-dataZoom_"; + vx.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: i(jN.title) + }; + var KN = vx.prototype; + KN.render = function (t, e, i, n) { + this.model = t, this.ecModel = e, this.api = i, _x(t, e, this, n, i), xx(t, e) + }, KN.onclick = function (t, e, i) { + $N[i].call(this) + }, KN.remove = function (t, e) { + this._brushController.unmount() + }, KN.dispose = function (t, e) { + this._brushController.dispose() + }; + var $N = { + zoom: function () { + var t = !this._isZoomActive; + this.api.dispatchAction({type: "takeGlobalCursor", key: "dataZoomSelect", dataZoomSelectActive: t}) + }, back: function () { + this._dispatchZoomAction(fx(this.ecModel)) + } + }; + KN._onBrush = function (t, e) { + function i(t, e, i) { + var r = e.getAxis(t), s = r.model, l = n(t, s, a), u = l.findRepresentativeAxisProxy(s).getMinMaxSpan(); + null == u.minValueSpan && null == u.maxValueSpan || (i = PC(0, i.slice(), r.scale.getExtent(), 0, u.minValueSpan, u.maxValueSpan)), l && (o[l.id] = { + dataZoomId: l.id, + startValue: i[0], + endValue: i[1] + }) + } + + function n(t, e, i) { + var n; + return i.eachComponent({mainType: "dataZoom", subType: "select"}, function (i) { + i.getAxisModel(t, e.componentIndex) && (n = i) + }), n + } + + if (e.isEnd && t.length) { + var o = {}, a = this.ecModel; + this._brushController.updateCovers([]), new bv(yx(this.model.option), a, {include: ["grid"]}).matchOutputRanges(t, a, function (t, e, n) { + if ("cartesian2d" === n.type) { + var o = t.brushType; + "rect" === o ? (i("x", n, e[0]), i("y", n, e[1])) : i({lineX: "x", lineY: "y"}[o], n, e) + } + }), dx(a, o), this._dispatchZoomAction(o) + } + }, KN._dispatchZoomAction = function (t) { + var e = []; + YN(t, function (t, n) { + e.push(i(t)) + }), e.length && this.api.dispatchAction({type: "dataZoom", from: this.uid, batch: e}) + }, Bv("dataZoom", vx), us(function (t) { + function e(t, e) { + if (e) { + var o = t + "Index", a = e[o]; + null == a || "all" == a || y(a) || (a = !1 === a || "none" === a ? [] : [a]), i(t, function (e, i) { + if (null == a || "all" == a || -1 !== l(a, i)) { + var r = {type: "select", $fromToolbox: !0, id: qN + t + i}; + r[o] = i, n.push(r) + } + }) + } + } + + function i(e, i) { + var n = t[e]; + y(n) || (n = n ? [n] : []), YN(n, i) + } + + if (t) { + var n = t.dataZoom || (t.dataZoom = []); + y(n) || (t.dataZoom = n = [n]); + var o = t.toolbox; + if (o && (y(o) && (o = o[0]), o && o.feature)) { + var a = o.feature.dataZoom; + e("xAxis", a), e("yAxis", a) + } + } + }); + var JN = lI.toolbox.restore; + bx.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: JN.title + }, bx.prototype.onclick = function (t, e, i) { + px(t), e.dispatchAction({type: "restore", from: this.uid}) + }, Bv("restore", bx), cs({type: "restore", event: "restore", update: "prepareAndUpdate"}, function (t, e) { + e.resetOption("recreate") + }); + var QN, tO = "urn:schemas-microsoft-com:vml", eO = "undefined" == typeof window ? null : window, iO = !1, + nO = eO && eO.document; + if (nO && !a_.canvasSupported) try { + !nO.namespaces.zrvml && nO.namespaces.add("zrvml", tO), QN = function (t) { + return nO.createElement("') + } + } catch (t) { + QN = function (t) { + return nO.createElement("<" + t + ' xmlns="' + tO + '" class="zrvml">') + } + } + var oO = Hb.CMD, aO = Math.round, rO = Math.sqrt, sO = Math.abs, lO = Math.cos, uO = Math.sin, hO = Math.max; + if (!a_.canvasSupported) { + var cO = 21600, dO = cO / 2, fO = function (t) { + t.style.cssText = "position:absolute;left:0;top:0;width:1px;height:1px;", t.coordsize = cO + "," + cO, t.coordorigin = "0,0" + }, pO = function (t) { + return String(t).replace(/&/g, "&").replace(/"/g, """) + }, gO = function (t, e, i) { + return "rgb(" + [t, e, i].join(",") + ")" + }, mO = function (t, e) { + e && t && e.parentNode !== t && t.appendChild(e) + }, vO = function (t, e) { + e && t && e.parentNode === t && t.removeChild(e) + }, yO = function (t, e, i) { + return 1e5 * (parseFloat(t) || 0) + 1e3 * (parseFloat(e) || 0) + i + }, xO = function (t, e) { + return "string" == typeof t ? t.lastIndexOf("%") >= 0 ? parseFloat(t) / 100 * e : parseFloat(t) : t + }, _O = function (t, e, i) { + var n = At(e); + i = +i, isNaN(i) && (i = 1), n && (t.color = gO(n[0], n[1], n[2]), t.opacity = i * n[3]) + }, wO = function (t) { + var e = At(t); + return [gO(e[0], e[1], e[2]), e[3]] + }, bO = function (t, e, i) { + var n = e.fill; + if (null != n) if (n instanceof CS) { + var o, a = 0, r = [0, 0], s = 0, l = 1, u = i.getBoundingRect(), h = u.width, c = u.height; + if ("linear" === n.type) { + o = "gradient"; + var d = i.transform, f = [n.x * h, n.y * c], p = [n.x2 * h, n.y2 * c]; + d && (Q(f, f, d), Q(p, p, d)); + var g = p[0] - f[0], m = p[1] - f[1]; + (a = 180 * Math.atan2(g, m) / Math.PI) < 0 && (a += 360), a < 1e-6 && (a = 0) + } else { + o = "gradientradial"; + var f = [n.x * h, n.y * c], d = i.transform, v = i.scale, y = h, x = c; + r = [(f[0] - u.x) / y, (f[1] - u.y) / x], d && Q(f, f, d), y /= v[0] * cO, x /= v[1] * cO; + var _ = hO(y, x); + s = 0 / _, l = 2 * n.r / _ - s + } + var w = n.colorStops.slice(); + w.sort(function (t, e) { + return t.offset - e.offset + }); + for (var b = w.length, S = [], M = [], I = 0; I < b; I++) { + var T = w[I], D = wO(T.color); + M.push(T.offset * l + s + " " + D[0]), 0 !== I && I !== b - 1 || S.push(D) + } + if (b >= 2) { + var A = S[0][0], C = S[1][0], L = S[0][1] * e.opacity, k = S[1][1] * e.opacity; + t.type = o, t.method = "none", t.focus = "100%", t.angle = a, t.color = A, t.color2 = C, t.colors = M.join(","), t.opacity = k, t.opacity2 = L + } + "radial" === o && (t.focusposition = r.join(",")) + } else _O(t, n, e.opacity) + }, SO = function (t, e) { + null != e.lineDash && (t.dashstyle = e.lineDash.join(" ")), null == e.stroke || e.stroke instanceof CS || _O(t, e.stroke, e.opacity) + }, MO = function (t, e, i, n) { + var o = "fill" == e, a = t.getElementsByTagName(e)[0]; + null != i[e] && "none" !== i[e] && (o || !o && i.lineWidth) ? (t[o ? "filled" : "stroked"] = "true", i[e] instanceof CS && vO(t, a), a || (a = Sx(e)), o ? bO(a, i, n) : SO(a, i), mO(t, a)) : (t[o ? "filled" : "stroked"] = "false", vO(t, a)) + }, IO = [[], [], []], TO = function (t, e) { + var i, n, o, a, r, s, l = oO.M, u = oO.C, h = oO.L, c = oO.A, d = oO.Q, f = [], p = t.data, g = t.len(); + for (a = 0; a < g;) { + switch (o = p[a++], n = "", i = 0, o) { + case l: + n = " m ", i = 1, r = p[a++], s = p[a++], IO[0][0] = r, IO[0][1] = s; + break; + case h: + n = " l ", i = 1, r = p[a++], s = p[a++], IO[0][0] = r, IO[0][1] = s; + break; + case d: + case u: + n = " c ", i = 3; + var m, v, y = p[a++], x = p[a++], _ = p[a++], w = p[a++]; + o === d ? (m = _, v = w, _ = (_ + 2 * y) / 3, w = (w + 2 * x) / 3, y = (r + 2 * y) / 3, x = (s + 2 * x) / 3) : (m = p[a++], v = p[a++]), IO[0][0] = y, IO[0][1] = x, IO[1][0] = _, IO[1][1] = w, IO[2][0] = m, IO[2][1] = v, r = m, s = v; + break; + case c: + var b = 0, S = 0, M = 1, I = 1, T = 0; + e && (b = e[4], S = e[5], M = rO(e[0] * e[0] + e[1] * e[1]), I = rO(e[2] * e[2] + e[3] * e[3]), T = Math.atan2(-e[1] / I, e[0] / M)); + var D = p[a++], A = p[a++], C = p[a++], L = p[a++], k = p[a++] + T, P = p[a++] + k + T; + a++; + var N = p[a++], O = D + lO(k) * C, E = A + uO(k) * L, y = D + lO(P) * C, x = A + uO(P) * L, + R = N ? " wa " : " at "; + Math.abs(O - y) < 1e-4 && (Math.abs(P - k) > .01 ? N && (O += .0125) : Math.abs(E - A) < 1e-4 ? N && O < D || !N && O > D ? x -= .0125 : x += .0125 : N && E < A || !N && E > A ? y += .0125 : y -= .0125), f.push(R, aO(((D - C) * M + b) * cO - dO), ",", aO(((A - L) * I + S) * cO - dO), ",", aO(((D + C) * M + b) * cO - dO), ",", aO(((A + L) * I + S) * cO - dO), ",", aO((O * M + b) * cO - dO), ",", aO((E * I + S) * cO - dO), ",", aO((y * M + b) * cO - dO), ",", aO((x * I + S) * cO - dO)), r = y, s = x; + break; + case oO.R: + var z = IO[0], B = IO[1]; + z[0] = p[a++], z[1] = p[a++], B[0] = z[0] + p[a++], B[1] = z[1] + p[a++], e && (Q(z, z, e), Q(B, B, e)), z[0] = aO(z[0] * cO - dO), B[0] = aO(B[0] * cO - dO), z[1] = aO(z[1] * cO - dO), B[1] = aO(B[1] * cO - dO), f.push(" m ", z[0], ",", z[1], " l ", B[0], ",", z[1], " l ", B[0], ",", B[1], " l ", z[0], ",", B[1]); + break; + case oO.Z: + f.push(" x ") + } + if (i > 0) { + f.push(n); + for (var V = 0; V < i; V++) { + var G = IO[V]; + e && Q(G, G, e), f.push(aO(G[0] * cO - dO), ",", aO(G[1] * cO - dO), V < i - 1 ? "," : "") + } + } + } + return f.join("") + }; + In.prototype.brushVML = function (t) { + var e = this.style, i = this._vmlEl; + i || (i = Sx("shape"), fO(i), this._vmlEl = i), MO(i, "fill", e, this), MO(i, "stroke", e, this); + var n = this.transform, o = null != n, a = i.getElementsByTagName("stroke")[0]; + if (a) { + var r = e.lineWidth; + if (o && !e.strokeNoScale) { + var s = n[0] * n[3] - n[1] * n[2]; + r *= rO(sO(s)) + } + a.weight = r + "px" + } + var l = this.path || (this.path = new Hb); + this.__dirtyPath && (l.beginPath(), this.buildPath(l, this.shape), l.toStatic(), this.__dirtyPath = !1), i.path = TO(l, this.transform), i.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, i), null != e.text ? this.drawRectText(t, this.getBoundingRect()) : this.removeRectText(t) + }, In.prototype.onRemove = function (t) { + vO(t, this._vmlEl), this.removeRectText(t) + }, In.prototype.onAdd = function (t) { + mO(t, this._vmlEl), this.appendRectText(t) + }; + var DO = function (t) { + return "object" == typeof t && t.tagName && "IMG" === t.tagName.toUpperCase() + }; + Je.prototype.brushVML = function (t) { + var e, i, n = this.style, o = n.image; + if (DO(o)) { + var a = o.src; + if (a === this._imageSrc) e = this._imageWidth, i = this._imageHeight; else { + var r = o.runtimeStyle, s = r.width, l = r.height; + r.width = "auto", r.height = "auto", e = o.width, i = o.height, r.width = s, r.height = l, this._imageSrc = a, this._imageWidth = e, this._imageHeight = i + } + o = a + } else o === this._imageSrc && (e = this._imageWidth, i = this._imageHeight); + if (o) { + var u = n.x || 0, h = n.y || 0, c = n.width, d = n.height, f = n.sWidth, p = n.sHeight, g = n.sx || 0, + m = n.sy || 0, v = f && p, y = this._vmlEl; + y || (y = nO.createElement("div"), fO(y), this._vmlEl = y); + var x, _ = y.style, w = !1, b = 1, S = 1; + if (this.transform && (x = this.transform, b = rO(x[0] * x[0] + x[1] * x[1]), S = rO(x[2] * x[2] + x[3] * x[3]), w = x[1] || x[2]), w) { + var M = [u, h], I = [u + c, h], T = [u, h + d], D = [u + c, h + d]; + Q(M, M, x), Q(I, I, x), Q(T, T, x), Q(D, D, x); + var A = hO(M[0], I[0], T[0], D[0]), C = hO(M[1], I[1], T[1], D[1]), L = []; + L.push("M11=", x[0] / b, ",", "M12=", x[2] / S, ",", "M21=", x[1] / b, ",", "M22=", x[3] / S, ",", "Dx=", aO(u * b + x[4]), ",", "Dy=", aO(h * S + x[5])), _.padding = "0 " + aO(A) + "px " + aO(C) + "px 0", _.filter = "progid:DXImageTransform.Microsoft.Matrix(" + L.join("") + ", SizingMethod=clip)" + } else x && (u = u * b + x[4], h = h * S + x[5]), _.filter = "", _.left = aO(u) + "px", _.top = aO(h) + "px"; + var k = this._imageEl, P = this._cropEl; + k || (k = nO.createElement("div"), this._imageEl = k); + var N = k.style; + if (v) { + if (e && i) N.width = aO(b * e * c / f) + "px", N.height = aO(S * i * d / p) + "px"; else { + var O = new Image, E = this; + O.onload = function () { + O.onload = null, e = O.width, i = O.height, N.width = aO(b * e * c / f) + "px", N.height = aO(S * i * d / p) + "px", E._imageWidth = e, E._imageHeight = i, E._imageSrc = o + }, O.src = o + } + P || ((P = nO.createElement("div")).style.overflow = "hidden", this._cropEl = P); + var R = P.style; + R.width = aO((c + g * c / f) * b), R.height = aO((d + m * d / p) * S), R.filter = "progid:DXImageTransform.Microsoft.Matrix(Dx=" + -g * c / f * b + ",Dy=" + -m * d / p * S + ")", P.parentNode || y.appendChild(P), k.parentNode != P && P.appendChild(k) + } else N.width = aO(b * c) + "px", N.height = aO(S * d) + "px", y.appendChild(k), P && P.parentNode && (y.removeChild(P), this._cropEl = null); + var z = "", B = n.opacity; + B < 1 && (z += ".Alpha(opacity=" + aO(100 * B) + ") "), z += "progid:DXImageTransform.Microsoft.AlphaImageLoader(src=" + o + ", SizingMethod=scale)", N.filter = z, y.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, y), null != n.text && this.drawRectText(t, this.getBoundingRect()) + } + }, Je.prototype.onRemove = function (t) { + vO(t, this._vmlEl), this._vmlEl = null, this._cropEl = null, this._imageEl = null, this.removeRectText(t) + }, Je.prototype.onAdd = function (t) { + mO(t, this._vmlEl), this.appendRectText(t) + }; + var AO, CO = {}, LO = 0, kO = document.createElement("div"), PO = function (t) { + var e = CO[t]; + if (!e) { + LO > 100 && (LO = 0, CO = {}); + var i, n = kO.style; + try { + n.font = t, i = n.fontFamily.split(",")[0] + } catch (t) { + } + e = { + style: n.fontStyle || "normal", + variant: n.fontVariant || "normal", + weight: n.fontWeight || "normal", + size: 0 | parseFloat(n.fontSize || 12), + family: i || "Microsoft YaHei" + }, CO[t] = e, LO++ + } + return e + }; + !function (t, e) { + Dw[t] = e + }("measureText", function (t, e) { + var i = nO; + AO || ((AO = i.createElement("div")).style.cssText = "position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;", nO.body.appendChild(AO)); + try { + AO.style.font = e + } catch (t) { + } + return AO.innerHTML = "", AO.appendChild(i.createTextNode(t)), {width: AO.offsetWidth} + }); + for (var NO = new $t, OO = [kw, $e, Je, In, fS], EO = 0; EO < OO.length; EO++) { + var RO = OO[EO].prototype; + RO.drawRectText = function (t, e, i, n) { + var o = this.style; + this.__dirty && Ne(o); + var a = o.text; + if (null != a && (a += ""), a) { + if (o.rich) { + var r = Ce(a, o); + a = []; + for (var s = 0; s < r.lines.length; s++) { + for (var l = r.lines[s].tokens, u = [], h = 0; h < l.length; h++) u.push(l[h].text); + a.push(u.join("")) + } + a = a.join("\n") + } + var c, d, f = o.textAlign, p = o.textVerticalAlign, g = PO(o.font), + m = g.style + " " + g.variant + " " + g.weight + " " + g.size + 'px "' + g.family + '"'; + i = i || me(a, m, f, p); + var v = this.transform; + if (v && !n && (NO.copy(e), NO.applyTransform(v), e = NO), n) c = e.x, d = e.y; else { + var y = o.textPosition, x = o.textDistance; + if (y instanceof Array) c = e.x + xO(y[0], e.width), d = e.y + xO(y[1], e.height), f = f || "left"; else { + var _ = we(y, e, x); + c = _.x, d = _.y, f = f || _.textAlign, p = p || _.textVerticalAlign + } + } + c = xe(c, i.width, f), d = _e(d, i.height, p), d += i.height / 2; + var w, b, S, M = Sx, I = this._textVmlEl; + I ? b = (w = (S = I.firstChild).nextSibling).nextSibling : (I = M("line"), w = M("path"), b = M("textpath"), S = M("skew"), b.style["v-text-align"] = "left", fO(I), w.textpathok = !0, b.on = !0, I.from = "0 0", I.to = "1000 0.05", mO(I, S), mO(I, w), mO(I, b), this._textVmlEl = I); + var T = [c, d], D = I.style; + v && n ? (Q(T, T, 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 = (aO(T[0]) || 0) + "," + (aO(T[1]) || 0), S.origin = "0 0", D.left = "0px", D.top = "0px") : (S.on = !1, D.left = aO(c) + "px", D.top = aO(d) + "px"), b.string = pO(a); + try { + b.style.font = m + } catch (t) { + } + MO(I, "fill", {fill: o.textFill, opacity: o.opacity}, this), MO(I, "stroke", { + stroke: o.textStroke, + opacity: o.opacity, + lineDash: o.lineDash + }, this), I.style.zIndex = yO(this.zlevel, this.z, this.z2), mO(t, I) + } + }, RO.removeRectText = function (t) { + vO(t, this._textVmlEl), this._textVmlEl = null + }, RO.appendRectText = function (t) { + mO(t, this._textVmlEl) + } + } + fS.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) + }, fS.prototype.onRemove = function (t) { + this.removeRectText(t) + }, fS.prototype.onAdd = function (t) { + this.appendRectText(t) + } + } + Tx.prototype = { + constructor: Tx, 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) { + var 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 || Ix(e.width)) - Ix(e.paddingLeft) - Ix(e.paddingRight) | 0 + }, _getHeight: function () { + var t = this.root, e = t.currentStyle; + return (t.clientHeight || Ix(e.height)) - Ix(e.paddingTop) - Ix(e.paddingBottom) | 0 + } + }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) { + Tx.prototype[t] = Dx(t) + }), wi("vml", Tx); + var zO = "http://www.w3.org/2000/svg", BO = Hb.CMD, VO = Array.prototype.join, GO = "none", WO = Math.round, + FO = Math.sin, HO = Math.cos, ZO = Math.PI, UO = 2 * Math.PI, XO = 180 / ZO, jO = 1e-4, YO = {}; + YO.brush = function (t) { + var e = t.style, i = t.__svgEl; + i || (i = Ax("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 o = zx(n); + o.indexOf("NaN") < 0 && Ox(i, "d", o) + } + Rx(i, e), Nx(i, t.transform), null != e.text && JO(t, t.getBoundingRect()) + }; + var qO = {}; + qO.brush = function (t) { + var e = t.style, i = e.image; + if (i instanceof HTMLImageElement && (i = i.src), i) { + var n = e.x || 0, o = e.y || 0, a = e.width, r = e.height, s = t.__svgEl; + s || (s = Ax("image"), t.__svgEl = s), i !== t.__imageSrc && (Ex(s, "href", i), t.__imageSrc = i), Ox(s, "width", a), Ox(s, "height", r), Ox(s, "x", n), Ox(s, "y", o), Nx(s, t.transform), null != e.text && JO(t, t.getBoundingRect()) + } + }; + var KO = {}, $O = new $t, JO = function (t, e, i) { + var n = t.style; + t.__dirty && Ne(n); + var o = n.text; + if (null != o) { + o += ""; + var a = t.__textSvgEl; + a || (a = Ax("text"), t.__textSvgEl = a); + var r, s, l = n.textPosition, u = n.textDistance, h = n.textAlign || "left"; + "number" == typeof n.fontSize && (n.fontSize += "px"); + var c = n.font || [n.fontStyle || "", n.fontWeight || "", n.fontSize || "", n.fontFamily || ""].join(" ") || Tw, + d = Bx(n.textVerticalAlign), f = (i = me(o, c, h, d)).lineHeight; + if (l instanceof Array) r = e.x + l[0], s = e.y + l[1]; else { + var p = we(l, e, u); + r = p.x, s = p.y, d = Bx(p.textVerticalAlign), h = p.textAlign + } + Ox(a, "alignment-baseline", d), c && (a.style.font = c); + var g = n.textPadding; + if (Ox(a, "x", r), Ox(a, "y", s), Rx(a, n, !0), t instanceof fS || t.style.transformText) Nx(a, t.transform); else { + if (t.transform) $O.copy(e), $O.applyTransform(t.transform), e = $O; else { + var m = t.transformCoordToGlobal(e.x, e.y); + e.x = m[0], e.y = m[1] + } + var v = n.textOrigin; + "center" === v ? (r = i.width / 2 + r, s = i.height / 2 + s) : v && (r = v[0] + r, s = v[1] + s); + var y = -n.textRotation || 0, x = st(); + dt(x, t.transform, y), Nx(a, x) + } + var _ = o.split("\n"), w = _.length, b = h; + "left" === b ? (b = "start", g && (r += g[3])) : "right" === b ? (b = "end", g && (r -= g[1])) : "center" === b && (b = "middle", g && (r += (g[3] - g[1]) / 2)); + var S = 0; + if ("baseline" === d ? (S = -i.height + f, g && (S -= g[2])) : "middle" === d ? (S = (-i.height + f) / 2, g && (s += (g[0] - g[2]) / 2)) : g && (S += g[0]), t.__text !== o || t.__textFont !== c) { + var M = t.__tspanList || []; + t.__tspanList = M; + for (T = 0; T < w; T++) (D = M[T]) ? D.innerHTML = "" : (D = M[T] = Ax("tspan"), a.appendChild(D), Ox(D, "alignment-baseline", d), Ox(D, "text-anchor", b)), Ox(D, "x", r), Ox(D, "y", s + T * f + S), D.appendChild(document.createTextNode(_[T])); + for (; T < M.length; T++) a.removeChild(M[T]); + M.length = w, t.__text = o, t.__textFont = c + } else if (t.__tspanList.length) for (var I = t.__tspanList.length, T = 0; T < I; ++T) { + var D = t.__tspanList[T]; + D && (Ox(D, "x", r), Ox(D, "y", s + T * f + S)) + } + } + }; + KO.drawRectText = JO, KO.brush = function (t) { + var e = t.style; + null != e.text && (e.textPosition = [0, 0], JO(t, { + x: e.x || 0, + y: e.y || 0, + width: 0, + height: 0 + }, t.getBoundingRect())) + }, Vx.prototype = { + diff: function (t, e, i) { + i || (i = function (t, e) { + return t === e + }), this.equals = i; + var n = this; + t = t.slice(); + var o = (e = e.slice()).length, a = t.length, r = 1, s = o + a, l = [{newPos: -1, components: []}], + u = this.extractCommon(l[0], e, t, 0); + if (l[0].newPos + 1 >= o && u + 1 >= a) { + for (var h = [], c = 0; c < e.length; c++) h.push(c); + return [{indices: h, count: e.length}] + } + for (; r <= s;) { + var d = function () { + for (var i = -1 * r; i <= r; i += 2) { + var s, u = l[i - 1], h = l[i + 1], c = (h ? h.newPos : 0) - i; + u && (l[i - 1] = void 0); + var d = u && u.newPos + 1 < o, f = h && 0 <= c && c < a; + if (d || f) { + if (!d || f && u.newPos < h.newPos ? (s = Wx(h), n.pushComponent(s.components, void 0, !0)) : ((s = u).newPos++, n.pushComponent(s.components, !0, void 0)), c = n.extractCommon(s, e, t, i), s.newPos + 1 >= o && c + 1 >= a) return Gx(0, s.components); + l[i] = s + } else l[i] = void 0 + } + r++ + }(); + if (d) return d + } + }, 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 o = e.length, a = i.length, r = t.newPos, s = r - n, l = 0; r + 1 < o && s + 1 < a && 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 QO = new Vx, tE = function (t, e, i) { + return QO.diff(t, e, i) + }; + Fx.prototype.createElement = Ax, Fx.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] + }, Fx.prototype.update = function (t, e) { + if (t) { + var i = this.getDefs(!1); + if (t[this._domName] && i.contains(t[this._domName])) "function" == typeof e && e(t); else { + var n = this.add(t); + n && (t[this._domName] = n) + } + } + }, Fx.prototype.addDom = function (t) { + this.getDefs(!0).appendChild(t) + }, Fx.prototype.removeDom = function (t) { + var e = this.getDefs(!1); + e && t[this._domName] && (e.removeChild(t[this._domName]), t[this._domName] = null) + }, Fx.prototype.getDoms = function () { + var t = this.getDefs(!1); + if (!t) return []; + var e = []; + return d(this._tagNames, function (i) { + var n = t.getElementsByTagName(i); + e = e.concat([].slice.call(n)) + }), e + }, Fx.prototype.markAllUnused = function () { + var t = this; + d(this.getDoms(), function (e) { + e[t._markLabel] = "0" + }) + }, Fx.prototype.markUsed = function (t) { + t && (t[this._markLabel] = "1") + }, Fx.prototype.removeUnused = function () { + var t = this.getDefs(!1); + if (t) { + var e = this; + d(this.getDoms(), function (i) { + "1" !== i[e._markLabel] && t.removeChild(i) + }) + } + }, Fx.prototype.getSvgProxy = function (t) { + return t instanceof In ? YO : t instanceof Je ? qO : t instanceof fS ? KO : YO + }, Fx.prototype.getTextSvgElement = function (t) { + return t.__textSvgEl + }, Fx.prototype.getSvgElement = function (t) { + return t.__svgEl + }, u(Hx, Fx), Hx.prototype.addWithoutUpdate = function (t, e) { + if (e && e.style) { + var i = this; + d(["fill", "stroke"], function (n) { + if (e.style[n] && ("linear" === e.style[n].type || "radial" === e.style[n].type)) { + var o, a = e.style[n], r = i.getDefs(!0); + a._dom ? (o = a._dom, r.contains(a._dom) || i.addDom(o)) : o = i.add(a), i.markUsed(e); + var s = o.getAttribute("id"); + t.setAttribute(n, "url(#" + s + ")") + } + }) + } + }, Hx.prototype.add = function (t) { + var e; + if ("linear" === t.type) e = this.createElement("linearGradient"); else { + if ("radial" !== t.type) return ew("Illegal gradient type."), null; + e = this.createElement("radialGradient") + } + return t.id = t.id || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-gradient-" + t.id), this.updateDom(t, e), this.addDom(e), e + }, Hx.prototype.update = function (t) { + var e = this; + Fx.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)) + }) + }, Hx.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 ew("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, o = i.length; n < o; ++n) { + var a = this.createElement("stop"); + a.setAttribute("offset", 100 * i[n].offset + "%"), a.setAttribute("stop-color", i[n].color), e.appendChild(a) + } + t._dom = e + }, Hx.prototype.markUsed = function (t) { + if (t.style) { + var e = t.style.fill; + e && e._dom && Fx.prototype.markUsed.call(this, e._dom), (e = t.style.stroke) && e._dom && Fx.prototype.markUsed.call(this, e._dom) + } + }, u(Zx, Fx), Zx.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) + }, Zx.prototype.updateDom = function (t, e, i) { + if (e && e.length > 0) { + var n, o, a = this.getDefs(!0), r = e[0], s = i ? "_textDom" : "_dom"; + r[s] ? (o = r[s].getAttribute("id"), n = r[s], a.contains(n) || a.appendChild(n)) : (o = "zr" + this._zrId + "-clip-" + this.nextId, ++this.nextId, (n = this.createElement("clipPath")).setAttribute("id", o), a.appendChild(n), r[s] = n); + var l = this.getSvgProxy(r); + if (r.transform && r.parent.invTransform && !i) { + var u = Array.prototype.slice.call(r.transform); + ht(r.transform, r.parent.invTransform, r.transform), l.brush(r), r.transform = u + } else l.brush(r); + var h = this.getSvgElement(r); + n.innerHTML = "", n.appendChild(h.cloneNode()), t.setAttribute("clip-path", "url(#" + o + ")"), e.length > 1 && this.updateDom(n, e.slice(1), i) + } else t && t.setAttribute("clip-path", "none") + }, Zx.prototype.markUsed = function (t) { + var e = this; + t.__clipPaths && t.__clipPaths.length > 0 && d(t.__clipPaths, function (t) { + t._dom && Fx.prototype.markUsed.call(e, t._dom), t._textDom && Fx.prototype.markUsed.call(e, t._textDom) + }) + }, u(Ux, Fx), Ux.prototype.addWithoutUpdate = function (t, e) { + if (e && Xx(e.style)) { + var i, n = e.style; + n._shadowDom ? (i = n._shadowDom, this.getDefs(!0).contains(n._shadowDom) || this.addDom(i)) : i = this.add(e), this.markUsed(e); + var o = i.getAttribute("id"); + t.style.filter = "url(#" + o + ")" + } + }, Ux.prototype.add = function (t) { + var e = this.createElement("filter"), i = t.style; + return i._shadowDomId = i._shadowDomId || this.nextId++, e.setAttribute("id", "zr" + this._zrId + "-shadow-" + i._shadowDomId), this.updateDom(t, e), this.addDom(e), e + }, Ux.prototype.update = function (t, e) { + var i = e.style; + if (Xx(i)) { + var n = this; + Fx.prototype.update.call(this, e, function (t) { + n.updateDom(e, t._shadowDom) + }) + } else this.remove(t, i) + }, Ux.prototype.remove = function (t, e) { + null != e._shadowDomId && (this.removeDom(e), t.style.filter = "") + }, Ux.prototype.updateDom = function (t, e) { + var i = e.getElementsByTagName("feDropShadow"); + i = 0 === i.length ? this.createElement("feDropShadow") : i[0]; + var n, o, a, r, s = t.style, l = t.scale ? t.scale[0] || 1 : 1, u = t.scale ? t.scale[1] || 1 : 1; + if (s.shadowBlur || s.shadowOffsetX || s.shadowOffsetY) n = s.shadowOffsetX || 0, o = s.shadowOffsetY || 0, a = s.shadowBlur, r = s.shadowColor; else { + if (!s.textShadowBlur) return void this.removeDom(e, s); + n = s.textShadowOffsetX || 0, o = s.textShadowOffsetY || 0, a = s.textShadowBlur, r = s.textShadowColor + } + i.setAttribute("dx", n / l), i.setAttribute("dy", o / u), i.setAttribute("flood-color", r); + var h = a / 2 / l + " " + a / 2 / u; + i.setAttribute("stdDeviation", h), e.setAttribute("x", "-100%"), e.setAttribute("y", "-100%"), e.setAttribute("width", Math.ceil(a / 2 * 200) + "%"), e.setAttribute("height", Math.ceil(a / 2 * 200) + "%"), e.appendChild(i), s._shadowDom = e + }, Ux.prototype.markUsed = function (t) { + var e = t.style; + e && e._shadowDom && Fx.prototype.markUsed.call(this, e._shadowDom) + }; + var eE = function (t, e, i, n) { + this.root = t, this.storage = e, this._opts = i = a({}, i || {}); + var o = Ax("svg"); + o.setAttribute("xmlns", "http://www.w3.org/2000/svg"), o.setAttribute("version", "1.1"), o.setAttribute("baseProfile", "full"), o.style.cssText = "user-select:none;position:absolute;left:0;top:0;", this.gradientManager = new Hx(n, o), this.clipPathManager = new Zx(n, o), this.shadowManager = new Ux(n, o); + var r = document.createElement("div"); + r.style.cssText = "overflow:hidden;position:relative", this._svgRoot = o, this._viewport = r, t.appendChild(r), r.appendChild(o), this.resize(i.width, i.height), this._visibleList = [] + }; + eE.prototype = { + constructor: eE, 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) + }, setBackgroundColor: function (t) { + this._viewport.style.background = t + }, _paintList: function (t) { + this.gradientManager.markAllUnused(), this.clipPathManager.markAllUnused(), this.shadowManager.markAllUnused(); + var e, i = this._svgRoot, n = this._visibleList, o = t.length, a = []; + for (e = 0; e < o; e++) { + var r = Yx(f = t[e]), s = t_(f) || Qx(f); + f.invisible || (f.__dirty && (r && r.brush(f), this.clipPathManager.update(f), f.style && (this.gradientManager.update(f.style.fill), this.gradientManager.update(f.style.stroke), this.shadowManager.update(s, f)), f.__dirty = !1), a.push(f)) + } + var l, u = tE(n, a); + for (e = 0; e < u.length; e++) if ((c = u[e]).removed) for (d = 0; d < c.count; d++) { + var s = t_(f = n[c.indices[d]]), h = Qx(f); + Jx(i, s), Jx(i, h) + } + for (e = 0; e < u.length; e++) { + var c = u[e]; + if (c.added) for (d = 0; d < c.count; d++) { + var s = t_(f = a[c.indices[d]]), h = Qx(f); + l ? Kx(i, s, l) : $x(i, s), s ? Kx(i, h, s) : l ? Kx(i, h, l) : $x(i, h), Kx(i, h, s), l = h || s || l, this.gradientManager.addWithoutUpdate(s, f), this.shadowManager.addWithoutUpdate(l, f), this.clipPathManager.markUsed(f) + } else if (!c.removed) for (var d = 0; d < c.count; d++) { + var f = a[c.indices[d]]; + l = s = Qx(f) || t_(f) || l, this.gradientManager.markUsed(f), this.gradientManager.addWithoutUpdate(s, f), this.shadowManager.markUsed(f), this.shadowManager.addWithoutUpdate(s, f), this.clipPathManager.markUsed(f) + } + } + this.gradientManager.removeUnused(), this.clipPathManager.removeUnused(), this.shadowManager.removeUnused(), this._visibleList = a + }, _getDefs: function (t) { + var e = this._svgRoot, i = this._svgRoot.getElementsByTagName("defs"); + return 0 === i.length ? t ? ((i = e.insertBefore(Ax("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] + }, 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 o = i.style; + o.width = t + "px", o.height = e + "px"; + var a = this._svgRoot; + a.setAttribute("width", t), a.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], + o = ["paddingLeft", "paddingTop"][t], a = ["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[o]) || 0) - (jx(s[a]) || 0) | 0 + }, dispose: function () { + this.root.innerHTML = "", this._svgRoot = this._viewport = this.storage = null + }, clear: function () { + this._viewport && this.root.removeChild(this._viewport) + }, pathToDataUrl: function () { + return this.refresh(), "data:image/svg+xml;charset=UTF-8," + this._svgRoot.outerHTML + } + }, d(["getLayer", "insertLayer", "eachLayer", "eachBuiltinLayer", "eachOtherLayer", "getLayers", "modLayer", "delLayer", "clearLayer", "toDataURL", "pathToImage"], function (t) { + eE.prototype[t] = e_(t) + }), wi("svg", eE), t.version = "4.1.0", t.dependencies = TI, t.PRIORITY = LI, t.init = function (t, e, i) { + var n = ss(t); + if (n) return n; + var o = new Gr(t, e, i); + return o.id = "ec_" + jI++, UI[o.id] = o, Ri(t, qI, o.id), as(o), o + }, t.connect = function (t) { + if (y(t)) { + var e = t; + t = null, bI(e, function (e) { + null != e.group && (t = e.group) + }), t = t || "g_" + YI++, bI(e, function (e) { + e.group = t + }) + } + return XI[t] = !0, t + }, t.disConnect = rs, t.disconnect = $I, t.dispose = function (t) { + "string" == typeof t ? t = UI[t] : t instanceof Gr || (t = ss(t)), t instanceof Gr && !t.isDisposed() && t.dispose() + }, t.getInstanceByDom = ss, t.getInstanceById = function (t) { + return UI[t] + }, t.registerTheme = ls, t.registerPreprocessor = us, t.registerProcessor = hs, t.registerPostUpdate = function (t) { + WI.push(t) + }, t.registerAction = cs, t.registerCoordinateSystem = ds, t.getCoordinateSystemDimensions = function (t) { + var e = Ca.get(t); + if (e) return e.getDimensionsInfo ? e.getDimensionsInfo() : e.dimensions.slice() + }, t.registerLayout = fs, t.registerVisual = ps, t.registerLoading = ms, t.extendComponentModel = vs, t.extendComponentView = ys, t.extendSeriesModel = xs, t.extendChartView = _s, t.setCanvasCreator = function (t) { + e("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 + ");")()), KI[t] = { + geoJson: e, + specialAreas: i + } + }, t.getMap = ws, t.dataTool = JI, t.zrender = $w, t.graphic = BS, t.number = qS, t.format = nM, t.throttle = _r, t.helper = ZT, t.matrix = P_, t.vector = I_, t.color = q_, t.parseGeoJSON = XT, t.parseGeoJson = KT, t.util = $T, t.List = sT, t.Model = wo, t.Axis = qT, t.env = a_ +}); diff --git a/unpackage/cache/wgt/H5030C5DA/js/index.js b/unpackage/cache/wgt/H5030C5DA/js/index.js new file mode 100644 index 0000000..a6dbfca --- /dev/null +++ b/unpackage/cache/wgt/H5030C5DA/js/index.js @@ -0,0 +1,723 @@ +var ip="http://172.19.50.70:10012" +//仓库 01 三联 02 二联 +var warehouseId="01" +//入出库端 1 入库 2 出库 +var type="1" +function getData() { + $.ajax({ + url: ip+"/api/stock/all", + type: "GET", + dataType: "JSON", + success: function(res) { + shuzi(res.data) + liebiao(res.data) + } + }) +} + +function getData2() { + $.ajax({ + url: ip+"/api/stock/cargoSpace/pie", + type: "GET", + dataType: "JSON", + success: function(res) { + pieCharts(res.data.pie) + $("#total").html(res.data.totalCargoSpace) + } + }) + + $.ajax({ + url: ip+"/api/stock/inout/stat", + type: "GET", + dataType: "JSON", + success: function(res) { + tiaoxintu(res.data.drrk,res.data.drck) + zhuzhuangzhexiantu(res.data.statistic) + zhexiantu('bzrk', 'rgb(5, 243, 255)', 'rgb(3, 148, 153)', 'rgb(1, 77, 80)', res.data.bzrk) + zhexiantu('bzck','rgb(25, 255, 236)', 'rgb(16, 171, 158)', 'rgb(6, 62, 57)' , res.data.bzck) + } + }) +} +function shuzi(res){ + let totalQuantity=res.totalQuantity+"" + let dom='' + for (let i = 0; i < totalQuantity.length; i++) { + dom+='
    '+totalQuantity[i]+'
    ' + } + dom+='
    件
    ' + $("#shuzi").html(dom) +} +// 饼图 +function pieCharts(data) { + var chartDom = document.getElementById('middleDiv'); + var myChart = echarts.init(chartDom); + var option; + + option = { + color: myColor1, + legend: { + bottom: 60, + itemWidth: 30, + itemHeight: 20, + // itemGap:100, + textStyle: { + fontSize: 20, + color: '#fff', + padding: [0, 10] + } + }, + + series: [{ + name: 'Nightingale Chart', + type: 'pie', + radius: [160, 260], + center: ['50%', '43%'], + // roseType: 'area', + itemStyle: { + borderRadius: 8 + }, + label: { + show: true, + textStyle: { + fontSize: 24, + color: "#fff", + }, + formatter: '{b}{c}\n{d}%' + }, + data: data + }] + }; + + option && myChart.setOption(option); +} + +// 条形图 +function tiaoxintu(a,b) { + var chartDom1 = document.getElementById('drcrk'); + var myChart = echarts.init(chartDom1); + var option; + + const builderJson = { + all: Number(a)+Number(b), + charts: { + 出库量: b, + 入库量: a, + } + }; + var myColor = ["#19ffec", "#19ffec"] + const canvas = document.createElement('canvas'); + option = { + backgroundColor: { + type: 'pattern', + image: canvas, + repeat: 'repeat' + }, + tooltip: {}, + title: [{ + subtext: '总计 ' + builderJson.all + ' 件', + left: 'center', + subtextStyle: { + color: '#ffb742', + fontSize: 20 + } + }], + grid: [{ + top: 40, + left: 80, + bottom: 110 + }], + xAxis: [{ + type: 'value', + max: builderJson.all, + axisLabel: { + color: '#00fff9', + fontSize: 20 + }, + splitLine: { + show: false + } + }], + yAxis: [{ + type: 'category', + data: Object.keys(builderJson.charts), + axisLabel: { + interval: 0, + color: '#00fff9', + fontSize: 20, + rotate: 30 + }, + splitLine: { + show: false + } + }], + series: [{ + type: 'bar', + stack: 'chart', + z: 3, + label: { + color: '#fff', + position: 'right', + show: true, + fontSize: 20 + }, + itemStyle: { + barBorderRadius: 5, + // 修改每个柱子的颜色 + color: function(params) { + var num = myColor.length; + return myColor[params.dataIndex % num] + }, + }, + // 修改柱子的距离 + barCategoryGap: 0, + // 柱子的宽度 + barWidth: 10, + data: Object.keys(builderJson.charts).map(function(key) { + return builderJson.charts[key]; + }) + }, + { + type: 'bar', + stack: 'chart', + silent: true, + itemStyle: { + barBorderRadius: 2, + color: '#0b4a54' + }, + data: Object.keys(builderJson.charts).map(function(key) { + return builderJson.all - builderJson.charts[key]; + }) + } + ] + }; + option && myChart.setOption(option); +} + +// 柱状图折现图 +function zhuzhuangzhexiantu(data) { + var chartDom = document.getElementById('dycrk'); + var myChart = echarts.init(chartDom); + var option; + var labelOption + labelOption = { + show: true, + position: "top", + verticalAlign: 'middle', + fontSize: 15, + color: "#ffffff" + }; + option = { + legend: { + left: "65%", + textStyle: { + fontSize: 15, + color: "#19ffec" + }, + }, + tooltip: {}, + dataset: { + dimensions: ['mouth', '入库', '出库'], + source: data + }, + grid: { + top: "20%", + left: '5%', + right: '5%', + bottom: '5%', + show: false, //显示边框 + borderColor: "#012f4a", //边框颜色 + containLabel: true //包含刻度文字在内 + }, + xAxis: { + type: 'category', + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + } + }, + yAxis: { + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + splitLine: { + lineStyle: { + color: "rgba(25,255,255,.3)" + } + } + }, + series: [{ + type: "bar", + showBackground: false, + barWidth: '50%', + label: labelOption, + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: '#19ffec' + }, + { + offset: 0.6, + color: '#07554e' + }, + { + offset: 1, + color: '#04252b' + } + ]) + } + }, { + type: "line", + showBackground: true, + label: labelOption, + itemStyle: { + color: '#ffb742' + } + }] + }; + + option && myChart.setOption(option); +} + +// 折线图 +function zhexiantu(a, b, c, d, e) { + var chartDom = document.getElementById(a); + var myChart = echarts.init(chartDom); + var option; + var labelOption = { + show: true, + position: "top", + verticalAlign: 'middle', + fontSize: 15, + color: "#ffb742" + }; + option = { + xAxis: { + type: 'category', + boundaryGap: false, //坐标轴两边不留白 + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + yAxis: { + type: 'value', + axisLabel: { + color: '#00f2f1', //文本颜色 + fontSize: 15 + }, + splitLine: { + lineStyle: { + // 设置背景横线 + color: "#097176", + } + } + }, + grid: { + left: '5%', + top: '10%', + // right: '4%', + bottom: '5%', + containLabel: true + }, + series: [{ + data: e, + type: 'line', + smooth: 0.2, + itemStyle: { + color: b + }, + label: labelOption, + areaStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ + offset: 0, + color: c + }, + { + offset: 1, + color: d + } + ]) + } + }] + }; + option && myChart.setOption(option); + +} + +var biaoshi = 0 + +function info() { + var tr = $("#aa ul>li:eq(1)").clone(); + var height = $("#kcxx").innerHeight(); + var allheight = $("#box").innerHeight() + if (height > allheight) { + $("#aa ul>li:eq(1)").animate({ + marginTop: "-1.8rem" + }, 500, function() { + $("#aa ul>li:eq(1)").remove(); + }) + biaoshi = 1 + } else { + biaoshi = 2 + } +} + +function liebiao(res) { + let data = res.stockMsg + let dom = ""; + if (biaoshi == 2) { + $(".tt").remove() + for (var i = 0; i < data.length; i++) { + if (i % 2 == 0) { + dom += "
  • " + data[i].productId + + "

    " + data[i].productName + + "

    " + data[i].lotNo + + "

    " + data[i].quantity + "

  • " + } else { + dom += "
  • " + data[i].productId + + "

    " + data[i].productName + + "

    " + data[i].lotNo + + "

    " + data[i].quantity + "

  • " + } + + } + $("#kcxx").append(dom) + } +} + +// 时间 +var t = null; +$(document).ready(function() { + time() + // getData() + // window.setInterval("getData()", 10000); + // getData2() + // window.setInterval("getData2()", 3000); + // info() + // window.setInterval("info()", 3000); + + // mockAlarmData(); + getAlarmData(); + window.setInterval(getAlarmData, 1500); + + getLaneData(); + window.setInterval(getLaneData, 1500); + + window.setInterval(scrollAlarmList, 1000); +}) + +function getAlarmData() { + $.ajax({ + url: ip + "/api/screen/selectFaultRecord?warehouseId="+warehouseId+"&type="+type, + type: "GET", + dataType: "JSON", + success: function(res) { + if (res.code === 200) { + renderAlarmData(res.data); + } + }, + error: function(err) { + console.log("Error fetching alarm data", err); + } + }) +} + +function renderAlarmData(data) { + var dom = ""; + // Ensure we have data + if (!data || data.length === 0) { + $(".alarm-items").html(""); + return; + } + + for (var i = 0; i < data.length; i++) { + var item = data[i]; + var bg = i % 2 == 0 ? "#046566" : "#05383c"; + + // Map fields + // Time: Extract HH:mm:ss from startTime "yyyy-MM-dd HH:mm:ss" + var timeStr = item.startTime ? item.startTime.split(' ')[1] : ""; + + // Type: Default to "故障" + var type = "故障"; + var color = "#ff4d4d"; // Red for fault + + // Detail: deviceName + fault description + var faultDesc = item.fault; + /*if (item.deviceType === "ddj") { + faultDesc = faultDesc; + } else if (item.deviceType === "ssj") { + faultDesc = faultDesc; + }*/ + + var detail = (item.deviceName || "") + " " + (faultDesc || ""); + + // Task No + var taskNo = item.taskNo || ""; + + dom += "
  • " + + "

    " + taskNo + "

    " + + "

    " + timeStr + "

    " + + "

    " + type + "

    " + + "

    " + detail + "

    " + + "
  • "; + } + $(".alarm-items").html(dom); +} + +function getLaneData() { + $.ajax({ + url: ip + "/api/screen/selectJobListByWarehouseIdAndType?warehouseId="+warehouseId+"&type="+type, + type: "GET", + dataType: "JSON", + success: function(res) { + if (res.code === 200) { + renderLaneData(res.data); + } + }, + error: function(err) { + console.log("Error fetching lane data", err); + } + }) +} + +function renderLaneData(data) { + var laneIds = ['1', '2', '3']; // Keys in the data object + + laneIds.forEach(function(key) { + var list = data[key] || []; + var content = ""; + content += "
      "; + + // Header + content += "
    • " + + "

      任务号

      " + + "

      托盘码

      " + + "

      类型

      " + + "

      状态

      " + + "
    • "; + + for (var i = 0; i < list.length; i++) { + var item = list[i]; + var taskId = item.taskNo; + var palletId = item.trayCode || ""; + var typeName = getTaskTypeName(item.inOrOut); + var statusName = getTaskStatusName(item.status); + + var statusColor = (statusName === "执行中" || statusName === "完成") ? "#00ffc0" : "#ffb742"; + var typeColor = (typeName.indexOf("入") > -1) ? "#0dede4" : "#ff7e00"; + var bg = i % 2 == 0 ? "rgba(4, 101, 102, 0.5)" : "rgba(5, 56, 60, 0.5)"; + + content += "
    • " + + "

      " + taskId + "

      " + + "

      " + palletId + "

      " + + "

      " + typeName + "

      " + + "

      " + statusName + "

      " + + "
    • "; + } + content += "
    "; + $("#lane" + key).html(content); + }); +} + +function getTaskTypeName(code) { + // 空值/假值直接返回空字符串(保留原逻辑) + if (!code) return ""; + // 将编码转为数字(兼容字符串/数字类型入参),判断大小后返回对应名称 + const numCode = Number(code); + return numCode > 20 ? "出库" : "入库"; +} + +function getTaskStatusName(code) { + if (!code) return ""; + if (code === "4") return "完成"; + if (code === "0") return "创建"; + if (code === "1" || code == "2" || code == "3") return "执行中"; + return code; +} + +function getDdjFaultDescription(value) { + if (value === "0") return "待机"; + if (value === "1") return "工作"; + if (value === "1031") return "急停"; + if (value === "1032") return "货叉不在中位"; + if (value === '1033') return "行走变频报警"; + if (value === "1034") return "升降变频报警"; + if (value === "1035") return "货叉变频报警"; + if (value === "1036") return "货叉变频报警"; + if (value === "1037") return "运行限位故障"; + if (value === "1038") return "升降限位故障"; + if (value === "1039") return "运行不能纠偏"; + if (value === "1040") return "升降不能纠偏"; + if (value === "1041") return "水平测距出错"; + if (value === "1042") return "垂直BPS出错"; + if (value === "1043") return "超速保护"; + if (value === "1044") return "前边超宽"; + if (value === "1045") return "后边超宽"; + if (value === "1046") return "左边歪斜"; + if (value === "1047") return "右边歪斜"; + if (value === "1048") return "超高1"; + if (value === "1049") return "超高2"; + if (value === "1050") return "放货完毕货叉有货"; + if (value === "1051") return "取货时货叉有货"; + if (value === "1052") return "放货目标有货"; + if (value === "1053") return "取货完毕无货"; + if (value === "1054") return "放货时货叉无货"; + if (value === "1055") return "货叉动作超时"; + if (value === "1056") return "货叉不能纠偏"; + if (value === "1057") return "微升降超时"; + if (value === "1058") return "松绳过载"; + if (value === "1059") return "设定超限"; + if (value === "1060") return "取双伸时单伸有货"; + if (value === "1061") return "放双伸时单伸有货"; + if (value === "1062") return "入库输送机任务不符"; + if (value === "1063") return "安全门打开"; + if (value === "9999") return "设备未联机"; + return value; +} + +function getSsjFaultDescription(value) { + if (value == 101) return "前超长"; + if (value == 102) return "后超长"; + if (value == 103) return "左超宽"; + if (value == 104) return "右超宽"; + if (value == 105) return "超高"; + if (value == 106) return "称重异常"; + return value; +} + +function time() { + clearTimeout(t); + dt = new Date(); + var y = dt.getFullYear(); + var mt = dt.getMonth() + 1; + var day = dt.getDate(); + var h = dt.getHours(); + var m = dt.getMinutes(); + var s = dt.getSeconds(); + var a = new Date().getDay(); + var b = ""; + switch (a) { + case 0: + b = "日"; + break; + case 1: + b = "一"; + break; + case 2: + b = "二"; + break; + case 3: + b = "三"; + break; + case 4: + b = "四"; + break; + case 5: + b = "五"; + break; + default: + b = "六"; + } + document.querySelector(".riqi").innerHTML = "星期" + b + "
    " + y + "年" + mt + "月" + day + "日"; + document.querySelector(".shijian").innerHTML = jialing(h) + ":" + jialing(m); + t = setTimeout(time, 1000); + +} + +function jialing(m) { + if (m < 10) { + m = "0" + m + return m; + } else { + return m; + } +} + +function mockAlarmData() { + var alarms = [ + { time: "10:00:01", type: "故障", detail: "1号堆垛机通信中断", status: "未处理" }, + { time: "10:05:23", type: "警告", detail: "2号入库口货物堆积", status: "处理中" }, + { time: "10:15:11", type: "故障", detail: "3号出库口光电异常", status: "未处理" }, + { time: "10:20:45", type: "提示", detail: "系统自动备份完成", status: "已完成" }, + { time: "10:30:00", type: "警告", detail: "库位占用率过高", status: "处理中" }, + { time: "10:35:12", type: "故障", detail: "1号巷道急停按下", status: "未处理" }, + { time: "10:40:00", type: "提示", detail: "入库任务下发成功", status: "已完成" }, + { time: "10:45:30", type: "警告", detail: "网络延迟较高", status: "处理中" } + ]; + + var dom = ""; + for (var i = 0; i < alarms.length; i++) { + var bg = i % 2 == 0 ? "#046566" : "#05383c"; + var color = alarms[i].type === "故障" ? "#ff4d4d" : (alarms[i].type === "警告" ? "#ffb742" : "#fff"); + + dom += "
  • " + + "

    " + alarms[i].time + "

    " + + "

    " + alarms[i].type + "

    " + + "

    " + alarms[i].detail + "

    " + + "

    " + alarms[i].status + "

    " + + "
  • "; + } + $(".alarm-items").html(dom); +} + +function scrollAlarmList() { + var list = $(".alarm-items"); + var firstItem = list.find("li:first"); + if (firstItem.length === 0) return; + + var height = firstItem.height(); + // Default to some height if 0 (e.g. if hidden) + if (height === 0) height = 30; + + if (list.children().length > 3) { + firstItem.animate({ + marginTop: -height + "px" + }, 500, function() { + firstItem.css("marginTop", 0).appendTo(list); + }); + } +} + +function mockLaneData() { + // Generate mock data for 3 lanes (merged inbound/outbound) + var laneIds = ['lane1', 'lane2', 'lane3']; + + laneIds.forEach(function(id) { + var content = ""; + // Create a list structure + content += "
      "; + + // Header + content += "
    • " + + "

      任务号

      " + + "

      托盘码

      " + + "

      类型

      " + + "

      状态

      " + + "
    • "; + + // Randomly generate 4-8 rows of data + var rowCount = Math.floor(Math.random() * 5) + 4; + for (var i = 0; i < rowCount; i++) { + var taskId = "T" + Math.floor(Math.random() * 10000); + var palletId = "P" + Math.floor(Math.random() * 1000); + var type = Math.random() > 0.5 ? "入库" : "出库"; + var status = Math.random() > 0.5 ? "执行中" : "等待中"; + var statusColor = status === "执行中" ? "#00ffc0" : "#ffb742"; + var typeColor = type === "入库" ? "#0dede4" : "#ff7e00"; + var bg = i % 2 == 0 ? "rgba(4, 101, 102, 0.5)" : "rgba(5, 56, 60, 0.5)"; + + content += "
    • " + + "

      " + taskId + "

      " + + "

      " + palletId + "

      " + + "

      " + type + "

      " + + "

      " + status + "

      " + + "
    • "; + } + + content += "
    "; + $("#" + id).html(content); + }); +} diff --git a/unpackage/cache/wgt/H5030C5DA/js/jquery-3.1.1.min.js b/unpackage/cache/wgt/H5030C5DA/js/jquery-3.1.1.min.js new file mode 100644 index 0000000..4c5be4c --- /dev/null +++ b/unpackage/cache/wgt/H5030C5DA/js/jquery-3.1.1.min.js @@ -0,0 +1,4 @@ +/*! jQuery v3.1.1 | (c) jQuery Foundation | jquery.org/license */ +!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.1",r=function(a,b){return new r.fn.init(a,b)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null==a?f.call(this):a<0?this[a+this.length]:this[a]},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\\]'\"]*?)"+K+"*\\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+K+"*(even|odd|(([+-]|)(\\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\\d+)|))"+K+"*\\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+K+"*((?:-\\d)?\\d*)"+K+"*\\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^h\d$/i,Y=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,$=/[+~]/,_=new RegExp("\\\\([\\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ca=function(a,b){return b?"\0"===a?"\ufffd":a.slice(0,-1)+"\\"+a.charCodeAt(a.length-1).toString(16)+" ":"\\"+a},da=function(){m()},ea=ta(function(a){return a.disabled===!0&&("form"in a||"label"in a)},{dir:"parentNode",next:"legend"});try{G.apply(D=H.call(v.childNodes),v.childNodes),D[v.childNodes.length].nodeType}catch(fa){G={apply:D.length?function(a,b){F.apply(a,H.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s=b&&b.ownerDocument,w=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==w&&9!==w&&11!==w)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==w&&(l=Z.exec(a)))if(f=l[1]){if(9===w){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(s&&(j=s.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(l[2])return G.apply(d,b.getElementsByTagName(a)),d;if((f=l[3])&&c.getElementsByClassName&&b.getElementsByClassName)return G.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==w)s=b,r=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(ba,ca):b.setAttribute("id",k=u),o=g(a),h=o.length;while(h--)o[h]="#"+k+" "+sa(o[h]);r=o.join(","),s=$.test(a)&&qa(b.parentNode)||b}if(r)try{return G.apply(d,s.querySelectorAll(r)),d}catch(x){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(P,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("fieldset");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return function(b){return"form"in b?b.parentNode&&b.disabled===!1?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&ea(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function pa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function qa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return!!b&&"HTML"!==b.nodeName},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),v!==n&&(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Y.test(n.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){return a.getAttribute("id")===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}}):(d.filter.ID=function(a){var b=a.replace(_,aa);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}},d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c,d,e,f=b.getElementById(a);if(f){if(c=f.getAttributeNode("id"),c&&c.value===a)return[f];e=b.getElementsByName(a),d=0;while(f=e[d++])if(c=f.getAttributeNode("id"),c&&c.value===a)return[f]}return[]}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){if("undefined"!=typeof b.getElementsByClassName&&p)return b.getElementsByClassName(a)},r=[],q=[],(c.qsa=Y.test(n.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+K+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+K+"*(?:value|"+J+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){a.innerHTML="";var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+K+"*[*^$|!~]?="),2!==a.querySelectorAll(":enabled").length&&q.push(":enabled",":disabled"),o.appendChild(a).disabled=!0,2!==a.querySelectorAll(":disabled").length&&q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Y.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"*"),s.call(a,"[s!='']:x"),r.push("!=",N)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Y.test(o.compareDocumentPosition),t=b||Y.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?I(k,a)-I(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?I(k,a)-I(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?la(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(S,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&C.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.escape=function(a){return(a+"").replace(ba,ca)},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(_,aa),a[3]=(a[3]||a[4]||a[5]||"").replace(_,aa),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return V.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&T.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(_,aa).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+K+")"+a+"("+K+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:!b||(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(O," ")+" ").indexOf(c)>-1:"|="===b&&(e===c||e.slice(0,c.length+1)===c+"-"))}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=I(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(P,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(_,aa),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return U.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(_,aa).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:oa(!1),disabled:oa(!0),checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return X.test(a.nodeName)},input:function(a){return W.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:pa(function(){return[0]}),last:pa(function(a,b){return[b-1]}),eq:pa(function(a,b,c){return[c<0?c+b:c]}),even:pa(function(a,b){for(var c=0;c=0;)a.push(d);return a}),gt:pa(function(a,b,c){for(var d=c<0?c+b:c;++d1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function va(a,b,c){for(var d=0,e=b.length;d-1&&(f[j]=!(g[j]=l))}}else r=wa(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):G.apply(g,r)})}function ya(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ta(function(a){return a===b},h,!0),l=ta(function(a){return I(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];i1&&ua(m),i>1&&sa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(P,"$1"),c,i0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=E.call(i));u=wa(u)}G.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&ga.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=ya(b[c]),f[u]?d.push(f):e.push(f);f=A(a,za(e,d)),f.selector=a}return f},i=ga.select=function(a,b,c,e){var f,i,j,k,l,m="function"==typeof a&&a,n=!e&&g(a=m.selector||a);if(c=c||[],1===n.length){if(i=n[0]=n[0].slice(0),i.length>2&&"ID"===(j=i[0]).type&&9===b.nodeType&&p&&d.relative[i[1].type]){if(b=(d.find.ID(j.matches[0].replace(_,aa),b)||[])[0],!b)return c;m&&(b=b.parentNode),a=a.slice(i.shift().value.length)}f=V.needsContext.test(a)?0:i.length;while(f--){if(j=i[f],d.relative[k=j.type])break;if((l=d.find[k])&&(e=l(j.matches[0].replace(_,aa),$.test(i[0].type)&&qa(b.parentNode)||b))){if(i.splice(f,1),a=e.length&&sa(i),!a)return G.apply(c,e),c;break}}}return(m||h(a,n))(e,b,!p,c,!b||$.test(a)&&qa(b.parentNode)||b),c},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("fieldset"))}),ja(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){if(!c)return a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){if(!c&&"input"===a.nodeName.toLowerCase())return a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(J,function(a,b,c){var d;if(!c)return a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);r.find=x,r.expr=x.selectors,r.expr[":"]=r.expr.pseudos,r.uniqueSort=r.unique=x.uniqueSort,r.text=x.getText,r.isXMLDoc=x.isXML,r.contains=x.contains,r.escapeSelector=x.escape;var y=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&r(a).is(c))break;d.push(a)}return d},z=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},A=r.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i,C=/^.[^:#\[\.,]*$/;function D(a,b,c){return r.isFunction(b)?r.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?r.grep(a,function(a){return a===b!==c}):"string"!=typeof b?r.grep(a,function(a){return i.call(b,a)>-1!==c}):C.test(b)?r.filter(b,a,c):(b=r.filter(b,a),r.grep(a,function(a){return i.call(b,a)>-1!==c&&1===a.nodeType}))}r.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?r.find.matchesSelector(d,a)?[d]:[]:r.find.matches(a,r.grep(b,function(a){return 1===a.nodeType}))},r.fn.extend({find:function(a){var b,c,d=this.length,e=this;if("string"!=typeof a)return this.pushStack(r(a).filter(function(){for(b=0;b1?r.uniqueSort(c):c},filter:function(a){return this.pushStack(D(this,a||[],!1))},not:function(a){return this.pushStack(D(this,a||[],!0))},is:function(a){return!!D(this,"string"==typeof a&&A.test(a)?r(a):a||[],!1).length}});var E,F=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,G=r.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||E,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:F.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof r?b[0]:b,r.merge(this,r.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),B.test(e[1])&&r.isPlainObject(b))for(e in b)r.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&(this[0]=f,this.length=1),this}return a.nodeType?(this[0]=a,this.length=1,this):r.isFunction(a)?void 0!==c.ready?c.ready(a):a(r):r.makeArray(a,this)};G.prototype=r.fn,E=r(d);var H=/^(?:parents|prev(?:Until|All))/,I={children:!0,contents:!0,next:!0,prev:!0};r.fn.extend({has:function(a){var b=r(a,this),c=b.length;return this.filter(function(){for(var a=0;a-1:1===c.nodeType&&r.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?r.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?i.call(r(a),this[0]):i.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(r.uniqueSort(r.merge(this.get(),r(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function J(a,b){while((a=a[b])&&1!==a.nodeType);return a}r.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return y(a,"parentNode")},parentsUntil:function(a,b,c){return y(a,"parentNode",c)},next:function(a){return J(a,"nextSibling")},prev:function(a){return J(a,"previousSibling")},nextAll:function(a){return y(a,"nextSibling")},prevAll:function(a){return y(a,"previousSibling")},nextUntil:function(a,b,c){return y(a,"nextSibling",c)},prevUntil:function(a,b,c){return y(a,"previousSibling",c)},siblings:function(a){return z((a.parentNode||{}).firstChild,a)},children:function(a){return z(a.firstChild)},contents:function(a){return a.contentDocument||r.merge([],a.childNodes)}},function(a,b){r.fn[a]=function(c,d){var e=r.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=r.filter(d,e)),this.length>1&&(I[a]||r.uniqueSort(e),H.test(a)&&e.reverse()),this.pushStack(e)}});var K=/[^\x20\t\r\n\f]+/g;function L(a){var b={};return r.each(a.match(K)||[],function(a,c){b[c]=!0}),b}r.Callbacks=function(a){a="string"==typeof a?L(a):r.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h-1)f.splice(c,1),c<=h&&h--}),this},has:function(a){return a?r.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||b||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j};function M(a){return a}function N(a){throw a}function O(a,b,c){var d;try{a&&r.isFunction(d=a.promise)?d.call(a).done(b).fail(c):a&&r.isFunction(d=a.then)?d.call(a,b,c):b.call(void 0,a)}catch(a){c.call(void 0,a)}}r.extend({Deferred:function(b){var c=[["notify","progress",r.Callbacks("memory"),r.Callbacks("memory"),2],["resolve","done",r.Callbacks("once memory"),r.Callbacks("once memory"),0,"resolved"],["reject","fail",r.Callbacks("once memory"),r.Callbacks("once memory"),1,"rejected"]],d="pending",e={state:function(){return d},always:function(){return f.done(arguments).fail(arguments),this},"catch":function(a){return e.then(null,a)},pipe:function(){var a=arguments;return r.Deferred(function(b){r.each(c,function(c,d){var e=r.isFunction(a[d[4]])&&a[d[4]];f[d[1]](function(){var a=e&&e.apply(this,arguments);a&&r.isFunction(a.promise)?a.promise().progress(b.notify).done(b.resolve).fail(b.reject):b[d[0]+"With"](this,e?[a]:arguments)})}),a=null}).promise()},then:function(b,d,e){var f=0;function g(b,c,d,e){return function(){var h=this,i=arguments,j=function(){var a,j;if(!(b=f&&(d!==N&&(h=void 0,i=[a]),c.rejectWith(h,i))}};b?k():(r.Deferred.getStackHook&&(k.stackTrace=r.Deferred.getStackHook()),a.setTimeout(k))}}return r.Deferred(function(a){c[0][3].add(g(0,a,r.isFunction(e)?e:M,a.notifyWith)),c[1][3].add(g(0,a,r.isFunction(b)?b:M)),c[2][3].add(g(0,a,r.isFunction(d)?d:N))}).promise()},promise:function(a){return null!=a?r.extend(a,e):e}},f={};return r.each(c,function(a,b){var g=b[2],h=b[5];e[b[1]]=g.add,h&&g.add(function(){d=h},c[3-a][2].disable,c[0][2].lock),g.add(b[3].fire),f[b[0]]=function(){return f[b[0]+"With"](this===f?void 0:this,arguments),this},f[b[0]+"With"]=g.fireWith}),e.promise(f),b&&b.call(f,f),f},when:function(a){var b=arguments.length,c=b,d=Array(c),e=f.call(arguments),g=r.Deferred(),h=function(a){return function(c){d[a]=this,e[a]=arguments.length>1?f.call(arguments):c,--b||g.resolveWith(d,e)}};if(b<=1&&(O(a,g.done(h(c)).resolve,g.reject),"pending"===g.state()||r.isFunction(e[c]&&e[c].then)))return g.then();while(c--)O(e[c],h(c),g.reject);return g.promise()}});var P=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;r.Deferred.exceptionHook=function(b,c){a.console&&a.console.warn&&b&&P.test(b.name)&&a.console.warn("jQuery.Deferred exception: "+b.message,b.stack,c)},r.readyException=function(b){a.setTimeout(function(){throw b})};var Q=r.Deferred();r.fn.ready=function(a){return Q.then(a)["catch"](function(a){r.readyException(a)}),this},r.extend({isReady:!1,readyWait:1,holdReady:function(a){a?r.readyWait++:r.ready(!0)},ready:function(a){(a===!0?--r.readyWait:r.isReady)||(r.isReady=!0,a!==!0&&--r.readyWait>0||Q.resolveWith(d,[r]))}}),r.ready.then=Q.then;function R(){d.removeEventListener("DOMContentLoaded",R), +a.removeEventListener("load",R),r.ready()}"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(r.ready):(d.addEventListener("DOMContentLoaded",R),a.addEventListener("load",R));var S=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===r.type(c)){e=!0;for(h in c)S(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,r.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(r(a),c)})),b))for(;h1,null,!0)},removeData:function(a){return this.each(function(){W.remove(this,a)})}}),r.extend({queue:function(a,b,c){var d;if(a)return b=(b||"fx")+"queue",d=V.get(a,b),c&&(!d||r.isArray(c)?d=V.access(a,b,r.makeArray(c)):d.push(c)),d||[]},dequeue:function(a,b){b=b||"fx";var c=r.queue(a,b),d=c.length,e=c.shift(),f=r._queueHooks(a,b),g=function(){r.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return V.get(a,c)||V.access(a,c,{empty:r.Callbacks("once memory").add(function(){V.remove(a,[b+"queue",c])})})}}),r.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length\x20\t\r\n\f]+)/i,ka=/^$|\/(?:java|ecma)script/i,la={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};la.optgroup=la.option,la.tbody=la.tfoot=la.colgroup=la.caption=la.thead,la.th=la.td;function ma(a,b){var c;return c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&r.nodeName(a,b)?r.merge([a],c):c}function na(a,b){for(var c=0,d=a.length;c-1)e&&e.push(f);else if(j=r.contains(f.ownerDocument,f),g=ma(l.appendChild(f),"script"),j&&na(g),c){k=0;while(f=g[k++])ka.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),o.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="",o.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var qa=d.documentElement,ra=/^key/,sa=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ta=/^([^.]*)(?:\.(.+)|)/;function ua(){return!0}function va(){return!1}function wa(){try{return d.activeElement}catch(a){}}function xa(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)xa(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=va;else if(!e)return a;return 1===f&&(g=e,e=function(a){return r().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=r.guid++)),a.each(function(){r.event.add(this,b,e,d,c)})}r.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.get(a);if(q){c.handler&&(f=c,c=f.handler,e=f.selector),e&&r.find.matchesSelector(qa,e),c.guid||(c.guid=r.guid++),(i=q.events)||(i=q.events={}),(g=q.handle)||(g=q.handle=function(b){return"undefined"!=typeof r&&r.event.triggered!==b.type?r.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(K)||[""],j=b.length;while(j--)h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n&&(l=r.event.special[n]||{},n=(e?l.delegateType:l.bindType)||n,l=r.event.special[n]||{},k=r.extend({type:n,origType:p,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&r.expr.match.needsContext.test(e),namespace:o.join(".")},f),(m=i[n])||(m=i[n]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,o,g)!==!1||a.addEventListener&&a.addEventListener(n,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),r.event.global[n]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,n,o,p,q=V.hasData(a)&&V.get(a);if(q&&(i=q.events)){b=(b||"").match(K)||[""],j=b.length;while(j--)if(h=ta.exec(b[j])||[],n=p=h[1],o=(h[2]||"").split(".").sort(),n){l=r.event.special[n]||{},n=(d?l.delegateType:l.bindType)||n,m=i[n]||[],h=h[2]&&new RegExp("(^|\\.)"+o.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&p!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,o,q.handle)!==!1||r.removeEvent(a,n,q.handle),delete i[n])}else for(n in i)r.event.remove(a,n+b[j],c,d,!0);r.isEmptyObject(i)&&V.remove(a,"handle events")}},dispatch:function(a){var b=r.event.fix(a),c,d,e,f,g,h,i=new Array(arguments.length),j=(V.get(this,"events")||{})[b.type]||[],k=r.event.special[b.type]||{};for(i[0]=b,c=1;c=1))for(;j!==this;j=j.parentNode||this)if(1===j.nodeType&&("click"!==a.type||j.disabled!==!0)){for(f=[],g={},c=0;c-1:r.find(e,this,null,[j]).length),g[e]&&f.push(d);f.length&&h.push({elem:j,handlers:f})}return j=this,i\x20\t\r\n\f]*)[^>]*)\/>/gi,za=/\s*$/g;function Da(a,b){return r.nodeName(a,"table")&&r.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a:a}function Ea(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function Fa(a){var b=Ba.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function Ga(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(V.hasData(a)&&(f=V.access(a),g=V.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;c1&&"string"==typeof q&&!o.checkClone&&Aa.test(q))return a.each(function(e){var f=a.eq(e);s&&(b[0]=q.call(this,e,f.html())),Ia(f,b,c,d)});if(m&&(e=pa(b,a[0].ownerDocument,!1,a,d),f=e.firstChild,1===e.childNodes.length&&(e=f),f||d)){for(h=r.map(ma(e,"script"),Ea),i=h.length;l")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=r.contains(a.ownerDocument,a);if(!(o.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||r.isXMLDoc(a)))for(g=ma(h),f=ma(a),d=0,e=f.length;d0&&na(g,!i&&ma(a,"script")),h},cleanData:function(a){for(var b,c,d,e=r.event.special,f=0;void 0!==(c=a[f]);f++)if(T(c)){if(b=c[V.expando]){if(b.events)for(d in b.events)e[d]?r.event.remove(c,d):r.removeEvent(c,d,b.handle);c[V.expando]=void 0}c[W.expando]&&(c[W.expando]=void 0)}}}),r.fn.extend({detach:function(a){return Ja(this,a,!0)},remove:function(a){return Ja(this,a)},text:function(a){return S(this,function(a){return void 0===a?r.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.appendChild(a)}})},prepend:function(){return Ia(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=Da(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return Ia(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(r.cleanData(ma(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null!=a&&a,b=null==b?a:b,this.map(function(){return r.clone(this,a,b)})},html:function(a){return S(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!za.test(a)&&!la[(ja.exec(a)||["",""])[1].toLowerCase()]){a=r.htmlPrefilter(a);try{for(;c1)}});function Ya(a,b,c,d,e){return new Ya.prototype.init(a,b,c,d,e)}r.Tween=Ya,Ya.prototype={constructor:Ya,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||r.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(r.cssNumber[c]?"":"px")},cur:function(){var a=Ya.propHooks[this.prop];return a&&a.get?a.get(this):Ya.propHooks._default.get(this)},run:function(a){var b,c=Ya.propHooks[this.prop];return this.options.duration?this.pos=b=r.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ya.propHooks._default.set(this),this}},Ya.prototype.init.prototype=Ya.prototype,Ya.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=r.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){r.fx.step[a.prop]?r.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[r.cssProps[a.prop]]&&!r.cssHooks[a.prop]?a.elem[a.prop]=a.now:r.style(a.elem,a.prop,a.now+a.unit)}}},Ya.propHooks.scrollTop=Ya.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},r.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},r.fx=Ya.prototype.init,r.fx.step={};var Za,$a,_a=/^(?:toggle|show|hide)$/,ab=/queueHooks$/;function bb(){$a&&(a.requestAnimationFrame(bb),r.fx.tick())}function cb(){return a.setTimeout(function(){Za=void 0}),Za=r.now()}function db(a,b){var c,d=0,e={height:a};for(b=b?1:0;d<4;d+=2-b)c=ba[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function eb(a,b,c){for(var d,e=(hb.tweeners[b]||[]).concat(hb.tweeners["*"]),f=0,g=e.length;f1)},removeAttr:function(a){return this.each(function(){r.removeAttr(this,a)})}}),r.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?r.prop(a,b,c):(1===f&&r.isXMLDoc(a)||(e=r.attrHooks[b.toLowerCase()]||(r.expr.match.bool.test(b)?ib:void 0)), +void 0!==c?null===c?void r.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=r.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!o.radioValue&&"radio"===b&&r.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d=0,e=b&&b.match(K);if(e&&1===a.nodeType)while(c=e[d++])a.removeAttribute(c)}}),ib={set:function(a,b,c){return b===!1?r.removeAttr(a,c):a.setAttribute(c,c),c}},r.each(r.expr.match.bool.source.match(/\w+/g),function(a,b){var c=jb[b]||r.find.attr;jb[b]=function(a,b,d){var e,f,g=b.toLowerCase();return d||(f=jb[g],jb[g]=e,e=null!=c(a,b,d)?g:null,jb[g]=f),e}});var kb=/^(?:input|select|textarea|button)$/i,lb=/^(?:a|area)$/i;r.fn.extend({prop:function(a,b){return S(this,r.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[r.propFix[a]||a]})}}),r.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&r.isXMLDoc(a)||(b=r.propFix[b]||b,e=r.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=r.find.attr(a,"tabindex");return b?parseInt(b,10):kb.test(a.nodeName)||lb.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),o.optSelected||(r.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),r.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){r.propFix[this.toLowerCase()]=this});function mb(a){var b=a.match(K)||[];return b.join(" ")}function nb(a){return a.getAttribute&&a.getAttribute("class")||""}r.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).addClass(a.call(this,b,nb(this)))});if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(r.isFunction(a))return this.each(function(b){r(this).removeClass(a.call(this,b,nb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(K)||[];while(c=this[i++])if(e=nb(c),d=1===c.nodeType&&" "+mb(e)+" "){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=mb(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):r.isFunction(a)?this.each(function(c){r(this).toggleClass(a.call(this,c,nb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=r(this),f=a.match(K)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=nb(this),b&&V.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":V.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+mb(nb(c))+" ").indexOf(b)>-1)return!0;return!1}});var ob=/\r/g;r.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=r.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,r(this).val()):a,null==e?e="":"number"==typeof e?e+="":r.isArray(e)&&(e=r.map(e,function(a){return null==a?"":a+""})),b=r.valHooks[this.type]||r.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=r.valHooks[e.type]||r.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(ob,""):null==c?"":c)}}}),r.extend({valHooks:{option:{get:function(a){var b=r.find.attr(a,"value");return null!=b?b:mb(r.text(a))}},select:{get:function(a){var b,c,d,e=a.options,f=a.selectedIndex,g="select-one"===a.type,h=g?null:[],i=g?f+1:e.length;for(d=f<0?i:g?f:0;d-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),r.each(["radio","checkbox"],function(){r.valHooks[this]={set:function(a,b){if(r.isArray(b))return a.checked=r.inArray(r(a).val(),b)>-1}},o.checkOn||(r.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var pb=/^(?:focusinfocus|focusoutblur)$/;r.extend(r.event,{trigger:function(b,c,e,f){var g,h,i,j,k,m,n,o=[e||d],p=l.call(b,"type")?b.type:b,q=l.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!pb.test(p+r.event.triggered)&&(p.indexOf(".")>-1&&(q=p.split("."),p=q.shift(),q.sort()),k=p.indexOf(":")<0&&"on"+p,b=b[r.expando]?b:new r.Event(p,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=q.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:r.makeArray(c,[b]),n=r.event.special[p]||{},f||!n.trigger||n.trigger.apply(e,c)!==!1)){if(!f&&!n.noBubble&&!r.isWindow(e)){for(j=n.delegateType||p,pb.test(j+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),i=h;i===(e.ownerDocument||d)&&o.push(i.defaultView||i.parentWindow||a)}g=0;while((h=o[g++])&&!b.isPropagationStopped())b.type=g>1?j:n.bindType||p,m=(V.get(h,"events")||{})[b.type]&&V.get(h,"handle"),m&&m.apply(h,c),m=k&&h[k],m&&m.apply&&T(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=p,f||b.isDefaultPrevented()||n._default&&n._default.apply(o.pop(),c)!==!1||!T(e)||k&&r.isFunction(e[p])&&!r.isWindow(e)&&(i=e[k],i&&(e[k]=null),r.event.triggered=p,e[p](),r.event.triggered=void 0,i&&(e[k]=i)),b.result}},simulate:function(a,b,c){var d=r.extend(new r.Event,c,{type:a,isSimulated:!0});r.event.trigger(d,null,b)}}),r.fn.extend({trigger:function(a,b){return this.each(function(){r.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c)return r.event.trigger(a,b,c,!0)}}),r.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(a,b){r.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),r.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),o.focusin="onfocusin"in a,o.focusin||r.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){r.event.simulate(b,a.target,r.event.fix(a))};r.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=V.access(d,b);e||d.addEventListener(a,c,!0),V.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=V.access(d,b)-1;e?V.access(d,b,e):(d.removeEventListener(a,c,!0),V.remove(d,b))}}});var qb=a.location,rb=r.now(),sb=/\?/;r.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||r.error("Invalid XML: "+b),c};var tb=/\[\]$/,ub=/\r?\n/g,vb=/^(?:submit|button|image|reset|file)$/i,wb=/^(?:input|select|textarea|keygen)/i;function xb(a,b,c,d){var e;if(r.isArray(b))r.each(b,function(b,e){c||tb.test(a)?d(a,e):xb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==r.type(b))d(a,b);else for(e in b)xb(a+"["+e+"]",b[e],c,d)}r.param=function(a,b){var c,d=[],e=function(a,b){var c=r.isFunction(b)?b():b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(null==c?"":c)};if(r.isArray(a)||a.jquery&&!r.isPlainObject(a))r.each(a,function(){e(this.name,this.value)});else for(c in a)xb(c,a[c],b,e);return d.join("&")},r.fn.extend({serialize:function(){return r.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=r.prop(this,"elements");return a?r.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!r(this).is(":disabled")&&wb.test(this.nodeName)&&!vb.test(a)&&(this.checked||!ia.test(a))}).map(function(a,b){var c=r(this).val();return null==c?null:r.isArray(c)?r.map(c,function(a){return{name:b.name,value:a.replace(ub,"\r\n")}}):{name:b.name,value:c.replace(ub,"\r\n")}}).get()}});var yb=/%20/g,zb=/#.*$/,Ab=/([?&])_=[^&]*/,Bb=/^(.*?):[ \t]*([^\r\n]*)$/gm,Cb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Db=/^(?:GET|HEAD)$/,Eb=/^\/\//,Fb={},Gb={},Hb="*/".concat("*"),Ib=d.createElement("a");Ib.href=qb.href;function Jb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(K)||[];if(r.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Kb(a,b,c,d){var e={},f=a===Gb;function g(h){var i;return e[h]=!0,r.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Lb(a,b){var c,d,e=r.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&r.extend(!0,a,d),a}function Mb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}if(f)return f!==i[0]&&i.unshift(f),c[f]}function Nb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}r.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:qb.href,type:"GET",isLocal:Cb.test(qb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Hb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":r.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Lb(Lb(a,r.ajaxSettings),b):Lb(r.ajaxSettings,a)},ajaxPrefilter:Jb(Fb),ajaxTransport:Jb(Gb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m,n,o=r.ajaxSetup({},c),p=o.context||o,q=o.context&&(p.nodeType||p.jquery)?r(p):r.event,s=r.Deferred(),t=r.Callbacks("once memory"),u=o.statusCode||{},v={},w={},x="canceled",y={readyState:0,getResponseHeader:function(a){var b;if(k){if(!h){h={};while(b=Bb.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return k?g:null},setRequestHeader:function(a,b){return null==k&&(a=w[a.toLowerCase()]=w[a.toLowerCase()]||a,v[a]=b),this},overrideMimeType:function(a){return null==k&&(o.mimeType=a),this},statusCode:function(a){var b;if(a)if(k)y.always(a[y.status]);else for(b in a)u[b]=[u[b],a[b]];return this},abort:function(a){var b=a||x;return e&&e.abort(b),A(0,b),this}};if(s.promise(y),o.url=((b||o.url||qb.href)+"").replace(Eb,qb.protocol+"//"),o.type=c.method||c.type||o.method||o.type,o.dataTypes=(o.dataType||"*").toLowerCase().match(K)||[""],null==o.crossDomain){j=d.createElement("a");try{j.href=o.url,j.href=j.href,o.crossDomain=Ib.protocol+"//"+Ib.host!=j.protocol+"//"+j.host}catch(z){o.crossDomain=!0}}if(o.data&&o.processData&&"string"!=typeof o.data&&(o.data=r.param(o.data,o.traditional)),Kb(Fb,o,c,y),k)return y;l=r.event&&o.global,l&&0===r.active++&&r.event.trigger("ajaxStart"),o.type=o.type.toUpperCase(),o.hasContent=!Db.test(o.type),f=o.url.replace(zb,""),o.hasContent?o.data&&o.processData&&0===(o.contentType||"").indexOf("application/x-www-form-urlencoded")&&(o.data=o.data.replace(yb,"+")):(n=o.url.slice(f.length),o.data&&(f+=(sb.test(f)?"&":"?")+o.data,delete o.data),o.cache===!1&&(f=f.replace(Ab,"$1"),n=(sb.test(f)?"&":"?")+"_="+rb++ +n),o.url=f+n),o.ifModified&&(r.lastModified[f]&&y.setRequestHeader("If-Modified-Since",r.lastModified[f]),r.etag[f]&&y.setRequestHeader("If-None-Match",r.etag[f])),(o.data&&o.hasContent&&o.contentType!==!1||c.contentType)&&y.setRequestHeader("Content-Type",o.contentType),y.setRequestHeader("Accept",o.dataTypes[0]&&o.accepts[o.dataTypes[0]]?o.accepts[o.dataTypes[0]]+("*"!==o.dataTypes[0]?", "+Hb+"; q=0.01":""):o.accepts["*"]);for(m in o.headers)y.setRequestHeader(m,o.headers[m]);if(o.beforeSend&&(o.beforeSend.call(p,y,o)===!1||k))return y.abort();if(x="abort",t.add(o.complete),y.done(o.success),y.fail(o.error),e=Kb(Gb,o,c,y)){if(y.readyState=1,l&&q.trigger("ajaxSend",[y,o]),k)return y;o.async&&o.timeout>0&&(i=a.setTimeout(function(){y.abort("timeout")},o.timeout));try{k=!1,e.send(v,A)}catch(z){if(k)throw z;A(-1,z)}}else A(-1,"No Transport");function A(b,c,d,h){var j,m,n,v,w,x=c;k||(k=!0,i&&a.clearTimeout(i),e=void 0,g=h||"",y.readyState=b>0?4:0,j=b>=200&&b<300||304===b,d&&(v=Mb(o,y,d)),v=Nb(o,v,y,j),j?(o.ifModified&&(w=y.getResponseHeader("Last-Modified"),w&&(r.lastModified[f]=w),w=y.getResponseHeader("etag"),w&&(r.etag[f]=w)),204===b||"HEAD"===o.type?x="nocontent":304===b?x="notmodified":(x=v.state,m=v.data,n=v.error,j=!n)):(n=x,!b&&x||(x="error",b<0&&(b=0))),y.status=b,y.statusText=(c||x)+"",j?s.resolveWith(p,[m,x,y]):s.rejectWith(p,[y,x,n]),y.statusCode(u),u=void 0,l&&q.trigger(j?"ajaxSuccess":"ajaxError",[y,o,j?m:n]),t.fireWith(p,[y,x]),l&&(q.trigger("ajaxComplete",[y,o]),--r.active||r.event.trigger("ajaxStop")))}return y},getJSON:function(a,b,c){return r.get(a,b,c,"json")},getScript:function(a,b){return r.get(a,void 0,b,"script")}}),r.each(["get","post"],function(a,b){r[b]=function(a,c,d,e){return r.isFunction(c)&&(e=e||d,d=c,c=void 0),r.ajax(r.extend({url:a,type:b,dataType:e,data:c,success:d},r.isPlainObject(a)&&a))}}),r._evalUrl=function(a){return r.ajax({url:a,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},r.fn.extend({wrapAll:function(a){var b;return this[0]&&(r.isFunction(a)&&(a=a.call(this[0])),b=r(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this},wrapInner:function(a){return r.isFunction(a)?this.each(function(b){r(this).wrapInner(a.call(this,b))}):this.each(function(){var b=r(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=r.isFunction(a);return this.each(function(c){r(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(a){return this.parent(a).not("body").each(function(){r(this).replaceWith(this.childNodes)}),this}}),r.expr.pseudos.hidden=function(a){return!r.expr.pseudos.visible(a)},r.expr.pseudos.visible=function(a){return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)},r.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Ob={0:200,1223:204},Pb=r.ajaxSettings.xhr();o.cors=!!Pb&&"withCredentials"in Pb,o.ajax=Pb=!!Pb,r.ajaxTransport(function(b){var c,d;if(o.cors||Pb&&!b.crossDomain)return{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Ob[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}}),r.ajaxPrefilter(function(a){a.crossDomain&&(a.contents.script=!1)}),r.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return r.globalEval(a),a}}}),r.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),r.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=r("